« first day (653 days earlier)      last day (4297 days later) » 

5:05 PM
@rubenvb interesting
I wonder how that one is gonna do against android
 
Me too. Probably it will be a gimmick and not really break through.
Corporations don't like "Open Standards" and "Open systems".
 
Did you know: before invoking a JNI member, Java will make sure that there's enough room for the native code to hold references to at least 16 java objects?
 
Nice, @Xeo is always first to tag questions with as well. I rarely need to fix that nowadays :P
 
@rubenvb It's for some virtual function But yea, that looks ok. But -Wno-unused-parameter looks better.
 
I can't imagine being limited to 16 references/pointers. That's insane
 
5:20 PM
@MooingDuck You can make those be references to arrays, no?
 
@MooingDuck JNI?
 
Java Native Interface
 
@R.MartinhoFernandes yes, but you have to explicitly release the references when iterating over the array, since it doesn't guarantee that you can reference more than 16 objects.
 
@R.MartinhoFernandes but but but:
> C++11 feels like a new language — the pieces just fit together better.
 
@FredOverflow If there's to be only one tag, that is .
 
5:22 PM
@FredOverflow Cpp11 *coolLang = new Cpp11()?
 
@R.MartinhoFernandes Can't we just remove the C++0x and C++11 tags?
@Drise You are missing a pointer. Which is probably a good sign :)
 
@R.MartinhoFernandes Can't have + as part of a type name.
 
@FredOverflow No, because @MooingDuck edited my answer to add the "11" yeesterday.
 
@FredOverflow I think the tag is helpful and on that basis don't approve its removal.
 
5:23 PM
Guys,I am looking for some Open Source C++ Projects to contribute to...I have a beginner level experience...can any one direct me to some projects?
 
4
A: const array declaration in C++ header file

rubenvbThis works just fine in C++11 class AppSettings{ public: static constexpr float noteFrequency[36] = { // C C# D D# E F F# G G# A A# B 130.81, 138.59, 146.83, 155.56, 164.81, 174.61, 185.00, 196.00, 207.65, 220.00, 223.08, 246...

 
was already made a synonym of , so it's practically gone.
 
@FredOverflow I always do, and it always yells at me telling my I'm trying to convert from a scalar to non-scalar type
 
Morning
 
I also think the tag is helpful for the time being but it's true I've observed that its need is waning. That's great!
 
5:24 PM
howzitgoin
 
There is still reason for the old stuff to survive. For code compiling against the 03 standard.
 
@nikel Interesting question. I remember I wanted to do that when I was starting, too, but didn't find anything.
 
@nikel I don't think contributing to a C++ project as a beginner is such a good idea. You might break a lot of stuff without knowing it. You should at least know the basics such as RAII and the rule of three and stuff.
 
Well...i have to do things as a part of my curriculum and i have a decent experience i suppose
 
@Drise How about auto cpp11 = new Language(); instead? :)
 
5:25 PM
If you could give some pointers on some SMALL projects to fix bugs
I would be happy to try:)
 
@FredOverflow Nice. I wish I could use more 11. I would have done it that way if I did it by habit.
 
@nikel Sorry, I have no experience contributing to open source projects. Good luck!
 
@nikel Pick some open-source program you already know and use and check their bug tracker.
 
I hate these dell keyboards. I feel like I'm in the late 90's
 
The point is that,all those get very complex for me as a beginner
 
5:26 PM
@FredOverflow How about not using new?
 
If I were to start in open-source, I'd choose chromium
 
@Drise Or even better, auto cpp11 = make_unique<Language>(); but that sounds stupid :)
 
again,m a beginner
 
@LuchianGrigore Use the up arrow.
 
Cpp11_feels_like a = new Language();   // now let's move on to other topics
 
5:27 PM
@Drise nice!!!
 
@FredOverflow You're the one who keeps it going.
 
@LuchianGrigore You honestly didn't know that? :)
 
I'm new to chat
 
@Drise Me and my stupid perfectionism :(
@LuchianGrigore Really? I swer I have seen your avatar before.
 
@FredOverflow He is. Though I would have expected him here sooner.
 
5:28 PM
@FredOverflow he answers lots of questions, just new to chat
 
From SO no doubt
 
@FredOverflow conversion from ‘Cpp11_feels_like*’ to non-scalar type ‘Cpp11_feels_like’ requested
@FredOverflow He's all over SO.
I HATE THIS KEYBOARD!
 
 
5:36 PM
hmm, it also appears that jni allows you to randomly access all privates of all types, but I haven't tested yet.
 
0
Q: how to pass array with *& in C++

m_pahlevanzadehI read the dynamic array and use it, but i have a bit question: When i put following format in prototype: void mmyfunc(int *& myArray) { //implementation } 1.if i pass an array to it, how to call it? because i get : no matching function for call to 2.When i use the following implement...

Wear goggles.
 
Well, it's not that bad.
(int *)new int[size];
Alert! Former C programmer detected!
 
@EtiennedeMartel Erm.
@EtiennedeMartel The memory allocated on that line will just leak.
 
C programmers don't cast
 
You call 8K large? hello world is 500K on MinGW ;) — FredOverflow 8 secs ago
 
5:40 PM
Oh, right.
 
The code is so haphazard I don't even know where to begin.
 
@EtiennedeMartel it's actually C that doesn't require the cast.
 
Hmm stackoverflow doesn't seem to be finding my gravatar account...
 
Always forget about that one.
 
@Tocs it takes some time until it does.
 
5:42 PM
I don't get what the if is for either.
Looks like this resize function takes an index of an item that is not to be copied when resizing (WTF?).
And that makes it UB when that index is the last one.
 
bummer
 
Actually, it's worse.
 
@R.MartinhoFernandes He probably wants to make space when inserting somewhere in the middle, but for that, he needs a read index and a write index. It won't work with just one.
 
It tries to copy a number of elements equal to the new size.
 
Anyway, very terrible code. He should just ditch the whole thing and use std::vector. Or quit coding and become a baker.
 
5:43 PM
Ow.
How do you know he's good at baking?
 
Hum
 
Are you afraid he's gonna poison people by accident? ;)
 
Baking is easy, just puff puff pass
 
is uppercase & actually "Et" ?
 
I mean, even I can cook and bake. Can't be that hard.
@kbok I don't think there are uppercase operators.
 
Ell
5:45 PM
hi guys
 
@FredOverflow I mean the character, when you look at it in the question title:
0
Q: how to pass array with *& in C++

m_pahlevanzadehI read the dynamic array and use it, but i have a bit question: When i put following format in prototype: void mmyfunc(int *& myArray) { //implementation } 1.if i pass an array to it, how to call it? because i get : no matching function for call to 2.When i use the following implement...

 
(Not the one oneboxed, but when you follow the link)
 
That's just because of the font.
According to the UCD, & has no uppercase variant.
 
Ok :)
But that's a "Et", right ?
 
5:47 PM
@kbok it's "ampersand"
@kbok "This symbol is a ligature of the letters in et, Latin for "and"." huh
 
Xeo
@R.MartinhoFernandes The tag pops up every so often on old questions, though, and you can't specifically search for it :s
 
@MooingDuck Ah, cool, I learnt something today
 
@Xeo I don't see a problem with that. The information there is probably not entirely up-to-date anyway.
 
Screenshot because I'm not crazy:
 
Ell
asterisk ampersand
 
5:52 PM
@MooingDuck That is correct, but still, the uppercase version of + is not Plus :)
 
1
Q: Segmentation fault at the end of destructor

bartgolI don't know if this question is going to be clear, since I can't give too many details (I'm using a TPL and wrote a huge amount of lines myself). But I'll give it a try. I am experiencing a segmentation fault which I can't understand. There is a structure (which I didn't design but should be we...

 
Ewwwwwwwwww.
 
Psychic debugging required
 
I'd vote for single resource handlers instead.
 
I'd guess its a member variable's destructor ...
 
5:56 PM
My crystal ball says "double deletes".
 
It's quite likely a rule of three violation.
Still, that's a silly destructor.
 
You could speed it up slightly by not writing beyond the end of each array. — Mike Seymour 4 mins ago
 
@R.MartinhoFernandes I hate it when people set pointers to null immediately before they go out of scope.
 
@FredOverflow Because blah blah something. What's the usual excuse anyway?
 
It hides programming errors instead of making them jump in your face.
@Prætorian haha that's golden
 
5:59 PM
@FredOverflow I know! He deserves some rep for that
 
Got tired, went home, ate some food, immediately started missing programming. The only cure is TF2.
3
I'm tired, going home, and then I'll eat some food. Will probably miss programming, but I won't play TF2.
Later.
 
know what? I hate JNI. I can't figure out how to get a member thats an array. I can get a member thats anything-but-an-array. but not an array.
 
why should simple joke about negro lips or jewish nose be flagged? huh.
he he :-)
@MooingDuck read the docs?
 
@R.MartinhoFernandes if you had another reference, now dereferencing those pointers blows up instead of silently working. If you don't null them out, then dereferencing silently "works", but it blows up on the double-delete.
@Cheersandhth.-Alf I am reading the docs :(
 
0
A: better method for initializing array

FredOverflowI would probably use the memset approach, but I would definitely want to make sure that it doesn't break when more complex data members are added to CHOLDELEM: CHOLDELEM() { static_assert(std::is_trivially_copyable<CHOLDELEM>::value, "It is no longer safe to use memse...

 
6:07 PM
@Cheersandhth.-Alf oh I found it, it's in a completely unrelated section of the docs. no wait, this is reading values from an array.
 
ain't it always so...
 
@Cheers You are always welcome to correct factual errors in my answers. — FredOverflow 2 hours ago
 
@Cheersandhth.-Alf according to SO, the correct way is to get the array as an jobject, and then static_cast it to an jarray. Awesome.
 
sounds reasonable
@Fred: the idea was, that you would correct, then I'd remove the downvote, yes? less work for me, you see. ;-) — Cheers and hth. - Alf 1 min ago
 
@MikeSeymour, I'm sorry I didn't get it. What do you mean? — vinao xd 8 mins ago
@Prætorian lol
 
6:24 PM
what is the type of u8"bla<insert non-ascii here>h"?
 
const char8_t[] most likely.
If there is that type.
I don't remember.
Might just be const char[], but always interpreted as UTF-8.
 
there isn't, it's const char[]
the only new primitive types are char16_t and char32_t
 
so, utf-8 is bytes, u"whatever" is codepoints?
Oh, I didn't read the next couple of paragraphs, my bad :(
 
thanks
 
6:28 PM
Why do they put the _t? they don't do things like vector_t or unique_ptr_t...
 
.@aaronvegh That's criminal. Here in Montreal, we have schools charging 16K for 8 months of "intensive" Visual Basic/C#/Java. :-(
 
@Tocs that's a good question to which I doubt there is a good answer
 
@KeithLayne They're all code units.
 
@Tocs a lot of C code has had _t names for standard stuff for a long time. C++ just inherited it for C++11 for some reason. Something to do with POSIX
 
@LucDanton I read 2.14.5, got it (better, anyway) now I think.
 
6:30 PM
@MooingDuck :/ still looks ugly
 
@Tocs I agree completely
 
@Nils Good thing those are Canadian dollars.
 
lol
I don't know what they are worth
 
A small fraction less than US dollars (unless it's changed a lot) if that helps.
 
Pretty much the same as USD.
 
6:34 PM
@MooingDuck Tradition has it that the _t suffix is reserved for type synonyms. I can't quite figure out what C11 has to say about char32_t though, I'm not familiar enough with the C Standard.
In any case in the absence of overloading I don't see why they would bother with a new type.
 
in PHP, 1 min ago, by SomeKittens
PHP room in two sentences:
"Oh, you're not an expert already? Let me insult you for your attempts to learn."
Oh, so we're not so different after all.
 
@EtiennedeMartel I was going to say that...
The key difference is, here we actually have experts.
 
@EtiennedeMartel Earlier today, the folks in the C# room were exchanging sick jokes about microwaving children.
 
6:43 PM
They probably have experts too. It's just that being an expert in PHP is not worth much.
Goes to show that no matter what language, framework, paradigm or platform you're using, if you write code, you're a douchebag.
 
@EtiennedeMartel I'm not a douchebag ):
Oh, wait.
 
@KeithLayne It's annoyingly char const[N].
 
I am, sometimes.
 
You're probably one, deep down.
 
I wanted to take advantage of this for ogonek, by offering implicit conversions from u8"blah", u"blah", and U"blah" to ogonek::text, but I can't do so for u8..
 
6:45 PM
):
 
The worse a language is, the more it's worth being an expert in it. I mean a real expert. Knowing all the pitfalls & traps of PHP must be worth a lot.
 
@R.MartinhoFernandes Settling on "foo"_u8?
 
@LucDanton That would have to be u8"foo"_u8 anyway.
 
Wait, that's dumb because it should be u8"foo"_u8. So uh better pick u8"foo"_text.
 
Kinda messy.
 
6:47 PM
morning
 
Hey :3
 
@LucDanton Yeah, that's better.
 
What's the fancy way of doing web server stuff since PHP is so terrible?
 
But still not workable.
There's no way operator"" _text can be sure the input is UTF-8 encoded.
 
How so :v
 
6:48 PM
For the same reason the implicit ctor won't work.
There's no distinction between "foo"_text and u8"foo"_text.
 
Oh yeah, didn't have that problem because my only literal op return std::string for that one so.
 
The only way is to assume every char array is UTF8.
 
Too dangerous for what I'm aiming.
I'm sticking with a ctor that takes an encoding parameter.
 
6:51 PM
I'll only assume the encoding on char16_t and char32_t. I think those are safe.
 
U"blah"_text could still be useful though, no? Is ease of manipulating codepoints still a goal?
 
God. MFC is the WORST gui framework I've ever worked with.
 
Well, valid ASCII is also valid UTF8.
 
@EtiennedeMartel But valid latin-1 isn't.
 
6:52 PM
"ç"_text vs u8"ç"_text.
 
@Drise VS writes half of the code for you. I like that.
 
@LuchianGrigore Winforms is alright. It's logical. MFC is just fuckin bizarre.
 
@Drise yes it is
 
@LucDanton Yes, that will work. I think it's safe to allow implicit conversion from U"blah".
 
You need variables to reference the objects? Why don't I just use the objects themselves, or why don't the variables come precreated when I add the object?
 
6:54 PM
You should threat a char * as a raw sequence of bytes and force the user to specify the encoding for those bytes.
 
@Drise I guess Apples crap from 92' wasn't better but they threw it away at least.
 
The only way to create a non-UTF-32 array of char32_t is by hand.
And if you're doing that... WTF?
@EtiennedeMartel Yeah, that I'll do.
 
I need some bizarre null terminated string to pass to objects? Wtf?
The whole thing is a mess.
 
ogonek::operator"" _text(alias<char32_t> { /* evil */ }); // This is totally legit
 
@Drise keep your hands away from Mfc
it's just a waste of time and nerves
 
6:55 PM
@Nils I tried, but I just finished an exam where you have to build one.
 
ouh
 
@LucDanton Yes, but so is checking if a chainsaw can cut meat by testing it on your own leg.
 
I honestly prefer Qt or Vb.Net Winforms. At least Qt hides all the stupid boilerplate in QApplication
 
They should have a programmer mofo ad :)
 
6:56 PM
If you put invalid codepoints in there (like above U+10FFFF, or surrogates), then you get a validation failure.
 
@Drise yes me too
Qt is nice
 
Vb.Net is fairly straight forward, and you can create a decent app with minimal amounts of code. I think I made an app that was 20 lines with whitespace, where my roomate made the same one in about 150 in C++ WinForms
 
If you put valid codepoints but give them a meaning different from UTF-32, I don't know why I should care.
 
vb?!
never tried basic since I was 12 or so
Can you use C++ with winforms?
I thought .net only
 
@R.MartinhoFernandes Tormenting you in the chat is more fun than tormenting an actual library with code.
 
6:58 PM
@Nils I admit I am biased because that was my first language. Thanks to .Net, it can do practically everything C++ can..
 
It is quite clear from the standard that char32_t is meant as an UTF-32 codepoint: for starters, both U"\x200000" and U'\x200000' are ill-formed.
 
I'm fucking tired
 
@Nils I wrote a client - server multiplayer "bingo" game. Though I never did finish it.
 
@LucDanton :)
 
7:00 PM
The solution to tiredness is sleeping, in most cases :)
 
@Drise lazy bitch :P
My iPhone app also not finished
 
@Nils There's C++/CLI. You can use it to use managed classes and write managed code that can use unmanaged code.
 
Ell
is winforms managed?
 
@Nils For a moment there I thought that was for @Nils.
 
But the syntax is kinda funky...
 
7:01 PM
@Nils Meh. .Net doesn't support SFTP which was going to be a main feature
 
Then I saw it was yourself.
Yes, I'm tired too.
 
Damn, those guys in C#...
 
@EtiennedeMartel What're they up to now?
 
I wonder if u"\xD800" (lone surrogate) is valid. Technically, there's no way to encode that as UTF-16.
 
@n2liquid Talking about anal, it seems.
 
7:02 PM
meh
 
@EtiennedeMartel Nice.
 
what the hell is there to say about anal except that that's normally an exit and not an entrance
 
@Drise Secure File Transfer Protocol?
 
You know what I say about normality? Yeah.
 
1
Q: Ftp Connection Failure in VB.NET

DriseUsing the code below, I continue to get a "Unable to connect to the remote server" error at Using response as... I'm not quite sure whats wrong or where to look for help. FTP in .NET seems to be seldom used. Ok, second stupid question. EnableSsl != Sftp? Dim FTPrequest As FtpWebRequest = Di...

 
7:03 PM
no
 
ah yeah c# sucks
Ever seen a cook who wants to work at Mc Donalds?
 
@TonyTheLion What about taking your temperature? (That's what the C# guys were talking about)
 
Some brogrammers do it seems.
 
@R.MartinhoFernandes oh yea, taking your temperature, but you can do that in other ways too. You don't have to use that place.
 
@Nils C# is actually quite good.
 
7:05 PM
@R.MartinhoFernandes I didn't bother go looking in the C# room on what exactly they were talking about
I made some assumptions
 
I didn't say there is anything wrong with it.
 
in C#, 32 secs ago, by Nadal
GOD i am being punished to program without version control!!!!!!!!!! my Desktop is a MESSS
@TonyTheLion I can guess which assumptions those were.
 
@R.MartinhoFernandes Ew.
 
I'm off cu
 
it's good when used for the correct purpose, just like most anything else really
@Nils nt
 
7:06 PM
@Nils Bye
 
@Nils Cu means "anus" in portuguese, you know.
 
@TonyTheLion Still plonking me?
 
@R.MartinhoFernandes yes I was being quite obvious about it
now they're flagging anal messages in C#, damn
they don't have to get anal about it
 
> phoenix cannot yet target Cocoa: due to phoenix utilizing C++0x, and Apple not supporting GCC 4.3 or newer in any way over the GPLv3, we are forced to wait until C++0x support is completed in LLVM. phoenix can still target OS X via the Qt target, but this negates the size and native widget advantages.
I'm starting to think that this might be slightly outdated.
 
7:08 PM
Slightly.
 
Oh dear
 
yes, outdated as fuck
 
Come on, you saw application.create() in main. Move on.
 
A comment with 6 flags and 5 stars... nice...
 
7:09 PM
Well it looked interesting so much for that.
 
Hah, there's a LOUNGE(C) chat room now? Cute... :)
 
been there for a while, pretty dead most of the time
 
I hadn't seen it before
but yeah, looked pretty deserted
 
Usually only lights up when we ship someone asking for C help from here to there.
 
> var up = new Exception(); throw up; <--- Cute.
 
7:11 PM
yea
 
@Drise Just link to the answer.
 
oh The Slupik :P
 
@RadekSlupik Hm?
 
var sex = new SecurityException(); <--- pretend that you're 13
 
Not sure how that works.
 
7:13 PM
@LucDanton Sure, I'll do that.
 
@Drise It’s from an answer to a useless question on Stack Overflow.
 
@RadekSlupik No, it's the C# room title.
 
LOL
Those two are not mutually exclusive. :p
 
I got downvoted on an age old answer again
meh
 
owned
I wish I could downvote people.
 
7:14 PM
@LucDanton There you go.
 
1 message moved to bin
That works.
 
@RadekSlupik I like my version better. auto up = new Exception("spaghetti"); throw up;
 
Roman emperors could downvote actual people. I want to have that power too. :(
@Drise :P
You like that until you have to clean it up.
 
@RadekSlupik downvote questions, they are asked by a person, whom is represented through their profile and rep. So indirectly you can downvote people :P
 
@Drise EWwwww, new and throwing by pointer..
@TonyTheLion I always expected downvoting people to be done with bullets.
 
7:16 PM
oh in that way
it's not really acceptable to do that
 
@RadekSlupik I recommend using: catch and #typedef toilet std::cout
 
> BANG! I just downvoted you in the head.
 
@R.MartinhoFernandes It's not supposed to be pretty,
 
This is how downvoting went two thousand years ago.
user image
3
 
7:17 PM
@Drise auto& toilet = std::cout;
 
@LucDanton Much better.
 
toilet << "hi";
 
reStructuredText is awesome, I learned today.
 
@LucDanton I prefer auto &toilet = std::count.
 
I put it down the toilet :P
 
7:18 PM
Just for consistency.
 
@RaphaelR. You lost me.
 
std::ofstream toilet("/dev/null");
toilet << complaints << PHP << annoying_people;
 
but that looks wrong, it's not the address-of operator, but the reference operator
 
@RaphaelR. spaghetti has no consistency in that form.
 
7:31 PM
Cool. I killed the room.
@RadekSlupik Irony: toilet.flush();
 
Ell
haha yes.
 
Can we get a reject vote on the edit for this answer:
132
A: Divide a number by 3 without using *, /, +, -, % operators

CoodeyThere is a simple function I found here. but it's using the + operator, so you have to add the values with the bit-operators: // replaces the + operator int add(int x, int y) { int a, b; do { a = x & y; b = x ^ y; x = a << 1; y = b; } while ...

The edit doesn't compile.
 
woah, done already
 
So how about those olympics, ey? //<-- I'll just leave this here
 
7:46 PM
@LuchianGrigore Tell @DeadMG about it.
 
lol, Lounge(C) in the first row of the chat room grid. That's cute.
 
@DomagojPandža cute? BURN IT WITH FIRE!
 
7:59 PM
@Mysticial 30 days have passed since the branch prediction answer.
No longer the top C++ answerer in the past 30 days :P
 
@LuchianGrigore yeah, I know :(
I was ruling Java too. 3x Jon Skeet. :)
 

« first day (653 days earlier)      last day (4297 days later) »