« first day (257 days earlier)      last day (4698 days later) » 

11:03 AM
0
A: what is wrong with this program ?

FredOverflowYou seem to have an incorrect model of sizeof, so let me try to get it right. For any given object x of type T, the expression sizeof(x) is a compile-time constant. C++ will never actually inspect the object x at runtime. The compiler knows that x is of type T, so you can imagine it silently tra...

 
nice answer @FredOverflow. +1
 
Pet peeve... "sizeof x" doesn't need parentheses, except on MSVC! Which makes it a double pet peeve ;-)
return (x) is just as bad... :-/.
Well, some old MSVC versions I'm told.
 
11:18 AM
@Tony that depends on whether x is a type or a variable. One needs parens, the other doesn't.
 
@JerryCoffin I heard the parenthesis are needed with a type because it's using the transtyping syntax
 
Jerry: exactly... in Fred's example, x is a variable
 
I find it simpler to always write sizeof(foo), regardless of whether foo is a variable or a type.
 
And besides hurting some puritan eyes, it does no harm, right?
 
Fred: yes, each to their own... just a pet peeve after all :-)
 
11:23 AM
+1 for homogeneity
 
@Martinho: well, I think it's important conceptually to understand which are keyword and which are function calls... using return and sizeof object can help highlight that, while return(x) and sizeof(x) disguise it.
But, it's about as trivial a stylistic thing as anyone could ever quip over...
 
@Tony I use syntax highlighting for that :P
 
sacrilege! 8-)
If Stroustrup had wanted you to, he'd have listed the colours and fonts to use in TC++PL... ;-]
 
Frankly, I use a 20 year old editor, and it has that.
It has had that for over 13 years.
So, I don't buy any excuses against that.
Except for paper printouts used for code reviews.
Which I don't find very smart.
 
I like printing stuff... should be guilty, but I can concentrate on it more intensely somehow, for reviews and taking in overall design of large modules - not so much for whole systems.
But it's good to at least have italics and boldfacing to help highlight things.
 
11:34 AM
LaTeX has been around since the 80's and it can do that.
 
All true... but it still won't get me using sizeof(x)... I'm stubborn.
 
Yeah, I know how that is. I have a few of those quirks myself.
Is it just me or there are too many people out there that think that bland factual sentences devoid of any explicit politeness indicators are inherently offensive?
 
@MartinhoFernandes could you give an example ?
 
What was just flagged.
Oh, you can't see flags, sorry.
 
Martinho: not just you... me too. Unfortunately I have to work for someone like that....
I've got to get out of this office... nearly 9pm. Catch you later all.
 
11:45 AM
It's weird how low-rep users cannot see things like close votes, flags, etc.
I often miss the context when the discussion goes meta
 
@kbok information overload.. why should it be visible?
 
@kbok Trust me, you don't want it visible.
It's annoying.
 
maybe there should be an opt-in/out option for those flags :)
 
Well, at least now things are calmer, now that the Android room doesn't have write-access for everyone anymore.
 
I though flagging was quite rare
 
11:47 AM
It should be.
 
@MartinhoFernandes does it steal focus or something?
 
It puts a little blue circle on your avatar.
It's not a big thing, but when you check it and see that the flagged message reads, say, something as innocent as "No, you can't do that."...
 
Totally off-topic : does someone know a way of getting rid of Firefox 5 modal proxy dialog ?
 
Uninstall Firefox :P
Trust me, it works.
 
Actually it is the corporate proxy which is shitty
It only works with firefox and IE.
Believe me this is the case where you want to use firefox :)
 
11:50 AM
@MartinhoFernandes hehe.. bummer..
maybe missclicks?
 
Given the frequency of those, I doubt that.
 
Ok, test time
well, nothing happened
 
@kbok my house just set on fire. did you run into UB?
 
@Default whoops
I won't flag myself again, I promise
 
Were you trying to fake AJAX requests or something?
 
11:53 AM
what?
 
How did you (attempt to) flag yourself?
 
clicked on my message, then flag for moderator
Is there other ways ?
 
Of flagging yourself? No. But other messages have a little flag icon on the right.
I didn't even knew you could flag yourself like that.
 
Interesting
there is actually flag as offensive and flag for moderator
 
"flag for moderator" calls a moderator, as in a real moderator, those guys with the diamond.
 
11:56 AM
@MartinhoFernandes a whole new world of oppertunities appear! :)
 
well, crap :)
 
The flag as offensive is the one that annoys us 10k+ users.
@kbok You really did that?
 
yes
 
What did you put in the text?
 
"testing"
 
11:58 AM
"How are you today gentlemen?"
 
fine.. just fine.. how are you @CatPlusPlus?
 
freaky
 
today promises, look at that cat greeting me
 
anyone else signed up for the C++ emails? I always get one question as <h1> in my mails
could it be because of #..?
seems like it..
 
12:10 PM
I never got any email from SO.
 
@CatPlusPlus you can sign up for emails by clicking a tag and then subscribe
 
OMG, this question is so lame
I'm disappointed
-3
Q: Is this a bug in GCC

MetallicPriestI am using GCC in Linux and one thing is really frustrating me. I have a function Initialize that is defined in one file and I'm using it it another file, but before I use it I declare it, like this void Initialize(....); void someFunction() { ... Initialize(...); ... } And note t...

 
I don't really want emails from SO, anyway.
 
@kbob this user metallicpriest doesnt accept questions
i remember telling him that, he was like 10% accept. then he randomly accepted some and was like: now gimme the codez
 
@hexa : you mean answers ?
 
12:15 PM
err, yes. answers /blush
2
Q: 64 to 16 bit hash key

MetallicPriestWhat is the most efficient way of hashing 64 bit values to 16 bit values, something like the following function. int16 hashfunction( int64 ); With least probability of collision.

 
@CatPlusPlus it's fun for the first three emails :) then it becomes more of a choir..
 
Yeah 50% accept rate
 
like here, the question was fully answered, by two ppl. both valid solutions, he never accepted
 
It's fun how people always think the compiler is in fault
I remember this C course we had
where we were using function from math.h
Our teacher said : "Due to a bug in gcc, you have to append -lm to the gcc command line"
 
For real?
 
12:24 PM
Yeah, now everyone in my class thinks gcc is a buggy piece of shit
 
:D
 
Very few really knows what -lm stands for btw
 
I don't
 
link the libm
same as -ljpeg or -lpthread
 
probably mathlib.
 
12:26 PM
don't use gcc so I wouldn't know -ljpeg or -lpthread either :) just found it via google
 
@Default what do yo use ?
 
What do you use? MSVC?
 
yup
 
I always found MSVC was a hell to add external libraries
 
math.h is part of the standard library, so I think your teacher is correct that normally you shouldn't need to add this lib
 
12:28 PM
why it's just under project > options > linker > additional libraries, it is
 
@StackedCrooked that hardly makes the compiler the culprit
 
@StackedCrooked Is it the same for -lstdc++ ?
Anyway it can be called non-standard behaviour, but it's hardly a bug
 
@kbok Yeah I guess.
 
@StackedCrooked I remember my first c++ program
gcc complaining that it missed gxx_personality_v0
the error reporting is not very noob-friendly indeed
 
:)
 
12:31 PM
I usually need to Google the errors. Must have been a pain in the past.
 
"what do you mean my program has no personality"
 
@kbok It needs more charm :)
 
@StackedCrooked maybe I should've given it a pet name
maggie.cpp
 
@kbok Well, it is a piece of shit. :P
 
@CatPlusPlus It's a non-standard piece of shit I guess
I use clang where possible
 
1:06 PM
How do you know if you have a Java program on your hands? Every other class ends with -handler
 
getManager().getFactory().getInstance().createSomething()
 
Factory.getFactoryFactory().getFactory().getBeanInstanceHandler().getBean("Facto‌​ryHandler");
 
PaulaBean
 
Real code : ServiceManager.getServiceManager().getDelegueLecteurCache().getCacheManager().r‌​echercherNextDefaultInstanceLocalisation(instanceLocalisation);
In my current project.
 
Remember this one?
(The answer is the one that immediately comes to mind:) )
 
1:17 PM
Naggers!
 
Lol this part is so awesome
"remember kids, the only reason dad used this word is because he wanted to make money"
 
1:33 PM
How are you all today?
 
Tired
 
Trying to figure out how to send sms in java. pls email me the codez
 
got woken up to take my delivery of food and realized I'd forgotten something
 
@kbok Burn it with fire.
 
1:35 PM
Tired
@CatPlusPlus I wish I could
 
@MartinhoFernandes your comment made me realise i forgot to paste a bit of code
(still in ugly Linus style)
actually that code is Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com>
 
@hexa It's still GPL.
 
yeah
 
Ben Gardner is the copyright holder, and he gave you the rights to do as GPL says.
Oh, you were trying to it wasn't written by Linus?
Linus imposes that style on all the kernel code.
 
2:01 PM
going for a one week vacation. any suggestions for funny OoO messages? [edited]
 
What's OOH?
 
out of hours
oh
that's the wrong one :P OoO I mean (Out of Office)
 
For the phone, or for e-mail?
 
email
 
Something like :
OoO Oo
thanks.
 
2:03 PM
make it a one of those undelivered email messages
 
it should include our team mailbox at least :)
@Collecter haha
 
reply with porn, then say it was a virus
 
just kidding :)
@hexa maybe an automatic hello.jpg dispenser ?
 
@hexa :D
 
Make it look authentic by sending one to a fake email and copying what is sent back to you, but putting your information in
 
2:05 PM
my account has been hacked, I will have fixed it by the 11th July
until then, contact <teammailbox>
 
Embed Nyan cat in it. Why can I not stop listening?
 
@Collecter yes! good idea. nyan cat ftw :)
 
> I am new to Python, and noticed something I believe its a bug.
Those people.
 
@CatPlusPlus again and again.
 
Woo, almost 300 answers.
For... total.
 
2:12 PM
@CatPlusPlus How will you celebrate this grand day of 300?
 
I will not notice, because I will forget till tomorrow.
 
maybe an answer that says "This! Is! C++!!!"
 
By posting an answer with nothing but a link to an already accepted answer!
 
I think I did that once. :D
 
@MartinhoFernandes haha, I remember reading about one of those on meta :)
 
2:13 PM
Or twice.
But shhh.
 
@CatPlusPlus You're evil.
 
0
Q: Django low level cache views

user823148I have an index view which validates a form containing various data. Even though the thankyou.html page doesn't have complex calculations to kill the server, i would like to render a a slighlty different html page if thankyou.html is already low level cached. To tell you the truth, I don't know w...

 
as long as you get rep for it, amarite?
 
Oh. My.
Just look at this code.
Are you seeing what I'm seeing?
 
Are you looking at the MarkDown?
I clicked edit reflexively to format the code as code... and then it hit me.
 
2:15 PM
Oh. My. IPU.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; form = UserForm()
We have a winner.
2
 
I'm compelled asking "what is u"
or do you not have to declare your variables in python?
 
You don't.
 
@CatPlusPlus lol. have fun formating that
 
@hexa It's easy really. You copy the code directly from the rendered post.
Someone did it already.
 
> deleted 4127 characters in body
 
2:19 PM
Indeed. Clever. I was gonna copy the text, find/replace &nbsp with
 
\t doesn't work so well here.
 
\t doesn't work so well anywhere!
 
it works on my machine!
 
or ill edit my text so you see what i mean
 
2:23 PM
Ill include that on every email i send to my contractors
 
I found it in the about page for some program.
 
I wish i could remember what program it was, but one program's legal thing in the installer only said "By clicking install you agree that (insert program name here) is the best program ever created."
 
someone inserted a "if you email this address we will send you a free gift!". it took a month or something before they got their first email
 
I normally at least browse the legal thing. Wish I had seen that.
 
any better way to make a c++ source file being executable by bash than this?
 
2:33 PM
What do you mean by executable by bash? A polyglot program?
 
@JohannesSchaublitb How does that one work anyway?
 
Or have bash actually execute the C++?
 
@MartinhoFernandes that if I pass that file to bash it prints its text and if I compile with a c++ compile rit prints the oter text when executed
 
Ok, a polyglot.
A mesh (#) makes single-line comments in bash.
You can combine that with #define to do stuff.
 
I wanted to use this for test files
 
2:35 PM
See the StackOverflow 404 page: stackoverflow.com/questions/999999999999
 
@JohannesSchaublitb That heredoc is not nice
 
i.e a test file that can be sourced into a bash script, so that it can set test-configuration variables.
so that the test is self-contained
@Luc any better idea? I can't just call exit, because it exits the sourcing script -.-
it's not a here-doc I believe.
<<< would be here-doc
 
I'm not terribly proficient in bash (as you just remarked in fact)
 
@MartinhoFernandes stackoverflow.com/questions/404 actually gives the 404message as well, but redirects me to some other question instead :P
 
ah that was a "here string" rather than here-doc. I see :)
 
2:38 PM
@Default It's a deleted question.
 
I thought it would be easier to type
 
A curious one: "How can I game the stack overflow system to achieve higher ranking and extra badges?"
 
@MartinhoFernandes Ifigured. but you must agree that question/404 shouldn't be found :)
 
@MartinhoFernandes Don't tell anyone, but I heard you can get rep by posting answers.
 
@StackedCrooked so that's what I'm doing wrong.
 
2:39 PM
@StackedCrooked Who would have guessed!
 
well, take care people, I'm off for the moment.
 
Bye Default
 
Oh, there you go, 300th.
And no rep, but hell, I just want that bloody badge.
4 boats left.
 
Or 6 (+5, -1) :P
 
whats up with all these questions regarding special chars the last 2 days
 
2:43 PM
You can also gain rep using a botnet. Implementation is left as an exercise for the reader.
 
éoúí
 
@StackedCrooked I was hoping your would provide the solution. :( Now I will have to work!
 
@StackedCrooked Maybe a question on codegolf.se ?
 
Oh my, I found a dinosaur.
 
@kbok Try it :)
 
@CatPlusPlus :D
Somehow, that's really funny.
We had to learn Cobol at university.
 
@StackedCrooked I have to go to an interview within a few minutes. Asking a question on codegolf.se is left as an exercise for the reader ;)
 
If you think of COBOL as a domain specific language then it becomes modern again.
 
Code Golf is the most depressing StackExchange I've seen lately.
It's not a Q&A site, it's a reverse pissing contest site.
 
What exactly is code golf?
 
2:48 PM
I find it bullshit, all this fragmentation to other sites.
It could work if there were less sites, imo.
 
@Collecter Making a program as small as possible, character-wise.
 
@CatPlusPlus I see
 
Took me a while to get it.
 
2:50 PM
@Collecter There are also some puzzle contests, not "code-golf" strictly speaking
 
What's the problem with CG? People wanted to move them out of SO, so they made an SE site.
 
They seem to go back and forth to SO
Remember the c++11 detection question ?
 
tomalak needs 5 votes here stackoverflow.com/questions/6534464/is-this-a-bug-in-gcc/… then he gets the gold badge!
 
@MartinhoFernandes no, ofc not. But SE like "Programmers" "Programming puzzles" "Webmasters" "Databases" etc seem to blurry the lines and fragment the community
 
@kbok yeah. i think code-golf.SE should stay code-golf not some weird "puzzle" site
 
2:52 PM
@JohannesSchaublitb lol -12
 
this is ridiculous
join codegolf.se, and I don't have enough rep to downvote
wtf, I'm sitting on 35k over here at StackOverflow :(
 
@DeadMG I think this is what fragmenting is about
 
@JohannesSchaublitb One more downvote for me
 
"why can't I downvote on cooking.SE! I cooked so many answers here on SO!"
 
2:55 PM
@JohannesSchaublitb Codegolf and stackoverflow are about programming
In fact it used to be a tag
 
why are you saying this tome
@kbok stackoverflow.com is a website
google.com too
 
Oh yeah, so stackoverflow is as unrelated to codegolf as it is to google
 

« first day (257 days earlier)      last day (4698 days later) »