« first day (320 days earlier)      last day (4621 days later) » 

Rob
5:00 PM
CTHULU
 
Cthulhu, not Cthulu.
 
I misspelled one of my libraries as CthuluLib.
I don't know if the Google Code page is still up.
 
Another summoning library?
 
Rob
rofl.
 
YASL.
Actually, isn't every Perl script a summoning library?
 
5:04 PM
Only if you want to summon an army of angry monkeys.
 
@CatPlusPlus Are they gonna write more Perl scripts?
 
Probably.
Some might also write PHP.
 
Maybe monkeys can't reproduce Shakespeare, but I wouldn't be surprised if they produced some meaningful regexes.
 
I hear they forced Guantanamo Bay inmates to read Perl aloud.
 
How do you pronounce Cthulhu?
 
5:06 PM
While listening to Friday.
 
@RMartinhoFernandes You don't, unless you want to summon him.
 
I say /k-tulu/ (me not know IPA).
 
"Kthh-ool-oo."
 
@FredOverflow You can't summon Cthulhu!
 
@RMartinhoFernandes But BP managed to do it on the Moon!
 
5:07 PM
@FredOverflow No, that's parsing HTML with regex.
 
@CatPlusPlus No, that's Zalgo.
 
@CatPlusPlus lol
 
I pronounce it like Ka-loo-loo.
In a gutural way.
 
ţ̦̘̄ͨ̋h͇ͨ͊̆̓͒ͪ̋ͅe̗̼̟̝̪̮̾̂͛͆͌̋́ ̠ͩͅ<̼͔͓̯͓̻͒͊͒̀̅ͤ̚c͕͌ͫ̑ͩḛ̖̟͔̣ͮ͜n̦͇̉͘t͈̜̖̱̠͕̆̑e̯̲͎̞ͯ͜r̞͙̫̮ͩ͂̋>̯̦̭̖̥͔̹̆ ̨͖̪̦̭̭̍ͤ̈́̈́̄ͅc̞̜͇̥̮a̤̪̤̘̪̙̟͑͘nͨ́̒̆ͧnͭ̇́͏̱͕̲o͋ͪͪ̇͊ͦ͑͘t̸͕̜̯̪̹͓̂ ̤̬͔̱̝̋̓̀̄͑͌ͧh̫̼̲̤̰͕̀ͭͬ̂̈͟o̮͉̭̪̬̙ͯ͊̐̋̔͛l͕̱̱̥̓ͣ̃̊̋̍ͤ͜d̯̫̋̓̋̾̈́ͫ̋͡ ̺̫̲̬̏̔̓̓͐̄̄ḭ̷ͨ͗̊ͭͨt̵̊̋̉̅ͬ͒́ ̘̮̩̭̃ͨ̌̑̌ĭ̋͜s͖̍̄ͣ ͐͒͏̯̭̤͍̲̦̦t̰̱͈̳͚̗͎o͓̜͍̪̼͗͒ͥͭͨ̋ͨ͡o̸̰̺͙̠͚͋͛̒ ̲͈͇̺̣̰͑̀́l̙ͪ͋̅̽̇a͈̦̜̺̣̗̟ͪ̀͗͐ͫ͗͌ẗ̺̻͚͉̠̘́̃̃ȩ̳͖̬̼̾ͨ̌̆ͦͫ
 
@RMartinhoFernandes That sounds like a stripper's name.
 
5:09 PM
That's how Lovecraft said it should be pronounced.
I find it weird.
 
Which matches.
 
@FredOverflow That's how you call him.
 
As long as we're sharing good music:
 
5:11 PM
@FredOverflow it.
I'm pretty sure it's a it.
 
She?
*Shrug*
 
@RMartinhoFernandes There's only one It, and I wouldn't dare summon that...
That reminds me, I really need to read that book again. Has been at least 15 years.
 
Oops, lowercase.
 
Sorry, every time I see "it", I immediately think of iterators :-/
It => scary clown
it => iterator
 
You should start using ranged-for more often.
 
5:13 PM
Scary... clown?
 
Oh dear.
 
@CatPlusPlus It by Stephen King?
 
It was about clown?
 
Well, only superficially of course.
 
This is the funnest room on Chat.
 
5:14 PM
To understand what It is really about, you have to read the book.
@Maxpm There are other rooms?
 
@FredOverflow Apparently.
 
I only read Cell from King, I'm not a fan of horrors in any form.
 
room topic changed to Lounge<C++>: This is the funnest room on chat. [c++] [c++11] [c++-faq]
 
Funnest. Brillant.
 
@RMartinhoFernandes Speaking of.
 
5:15 PM
I'm Commander Shepard, and this is my favorite store on the Citadel.
 
I'm Commander C++, and this is my favourite compiler on Linux.
 
@LucDanton I'm reading your answer on my thread-exception question.
 
I'm Commander Keen, and this is my favorite platformer on the PC.
 
I agree with you.
 
Well, GCC does support other languages.
 
5:17 PM
The more I read of the std::thread API, the less I want to use it.
 
Oh?
 
But the more you read of std::future & Co, the more you want to use it right :) ?
 
Speaking of id software, Doom 1 and 2 are no longer on the German index.
 
Threading seems to me like something that should be built into the language itself, not the standard library.
 
Things like operator= can call std::terminate!
@LucDanton Haven't got to that part yet :)
@Maxpm It's both.
 
5:18 PM
I've used boost::future and it is quite nice.
 
Has anyone tried D? I think I'll give it a shot once I'm done with this project.
 
If you're wondering how it came to be that way it's the result of design by committee. Boost.Thread handled all those cases gracefully IIRC or at least gave some control.
 
I've dabbled in it, but nothing beyond Hello World.
I'm a little disappointed in Code::Blocks's support for it.
 
But I think the SC has a point when it says that "Either implicitly detaching or joining a joinable() thread in its destructor could result in difficult to debug correctness (for detach) or performance (for join) bugs encountered only when an exception is raised. Thus the programmer must ensure that the destructor is never executed while the thread is still joinable."
 
Can std::future transfer exceptions between threads, like Boost.Exception does?
 
5:20 PM
As usual: with std::thread you only pay for what you use but have terrible exception guarantees; while with std::async you get all kinds of niceness.
@CatPlusPlus Yesh.
 
That's cool.
How's it manage that?
 
@LucDanton Terrible.
 
@Maxpm It isn't required to but in all likeliness implentations will use std::exception_ptr for that.
 
Make that two of us.
 
5:22 PM
@Maxpm Yes, but I was missing IDE support back at the time. Has it improved yet?
 
IDE support is for sissies.
 
@FredOverflow I got Code::Blocks to compile it, and it has D syntax highlighting. The autocomplete doesn't work, though.
Just shows up with "The parser is still parsing..." for everything.
 
I'll be accepting @Ben Voigt's answer because it is the answer to my question, but I'd like y'all to upvote @Luc's: stackoverflow.com/questions/7272093/…
 
So you have to disable that or live with the message popping up, which is a problem if I'm going to be switching between languages.
 
Anyway, the language itself I find quite interesting, but there don't seem to be many books on D yet, and I love reading language books.
 
5:24 PM
My answer is tangential and illustrative so I expected as much :)
 
The other thing about vim I like it's that it has syntax highlighting for nearly damn everything.
 
@CatPlusPlus I wrote an xmodmap script recently and vim highlights that, too.
 
Including Whitespace.
 
I never really liked language books.
 
C++11 support is still missing though :(
Lambdas screw up everything.
 
5:26 PM
I think they're pretty pointless. I learned about the main() function in my introductory comp. sci. class in school, and the rest of what I know comes from the Internet and documentation. Stack Overflow is invaluable.
Really, schools should be teaching how to read documentation.
 
I would say it's pretty much impossible to learn modern, idiomatic C++ from the Internet. YMMV, of course.
 
@FredOverflow You're basically in a sea of crap.
 
I think I sifted through the crap pretty well.
A bit hazy on C++11, though.
 
There are two choices of toilet paper orientation when using a toilet roll holder with a horizontal axle parallel to the wall: the toilet paper may hang over or under the roll. The choice is largely a matter of personal preference, dictated by habit. In surveys of American consumers and of bath and kitchen specialists, 60–70% of respondents prefer over. Despite being a trivial topic, people often hold strong opinions on the matter. Advice columnist Ann Landers said that the subject was the most controversial issue in her column's history. Defenders of either position cite advantages rang...
 
Especially with lambdas. I know what they're for, but I can never remember the syntax.
 
5:29 PM
It's easy.
 
@CatPlusPlus I love the Internet.
 
[] for capturing () for arguments like in a normal function {} body
 
I feel that because it's not fully adopted yet, I don't feel comfortable messing around with it.
 
And the () is optional.
 
Also -> return type after () for more complicated ones.
It is? It'd look weird without ().
 
5:30 PM
Yes.
[] -> T {} is not valid.
 
Huh.
 
[]{} is the shortest possible noop lambda.
 
It's also possible to write a palindromic lambda.
 
Yeah, we've seen that.
 
5:33 PM
How?
 
I was going to post the image for that but the colour scheme is so hideous I daren't.
 
Or is it an expression with a lambda in it and some other stuff?
 
oh we're talking about toilet paper?
 
[i](type)->type*{ ;throw worht; }*epyt<-(epyt)[i]
 
5:35 PM
@LucDanton Doesn't compile though.
worht is not captured.
 
It's not a local.
[] { std::cout << 42; } is valid.
 
Oh, of course.
 
;return nruter; is also possible.
 
I liked discussing 10 better than discussing palindromic lambdas :)
 
wtf is palindromic lamdba?
sounds like a disease
Oh Dr., I have a bad case of palindromic lambda, what should I do?
 
5:40 PM
5 mins ago, by Luc Danton
[i](type)->type*{ ;throw worht; }*epyt<-(epyt)[i]
 
I don't get what the right side is doing?
 
Deep magic.
 
lol, WHAT deep magic?
 
Multiplying by epyt and checking if the result is smaller then negative epyt at i?
 
Also indexing.
 
5:42 PM
@TonyTheTiger Are you aware of the "goes to" operator? :)
while (x --> 0) { ... }
 
oh I see
I've seen that before
 
I think it's really cute.
 
its actually while ( x-- >0) {....}
 
And you can astonish programmers that don't understand lexing :)
@TonyTheTiger exactly
There's also the love operator: while ( x <3 ) { ... }
2
 
@FredOverflow you almost tricked me, I'm no lex expert either though
@FredOverflow lol
 
5:44 PM
Personally, I love x, so it's an endless loop for me :)
 
@TonyTheTiger It's looking good.
 
lol :P
@CatPlusPlus hahahah:P
but what makes a lambda palindromic?
 
The same thing that makes other things palindromic.
It can be read the same way from either side.
 
oh damn, why didn't I see that
 
Like 12344321.
 
5:46 PM
lulz
yes, I know what a palindrome is, I did a euler project thingy on it the other day
 
@TonyTheTiger honestly, you didn't see that? lol
 
@FredOverflow no I missed it
I wouldn't have asked otherwise would I?
I'm having a dense moment
damn :(
 
You were probably focusing your energy on the (non-existent) semantics of the lambda.
 
yea I thought it was actually some lambda concept I hadn't seen that could be used in C++
but turns out it's just something idiotic to confuse morons such as myself :P
 
You could wait until April 1st and then suggest palindromic lambdas as an extension to C++11.
 
5:49 PM
lol
email Bjarne and ask him out it
 
Have you ever emailed Bjarne?
 
I emailed Bjarne once, never got a reply :(
maybe Bjarne is secretly on SO
lol
 
What did you ask him?
 
@TonyTheTiger Not really secretly.
 
@FredOverflow it was about something in his book, Programming: Principles and Practices using C++
 
it was someone on here that suggested to me at the time I should write him
 
@TonyTheTiger Did you discover an error?
 
@FredOverflow I think it was an error yes
 
@TonyTheTiger Then he will probably already have corrected it in the current revision.
 
oh hopefully
Herb Sutter is not on SO is he?
or Scott Meyers?
 
5:55 PM
I haven't seen Scott Meyers on SO yet. He probably has too much of a life :)
 
Xeo
> This is the funnest room on chat.
I think we're missing an i here
 
hai @Xeo
 
Xeo
Did Apple steal it?
Hai Tiger
 
long time no see
 
Xeo
Indeed, been pretty busy
 
5:58 PM
@Xeo It's funner without the i.
 
@Xeo Ah, welcome back then :)
 
Xeo
Reminds me of
> Ihadanargumentwithmyspacebarandnowwedon'ttalkanymore
Damn, it's actually hard to type like that!
 
A broken spacebar is no problem as long as Alt, 3 and 2 still work.
 
Xeo
heh, clever one
Though it'd probably look very nerdy if one sees you typing like that
 
People wouldn't notice, I type too fast to follow.
 
6:01 PM
lol
 
I first thought you meant a "space bar" as in SF themed bar.
 
@FredOverflow And you're on the appropriate OS.
 
Xeo
@FredOverflow Don't think they'd look curious after your flashing hand, always hopping to the numblock?
 
My favorite Tetris joke: A man walks into a bar and says "Where the hell have you been when I needed you?"
 
6:02 PM
Haha
 
Xeo
So, who knows First-Person Tetris ?
2
 
my head hurts :(
 
pretty amazing
 
How do people get so good at Tetris?
 
Rob
 
Xeo
6:10 PM
@FredOverflow Mine too now, couldn't resist playing again. 6.8k pts. Night mode is funny though
 
This guy is even faster... music sucks, though.
 
woah that's fast tetris
 
Rob
I don't know
I think the first one is faster
Gotta go, later all
 
6:24 PM
So, there's apparently a website about beards.
I might be needing this one soonish.
 
Hello people
 
People left, animals and robots took over.
Welcome... to the world of TOMORROW!
 
What is the best book of Introductory section??
I have already readed the Herb Schildt Book (C++ Begginers Guide)
 
I liked "Accelerated C++". "C++ Primer" is supposed to be good as well.
If you have already read other C++ books, then I would recommend "Accelerated C++", followed by "Effective C++".
 
Which would be the first to be read?
Hmm
Thanks
Only 352 pages?
 
6:34 PM
Accelerated C++ is dense, so it packs a lot of stuff in a small amount of pages.
If you don't like this style then you should opt for C++ Primer
 
I have 15 years and I dont know what will be my next book...
 
You have 15 years time to read the books?
In that case you should also checkout the advanced section.
 
No no ... I am 15 years old.
I think my English is very bad, but that's because I live in Brazil.
Sorry
 
Oh I see.
It's up to you. Pick a book and stick with it. The ones recommended in the SO post you linked are all good ones. So you can't really go wrong with any of them.
 
I'm on the page 97 of Programming: Principles and Practice Using C++ (bjarne) but I see many people speaking well of him.
 
6:39 PM
That's probably also a good book.
 
You can always ask when you don't understand something in the book.
 
I never understand Bitwise Operators, however, think better left for later.
 
Yes, you can leave them for later.
 
GWW
Bitwise operators can be useful for code optimization
 
In order to understand bitwise operators you first need to learn a little binary math and logic.
 
GWW
6:49 PM
Yeah, they can definitely be a headache to start learning
 
It has a good book on binary math? And it is possible to understand with the knowledge of a boy of 15 years who attended 1 of the second degree?
 
@BrunoAlano This is a good post: stackoverflow.com/questions/47981/…
 
Hmm
Thanks
But I dont understand the concept of XOR and others operations with Bits
 
@GWW What optimisation?
 
But you can leave that for later really. You don't really need to learn it right away.
 
6:52 PM
Well, bit is either 0 or 1.
Bit operations take two of those and produce either 0 or 1.
 
Hmm
 
Bitshifts work a bit differently, but AND, OR, XOR is just a simple table lookup for two values. And bitwise operations is just that only with a larger amount of bits.
 
I am seeing the Accekerated C++, but not really like the style and explanation of it. Can I opt for C++ Primmer?
 
I.e. 8 bits AND 8 bits is [bit7 AND bit7, bit6 AND bit6, ..., bit0 AND bit0]
 
@BrunoAlano It's easier to explain bitwise operators if we know what you already know. Do you know the binary operationrs, e.g. x AND y?
where x and y are bits.
 
6:55 PM
AND yields 1 when both operands are 1, OR yields 1 when either operand is 1, XOR yields 1 when only one of the operands is 1.
No magic.
 
Hey all… quick question:
 
Bitshifts took me quite a while to grasp when I was starting, but simple bit operations aren't hard at all.
 
I know the standard doesn't say you can compare default-constructed values of container iterators.
 
Oh, there's also NOT, which reverses the bit (NOT 0 = 1, NOT 1 = 0).
 
6:56 PM
E.g., std::list::iterator() == std::list::iterator() is UB.
but is it really so bad???
 
GWW
@CatPlusPlus: I am referring to rewriting certain statements using bitshift operators
 
Will any debugging library throw on that?
 
@Potatoswatter You can't divide UB into 'really bad' UB and 'not so bad' UB.
 
@GWW If you mean replacing multiplication with bitshifts, you're doing it wrong.
 
It's not a meaningful distinction.
 
6:57 PM
This is called 'power reduction' and compilers are perfectly capable of doing that on their own.
 
@LucDanton I just came here for some reinforcement :)
 
Also why are you worried about throwing?
 
Don't microoptimise.
 
GWW
@CatPlusPlus: I agree that any compiler worth is salt will do it for you, but it's still useful to understand how your code is optimized
 
@Potatoswatter UB means the whole program can't be reasoned about, from the language point of view. If you're asking about the quality of implementation regarding iterators, well I don't really know about that.
 
6:59 PM
@LucDanton Only throwing from debugging libraries… I think, for example, that GCC will specifically check that both operands are default-constructed and allow it to pass, because it is relatively sane behavior if not mandated by the standard.
 
@GWW But why not go the whole way and drop down to assembly?
 
@LucDanton I think you can. Even if some behavior is UB according to the C++ standard, it can still be well defined for a compiler implementation.
 
Anyway I think that, I didn't try, and MSVC might do different.
 
Sorry, but this will be my last question: Primer or C++ Programming: Principles and Practice Using C++?
C++ Primer *
 
@StackedCrooked I meant from the level of the language. If this is about quality of implementation then it should be phrased as such.
 
7:00 PM
@StackedCrooked But then you're not portable, you're relying on implementation details.
 
GWW
@LucDanton: Dropping down to assembly is getting a bit beyond just learning C++
 
Micro-optimisations are irrelevant to learning C++ as well.
 
@GWW Substituting some operations with bitwise operations is not learning C++ but doing some maths. You don't need C++ for that.
 
An implementation would have to be particularly nasty for that operation not to work… so it's not QOI of the implementation as much as QOI of the debugging library to purposely break things that aren't guaranteed by the Standard.
 
@Potatoswatter Checked iterators or the like do not break anything.
 
7:02 PM
What do you need those iterators for, anyway?
 
Validating and asserting on iterator operations falls well within UB.
 
GWW
@LucDanton: I don't disagree with that, I am just trying to state that in the end it's a good idea to understand them. Especially when you have to read someone elses code who has chosen to "microoptimize" everything
 
UB doesn't mean 'it goes bad'. It means that the language washees its hands at what happens.
 
@LucDanton They will throw exceptions on comparing iterators from different containers, which usually will succeed and produce a useful/expected result, for example.
 
@Potatoswatter And this doesn't break language expectations.
 
7:03 PM
Sorry, but this will be my last question: "C++ Primer" or "C++ Programming: Principles and Practice Using C++"?
 
@BrunoAlano The latter because you already started reading that one.
 
Thanks everybody
I am going learn
 
I am going learn too.
 
Meh, whatever. I won't do it because I know it's UB. I'm sure a lot of folks are unaware and do it all the time and all the libraries support it, though.
It would be nice to be able to write a constructor for a struct containing a map::iterator without passing in the actual map, just to be able to call end() :vP .
 
I'm going to not do anything.
 
7:08 PM
Hey, @CatPlusPlus.
 
@Potatoswatter There's the view that iterators are largely useless on their own and the the real thing that matters are pairs of iterators; also know as iterator ranges. In other words, write a constructor that accepts two iterators, and then you don't need to pass the map.
Plus user code may want to restrict that range to something smaller than (begin, end).
 
@CatPlusPlus not doing anything, sounds boring?
 
@LucDanton I'm basically using the iterator as a pointer. There is no range. Perhaps I should be using pointers instead, but especially with map, I prefer the iterator type.
 
Pointers are a kind of iterators but you can't use the pointers from map elements to navigate the map so I'm not sure how you can substitute the one from the other.
 
7:17 PM
I'm not navigating the map.
 
@Potatoswatter What do you need the end for?
 
GWW
@TonyTheTiger: That is quite strange I guess they don't like that number :P
 
Hmm, searching the standard for "singular" turns up §24.2.1/5, "Results of most expressions are undefined for singular values; the only exceptions are destroying an iterator that holds a singular value, the assignment of a non-singular value to an iterator that holds a singular value, and, for iterators that satisfy the DefaultConstructible requirements, using a value-initialized iterator as the source of a copy or move operation."
@LucDanton Simply to serve as a NULL value.
 
Definitively a job for a pointer then.
 
7:20 PM
That would be a setback in my jihad against pointers.
 
Well you can use a boost::optional<T&> but what's the point.
 
name_map::value_type const *… ecchh. name_map::iterator… hoooray
Ah well, I suppose I'll take your point to heart. Thanks.
 
ಠ_ಠ
woah, I did the reddit look
lol
annoying when that happens
 
oh duh, name_map::const_pointer
 
@Potatoswatter Not Standard.
 
7:35 PM
@LucDanton It's in C++11, I'm not bothering to look in 03. Pretty sure it's always been there.
 
I don't see it in the container requirements. Is it exposed via the allocator?
It forwards it from the allocator indeed.
That's odd. It's not even a allocator-aware container requirement -- it's just specified individually for each container.
 
Allocator specification is still a mess.
It looks like good practice would be to have an allocator-aware container inherit from std::allocator_traits just as iterators inherit from std::iterator. But I haven't tried that, and a later standard could add something undesirable to that class.
Hmm, what's the point of allocator_traits<Alloc>::allocate()? Providing a user definition for that would be sadistic, and it's no more accessible than the member function it calls.
 

« first day (320 days earlier)      last day (4621 days later) »