« first day (644 days earlier)      last day (4304 days later) » 

7:00 PM
What error?
I only compiled stubdata.c and didn't bother with dat -> C conversion.
 
It's a runtime error that that entry point cannot be found in the dll. If I build statically, I get an undefined reference to icudt49_dat.
I think it's the data->C conversion that's not quite right :(
 
@Cheersandhth.-Alf soma...
 
[now playing: various videos with Avril Lavigne, including the one with The Ultimate Stagedive]
hm, to get c++11 range loop i have to restart Visual Studio Express with /useenv
 
argh, my batch file started VS Ultimate, a resource-hogger!
@R.MartinhoFernandes very nice for using msvc 11.0 in visual studio 10.0
 
7:06 PM
Oh.
It's a cheat.
 
it's like, a downgrade to the better previous version, like people used to downgrade from vista to xp (but they payed for it)
 
@Cheersandhth.-Alf You paid for this downgrade.
 
Oh, VS Express. nvm.
Won't you miss out on "great debugging and analysis" stuff though?
 
What? Alf don't need no debugging, yo.
 
7:15 PM
Oh great. I add a png to the repo and GCC ICEs.
 
ICE.
Cold.
Compiller.
 
@R.MartinhoFernandes that makes no sense
 
Kompiller.
 
@keith.layne Yeah, that's why it's remarkable.
 
I seem to have a flair for the obvious lately
On the plus side, my new gravatar is pretty sweet.
 
7:20 PM
lol
 
I'm so infamous for being late that my buddies managed to set me up for tonight. I am to pick them up at 21:45, so I can make it by 22:00 - to be on time.
 
Domagoj Y U NO ON TIME?
 
"\t.align 16\n" /* Either align 8 bytes or 2^8 (256) bytes. 8 bytes is needed. */
That is confusing.
 
Hmm, turns out jenkins was hogging the RAM and GCC was OOMing when compiling the UCD arrays.
 
lol, and I'm worried my command string map things would be a problem size wise.
 
7:23 PM
I would expect something a little more descriptive than ICE
 
hava
nagila hava
nagila hava, nagila venish me ha.
dafuq.
 
Exactly.
 
@R.MartinhoFernandes jenkins, huh?
 
@keith.layne I'm using the build server from work for my personal projects. Don't tell anyone.
 
the cat's out of the bag now
 
7:24 PM
(Don't get the wrong idea, the other folks are ok with it, and I'm the one administering it anyway)
 
^ ah! i hope it works...
 
novel!
 
@rubenvb Since it's a bunch of separate arrays, I could split that TU into several and reduce the memory needs.
Which is probably what I'll do if this happens again.
Woot, ogonek has a logo now.
 
7:33 PM
@Cheersandhth.-Alf didn't work
 
Alf, what is the command-line build tool for VS?
 
ah yeah, does it default to "keep going" on a failure too?
Portal: 64%
 
0
Q: new, () and [] operators all at one instruction | C++

JonasWhy can't I use the new operator like this: char* p; p = new char('a')[3]; delete[] p; Compiler says: error C2143: syntax error : missing ';' before '[' error C3409: empty attribute block is not allowed error C2143: syntax error : missing ']' before 'constant'

 
@chris: No you can't. OP clearly gets a compile error. — trinithis 1 min ago
This guy misunderstood the comment, I see.
And all the answers focus on how to do it. None of them are actually mentioning that new is bad.
 
7:47 PM
There's one suggesting std::fill and not std::vector... :/
Or std::string (I'm starting to forget about that more and more).
 
Damn repwhores. They rush to answer the question but don't give a fuck about teaching important stuff to the asker.
 
C++11 uniform initialization of a char array?!?!
 
lol @rubenvb explained his downvote on Kerrek's answer with Kerrek's own comment.
 
hehe
 
Smooth.
 
7:53 PM
@keith.layne there are many. devenv runs the IDE. cl compiler. link the linker. lib the librarian. nmake the make tool. and more
 
0
Q: Why doesn't C++ allow this

parapura rajkumarConsider this simple program class Shape { public: virtual double getArea() = 0; }; class Rectangle : public Shape { int width; int height; public: Rectangle( int w , int h ) :width(w) , height(h) {} double getArea() const { return width * height; } }; i...

 
guidgen is handy
 
Erm, isn't the answer just "because that makes the most sense"?
 
oh yes, as @R.MartinhoFernandes says, if you just want to build it's msbuild
easiest to invoke via the IDE though
 
@R.MartinhoFernandes Actually, I think because otherwise you would violate some semantics.
I mean, you declare the base method as const, but the implementation is non const... it's like you're lying to the caller.
(I know it doesn't mean shit with const_cast and mutable, but I'm talking about design here).
 
7:58 PM
@EtiennedeMartel It's the other way around.
 
@R.MartinhoFernandes Really? Hmmm.
Well.
 
And having the base method const but the implementation non-const seems actually less bad (you can invoke const methods on non-const objects).
Anyway, I'm -1ing because there's no problem to be solved.
 
haha, two downvotes on the question probably for a misleading title...
 
I don't like "what the spec people thought when they wrote that" questions.
 
Often it's someone that has some weird crazy case where they think X would be helpful, so they ask why the language designers didn't break the language with X.
 
8:05 PM
goes to show I still can't compete in any "real" C++ questions...
 
Don't worry, this one is not real.
 
lol
 
DVCV.
 
Kinda reminds me of the explanation for Perl's auto-flattening lists.
 
@Mysticial, You knew this was coming, but:
2732
A: Why is processing a sorted array faster than an unsorted array?

MysticialYou are the victim of branch prediction fail. What is Branch Prediction? Consider a railroad junction: Image by Mecanismo, from Wikimedia Commons: http://commons.wikimedia.org/wiki/File:Entroncamento_do_Transpraia.JPG Now for the sake of argument, suppose this is back in the 1800s - before...

 
8:06 PM
One day Larry Wall was doing something and needed to flatten some lists, so he made the language flatten all lists.
 
@chris That's not a "real" C++ question.
 
Came in handy once, fucked programmers forever (well, until they introduced pointers in Perl 5 or whatever).
@chris C++ is just background there.
 
Eh, true.
 
I love how I still see the +28 blue icon on my rep even after deleting my answer.
 
good afternoon everyone :)
 
8:09 PM
@R.MartinhoFernandes Yay for language designers.
Perl <6 is in the same league as PHP.
It just gradually happened until they decided to start from scratch.
 
@CatPlusPlus Yeah.
But at least they realized they should start from scratch.
 
@chris haha, I just went down my list of answers... My two highest voted "real" C++ answers are both incredibly stupid - to the point that I'm embarrassed.
 
afternoon
 
afternoon
 
noon:after {
    background-color: black;
}
 
8:17 PM
middlenoon
 
@Mysticial Now I'm curious.
 
@Mysticial, Once I managed to ask a question, but leave half the post out, then fall asleep.
 
I actually never got an answer with a score above 17
 
@chris did you actually post it half-done?
 
8:18 PM
Sometimes I wonder if I just produce shitty answers or don't answer high-profile questions :)
 
@R.MartinhoFernandes My 58 and 57-point answers.
 
I'm not sure where all these came from, tbh: stackoverflow.com/questions/11527852/…
 
@Mysticial Ok.
Yeah.
 
@chris: Ironically the switch statement is a disguised dynamic goto
 
yup
 
8:20 PM
switch is really bad.
 
Default fallthrough is really bad.
 
Full of WTFs.
 
"duff's device"
 
And the integral type restriction.
 
device
 
8:21 PM
@CatPlusPlus It's useful though.
 
@nightcracker And the scoping.
 
No, it's bad.
break should be fallthrough.
 
Like if I want to accept both Y and y as a "yes" input.
 
@Mysticial Fallthrough, you mean. Default fallthrough is hard to defend.
 
Actually it's to make implementation easy
 
8:21 PM
@Mysticial C# does that right.
 
break; just gets translated like this
switch (...) {
...
 
There's nothing easy about implementing C++ anyway.
 
@nightcracker That's probably the most stupid reason.
 
}
exit:
any break is just translated with "goto exit"
 
8:22 PM
We know how break works, thanks.
 
@CatPlusPlus: switch is inherited from C
 
Like all bad things in C++.
 
most
 
Name one good thing inherited from C.
 
oh no the other way around
not all bad things in C++ came from C
also, one good thing would be <cstdint>
 
8:23 PM
@CatPlusPlus I think the required thing to prove his point would be a bad thing not from C.
 
@CatPlusPlus multiline comments.
 
@RadekSlupik: lol
 
@RadekSlupik C inherited it from C++.
 
@nightcracker That it's required is bad thing in itself.
 
True
 
8:23 PM
@R.MartinhoFernandes C inherited single-line comments from C++.
 
Ha... my highest voted "real" C++ question that isn't completely stupid is only +11. lolz I hate myself for being in the top 30 C++ users.
 
Multi-line comments are not that useful.
 
Oh, right. Well, multiline comments are not good.
 
Commented out code should be removed.
For docs, // can be repeated by the editor.
 
Best thing from C was definitely macros.
 
8:24 PM
There's a reason people resort to #if 0.
 
I really, really like some idea's from D
 
quick syntax question: if I have two classes, and in one class there are some variables stored, such as:

>class a_class{
>int var1 = 1;
>};
 
@chris: surely you have to be kidding
 
Besides, aren't nestable and that's bad, too.
 
@CatPlusPlus I don't always though. Especially when I do unreadable optimizations, I always keep the original commented out above it.
 
8:25 PM
how can I pull out the value of var1 from another class?
 
Okay, okay, static typing. xD
 
@Mysticial Well, that's form of documentation.
 
@Mysticial: my highest rated python answer is something so basic it should be forbidden: stackoverflow.com/questions/10301687/…
 
@CatPlusPlus true... didn't think of it that way.
 
@nightcracker, No way! I just love the errors they cause. Adds a bit of challenge.
 
8:26 PM
C++ type system could be better if it didn't inherit from C.
 
Especially if the macro is in some header you included cough windows and it's min/max macros
 
I really should learn D some time
 
@nightcracker Ew, no context managers.
 
@nightcracker That doesn't look that basic to me. Or maybe it's because I suck at python.
 
Bad bad.
 
8:27 PM
Context managers FTW.
 
Besides, I don't know if loading entire file into memory is "fastest".
 
with context managers, you can be exception-safe. :p
 
Non leakage FTW.
Also, fuck off Go.
 
@R.MartinhoFernandes Lol.
 
@CatPlusPlus Their idea of it is really annoying.
 
8:28 PM
Of what?
 
Scope based resource management.
 
@CatPlusPlus: I know no context manager. See the comments :)
 
Oh, you mean defer?
 
@CatPlusPlus: that sounded wrong, I meant "I know that it doesn't use no context managers"
 
8:29 PM
@CatPlusPlus Yeah, that usually doesn't work too well if the file is bigger than your ram size.
 
You need to actually name the cleanup function.
 
of course I know context managers :)
 
"Confusing newbies" is silly argument. They should know and use context managers from day 1.
 
Don't confuse newbies by giving them bad code.
That's a good argument.
 
It's not advanced, it's resource management 101.
 
8:30 PM
Don't hide knowledge from newbies.
If they can't understand good code, they should be out researching it.
Knowing what you don't know is a crucial part of learning.
 
I learned Python's context managers in under half a minute. They're easy as fuck.
Or maybe that was because I was already familiar with RAII…
 
Taking that away hurts them more than giving them an answer they don't fully understand.
 
RAII is trivial concept, too.
Scope goes in, resource allocated. Scope goes out, resource deallocated.
 
True.
 
The following might surprise you (or not): tonight, I'm getting drunk.
 
8:33 PM
Wow.
 
With other people.
 
I would never have expected that from you.
 
@EtiennedeMartel Come talk with us while drunk, would be hilarious.
 
fine I'll update the answer
 
8:33 PM
Yes, this room looooves drunk talk. I should know.
 
@RadekSlupik I'll be deep in the woods, too far away from an internet connection.
 
0
Q: string<char> vs string <unsigned char>

john_leoI have a question concerning the difference between a "normal" C++ string and a string of unsigned characters. When generating some pseudorandom strings of chars and of unsigned chars, I noticed a huge performance difference between the time the code would need to build a normal string and one c...

Silly benchmarks?
@EtiennedeMartel Do it when you come back home. The cat often does.
 
Some questions should be tagged .
3
 
When I come back home, I'm almost already asleep.
 
8:34 PM
@R.MartinhoFernandes Oh, I'm coming back tomorrow. Knowing me, I'll be severely tired but not hungover.
 
@EtiennedeMartel No, I meant while you're still drunk.
 
On that note, game nights are awesome.
 
@R.MartinhoFernandes Then I'll be in the woods.
 
contextlib.nested, man.
 
8:36 PM
I know
 
Okay, that might not be basic. :P
 
more complication =/
 
@R.MartinhoFernandes That's something I could probably answer if I knew exactly what was under basic_string.
 
@CatPlusPlus: that is exactly my problem
 
Python 3 supports that as a core syntax.
 
8:36 PM
@CatPlusPlus: this is ugly as fuck
I wish 3.0
 
with open() as a, open() as b, open() as c:
 
but it's in 3.1
(I know)
not backported to 2.7 IIRC
 
I don't know, I never use outdated versions.
 
@Mysticial The same code for both chars and unsigned chars: allocation of a dynamic array and copying around when reallocation is needed.
 
@nightcracker Nope.
 
8:37 PM
I tend to write 2.6+ compatible code when writing on teh interwebz
 
Pity that many packages don’t work with Python 3 yet…
 
The only package that stops me from uninstalling Py2 right now is Django.
 
own projects are latest of course
Django isn't 3.x?
 
Not yet.
 
For me it’s Flask. Highly unfortunate.
 
8:38 PM
They're planning experimental support for 1.5
 
Let me guess: unicode problems?
 
Unicode all the problems.
Also, I'd like to note that, after a month of Unicode, I'm still not crazy.
 
My suspection is
 
You just think that.
 
you were crazy already, before that month.
 
8:39 PM
Sanity points down the drain.
 
@CatPlusPlus: I was wrong
@CatPlusPlus: multiple context managers was backported to 2.7.3
not 2.6 though
 
Oh, neat.
Not that I use it very often.
 
% python --version
Python 2.7.1
% python3 --version
Python 3.2.3
 
flags none ??? You have no optimizations enabled? — Mysticial 1 min ago
 
Almost never, really.
 
8:40 PM
TADA! Mistery solved.
 
Hmm… Why do I still have 2.7.1?
 
@RadekSlupik: most unices come with Python 2.6
 
Screw 2.6.
 
Python 2.5 sticks on some PC's (mostly windows)
luckily, Python 2.4 seems extinct
 
@nightcracker OS X apparently comes with 2.7.3. Ah fuck it, OS X 10.8 will come soon.
 
8:41 PM
It's 4 years old.
 
@CatPlusPlus: more.
 
> Python 2.6 (final) was released on October 1st, 2008.
 
Oh I meant 2.5
 
What's 2.5?
 
@R.MartinhoFernandes Fuck, my upvote on the question is locked...
lol
 
8:42 PM
@Mysticial Edit it.
 
On a nostalgia note, I've learnt Python around the 2.5 release.
 
lol expert-sexchange
2
 
Anybody wanna give me an idea on how to call class member variables from another class?
 
Noooooooooooooo, not that site.
 
oh man
I want to post a trollface so hard
 
8:43 PM
The hyphenated scamsite!
 
1 message moved to bin [HORRIBLE EVIL VANQUISHED]
 
It’s a virus! Bin it!
 
haha!
 
@Mysticial std::basic_string has no arithmetic or anything, it's basically just mallocs and memcpys.
Though with optimizations disabled you may not get the memcpys and get manual copy loops instead.
 
Find horny programmers near you!
 
8:45 PM
oh wait... my upvote wasn't locked. I guess I did my last edit after I upvoted it.
 
lol “Python 2.5 Hello Word”
 
Some people say 666 is the number of the devil, I think it's 64.156.132.150.
 
Everyone knows numbers begin with 555.
 
@chris in orbit.*
Lightness races in orbit.
 
8:47 PM
Lightness Races in Orbit, Nottingham, United Kingdom
56k 6 68 141
 
“I will no longer be checking or using this account.” that's good news.
@sehe Because too giant image.
 
@RadekSlupik Ah, just prepend a space, or add an exclamation mark so it won't OB
@RadekSlupik Why? Do you have something against Tomalak?
 
OB = Overblow?
 
8:50 PM
Yup.
 
@RadekSlupik SO's biggest repwhore?
 
Also, long time no seen.
 
struct : bar {} foo {}; They're never going to stop introducing confusing syntax, are they?
 
@EtiennedeMartel Way too much honour. I've seen countless worse
 
@chris: what on earth is that
 
8:50 PM
@sehe Doesn't change the fact that he was a fairly big one.
 
@chris Where?
 
Especially when that boobs operator comes out, we'll be coding using ASCII people
 
@nightcracker it constructs an empty struct that inherits from bar.
 
@EtiennedeMartel That's something else
 
67
A: What is this crazy C++11 syntax?

Lightness Races in OrbitFirst, we'll take a bog-standard abstract UDT (User-Defined Type): struct foo { virtual void f() = 0; }; // normal abstract type foo obj; // error: cannot declare variable 'obj' to be of abstract type 'foo' Let's also recall that we can instantiate the UDT at the same time that we define it: ...

 
8:51 PM
@sehe Indeed.
 
@chris Meh. It would be news if we weren't restricted to subset-ASCII
 
I want Unicode on my identifiers.
Get cracking GCC.
Does clang support that already?
 
@EtiennedeMartel I never considered him to be a repwhore... He never topped the charts.
 
% cat foo.cc
class Хелло {};
% clang++ foo.cc
foo.cc:1:1: error: declaration of anonymous class must be a definition
class Хелло {};
^
foo.cc:1:1: warning: declaration does not declare anything
      [-Wmissing-declarations]
class Хелло {};
^~~~~
 
@Mysticial I think he 'went out' just around the time you started, a bit earlier than me
 
8:53 PM
@R.MartinhoFernandes Apparently not.
 
@sehe ah
 
"declaration does not declare anything" only in C++.
 
I used to be quite a repwhore
Now I don't care so much anymore
 
Amaizing. I'd have deemed it illegal syntax. I like it :)
Pure evil
 
I don't care at all.
 
8:54 PM
I was once surprised that std::string; is actually valid C++.
 
This chat is the only good part of SO, period.
 
Oh, right, now I recall, he was a massive elitist jerk.
 
I reckon anyone >10k has actively hunted for rep for a while. This can be a good thing, doesn't have to be silly always
@nightcracker And all of them stop caring after a while mostly around the 10-15k mark.
Except for Jon Skeet
 
Jon Skeet lol
 
@EtiennedeMartel "It's isn't the STL" - Tomalak
 
8:56 PM
@sehe Anyone with the Legendary badge had to have been a huge repwhore at some point - except for Eric Lippert.
 
on programmers' I have 1,630 rep
7 answers
 
@sehe What a pedant.
 
lol
Average answer score is something like 15-18
 
Well, hello :) This is the lounge.
I think pedantry shouldn't be on the list of deadly sins :)
 
only one was accepted :(
 
8:57 PM
@sehe I mean, above the average of the C++ tag.
 
@Mysticial Well some other first-time users/real life "celebs" have understandably gotten rep with the sweat
 
This outscores all my SO answers. programmers.stackexchange.com/a/66617/12554
I count a whopping 5 words
 
@EtiennedeMartel Ok, fair enough :) I didn't hate him. He contributed much. But yeah, you gots to ignore the comment threads. (As with many SO users now)
 
@nightcracker lol, nice
 
@sehe Sure, but I prefer a nice guy who contributes a little than a jerk who contributes a lot.
 
8:59 PM
Here's another efficient answer that I liked:
196
A: Can I encrypt data in a way that it can be read normally but can't be copied or edited?

SirexIf you can read it, you can copy it. A concept the RIAA or MPAA have yet to grasp.

 
@Mysticial: yeah, I know that one.
 
Hollywood would kill for such a feature - and no, despite millions of investments, they haven't found a solution either. — MSalters Feb 20 at 9:20
Wonderful comment.
 

« first day (644 days earlier)      last day (4304 days later) »