« first day (279 days earlier)      last day (4652 days later) » 

12:00 AM
Hmm, today was a stale day for reputation :-(
 
@KerrekSB I capped.
 
Yay, well done -- I was busy in the early evening GMT, which I think is a prolific time for questions...
 
12:54 AM
> When a post is first created, it says "viewed 1 times" in the sidebar. This should say "viewed 1 time".
> so view it more than once – Jeff Atwood♦ Sep 26 '09 at 5:52
 
Good fix.
 
user457812
Is it wrong to stab people who confuse C and C++?
 
I'd say it only depends on where you stabbed them.
 
user457812
I like to think it's self defense, because they might put me in a coma with stupid questions.
 
user457812
1:02 AM
Luc: In the eyes
 
Have you considered providing them with a C compiler and C++ code, or vice versa? I'd like to see their reactions when their little world comes crumbling down.
 
user457812
No, because that would be too generous
 
3:05 AM
-4
Q: Is anyone else tired of the windowed operating system interface?

thfApplications are king. Data and usability take a back seat. Lion just came out and it's basically no different. I still have to move and resize windows to move information back and forth. The end-user has no realistic chance of customizing the processes to make workflow efficient. It's a day-t...

I like those tags.
 
3:20 AM
I'm going to sleep. Hope I find some good answers when I wake up:
0
Q: Should we use constexpr everywhere we can?

Martinho FernandesWe obviously can't make everything constexpr. And if we don't make anything constexpr, well, there won't be any big problems. Lots of code have been written without it so far. But is it a good idea to slap constexpr in anything that can possibly have it? Is there any potential problem with this?

 
 
5 hours later…
8:12 AM
I'm pretty sure our database would get featured on thedailywtf if anyone submitted it
got tables trkusr, tsl and tst, and columns like x8, x9 and z3.
And they're just the ones that happen to be used in the query I'm fiddling with atm
 
:)
 
hahah
 
sbi
@jalf Those column names smell like Excel to me.
 
@jalf you haven't seen some of the code at my workplace then :)
 
8:25 AM
work is overrated
@StackedCrooked I'm sure the place I used to work at was worse
 
@TonyTheTiger could be. my workplace isn't bad, it's just that some of the code makes me frown
 
@StackedCrooked some of the code I looked made me barf
 
but they are allowing me to refactor much of the code, which makes the work more interesting
 
@StackedCrooked oh that's nice :)
 
did you barf on your keyboard?
 
8:29 AM
@StackedCrooked yea lol
twas never the same working after that
the barf smell and all that LOL :P
 
Lol, it's actually 10 am now.
My sleep cycle is so messed up that I wake up in the morning now.
4
 
lol :P
 
sbi
@TonyTheTiger That gives a whole new meaning to the old "You owe me a new keyboard" meme: "You owe me a new keyboard because your code made me throw up." Not bad. I'm tempted to try this here.
 
@TonyTheTiger you didn't clean it up then ? well it's not your job anyway :)
 
@StackedCrooked yea but you know, there's always bits that hang around :P
 
8:31 AM
ugh
:)
 
@sbi heheh :)
 
OMFG. honestly! What does it take to move the tree??
 
sbi
@TonyTheTiger This one's even better:
 
if it ever loads
 
8:34 AM
> A cat got hit by a car and laid decomposing in the middle of the road. The road crew simply painted the double yellow line over the cat. It was there for quite a while, and got pretty bad with bloato-moto. Everytime you drove past, it would wave at you with its one arm proudly up in the air.
 
^ @sbi from your first post
 
hahahah lol
 
sbi
@StackedCrooked I'm glad you said that, because I was wondering where you live where this would be considered a cat... :)
 
8:36 AM
Actually, what is it? A rat?
 
sbi
(BTW, if you read the newbie hints, you can find how to reply to specific messages.)
 
A huge rat.
 
a mole?
 
sbi
@TonyTheTiger That would be one giant of a mole.
 
@sbi I know how to do that.
 
sbi
8:36 AM
@StackedCrooked It's dead.
 
A dead dead.
 
sbi
@StackedCrooked I know you know.
 
@sbi yes we've established that much !
@sbi so why are you pointing it out?
it's a waste of chat lines
lol
 
@sbi If you knew I know then why mention it? :)
 
for teh lulz
 
sbi
8:38 AM
@TonyTheTiger Everything in this chat is a waste. Wasting is what the chat is all about.
 
@TonyTheTiger lol
 
I"m cold
 
@TonyTheTiger are you dead?
 
room topic changed to Lounge<C++>: Everything in this chat is a waste. Wasting is what the chat is all about.
 
sbi
@StackedCrooked Well, I knew you knew that I know you know. You have three guesses as to why I said it anyway.
 
8:39 AM
@sbi I couldn't resist, Best. Tag Line. Ever!!!
@sbi cause you enjoy pointing out the obvious and you're bored?
 
sbi
@StackedCrooked I just had another look at it. From the road and vegetation this looks like the US, so it might be an Opossum.
 
@StackedCrooked perhaps, but maybe I haven't realized
 
@TonyTheTiger You can ask the doctor if you're not sure.
 
sbi
@TonyTheTiger Is there two yellow stripes across your back?
Oh, what a dumb question to ask a tiger...
 
@StackedCrooked I don't need a doctor right now
 
sbi
8:41 AM
@TonyTheTiger No, not when you're dead.
 
@sbi that cracked me up :)
 
@TonyTheTiger actually that would be correct in both cases
 
@sbi the mere fact I"m on this chat, wasting my life away, proves enough!
 
sbi
@TonyTheTiger That is wrong, BTW. Two more guesses left, then.
 
@sbi you enjoy annoying people?
 
sbi
8:42 AM
@TonyTheTiger You mean, you can't be dead as long as you still got a life to waste? :)
 
When people ask me why I'm wasting my time I answer that it's a philosophical experiment.
Best justification.
 
sbi
@TonyTheTiger I'm The Grumpy Old Man. I never enjoy anything.
 
@sbi something like that, it's only 10:43 am, don't make me think too much
@sbi oh yea, that's true
so does being on this chat prove we're all really a bunch of sad losers?
 
I'm terrible at getting up early.
 
I'm terrible at working
 
sbi
8:45 AM
@TonyTheTiger "It's only 10:43am"? Boy, my alarm clock went off 7:00am today. I already was awake by then, though, cause one of my kids woke me half an hour earlier.
 
@sbi that's early, can't help it
1
Q: C++:what happened about this?

Zhao RockyI encountered a line of code: int a = 10; int b = 40; a = a+b-(b=a); cout<<a<<" "<<b<<endl; I cannot understand what happended to this code? Can anyone explain for me?? Thanks in advance!

does anybody get that?
 
Morning.
 
morning.
 
sbi
You know you're hungry when... http://twitpic.com/5tq2uq
 
lol
does anybody use Google+ around here? if so, what's your thoughts? you like?
 
8:50 AM
Ya I like
It's a different vibe that's for sure.
 
hmmm
I haven't tried it yet, I'm skeptical
 
The circles is more like twitter's "follow/follower"
Since you can follow someone and they dont have to follow you
 
yet another way to give out way too much information
 
But you can send statuses or links only to certain people.
 
hmmmm
I wonder if it's better the FB...
 
8:52 AM
There are flaws in the circle system.
It all falls down to how every person creates their circles.
Most people have a "Everyone" circle and then they narrow it down to smaller ones.
 
I don't have a circle, I only have the internetz
 
You have a series of tubes.
 
tubes?
oh lol, I get it now
I'm slow today
 
:)
"People dont have speeds!" - Cat++
 
People take speed
and no, I don't support drugs at all.
 
8:56 AM
Addict!
 
Hey, some language fun. The word for riding a horse and the word for fucking in one and the same in Icelandic.
 
So you go fucking a horse?
ewwww
 
Basically.
 
8:59 AM
Bestiality, wow, what has this chat come to???
 
i like horse porns
 
Heh.
 
9:00 AM
lulz
There is pr0n of it, no exceptions!
 
Lounge<C++>, there is porn of it!
 
and there's puppy, just in time for the pr0n convo
lol
 
hey, I just got up
my stomach was giving me trouble till 1am
 
sbi
In other news, @James again said it well, regarding this issue, but with Jeff's attitude this also fits pretty well: twitter.com/#!/tweetsbi/status/91728206046052352
 
oh lol
 
9:01 AM
I don't care
Im in downvote mood
lol why was the horse love unstarred
4
Q: C++:what happened about this?

Zhao RockyI encountered a line of code: int a = 10; int b = 40; a = a+b-(b=a); cout<<a<<" "<<b<<endl; I cannot understand what happended to this code? Can anyone explain for me?? Thanks in advance!

 
Here you go.
 
Horse love for everyone!
You know what's dangerous. Leaving candy behind at work. Candy for breakfast!
 
now they can get horny like unicorns too!
lol
 
Man, you have horses on your mind!
 
sbi
9:08 AM
Anyone here using VC? If so, please look at this suggestion, and maybe vote it up.
 
Aww, stop being so admin!
 
sbi
@ÓlafurWaage Excuse me?
 
You angry?
 
no, he's just grumpy
it's a natural state for @sbi. lol
 
If he was a state machine, he would only have 1 state. Grumpy?
 
sbi
9:10 AM
@ÓlafurWaage I'm confused.
 
Me too.
My comment was about someone removing the horse stars.
and was written before your "anyone here using vc" line.
 
sbi
@ÓlafurWaage Ah, now I understand.
 
sbi
@ÓlafurWaage Actually, the server disagrees with you there.
 
@sbi well the comment was being written before I saw yours, so that's that.
Brain poop
 
sbi
9:15 AM
@ÓlafurWaage What an extraordinarily objective measure! (Mine was written before I saw yours, FTM.)
@ÓlafurWaage Zombie Brain Poop. Actually, this pretty much describes the content of this room.
 
PVS-Studio is 13Mbytes in size and costs 3500$ for a year. That is probably the biggest Mbyte to Dollar ratio I've ever seen.
@sbi I'm sorry, I can not star this, this witty comment is not self contained.
 
sbi
@ÓlafurWaage IMO it is.
 
I can't star my life, it's not self contained either.
 
@sbi Well your opinion stinks of Zombie Brain Poop!
 
9:23 AM
R U GIRL?
 
why would I be?
 
The Internet: where men are really women, women are really men, and little girls are the FBI
2
 
hahah
 
I don't get it.
 
9:29 AM
Mimic octopus can mimic a few sea creatures
 
sbi
@kbok Something to do with China mimicking western products?
 
not a girl but a G.I.R.L hahaha
 
lol
baby koala
lol
 
The octopus mimics the physical likeness and movements of more than fifteen different species, including sea snakes, lionfish, flatfish, brittle stars, giant crabs, sea shells, stingrays, flounders, jellyfish, sea anemones, and mantis shrimp. It accomplishes this by contorting its body and arms, and changing colour.
 
@ÓlafurWaage: Pic or it did not happen!
 
9:31 AM
@Tony it reminds me of that one pictureof donald knuth
 
the same surprised face xD
 
@JohannesSchaublitb what picture?
 
@wilx You think I'm not lazy? I'll show you how lazy I am!
 
9:33 AM
lol
197
Q: Creating a memory leak with Java

Mat BanikI just had an interview, and I was asked to create a memory leak with Java. Needless to say I felt pretty dumb having no clue on how to even start creating one. What would an example be?

 
Ya saw that yesterday, the first answer is pretty neat, but most of the others are "Don't close resources"
 
sbi
@JohannesSchaublitb Your mind works in mysterious ways.
 
9:48 AM
lol
 
lol @TonyTheTiger
 
bad joke, nvm
 
I think he wanted to make fun of my sort of redundant "@sbi"
 
9:56 AM
You did a lol @sbi which was referring to a comment above tony, so I did a lol @TonyTheTiger which was referring to a comment above you.
 
sbi
@JohannesSchaublitb Huh? What are you waiting me up for? It's not even noon yet, and I'll have to be at work till 4pm!
 
lol
weird sense of humor
 
patterns are lovely :)
 
heheh
 
10:13 AM
Coffee!! Imma get some light whip caramel soy latte
 
ok, I'm starting to get a little concerned about my parallel parser
I mean, sure, it's in parallel, but.. I'd have to iterate through the token streams multiple times instead of just one
 
@sbi done. I'd love to see this one upvoted as well: visualstudio.uservoice.com/forums/121579-visual-studio/…
 
@DeadMG did it work to split it up into blocks?
 
sbi
@jalf Thanks! Yeah, that one got my votes, too.
 
dunno, I usually do a lot of forethought before implementing anything, and I haven't written any code yet
but parallelising an O(n ^ 2) algorithm is still going to be slower than a serial O(n) algorithm
 
10:24 AM
I'm often the other way around, I try to implement the naive solution and most of the times I get the best ideas from that.
 
the reason I don't usually do that is because I often have no idea what the naive solution even is :P
focusing on this stuff gives the other half of my brain time to figure that out
 
Well there's that :)
 
I guess
rather than splitting into blocks, and parallelising, I could simply fork off each block into parallel as I come into contact with it
but I'm still concerned that I'm gonna end up looking through the same tokens over and over again on various threads
 
Well you could just make it, create a strange edge case and a counter to see how often a token show up in the parser.
 
that's easy to determine
namespace one {
    namespace two {
        namespace three {
            namespace four {
                type t = type {};
            }
        }
    }
}
the contents of namespace four will have to be gone over during parallelising namespace one, namespace two, and three, and four too
and then again to be parsed finally
 
10:29 AM
is that really a problem though?
 
doing the same work over and over again isn't going to produce a speed-up, even if you're doing it on multiple threads
 
sure does, if the time spent on repeated work is small enough
 
well
I guess it would be simple iteration, rather than actual parsing
so I wouldn't be parsing it about six times, I'd be iterating four or five times, parsing it once
 
it sounds like a really really simple and cheap task, which is unlikely to make a dent in performance
yeah, exactly
 
A loop of size < 10 in a worst case is not something you should worry about :)
 
10:32 AM
lol
 
unless you're computing pi to a billion digits in each iteration
 
heh
I'd just be looping through, looking for the end of "namespace two" so I can partition those tokens off
maybe I could come up with some elaborate scheme to mark it in the lexer, or something
anyway
you're right, it probably won't be that much work, and I shall have invented a new kind of parsing grammar and a new parsing algorithm, which will likely already have been thought of by someone smarter than me
 
There are probably papers out there on what you are doing. But they are called such strange names that you would never find them.
 
yeah, that's one thing, I would never have thought to look for LALR or LL parsing if I had never heard of them before
 
I'm taking compilers this fall, pretty excited for it.
 
10:40 AM
If you're like me, you should be excited about the fall 2013 then. It took me a couple of years for all that to really sink in and make sense ;)
 
I only barely struggled through the compilers class. Then, a year or two later, it all actually started to make sense
 
Ahh I gotcha.
 
real men write compilers with no education about them
 
I'm done with Programming Languages, and we dipped our toes into compilers there. Sounded like fun.
 
10:44 AM
sorry, I meant
real men write hideously complex parsers for languages way better than any other in existence with no implementation experience or education
 
:D:D:D
 
hi . could some one tell if heap resides on top of a stack in the memory layout of a c++ program
 
The heap is in between IIRC
its a variable space in the middle that expands as needed
1 sec
 
okay . so when does a stack and heap collide. will they collide at all ?
 
They will not collide. The OS will watch for that.
err let me rephrase, the OS should watch for that.
 
10:51 AM
@ÓlafurWaage in the cases where the OS is able to watch for that
 
Aye exactly.
 
like how stack buffer overflow can happen. is there any case in which a heap will be overflown
 
yes
 
11
Q: What Happens When Stack and Heap Collide

maheshI am curious to know what happens when the stack and the heap collide. If anybody has encountered this, please could they explain the scenario. Thanks in advance.

 
by the way, it really bugs me that there are so many TFS-related suggestions on the VS uservoice.
Yes, MS finally managed to make a SVN clone that works. Hooray, but can we please move on?
 
10:54 AM
Didn't you get the memo on the TFS reports?
 
hmm?
 
woosh The Office reference
 
woosh. I guess I should watch more tv shows
 
it's a movie, you havent seen it?
 
nup
 
10:57 AM
You should, it's a good one.
Office Space even, sorry.
 
ah
well, haven't seen that either
 
PC LOAD LETTER
 
they took my stapler
Operating systems are just a bunch of while(true) loops abstracted away so you don't have to deal with them. Then you complain if your program has 3 nested loops? Sir, your 3 nested loops are probably running within 4-5 nested loops that you don't see.
 
11:09 AM
ok
I'm still sitting staring at an empty if statement in ParallelParse :(
what I really need is another stream class, they have a much better interface than vector for this
 
damn
for streaming what?
 
tokens
 
Man I hate some edge cases. I have a case that happens twice in a test run of 600k words.
 
lol
 
11:19 AM
There are 6 errors left, 3 of them are easy, 1 i haven't even looked at and the other two. shakes fist
 
We had over 100 errors last week.
 
11:49 AM
Finally put my thesis online "Lagrangian Particle Tracking on a GPU" http://t.co/tnTT4Bi #cs
 
cool
I found a typo!
;)
also a minor factual error. GPU memory buses are designed for throughput, not latency, aren't they?
 
that's at least the right idea, right?
 
@Nils looks cool. Here, have a star!
 
@jalf Thanks, well at least they are not designed to support huge amounts of memory as CPU buses do, but I guess throughput comes before latency
 
afaik they generally have pretty horrendous latency
 
11:57 AM
Added this paragraph at the last second, maybe I should have thought a bit more about it..
 
that's why they need pipelines of hundreds and hundreds of stages, and tens of thousands of threads in flight, in order to hide the latency
but that's a pretty minor issue imo. Your main point, that they're not optimized for large quantities of memory is correct
just wanted to be able to go "hah, I found an error in your thesis" ;)
@DeadMG where does the parallelization come in? Right now you're just recursively calling the function on the same thread?
 
yeah
right now, I'm more looking at "it works"
for the simple case of nested namespaces :P
parallelising that single call will be quite easy with the PPL
of course, it doesn't actually do anything
which is probably an at least somewhat major flaw
 
@jalf hehe ok
 
@DeadMG you could see it as a strength. If it doesn't do anything, then it doesn't do anything wrong either
 
12:11 PM
hehe
I need to start implementing my AST if I want to actually get it as output from the parser
fortunately, the PPL will be of great help constructing an AST that can be modified in parallel
 
sbi
@jalf And I bet it's darn fast, too!
 
@sbi: rofl
 
sbi
@DeadMG I liked it more when you were laughing so hard you were yelling.
 
humph
quiet, you
I r busies
note to self: if you intend to use polymorphism, that requires inheritance
 
sbi
@Dead: If you don't want to be disturbed, then, rather than telling us to shut up, you might want to consider logging out.
Just an idea...
 
12:24 PM
lol
@Nils i did also put CRTP reference into my thesis :)
I should have referenced james coplien though. I used "C++ templates, the complete guide" as a reference :)
 
:)
well I asked on SO about the paper and he himself replied
3
Q: Original article from the C++ report 95 about the CRTP online anywhere?

NilsI've just learned about the CRTP Pattern and am looking for the original work. The reference of wikipedia says Coplien, James O. in (1995, February). "Curiously Recurring Template Patterns". C++ Report: 24–27. I also found it on ACM, however it's not available for download :( I wonder i...

 
neat
@Nils how did you make those nice class diagrams?
 
OmniGraffle
it only runs on a mac though
 
ah i see now. it's a school of applied science and arts. so the diagrams in the work must look nice :)
aww. if there would only be a wine but for emulating mac :)
 
vmware and the like can do it afaik
 
12:50 PM
Review of programming languages, in 1984
 
Yuck!
COBOL!
 
COBOL!
I think this is pretty fascinating. He has a form generator in a DOS like environment that generates COBOL.
 
kobold!
 
There is a guy there talking about how expressive Pascal is and how little syntax is has.
 
sbi
@Nils Wow, Jim here, too. Although he very likely just googled for his name and only dropped in to answer this one question, I'm still impressed.
 
12:56 PM
"Having fun with FORTH"
 
sbi
@Collecter As students, when someone told us there's an OO extension for COBOL, we coined the term COOBOL. :)
 
@sbi Nice. I happened to be making a reference I hoped people would understand. Guess not. If they did, they did not comment.
 
0
A: Ascii value of Enter Key in C - Unix

0A0DAssuming you mean a CARRIAGE RETURN, it is ASCII 13 or Hexadecimal 0x0D (hence my username 0A0D). If you mean LINE FEED, it is ASCII 10 or Hexadecimal 0x0A. I will let you enhance your question more before I answer further.

 
sbi
@Collecter I think they did. At least yours was starred, so someone must have found it useful/interesting.
 
@sbi I did not notice.
 

« first day (279 days earlier)      last day (4652 days later) »