« first day (454 days earlier)      last day (4485 days later) » 

9:00 AM
If they're pure, it'll barf. If not, it won't call derived implementation.
 
@Tin in other words, in c++ there is no problem (except for pure virtuals)
 
Tin
@StackedCrooked, so you're suggesting for instance, eliminating the generate() function and putting its whole definition in the constructor?
 
I think that the constructor should try to restrict it self to as little as possible to make the instance valid. This sort of ties in with lazy instantiation, the idea that you do not create instance of member objects until you actually need them. You get faster initial creation, but slight slow downs as member objects get created on the fly
 
@Tin i think he means, you should heed the @cat's advice and initialize your member in the constructor's initialization list
 
@Tin That's what I usually do. For example for a GUI Window constructor can be quite big in my code.
@AlfPSteinbach That too.
Although I usually don't initialize GUI widgets in the initialization list.
 
Tin
9:04 AM
@AlfPSteinbach, I updated the link pastebin.com/Yc8uvEzy and added the suggestion regarding the constructor's initialization list
 
there is nothing wrong with initialise functions, but they can be abused. especially if you HAVE to call the init functions
 
Tin
mm, say i have a class having a std::vector<T> class member. would it make sense to have an init function to fill the vector in a given way? or could i do it directly in the constructor?
 
init members rarely make sense.
And manually called ones are just silly.
The rule is: after exiting constructor, object must be ready to be used.
 
@Tin well, lets say you had a matrix class, it would be handy to have a few functions like "makeAllZero" and "makeIdentity"
 
That sounds like Java.
m = matrix(); /* identity */ m = matrix(0); /* all zero */
 
Tin
9:10 AM
@CatPlusPlus, The rule is: after exiting constructor, object must be ready to be used., thanks a lot! it couldn't be much clearer than that. I'll have now your suggestion in mind, when defining the onstructors.
 
@CatPlusPlus yeah, but at some stage you might have a matrix that for what ever reason you want to make identity. so you where passed in a reference to a matrix, and under certain conditions, such as the operation can't be done or the matrix gets made invalid, you need to set the matrix to identity
 
Via assignment.
 
Tin
@CatPlusPlus, so in the issue pointed by @thecoshman you're then suggestion having say the definition of makeIdentity() as the content for the default constructor and the definition of makeZero as the content of a param constructor? is that it right?
 
though I do like the idea of a matrix(T value) constructor that set's all values to that one value
 
Identity matrices are bit more useful than all-zero ones, so default constructor creating identity matrix makes sense
Also, immutable objects are better.
 
9:15 AM
@CatPlusPlus have you got any good articles that talk about the reasoning behind this. I understand many of the arguments, but I still don't think they are that great an idae
 
Tin
to handle identity matrix by matrix(T value), would it be different than handling zero matrices by matrix(T value), right? because identity matrix has ones in its diagonal, but the rest is zeros.
 
especially for things where the objects value are changing all the time
 
Mutator methods can be "emulated" by making them const and having them return a modified copy.
 
sbi
Oh. Has the robot decided, after @Alf's frightening prognosis for the day, to spend the rest of it in bed? @RMartinho, I meant to tell you that I love the hybrid suspend mode in Windows. Thanks for pointing it out!
 
@StackedCrooked Hence immutability.
@thecoshman Matrices don't change, though. You create new ones based on old ones.
Java vector and matrix classes are silly that way, because the language is too stupid, and you have to mutate in place.
 
9:17 AM
@CatPlusPlus what do you mean?
 
I don't know. That's a derp moment there.
 
@sbi hybrid suspend mode you say...
 
sbi
@thecoshman Yes, I do. So?
 
But still, no operator overloading and they're awful.
 
There was once a case where a radiation machine in the hospital exposed patients to too much radiation. The company defended its machine by saying that it had no moving parts so it's impossible to misfunction.
 
9:19 AM
@sbi Why do you have to turn that feature on :O
that is amaizng!
@CatPlusPlus yeah, I miss operator overloading :(
 
I still don't know what's so amazing about that hybrid sleep.
 
@CatPlusPlus lose power? no problem!
 
Tin
@CatPlusPlus The rule is: after exiting constructor, object must be ready to be used. I was thinking, and what about when an object gets constructed by its default constructor. Is the object also ready to be used?
 
@Tin Yes, if it was well-designed.
 
@Tin it should be is the point
 
9:21 AM
@Tin Why not? It's still a constructor.
If there is no valid 'default' state, then there should be no default constructor.
 
sbi
@CatPlusPlus When I left home this morning, I put my laptop into suspend mode. and put it into my backpack. When I arrived at work, it took <10secs to allow me to login. This is a 8GB RAM machine, and takes a min or two to wake up from suspend-to-disk mode, when I have 250 FF tabs open, three instances of VS, and a lot of other stuff. Reviving it in less than 10secs is spectacular.
 
@thecoshman I just hibernate.
 
@CatPlusPlus even though sleep is insanely faster?
 
I can't say I like the idea of having even half-powered-on laptop in a backpack.
 
and I just leave my laptop at work turned on all the time :D
 
9:23 AM
Mine unhibernates in about 30.
 
@CatPlusPlus why not? it's (Sort of) like having a phone in your bag
 
sbi
@thecoshman If you leave it at work, why do you have a laptop?
 
@sbi My desktop PC at work boots faster than it wakes up from sleep modus. But that is probably because it never manages to wake up from sleep modus at all.
 
@thecoshman It's a laptop, not a phone.
 
@sbi fuck knows, it's just what they gave us
 
9:24 AM
Laptops tend to generate much more heat.
Also, sleeping drains battery faster.
 
@CatPlusPlus not when they are in sleep mode. more or less all that is powered is the RAM to keep the memory active
@CatPlusPlus minor difference
 
@CatPlusPlus Once pulled out my laptop from my backpack and it was freaking hot and its coolers were blowing at max power. Ever since then I don't trust sleep modus any more and just turn it off.
 
Maybe. I still prefer to just shut it down, and let it deal with the fact that there is no external monitor now on its own.
@StackedCrooked No screen damage?
 
Tin
@CatPlusPlus If you want to refactor repeated constructor logic, then use either a base class .... so usually when we need refactoring, we might need at the end inheritance, right?
 
No there was no damage.
 
9:26 AM
You got lucky, then.
 
sbi
@thecoshman I used to have a desktop machine at work and one at home (the latter sometimes sponsored by the company I worked for). I thought I wouldn't want a laptop, because they are less powerful, and compiling takes processing power. Then, for one job, they gave me a powerful desktop machine plus they asked what kind of laptop I wanted to have, a light one or a powerful one. I chose the latter, and hardly ever turned on my desktop after it arrived.
Since then, bargaining for a powerful laptop is part of every interview I have, and meanwhile I don't even want a desktop machine anymore.
 
@Tin Base class here is just a workaround on C++03 deficiencies.
C++11 lets you delegate to another constructor with no problem.
 
sbi
@StackedCrooked That happened to me, too, a few times, when I was in a hurry and closed the lid before it had gone all the way to suspend mode. I have since learned to wait and only close the lid/stow it away, after it did.
 
@sbi we compile on remote servers, so it's kind a moot point
 
sbi
@CatPlusPlus I have been lucky maybe half a dozen times. Is that coincidence? OTOH, mine is more of a mobile desktop than a laptop, and certainyl can take some heat.
 
Tin
9:30 AM
@CatPlusPlus, great, i was just reading a bit about it. so the main idea is basically to define one constructor in terms of another, right?
 
@sbi One day it'll register a hit on the keyboard and melt the display.
 
In case of MacBook; pulling out a usb device when the lid is closed wakes it up. Which is useful when you want to use an external monitor only. But dangerous also.
 
@sbi one of the first things I do when I get any sort of laptop, is tell it to do the right thing when I close the lid, FUCK ALL
 
@Tin Yes.
 
@Tin usually
 
sbi
9:32 AM
@thecoshman Yeah, in one company I worked for we used IncrediBuild for VS. Compiling on 30 cores across the network put the fun back into hacking at templatized string handling used all over a several MLoC codebase. :)
 
Tin
@thecoshman, is there anything i forgot?
 
sbi
C#, however, not only is as dull as Turbo Pascal, it also compiles as fast.
@CatPlusPlus How so?
 
@sbi Just being pessimistic.
But I've seen screen damage via overheating in a bag.
 
@Tin try not to do things that can fail in a constructor and try to keep it short
 
sbi
@thecoshman I always set it to suspend-to-RAM. But it initiating suspend-to-disk, and getting a suspend-to-RAM signal somehow seems to screw it up sometimes. So I learned my lesson there.
 
9:34 AM
@CatPlusPlus huh, never seen that
@sbi like I said, I hate laptops doing anything when I close them.
 
sbi
@CatPlusPlus I haven't seen that, and I have burned my fingers more than once trying to pull the overheated laptop put of its protected case.
 
@StackedCrooked Whut.
 
@CatPlusPlus Sorry, ignore that.
 
mawning
is this an infinite loop for (mbx = mby = 0;;) ?
 
@TonyTheLion I think so... well, the condition is "" and it loops whilst condition is true... so what does "" count as?
 
9:39 AM
@TonyTheLion Sure, if there is no break-like (break, goto, return, etc) inside for
 
@maverik yea there's an if statement inside the for
I just wanted to confirm my thinking that it is essentially an infinite loop
 
@TonyTheLion That won't break the loop.
 
@StackedCrooked I meant the if has a break inside
 
@StackedCrooked, why not? for(int x = 0;;) if (x == 0) break;, It depends actually
 
@maverik that should break shouldn't it?
 
9:42 AM
@maverik It's the break statement that is breaking the loop here. Not the if.
 
@thecoshman, if condition is true somehow
 
Nitpicker brigade.
 
@TonyTheLion Btw, yes it is :)
 
@StackedCrooked, yep, if itself not breaking the loop
 
Well, that concludes this discussion.
 
sbi
9:43 AM
@thecoshman for(;;) is an endless loop.
My answer to The Pointless Premature Optimization Question Of The Day.
 
@sbi We keep saying that, and nobody listens.
That's a waste of time.
 
sbi
@CatPlusPlus Hey, we're C++ programmers. Of course we're all nitpickers! In the same way chimney sweepers are sooty.
 
@sbi copy and paste into ALL the answers about optimisation
@sbi not the good ones, they keep them selves clean and thus your house clean
which reminds me... need to book a sweep ¬_¬
 
sbi
@CatPlusPlus Actually, I've had positive experience with these kind of answers. Some of them have been accepted.
 
I think it's easy for a newbie to fall into the optimization trap
 
sbi
9:47 AM
@thecoshman Shrug. Maybe we should set up a Pointless Optimizations FAQ entry with such an answer and then close all such questions as dupes of that one? :)
 
All optimisations are pointless if you're not finished.
 
sbi
But then, such questions always provide cheap rep from experienced programmers by giving these kind of answers. :)
 
@sbi I was thinking something along those lines
@sbi repwhore :P
I've optimized my coffee drinking.
 
sbi
@CatPlusPlus That's not true. See my points #2 and 3.
@TonyTheLion Intravenous?
 
@sbi makes sense
 
sbi
9:51 AM
@thecoshman I'd envision an entry that lists lots of such questions with links to the actual questions closed as dupes of it. Most of us here could contribute answers to this, giving it a lot of weight. Then ruthlessly close every POQ as a dupe of that.
Sounds a bit harsh, though. What does the rest of you lot think?
@TonyTheLion Hey, I came out with the idea to turn it into an FAQ instead!
 
well... could I create the FAQ question? please :D
which may or may not be a C+P of your answer @sbi :P
probably not though ¬_¬
 
sbi
@thecoshman I'd rather wait for the rest of the regular gang here to have their say to the idea. @Xeo? @jalf? (He'll be against the idea, but that counts, too.) @RMartinho? @Luc? @Alf? @Fred? @Dead? (Whom did I forget?)
 
@sbi :( fine <puts hands in pockets, hangs head, and kicks a stone in a sulky sort of a way>
 
Xeo
What's the matter? Short summary please?
 
sbi
@thecoshman No slacking there! You got work to do! Take your hands out of your pockets! Back straight! Turn on the light in your eyes! Now, there's a fine lad. Now get going, search good candidates for questions to list, and formulate the list! Present your findings here after lunch. After that, you are free to create your own answer to it.

The Pointless Premature Optimization Question Of The Day

14 mins ago, 10 minutes total – 25 messages, 4 users, 0 stars

Bookmarked 12 secs ago by sbi

 
9:58 AM
lol
@sbi woah, had no idea you could do this
 
@sbi ... erm ... so... by good candidates, you means questions that have a good answer on optimisation and are asked in a good way?
 
sbi
@TonyTheLion You had no idea I could create bookmarks?!
@thecoshman No, I mean questions that are exemplarily pointless. :-)
 
> Smartness is proven by being able to write simple code, not by writing horribly complex lines of code.
nice :)
@sbi I had no idea it would one box it nicely like that when posting it in the chat
 
@sbi huh... so I need to look for shit questions. This is going to be painful isn't it
 
I knew you could bookmark stuff
 
sbi
10:02 AM
@TonyTheLion Everybody agrees with these lines, but nobody agrees over what "simple code" is. I have heard programmers prefer hand-written linked lists to the STL on the grounds that they are simpler.
@TonyTheLion Ah, that. Frankly, I hadn't known either, but I suspected it to happen.
 
@sbi I guess yea, the term "simple code" means something else to every programmer
 
Xeo
@sbi Oh! I'm personally all in favor for it. However, I wonder if the meta-police would like that.
 
sbi
@thecoshman Why? There should be lots of those out there, some with real good answers. If you search the answers of high-rep users in the tag, you are bound to find exemplary questions.
 
I mean, I've been trying to understand this "simple" code written in C for a while now, and I'm still not sure how it works. can't possibly be that simple
 
sbi
@Xeo Wouldn't they like us to close POQs as dupes?
@TonyTheLion There's a fine line between simple code and simplistic code. :)
 
10:04 AM
We've long stopped caring about the meta-police
2
 
Why is there no "this question is stupid, go away" close reason.
 
Xeo
Yeah, nevermind that. If the question + answer(s) is/are well done, it should be fine
 
@CatPlusPlus we NEED that
 
Who polices the meta-police? Meta-meta-police?
 
sbi
A disturbance in the Force I feel. #SOPA
 
10:06 AM
lol
 
I need a break from all the uni stuff.
My brain is melting.
 
ok, maybe someone in here can help me figure this out
 
Xeo
@CatPlusPlus "Closed as 'FUCK THIS SHIT (╯°□°)╯︵ ┻━┻' by ...."
5
 
@sbi correct me if I am wrong, but optimisation is really a language-agnostic thing really
 
this, is a bunch of nested loops, that ultimately decodes 8 x 8 pixels of a jpg images, now I don't get what the ssx, ssy loops are doing. I understand, so far, that it is looped over by the outer loop in terms of components, but ssx can be 2 for example, does that mean there's two 8 x 8 matrices per component?
 
10:10 AM
I'm looking at ATS language. It apparently uses .sats, .dats, .hats and .cats as extensions.
 
Xeo
@CatPlusPlus Cats!
 
It's actually part of nanojpg, a little library to decode jpg
 
however, not well documented
 
Xeo
> ┬──┬╯︵ /(.□. \) ℲℲℲℲℲℲℲℲℲℲℲℲ
 
10:12 AM
@Xeo looks more like circlejerk then r/funny
 
breakfast :D
 
Xeo
afk too
1
Q: Is the behavior of "a=(b+n)/++n" defined?

poordeveloperI am wondering if following expression has defined behavior (always equal to "a=n/(n+1); ++n;") in C++? a=n/++n;

Please vote to reopen and then vote to close properly as a duplicate. :)
 
@TonyTheLion Will you add C++ to that Wiki page?
 
@user800454 No, I don't edit Wiki's
 
Xeo
@user800454 It's already mentioned: en.wikipedia.org/wiki/Duck_typing#Templates_or_generic_types - the article in general refers to dynamic duck typing it seems
 
10:27 AM
@Xeo Yes, but no C++ implementation. We need to defend C++ from teh other evil languages ;-)
@TonyTheLion OK, I see..
 
Xeo
@user800454 That's intended it seems, since, again, the article talks about dynamic duck typing.
Which is not supported by C++
Even C# has a dynamic implementation example.
 
@Xeo Sorry missed the main point of the article.... so we don't have reflections in C++?
 
@Xeo What's the difference, really?
 
Xeo
@user800454 No, atleast not without considerable effort
@CatPlusPlus More visible
 
Reflection is not related to typing discipline.
 
Xeo
10:32 AM
Also, order and stuff
 
@CatPlusPlus Educate me .. in reflections you can query for methods and member variables and add them at runtime. as to my understanding... what is dynamic typing ?
 
Reflection is runtime access to type information.
C++ is really primitive in that regard.
 
@CatPlusPlus or is is more like a scripting language where I don't need to compile when I change the source code?
 
Adding new things to types at runtime is not related to reflection. Dynamic typing is typing discipline where usually only values are typed, and types are resolved fully at runtime.
"Scripting language" is a misnomer.
 
@CatPlusPlus think I got it now, we need to come up with a slow running C++ interpreater that we can compile and get massive speedups in performance when we compile it
 
10:36 AM
Also interpreters usually compile, too.
 
So you are saying there is a difference between typed langauges and interpreteaded code as in scripting languages?
 
Typing has nothing to do with code being compiled or interpreted, and there's no such thing as "scripting language".
 
0
Q: mean shift segmentation of images

georgeDoes anyone know any available code for "mean-shift segmentation of images" available in C++, java or matlab?On the net there is some source code in C++ but it doesn't seem to work prperly. After compiling I get this error: 1>e:\terebes\gui\bgimagpgm.cpp(24) : fatal error C1083: Cannot open ...

a little help here
 
@sbi Hmm, what is the purpose? Just to point fingers at people who fall into the optimization trap? To discourage questions about optimization? To feel powerful by closing lots of questions as dupes? Basically, how would it add value?
 
@CatPlusPlus I had this same discussion with my house mate in uni. In theory, you could take C++ and use it as a scripting language just like JS. He thinks that as you are no longer compiling your code it is no longer c++ equally, if you did compile JS into an EXE, it would no longer be JS.
 
Xeo
10:46 AM
@jalf A single, concentrated compilation of optimization tips and ways to avoid premature optimization, if I got it right.
 
@george no drive by linking please
 
Xeo
Wtf, who flagged that message?
 
@Xeo but isn't that self-defeating? The only sane answer to any optimization question is "it depends". So how can one single global answer ever be useful for every optimization question?
a useful answer to a question about optimization will have to be tailored for the precise context
 
Xeo
@jalf It's an FAQ, a compilation of relevant answers. I didn't say a single answer
 
sbi
@jalf See, I knew you oppose the idea of closing questions as dupes of FAQs, but to be fair I had to give you a chance of saying so. :)
 
10:47 AM
@sbi well, I just asked what the point would be. :)
@Xeo but it doesn't matter if it's 1, 5 or 20 answers. They still won't be good fits for the specific questions you're closing as dupes
 
sbi
@jalf I disagree with that. My answer fits 80% of the POQs out there.
 
unless you're only going after the "bad" questions
@sbi so wouldn't it be more interesting to try to improve on that kind of questions? Work with the OP to specialize the question into a form that's useful, rather than simply closing as dupe because the generic "profile and then act on the result" answer was already written
Also consider the message it sends. Newbies tend to be turned off somewhat by having their question abrubtly closed as a duplicate.
 
@jalf but few questions are "this section of code is slow, any suggestions on how I can improve it, here is my proof it is slow"
@jalf this is a very good point
 
@thecoshman and that is why I'm saying it'd be better for everyone if you left a comment on the questions telling them how the question should be improved
 
@thecoshman what?
 
sbi
10:51 AM
@jalf I must have written such answers dozens of times, exhibiting very widely varying patience and quality. The point of FAQ entries is to have a single, patiently written, high-quality answer. But you know that already, since we've been over this dozens of times, too... :)
 
I fully agree that the generic "how do I make my code fast" question is useless. But for a lot of people, it's the best they can do, and it's a starting point at least
 
The best would be like in Common Lisp where you can run in scripting mode and compile the code when you are happy with the code and get a good speedup
 
sbi
1 hour ago, by sbi
Sounds a bit harsh, though. What does the rest of you lot think?
 
@george it's not very nice to dive into a room and post a link to a question you have just asked. Most users here are watching for new questions any way.
 
At least don't turn it into an insult. Don't refer to POQ or put "pointless" in the title
 
sbi
10:52 AM
@jalf Should we count this as you agreeing?? :b
 
People don't ask those questions to annoy you, they just don't have the knowledge necessary to reason about performance and optimization
so if you're going to redirect people to a FAQ question, make it a respectful and helpful one
 
@user800454 interesting idea that
 
@sbi Well, I feel the same way about it as I do about all the other FAQ questions. I'm against the FAQ as a whole, but if you're going to have it, putting an entry on optimization in it makes sense
I'm just concerned because of the tone I've seen here on the subject. People tend to mockingly talk about "pointless optimization", and I don't think that belongs in the FAQ
The frequently asked question is not "how do I waste my time doing pointless optimizations", but "will X speed up my program", or "how do I make my code go fast"
After all, questions like "is a for or a while loop faster" are pretty frequent
Or "should I inline every function"
 
sbi
@jalf No, neither do I want such a tone in that entry. As I had written, I'd like one that makes it clear why theirs is a dupe, by listing and linking to the many similar questions.
 
but one more point to consider might be to simply refer to the FAQ in a comment, rather than closing the question. I can think of a lot of questions where the OP would benefit from this general optimization advice, but where it's not enough, and doesn't provide a satisfactory answer by itself
of course on a case by case basis
 
sbi
10:58 AM
@jalf Hey, that idea would allow us to harvest rep by pasting a snide std-answer and get upvotes on that FAQ! :D
 
yup, and that too ;)
 
this is not fun. I am simply failing at openGL :(
 
opengl isn't supposed to be fun
 
#version 330
layout(location = 0) in vec4 position;
uniform mat4 PVMmatrix;
void main(void) {
    gl_Position = PVMmatrix * position;
}
does that look acceptable to you guys?
 
11:21 AM
Yes.
But you probably don't want 4D vector as vertex position.
 
@CatPlusPlus Sure you do. And don't forget the spacetime metric for distance calculations.
 
Right.
 
@CatPlusPlus yeah, need to pull that out when it starts to actually work
currently, the vertex shader is either passing through or eating the vertex data ¬_¬
 
Make sure w = 1.
 
@CatPlusPlus it is
would it matter the location ID for PVMmatrix is 0...
 
11:25 AM
After the MVP transformation, too.
 
@CatPlusPlus how I can I see the w after shader has done it's thing, or do you mean I should set it back to 1?
 
You can try with glVertexAttribPointer instead of layout(location).
Or however it's been done.
I can't remember now.
@thecoshman Well, you can check in the shader, and normalise if necessary.
I think.
 
@CatPlusPlus AFAIK using the layout(location) is just a handy way of saving you from having to query the shader where 'position' is
 
I'm a CG-failure-person here.
 
@CatPlusPlus oh yeah :P
 
11:30 AM
Oh, right, it replaces calling glBindAttribLocation from the code.
Nvm then.
 
I think it could be a fecked up projection matrix
are openGL matricies
0,1...
4,5..
...

or are they

1,4...
2,5...
...
 
12:19 PM
They just are.
 
sbi
Neat!
 
@sbi That very ..meta.
 
12:39 PM
@sbi 'tis very funny indeed
 
12:53 PM
that's pretty dam small!
 
@thecoshman I didn't see enough context, what FAQ question?
 
sbi
3 hours ago, by sbi

The Pointless Premature Optimization Question Of The Day

14 mins ago, 10 minutes total – 25 messages, 4 users, 0 stars

Bookmarked 12 secs ago by sbi

 
So you want a FAQ on pointless optimizations?
 
basically yes
 
@FredOverflow I am sure something witty can done here... but it's Friday
 
1:07 PM
a fun puzzle
3
Q: how this algorithm will generate a sequence

user1147717Few days back, I was asked thsi question for a job interview, out of three questions this was the most tricky one. Here is the question: Two integer variables L and R are given. Their initial content is 0 and 1 respectively and it can be manipulated using the following unfold operations: o...

 
Xeo
dammit
Anybody got an Alice Modem WLAN 1121 router at home and got any idea where to find the telnet interface documentation?
 
@Xeo yeah sure, let me just go through my collection of routers...
 
sbi
The guy who came up with #SOPA is a copyright violator: http://www.vice.com/read/lamar-smith-sopa-copyright-whoops. Now, who'd have thought that could happen to anyone?
@Xeo Alice doesn't produce routers. You need to find out which router is actually inside the Alice wrapping. You will then very likely find the docs on the web.
 
Why is C++ locale naming not standardized? It wraps all the C non-standard naming, so they might as well've decently standardized the names...
 
@thecoshman Well, better a FAQ on pointless optimizations than a pointless FAQ on optimizations...
 
1:18 PM
@FredOverflow it's not great, but it it's better then anything I can arsed to come up with right now
 
By the way, you can't spell "parse" without "arse"!
 
@FredOverflow erm... thanks for the tip :S
 
I often confuse @DeadMG and @thecoshman because their avatars look similar in the corner of my eye.
 
@StackedCrooked I am @Dead
 
Xeo
@sbi Good idea
@FredOverflow Can't spell "slaughter" without "laughter"
 
1:22 PM
@Xeo Lol.
Concerning the war on piracy: you can't spell "war" without "arrr!".
 
Xeo
@sbi I correct myself, great idea. Thanks to that I found some hidden webinterface pages. :)
 
UK Budget airline Easyjet introduces £9 administration fee for all bookings, replacing £8 debit card fee. Details soon http://bbc.in/zwTNxw
oh yeah, thanks so much for getting rid of the debit card fee
@StackedCrooked you can't spell "SOPA" with out "GTFO"
 
My milk expired 3 days ago. Should I risk drinking it?
 
@FredOverflow if it smells fine, drink it
 
If it doesn't smell fine, add cocoa.
 
Xeo
1:29 PM
@FredOverflow Depends - was it open already?
 
@Xeo I opened it yesterday and it was fine.
 
the bacteria which curdle milk are not pathenogenic
the worst case is that the milk will taste disgusting, and you can tell because it will also smell disgusting
 
@DeadMG unless you added too much cocoa
 
what is it with yiu and cocoa
 
8
A: Is this undefined behaviour and why?

6502The first is ok *++p1 = *p2++ // p1++; *p1 = *p2; p2++; the second is UB with C++ because you are modifying what is pointed by p1 twice (once because of increment and once because of assignment) and there are no sequence points separating the two side effects. With C++0x rules things are diff...

Nevermind, increment followed by assignment, got it.
 
1:32 PM
@DeadMG the worst case is you are so revolted by the taste that you projectile vomit your self a near death state and have lie in it until some one is able to revive you
 
sbi
> I wish the standard would define "stupid behaviour"– PlasmaHH 3 hours ago
Nice one.
 
17
A: Is `*--p` actually legal(well formed) in C++03

Ben VoigtOf course it's well-defined. It doesn't matter when the assignment p=arr takes place. You aren't evaluating p[0], you're subscripting the result of (p=arr), which is the pointer value which is being stored into p. Whether or not it's been stored yet doesn't change the value, and the value is k...

Please comment on my comment.
 
@FredOverflow done
 
Xeo
lol
 
@FredOverflow see my comment directly on the question
 
1:47 PM
@FredOverflow Burn it!
 
Xeo
@StackedCrooked "If it burns, it was bad."
 
sbi
@thecoshman Actually, milk often tends to smell badly before it tastes badly.
@FredOverflow Milk isn't raw meat. Having a taste of it won't do you any harm, even if it's already spoilt.
 
Xeo
@sbi It does harm to my taste buds. :(
 
sbi
@Xeo Only if it is spoilt.
 
@sbi maybe so, but the smell of gone of milk is not something I want to ingest
 
Xeo
1:53 PM
While we're at taste buds:
user image
2
 
@Xeo epic! how long have you been waiting to post this :D
 
Xeo
It was posted yesterday in some channel, I just remembered it
 
sbi
@thecoshman Usually it's only the bottle that smells (presumably from the cling-ons in the lid). Once you have it in your cereal bowl, it's fine.
I can only shake my head about the attitude to throw away food after the date stamped on the package. At least here in Germany, it's the date the producer guarantees the product will still be fine ("Mindesthaltbarkeit"). That doesn't mean the product will turn bad exactly the day after, it only means it's not guaranteed to still be good then. Yet, people throw away perfectly fine food just because of that date. That's hilarious.
 
@sbi I need my milk very fresh. That's why I prefer to pick up a bottle every other day then stash up for weeks at at time
@sbi oh, wasting sickens me more. I try to avoid getting more stuff then I know I can use before it goes bad
 
Xeo
@sbi I think that's called "best before"
 

« first day (454 days earlier)      last day (4485 days later) »