« first day (249 days earlier)      last day (4705 days later) » 

2:54 AM
When will we grow up?
> (...) test of non-food exports from the fallout-ravaged Asian nation, (...) will also take surface samples from spots where people in Japan could have touched the vehicles.
If they find any radioactive cars, I'll happily take them as mine.
And Japan is not a "fallout-ravaged" nation, and people in Japan do not glow. They can touch your cars as much as they please.
</rant>
 
 
4 hours later…
7:00 AM
Hmm, what's going on here: ideone.com/zeO26? I was expecting every bin to have 3 bottles.
 
sbi
7:37 AM
I disagree that this should be an FAQ entry and will remove the c++-faq tag. I think that, while iterator invalidation certainly warrants an FAQ entry, it should encompass all std lib containers and their interfaces, not only one function of one container. Please speak up if you disagree with me on this.
 
sbi
7:54 AM
@TomalakGeretkal Then judging by your code's formatting, you'd be coming from C# as well. :)
 
8:22 AM
Morning.
 
8:34 AM
@sbi agreed
whoo! just got my gold :D
 
sbi
@TomalakGeretkal Erm. So you agree with me disagreeing? Or do you agree with it being an FAQ entry while I disagree with that? (I could have made my message a bit clearer...)
@TomalakGeretkal Cong-rats and other rodents!
 
@sbi I share your opinion on the topic.
 
sbi
@TomalakGeretkal And wow, I didn't know the tag syntax now works in the chat, too. Lemme try: [tag:c++] makes .
Ah, works.
 
@sbi Trying to find badge markdown, but I don't think that there is any
 
sbi
8:40 AM
@TomalakGeretkal I hadn't heard about that either, not even for SO proper. But I haven't looked at the list of improvements for a long time.
The other day @balpha mentioned (on twitter) that he had made small improvements to the chat, but I don't know which ones, so the chat keeps surprising me with little things like this. :)
@ÓlafurWaage I knew you'd come up with something like this...
 
:D I aim to please.
 
hi
 
8:56 AM
Qt Creator now allows you to build on a remote Nokia server. Has anyone tried it? (doc.qt.nokia.com/qtcreator-snapshot/…)
 
"it's good when you don't have the SDKs on your PC, but you start it from the qt SDK"
 
9:22 AM
can anybody spot any bugs in this post regarding iterator invalidation rules?
 
sbi
@TomalakGeretkal Planning on doing that FAQ? :)
 
@sbi Not on SO :P
 
sbi
@TomalakGeretkal Wimp!
 
9:57 AM
@sbi Markdown doesn't support tables!
 
But it supports ASCII art!
(and Unicode art too, if you're into that)
 
meh, CBA to ASCII art it
you're welcome to
0
Q: Iterator invalidation rules

Tomalak Geret'kalWhat are the iterator invalidation rules for C++ containers? Preferably in a summary list format.

 
sbi
@TomalakGeretkal So? Isn't that just an opportunity to rise to a challenge? :P
 
@sbi not when I have other stuff to do
 
sbi
@TomalakGeretkal Hey, great! Thank you!
 
10:06 AM
Upboat @TomalakGeretkal
You're catching upto me!
 
@ÓlafurWaage :P
 
But in my eyes, you're the 2nd Tomalak, the original was the bomb :D
What is Tomalak anyway
 
1
Q: Iterator invalidation rules

Tomalak Geret'kalWhat are the iterator invalidation rules for C++ containers? Preferably in a summary list format. (Note: This is meant to be an entry to Stack Overflow's C++ FAQ. If you want to critique the idea of providing an FAQ in this form, then the posting on meta that started all this would be the plac...

 
@ÓlafurWaage My name
@ÓlafurWaage Pfft :P That guy has had people confusing me with him on the internet for years >.<
if I ever couldn't register on a website with my usual username, it was because of him
 
10:17 AM
(well either that or I'd forgotten that I'd already registered :P)
 
shakesfist
 
I am the one and only, baby
 
there are two that share my full name but Olafur is like the 5th most common name in Iceland
 
sbi
@TomalakGeretkal You're the one and only baby? I doubt that. :)
 
@sbi Removing commas when quoting others is a very unpolite thing to do.
 
sbi
10:20 AM
@MartinhoFernandes Of course, it is. So? Did you expect me to be polite?? Just look at my avatar, FFS!
 
@sbi eat some shoots and leave
 
sbi
@TomalakGeretkal You mean "shoots and leafs", right?
 
@sbi there is no such word as "leafs"
and, no. I want you to eat some bamboo shoots, then gtfo!
 
sbi
@TomalakGeretkal According to FF's spillchucker there is.
 
@sbi Probably because in the context of "Maple Leaf" as a proper noun, "Maple Leafs" can be seen
 
10:23 AM
I bet it's that American vs British thing again.
 
but the plural of "leaf", on both sides of the Atlantic, is "leaves"
 
sbi
@TomalakGeretkal OMG. Your grasp of Geography, Botanics, and Zoology is pathetic. :)
 
Also, "leafs" is an active participle of the verb "to leaf"
 
all in one
 
sbi
10:25 AM
@TomalakGeretkal See. I knew there's such a word!
 
s/there is no such word as "leafs"/"leafs" is not the right word here/
 
sbi
@TomalakGeretkal s/leafs/leaves/
 
sed nerds!
 
sbi
@ÓlafurWaage Did you mean "sad nerds"?
 
s/sed/sad/
 
sbi
10:27 AM
@ÓlafurWaage sed nerd!
 
don't know who you're talking about
 
sbi
@ÓlafurWaage I was talking about you!
 
@ÓlafurWaage sed's got nothing to do with it. perlre tyvm!
 
HERETIC!
 
10:32 AM
morning nubbins
 
Morning nublette
 
sbi
@DeadMG Mornin' puppy.
 
Anyone knows why "grep" is called "grep"?
And no, it's not from the verb "to grep". That came after.
 
generalized regular expressions
 
sbi
@MartinhoFernandes That's "to grab", shirley?
 
10:36 AM
@sbi: no, that's grope
 
to grep: verb, to google locally.
 
sbi
@DeadMG You mean "grok"? (That's from Heinlein, BTW.)
 
grep comes from the documentation of the ed editor.
To print all the lines matching a given regex re, you write g/re/p.
@sbi Where did he invent that?
 
This is at the bottom of grep's man page. "GNU’s not Unix, but Unix is a beast; its plural form is Unixen."
 
sbi
@MartinhoFernandes Stranger in a Strange Land: en.wikipedia.org/wiki/Grok
@ÓlafurWaage And here I thought Unix were a unique beast.
 
10:41 AM
@ÓlafurWaage I though the plural was Multics.
 
hehe
 
@sbi Man, why are there so many classics? Like this I can never catch up!
 
sbi
@MartinhoFernandes No whining! I grew up on the wrong side of the Iron Curtain, had only Lem available when I was young, and only recently caught up with Heinlein. (I read like two dozen of his books in the last twelve months.) You had that stuff available all your life.
 
there is no "wrong" side of the Iron Curtain
 
sbi
Well, now that I think of the average age of those who revealed their age here, that might not make all that much of a difference, 20 years after the fall of the IC...
 
10:45 AM
@sbi: Did you also walk thirty miles up a mountain to get to school every morning?
 
there is the side that you prefer, and the side that you do not prefer.
 
sbi
@TomalakGeretkal Actually, if you are talking about reading Heinlein in your teens. There is a wrong side.
 
@Tomalak: The massive collapse of the Russian economy and Communism worldwide, with the corresponding incredible relative wealth of the West, suggests otherwise
 
@sbi I'm only 24.
 
@sbi I'm not, and lol
 
10:46 AM
I think.
 
when I went to school I had 5 minutes to the classroom. So I usually slept until 10 minutes before class started
 
@DeadMG for some value of "wrong"
 
walking distance
 
interesting that you have decided that "not viable in terms of capitalism and money" is "wrong"
 
@Tomalak: Cripplingly poor, starving and repressed people sounds like an easy definition to me
let me ask you: what on earth possible definition of "right" could you have that might make the Communist side "right"
 
10:47 AM
there are cripplingly poor, starving and very repressed people all across the West, but you ignore them
 
sbi
@MartinhoFernandes Yeah, I added that as an afterthought. When I got access to Heinlein 20 years ago, I was old enough to actually having stopped reading SF books. (I restarted a few years ago.) You were to young to read anything at all. :-x
 
we don't institutionalize it for the benefit of our leaders
 
@DeadMG I didn't say it was
@DeadMG no, we institutionalize it for the benefit of the big corporations.
 
sbi
@DeadMG No. I walked 10mins. On sidewalks. (I wasn't born in Siberia, but in Germany.)
 
big corporations > dictatorship leaders
 
10:49 AM
@DeadMG orly
i'm going to leave this discussion before you generalise subjectivity any further
 
well have fun
 
@sbi The problem with reading old SF classics is that you get to see how their predictions failed. You need to get into the right mindset and ignore that, otherwise you won't enjoy it as much.
 
@MartinhoFernandes I always had that problem watching repeats of Space:1999
 
sbi
Who flagged @Tomalak's messages? What bullshit is that?
 
10:56 AM
wasn't me
if he'd have stayed, I'd have been perfectly happy to keep telling him how incredibly wrong he was
 
Yeah, everyone thought that by the end of the millenium we'd have conquered space.
 
sbi
@MartinhoFernandes Yes, certainly. Being older helps getting into the mindset, though. :)
 
@sbi flagged?!
@DeadMG lol
 
;p
 
sbi
@TomalakGeretkal They were flagged as offensive/spam.
 
10:57 AM
@sbi well isn't that pathetic.
 
what's more is that someone agreed with the flag
which is incredible
 
sbi
Whoever flags such nonsense: All 10k+ users across whole of the chat will get notified of these flags, and asked to confirm or deny. That is bloody annoying if it is done for someone's pet peeve in some other chat room.
 
tell them sbi
 
Nitpick: what was flagged was not nonsense. It was Tomalak's opinion. The nonsensical part is flagging it.
 
sbi
Please leave flagging for (1) stuff that has a good chance to seem to be spam or offensive to most users or (2) to stuff half a dozen people agree should be deleted (for example because someone posted some personal information that shouldn't have been posted and failed to delete it within the editing period).
Mhmm. Maybe this should get added to the newbie hints?
 
11:03 AM
Pity the process for doing that is a pain.
You need to acquire a mutex on the room, copy-paste every individual message that is part of the current hints, add that one, release the mutex and fix the pinned message.
Ugh.
 
user784668
Tomalak: and if you actually understands how it works in practice, he's almost right.
 
+1 on that. I hate the overloading of stack and heap to mean pieces of a process memory. A stack is that thing with push/pop, and a heap is that tree-like thing.
 
user784668
understand*
 
I still use the overloads though :(
 
user784668
11:16 AM
@Martinho: cough static cough
 
user784668
In comparison, overloading of "stack" and "heap" is angelic.
 
user784668
Well, isn't it that "static" is a word with gazillion of overloaded meanings in C++?
 
Ah, that.
 
@Fanael "how C++ works in practice" doesn't exist
 
11:18 AM
But stack and heap are not only in C++. They're everywhere.
Both of the meanings.
 
@Fanael how C++ compiler X on platform Y with architecture Z works in practice does
@Fanael and "stack" does not map to auto storage duration, "dynamic" does not map to dynamic storage duration, and static storage duration objects may not be in a "stack" data structure
actually I don't think heaps are actually used too much nowadays
finally, consider:

struct T { int x; };
T* obj = new T;

is that T::x "on the stack"? really?
 
user784668
@Tomalak: how "any sensible C++ compiler on any sensible platform" in this regard, actually.
 
@Fanael see example above. the term, on any platform, is not accurate enough.
 
user784668
Yeah, I know that, but I'm not that pedantic :)
 
> Fanael and "stack" does not map to auto storage duration, "dynamic" does not map to dynamic storage duration, and static storage duration objects may not be in a "stack" data structure

Sorry: "heap" does **not** map to dynamic storage duration [edit]
@Fanael It never ceases to amaze me how many people deliberately choose to use misleading and inaccurate terms, because they think that using the right thing would be "pedantic". Buy a dictionary!
This stuff is confusing enough for newbies without them having to go through the pain and suffering of fighting through all the crappy nonsense propagated by the "non-pedantic"
(where "non-pedantic" == "lazy", I think!)
 
user784668
11:25 AM
@Tomalak: dictionary?
 
http://dictionary.reference.com/browse/dictionary

a book containing a selection of the words of a language, usually arranged alphabetically, giving information about their meanings, pronunciations, etymologies, inflected forms, etc., expressed in either the same or another language; lexicon; glossary
 
user784668
@Tomalak: now you're being silly.
 
@Fanael No, that's the real definition, I swear...
 
user784668
I meant, why should I buy a dictionary?
 
@Fanael To learn what "pedantic" actually means. It doesn't mean "cares more about being honest in terminology than I do"
 
user784668
11:28 AM
Uhm, "overly concerned with minute details or formalisms".
 
user784668
So looks like I used this word right.
 
I don't think that detail is minute.
 
user784668
Well, most people know what you mean when you use "stack" or "heap" anyway.
 
And I've now downvoted that answer because it's completely misleading.
Handle and value classes are not about that stack/heap memory location thingies.
 
@Fanael No, they don't.
@Fanael Most people are unaware of the consequences of the example I posted above, when using this incorrect wording.
@Fanael That's also not a valid argument. This is a technical field, for goodness's sake! "Well, you know what I meant..." wouldn't pass in the factory, so why does it get to pass here?
lol
 
user784668
11:38 AM
Playing devil's advocate wasn't the best idea, I see.
 
@Fanael Correct :D
 
user784668
Anyway, can someone explain me why C++ makes writing variadic functions so hard?
 
because it doesn't provide any kind of type information at run-time
variadic templates will make this much better
 
user784668
The problem is that they will.
 
GCC and Clang both support them, and it's not long before they're fully Standard
 
11:49 AM
@Fanael s/variadic functions/programs/
 
user784668
@Tomalak: some programs are easy to write in C++, for example these that crash mysteriously ;)
 
only if you don't know how to use self-resource-managing classes
 
@DeadMG There are other ways of crashing it.
Say, invalidated iterators, for example.
 
@DeadMG nonsense. It's still easy to write programs that crash mysteriously, even if you know how to use self-resource-managing classes. just don't employ that knowledge for those programs!
 
don't keep iterators around -> problem solved
 
11:53 AM
@DeadMG erase whilst iterating.
 
it = vector.erase(it)
 
@DeadMG I'm not always using a vector
Why are you being so difficult today?
 
SBRM is great and all, but it doesn't solve everything.
There's lots of mistakes you can do that are not solved by SBRM.
 
well, I'm sorry, but the rules for iterator invalidation are easily and explicitly defined by the Standard
 
11:54 AM
they're also explicitly defined by my FAQ post and blog entry
but that's completely irrelevant
 
if you don't know them, then it's your own fault for not knowing the semantics of the class you're using
 
just because it's easy to write programs that don't crash, doesn't mean it's not also easy to write programs that do...
you're confusing lack of knowledge with what happens when you don't employ it
 
not employing it s also your own fault
 
Of course it's your fault if you make a mistake like that.
But SBRM doesn't help prevent it.
 
@DeadMG you're just being silly
 
12:03 PM
I see
so it's unreasonable to expect people to ... use what they know?
 
It's unreasonable to expect people to not make mistakes.
 
if you make mistakes in any programming language, then your program won't operate as expected
 
@DeadMG I think you're completely missing the point of the discussion
It's easier to make said mistakes in C++ than in some other languages, and said mistakes lead to crashes more so than in some other languages. That's it! That's all! No need to get defensive.
 
And those crashes are usually much more mysterious in C++, because there isn't as much metadata available at runtime to help.
 
lol, has anyone else noticed lately the prevalence of the Apple-style casing in questions about HTML "iFrames"?
 
12:08 PM
?
 
this new generation of programmers don't even know what day it is
 
Oh, casing as in upper/lowercase. I was thinking of boxes for some reason.
 
user784668
How does it look like?
 
@MartinhoFernandes LOL
@Fanael How does what look/what does what look like?
 
user784668
Apple-style casing.
 
user784668
12:15 PM
s/like//
 
... "iFrames".
 
user784668
Ah.
 
Indeed.
 
sbi
12:30 PM
@TomalakGeretkal It's iDay, shirley?
Someone please help to close that one as a dupe.
 
sbi
Wow. Last night I was still >200 rep away from 50k, so I figured I'd need to find two real good questions today which I can provide answers for that will get upvoted and accepted, in order to make the 50k. But I got ~100 rep since last night, despite the fact that I have only written one answer which one got one upvote (and an accept) since then.
Really, why should I even bother answering question, when I get the rep for free?
 
I don't think it's a dup.
@sbi Because it's not a competition.
 
sbi
@TomalakGeretkal Yeah, right, SO is not competitive at all. That must be the reason we're sorted by rep on the user pages.
 
@sbi Must be!
@sbi Just because sorting users by rep makes sense, doesn't mean it's a competition. You're assuming that there's a competition to get to the top of the user page.
Is it a competition to have the highest letter at the start of your name, in any system that sorts alphabetically?
 
sbi
12:46 PM
@TomalakGeretkal I must be the only one to think of that, certainly.
 
@sbi I'm sure!
interesting. chat says I'm on 20.4k. I'm on 20.5k (and it's not even a rounding error; I'm just over 20.5k)
 
sbi
A new face appeared on the first page of the users-by-reputation list on #stackoverflow today http://stackoverflow.com/users?filter=all
Or maybe I'm not all alone then?
 
@sbi Competition is not implied there, either. It's a statement of fact.
 
sbi
@TomalakGeretkal I give up, you're too obtuse for my taste today.
 
@sbi ;) You have just been trolled.
Hey, I'm all the way down on page 13 :( Oh well, not for long... the 20s go up to, like, page 7
 
sbi
12:49 PM
@TomalakGeretkal Oh really? I didn't notice. :)
 
@sbi uh huh
 
plonk imminent?
 
sbi
@Default ??
 
if he's trolling you
 
sbi
1:00 PM
@Default I don't mind some friendly teasing. (How could I? I do this myself quite often!) What I mind is rude behavior.
@JohannesSchaublitb They brought in a cave troll!!
 
hehe
 
1:15 PM
A bit OT but anywho... I've created a "Gravatar" account now and added a profile picture to it and it says under edit on my SO profile that "your gravatar is associated with your email address". So does it update my profilepicture automaticlly if I'm using the same email address for my gravatar as my SO account?
 
@Alex Yea, should do.
 
1:32 PM
@Alex It usually takes some time to propagate across caches.
 
damn my questions are good
in fact, I'm pretty awesome in general.
(:P)
 
Just curious, how many holidays per year do you guys have wherever you are?
I'm starting to think we have too many.
This is the second time in three months I get a four day weekend.
 
25 days (Sweden)
oh, you mean.. like common holidays?
 
Like holidays when you don't work.
 
I guess 11 (based on this)
 
1:40 PM
Just counted it, we have 16. That's more than one per month.
 
how can it be too many?
the more the merrier, right?
 
For the individual, yeah, maybe. I don't understand a thing about economics, but stopping the whole country doesn't seem healthy for the collective.
 
lol tomalak
 
sbi
Germany is a federation. There's holidays that apply to all the states and those that are established by the individual states. If you put them all together, according to feiertage-newsletter.de/deutschland/gesetzliche.php, there's 16 of them, but no one state has them all. Some states (like Bavaria) have up to 14. I think 9 is the lowest. Unfortunately, Berlin (where I live) has only 9 of them.
 
hmm
ppl in the #coffee room on freenode say that I shouldn't though
but they seem like fanatics on their coffee
 
sbi
1:49 PM
Oh, I just saw that individual states can have even more than those. For example, tomorrow is another holiday in six states and in some places in two others.
 
Twelve in Norway... so guess I'm downgrading when moving back to Sweden.
 
vector stores everything on the heap right? so making a copy of a vector isn't that expensive I guess?
 
It's as expensive as it is to copy all the elements.
It cannot be less expensive.
 
oh, so they aren't pointers?
 
But, you probably want to avoid the copy altogether.
@Default Is it a vector of pointers vector<T*>?
 
1:58 PM
nope.
 
C++ is a value-typed language.
 
I haven't written it yet :)
 
Things are values by default, not references, like in C# and Java.
 
according to this they are stored on heap
brb..
 
Yes, they are, but a copy of vector copies all the elements.
 

« first day (249 days earlier)      last day (4705 days later) »