« first day (840 days earlier)      last day (4093 days later) » 

12:00 AM
Hm, this one looks interesting...
 
-1
Q: How to forward declare a custom constructor?

Sebby JohannsI have a pure virtual interface and want to define its factory method, which returns a subclass of this interface. This works fine: struct MyVirt{ ...all virtual stuff }; class SubVirt; //forward declaration allows factory: MyVirt*CreateClass(){ return new SubVirt; } Update: Some of the comme...

Some idiot insisting new doesn't need to know the size of the object it's allocating
 
Page 24: "Getters and Setters are evil". I already like this book!
 
@FredOverflow Probably -- all of Holub's books that I've looked at have been at least fairly decent.
 
Who is this Holub guy?
 
"X is evil" considered evil
 
12:04 AM
@FredOverflow Allen Holub -- not sure if he still does, but wrote for Dr. Dobbs for years. Also wrote Compiler Design in C, essentially the only worth alternative to the Dragon Book (unfortunately, now out of print though).
 
@FredOverflow: I made a laughable TicTacToe, do I get a cookie?
By laughable I mean of laughable quality
 
@Borgleader I don't have cookies, sorry :(
 
Oh well
 
I can show you one I did 9 months ago to show the folks at /r/learnprogramming as an example of how easy it is to make a shitty game.
 
Mine is in a console :P
 
12:08 AM
yeah same here
spot the goto. :P
 
http://pastebin.com/ZYRc75ce
Spot the shittyness :P (brb food)
It probably has a bug or two, I whipped that up in like <30 min
 
Yours has a class, interesting.
 
@JerryCoffin Oh, he also wrote "Enough rope to shoot yourself in the foot" :)
Writing a compiler in plain C does not sound too much fun.
 
woo! I passed a second test case!
 
He also wrote "C+C++" lol
 
12:12 AM
8
Q: We should be able to close questions as duplicates of any question

murgatroid99Today, the behavior of duplicate close votes was changed so that a question can only be a duplicate close vote target if it has an upvoted or accepted answer. I think that this change is not a good one and that it should be reversed, for the following reasons: The purpose of being able to close...

 
@JerryCoffin Shit. Can you tell I hardly ever used it?
@Borgleader tic tac toe with "pieces"? I think of them as markings
@FredOverflow 2*c + 1
@Ell Ask someone you don't trust to help you. A small hand held will do.
 
Wow, check out the comment thread on this:
 
I totally start to use RGB hex when describing colors :(
 
@sehe Well I thought of it as a reusable board with pieces you can place on it. But yes I guess it could be markings.
 
@Borgleader Have you ever seen it played with pieces>
 
12:21 AM
Uh yeah
 
@FredOverflow Not now, but when he wrote it there weren't a lot of alternatives (copyright 1990).
 
I'm sure I've seen a few children's tic tac toe boards with magnetic pieces
 
@sehe I'll take your word for it anyway.
 
@MooingDuck Yeah, it's hilarious...
 
12:23 AM
Hilarious indeed.
 
why did people used to call it "down-modding"? seems like a stupid phrase.
 
The only thing I can't figure out is why the last std::cin.get(); call doesn't actually do anything. Probably some buffer stupidity.
 
@Rapptz Oh dammit, you're here. That means I need to provide a screenshot.
 
Holy shit, I can't fit those comments on my two monitors.
 
12:24 AM
@Mysticial I'm here too....
 
It's okay.
 
Lemme re-arrange for 4.
 
I'll try to find it on stackprinter or something
How do I use stackroulette
 
@Mysticial Relevant:
 
Why was that mod-deleted
 
12:26 AM
..for the love it bears to fair maidens forgets its ferocity and wildness..
Not found!
:(
 
Seems like it could be one of those "historical exceptions" to me
Or just leave it closed so that it can still be read.
 
Doesn't even fit on 4 monitors.
 
@Mysticial fuck, how tall is your monitor?!
 
@LightnessRacesinOrbit Taller than yours
 
oh snap.
 
12:28 AM
And here's the rest of it:
 
People actually pick dates to get married based on multiples of 2?!?
 
goddamnit
what's that word "time-...-ing"
 
I suppose it would fit on 4 monitors if I turned them sideways.
 
consuming
thanks
 
Man Ctrl + F and Ctrl + Z in real life would be cool.
 
Ell
12:30 AM
Yeah
 
@Rapptz I'd like Windows+E to get the menu at restaurants.
 
@Rapptz I try to CTRL+F my IRL books all teh time :( Espcially instruction manuals
 
@Mysticial I find it weird that you don't have app/extension to do something like this:
 
Or Alt+F4 to quit your job.
 
@Rapptz What's it called?
The only time I actually need it is for screenies... so
 
12:32 AM
Well besides it fucking up the image quality due to size :(
 
I haven't needed it enough to actually look for one.
 
@FredOverflow No that would be Ctrl+Shift+Esc -> End Process Tree, Run -> "FuckItAll.bat"
 
does the StackExchange API allow uploads to i.stack.imgur?
 
API?
 
nvm it's read-only.
@user1690130 Application Programming Interface?
 
12:35 AM
@Rapptz Nerds do all sorts of crazy shit.
 
@Rapptz I am trying to combine perl and API at the moment. Very hard stuff :(
 
APIs are hard?
 
oh cool
dammit, I don't wanna restart FF.
I do it the next time it hangs - which will probably be sometime in the next hour.
 
12:38 AM
Chrome has a 60% chance of crashing if I download something.
 
Oh the kids question got migrated.
 
@Rapptz they are hard in perl
 
That's why I Use The Right Tools For The Right Job™
 
1
Q: Changes to "close as duplicate"

Shog9As you may have noticed, Jarrod's been hacking away at some design changes to the "close as duplicate" UI. These are the first fruits of some discussions we've been having internally regarding the "close" UI as a whole, with the goal being a smoother, easier-to-understand experience for all invol...

 
@Rapptz aka Don't use Perl? xD
 
12:45 AM
Why can I not close?!?
 
it's bugged
10
Q: Duplicate target erroneously rejected although it has upvoted/accepted answers

BЈовићThis review is not possible to finish, because I get that this question can not be closed as a dupe of this question, because it has no accepted or upvoted answer (although it has two answers - each with 6 upvotes).

 
> It accomplishes there no longer being two open, identical questions in existence, clogging up the tubes and making my OCD hurt.
 
because they fixed what was not broken. and, in doing so, broke it...
sometimes I worry that the devs don't spend enough time in the trenches to see how we really use SO
I feel that the extreme amount of effort us lot put into closing things to keep SO vaguely tidy goes unnoticed
but perhaps I'm imagining it
 
Wie geht's?
 
@LightnessRacesinOrbit The primary problem at the moment seems to be much simpler: rolling out changes before completing even the most minimal or rudimentary testing.
3
 
12:50 AM
@MooingDuck Did you like that?
@JerryCoffin Well, that too. And have you spotted the instability lately?
 
@LightnessRacesinOrbit I did
 
@LightnessRacesinOrbit They're migrating to another datacenter or something.
 
I can't help wondering whether this stuff would be going down if Jeff were still around...
@R.MartinhoFernandes New York. But the instability predates the move, and has continued for weeks afterwards.
@JerryCoffin They also seem to hate the community, in that no feature suggestion or request or discussion led to the changes. I know that they don't have to ask us, but, really?
 
@LightnessRacesinOrbit There hasn't been "weeks afterwards". They were just testing out use of the new data center in New York day before yesterday.
 
@JerryCoffin I thought they migrated on like the 9th Jan or something
@JerryCoffin Regardless, problems were not limited to the day before yesterday!
Now I don't care about a bit of downtime here and there, but there does seem to be a pattern forming, which is different.
Do we really think that somebody with only 2 years' C++ experience can write a complete C++ implementation...?!?!?
 
12:55 AM
@LightnessRacesinOrbit Since when is he gone?
 
@LightnessRacesinOrbit No. There was originally supposed to be, but it got delayed. They moved datacenter from Oregon to New York last fall. During hurricane Sandy they (hurriedly) moved it back. Now they're trying to get things set up at a different data center in New York. Seems like they may be getting beyond what the Oregon center can support (and the office has moved, so I'm not sure they have anybody on-site in Oregon any more either).
 
@LightnessRacesinOrbit This has been pretty widely discussed. Apparently somebody got confused between Feb 1 and April 1.
 
@Rapptz counts as foresight. you know, undefined behaviour tends to occur if you forget about that date
 
He still hangs around as a mod, but he's not a dev AIUI
 
12:56 AM
@LightnessRacesinOrbit I think I have heard writing a C++ compiler takes about 10 manyears.
 
That sounds more reasonable
But.. you get a certificate!!
Jeff Atwood ♦, El Cerrito, CA
24.3k 34 104 118
> However, I no longer work at Stack Exchange, Inc. I'll miss you all. Well, some of you, anyway. :)
 
@Rapptz NEEDS MOAR JPEG
 
@sehe Not my fault!
 
I think that this is sufficient evidence that nobody got "confused".
 
12:58 AM
@LightnessRacesinOrbit yeah that's ludicrous. I flagged that as spam/unwelcome, by the way
 
@LightnessRacesinOrbit Maybe they are writing a toy compiler that doesn't support templates?
 
@LightnessRacesinOrbit the compiler building "course" post
 
@FredOverflow Maybe. It seems to imply full compliance required, though.
@sehe Why? :(
 
@LightnessRacesinOrbit No, I don't think it's really confusion -- but it is utterly ludicrous.
 
12:59 AM
@JerryCoffin I guess now I'm confused. What are you saying? Jeff no longer works at Stack Exchange, which is demonstrated on his public user profile and his own website.
 
@LightnessRacesinOrbit who are you guys talking about that said that was possible? (I can't get to cppgm.org, my company firewall thinks it's a malicious website)
 
17 hours ago, by sehe
I'd like this post removed in absense of any credentials.

This has all the hallmarks of a scam, for me. At best it is an elaborate joke.

If anything it is advertising. Do we need to allow advertising to spoil the isocpp forums?
 
@LightnessRacesinOrbit I didn't comment at all on Jeff working at stack exchange, but on the write a compiler nonsense.
 
can't find out what the friggin UB is graaaaaaawl
 
@MooingDuck i didn't need a firewall to reach that conclusion
 
1:00 AM
@sehe Doesn't mean you need to flag a post in which I wrote the URL so that you'd know what I was talking about when I started discussing it. Thanks a lot buddy. :(
 
@GigaBass use vim; :%d is certain to catch it
 
@JerryCoffin Oh. Okay then :)
 
Give me a sec to google that
 
@LightnessRacesinOrbit :< sigh
 
@JerryCoffin Your mention of "Feb 1 and April 1" led me to believe you'd accidentally replied to the wrong post
 
1:01 AM
@GigaBass I feel slightly bad. That was a troll
 
@LightnessRacesinOrbit I meant it looked to me like somebody's April fools joke, posted a few months early.
 
> The C++ Grandmaster Certification is a massively open free online course (MOOC) for expert C++ programmers. It provides the most rigorous C++-specific qualification possible.
 
oh LOL
 
loool
@JerryCoffin ahhhhhhh! Now I get it
Faildown
 
does anyone by chance know Objective-C?
and mac programming
 
1:03 AM
@EliteGamer Yes. Many people.
 
do you?
 
(However, I shoot such people on sight.)
@EliteGamer No; I do not.
 
ok
anyone else?
 
@EliteGamer Great!
 
@EliteGamer If I did, I certainly wouldn't admit it.
 
1:03 AM
Why are you asking us? Just to see who's actively participating in conversation at this moment in time?
 
@JerryCoffin lol
 
well, i just though someone might know
 
@EliteGamer A couple in the Objective-C chat room may know. Maybe.
 
Anyways, seems it is now marked as spam, or is it just for me?
 
ha, but there is never anyone in the room
 
1:04 AM
@sehe Just you.
 
@Rapptz Funny feature, that
@EliteGamer See the "Java Sucks" room. You might catch a lobster with strange polyglot fetishes before he wastes time sleeping
 
I want to mark as dup of stackoverflow.com/questions/106508/…, but the system has been broken by a premature feature roll-out. — Lightness Races in Orbit 13 secs ago
 
@LightnessRacesinOrbit Wait, that question has 100+ votes...
 
So?
15
Q: Duplicate target erroneously rejected although it has upvoted/accepted answers

BЈовићThis review is not possible to finish, because I get that this question can not be closed as a dupe of this question, because it has no accepted or upvoted answer (although it has two answers - each with 6 upvotes).

Don't expect the feature to make logical sense these days, @Mysticial!
 
1:08 AM
@LightnessRacesinOrbit That's a bug.
 
@Mysticial Correct. Hence the tag
 
@Mysticial I don't get it
 
Oh ok, now I get what you mean I "premature".
 
Okay
 
As in, wasn't fully tested.
 
1:09 AM
Yes
 
@Mysticial s/fully// FTFY.
2
 
@Mysticial What were you thinking about? ;)
 
@LightnessRacesinOrbit Premature ejac...no, I'm sure not that.
 
@JerryCoffin I'm sure.
 
@LightnessRacesinOrbit As it wasn't well-thought out when they designed the feature.
@JerryCoffin Wait what? No that's not what I had in mind.
 
1:13 AM
@Mysticial I said I was sure it wasn't that.
 
@Mysticial There's that too.
The word "hacking" has been used to describe the work; I'm fairly confident that no serious pre-design was involved.
 
any way to Debug with Release's options?
 
@GigaBass Release's options include not having debug symbols. So, er, no.
@GigaBass Got a Heisenbug?
 
hmk
 
(disclaimer: I had to assume a few things, since you gave no details on what "Debug" and "Release" and "options" mean to you here.)
 
1:16 AM
I guess >_>
Well, running the prog in Release has bugs, while in Debug it does well. And I wanted to be able to Debug the Release "version", lol
 
@GigaBass It's always possible, but it'll feel like shoving your nuttsack in a vacuum cleaner at full power.
 
@GigaBass Yes -- just not symbolic debugging. Alternatively start from release options, turn on debug symbols, and go to town (but be aware that optimization can make some code a bit...strange to debug).
 
Yeah I'll give it a try
 
@GigaBass: you could also try some logging to analyse the behavior of a release build
 
Yeah I printed loads of values out to a .txt in hopes I could find what was wrong, but nop.
 
1:18 AM
@GigaBass sounds like you need to put some assert() in your program
 
@doug65536: assert() won't do anything in a release build
 
@doug65536 asserts are compiled out in release
 
sure you can if you override NDEBUG (and _DEBUG in MSVC)
 
@doug65536: but will this not turn off a lot of other code optimizations? e.g. debug level iterators etc.
 
no its a preprocessor define. at worst make a custom assert macro
I use a custom one with equality asserts AssertBreakEqual etc that prints the expected and actual values
 
1:23 AM
@doug65536: I see, but a preprocessor define will likely affect other library code. (for instance I believe MS defines "new" as a macro when _DEBUG is defined, so it could do some memory leak detection work). But yes, some alternative assertion mechanism makes sense.
 
Just debug the old-fashioned way
 
@doug65536: that looks elegant, but macros give me the creeps. I'd go for something simpler
 
the GUI assert implementation for MSVC is utterly unusable, I had to write that :)
 
5
A: Duplicate target erroneously rejected although it has upvoted/accepted answers

Shog9Sorry about this - the test was inadvertently negated, so it only let you close questions as duplicates of questions with no answers. PSA: don't write production code when you're sick. It might catch something from you!

lol....?
unit tests? no?
 
you know, I like the new way to search for duplicate questions.
it isn't that bad
 
1:33 AM
OT: having trouble with this math task: x/(x-1) - 1 > 1/(x+1)
I'm getting 0/(x^2-1)>0
 
or if I multiply by (x-1)(x+1), I get 2>0
 
@ŠimeVidas: it seems to me that should be a tautology
 
what's the task?
 
the left expression is equal to 1/x-1
 
1:35 AM
@AndyProwl But it's not, try 0
 
@ŠimeVidas Did you divide by x? What's your input domain? If x can be 0, you cannot do that.
 
@LightnessRacesinOrbit R
(real numbers)
 
Also dividing (x-1) by x does not yield (x^2-1)
though you may not have done that
 
The equation defines an empty set.
 
@ŠimeVidas: oh, right.
 
1:36 AM
An equation defines a set?
 
@R.MartinhoFernandes But 2 for instance is a solution
 
@R.MartinhoFernandes: you mean it has no solutions? i don't think so
 
@LightnessRacesinOrbit Yes.
 
so it's not an empty set
 
@ŠimeVidas Oh, wait.
 
1:37 AM
What is the task?
 
You need to do a lot of branching.
Whenever you multiply both members by something, if < 0 switch sign, blah blah.
 
That sounds like a fun task.
 
@ŠimeVidas: if you multiply by (x - 1), you should consider whether X is > 1 or not
and if not, change > into <
 
@AndyProwl Ah, good point
forgot about that
 
ARGHHHARHGARHGARHGARGHARGAH
all the tags!!!!!
 
1:39 AM
Uff, leaving it for tomorrow, feeble mind. Night
 
But if I just combine everything into one big fraction, I get 0/(x^2-1) > 0 which doesn't make sense
 
(x^2)-x ?
 
it's unlikely to fit into one big fraction
 
@ŠimeVidas: you can't combine everything into one big fraction
 
@ŠimeVidas How do you get 0 on the right side?
 
1:40 AM
@R.MartinhoFernandes Just move everything to the left
@AndyProwl Why not?
 
@ŠimeVidas That does not result in 0 on the left. How do you move everything to the lft?
 
@ŠimeVidas Didn't Martinho just explain that?!
 
@ŠimeVidas: you need to consider the cases x > 1, x < -1, and -1 < x < 1 separately i believe
 
@R.MartinhoFernandes Example: x < 2 becomes x - 2 < 0
 
1:42 AM
Another example: x < 2 becomes 1 < 2/x and so many other things
 
@LightnessRacesinOrbit Not really.
 
@R.MartinhoFernandes Well, I just move the fraction from the right hand side to the left hand side
 
@LightnessRacesinOrbit You cannot multiply without considering negative numbers.
 
@ŠimeVidas: that's not an equation though
 
@R.MartinhoFernandes Yes, that's my point.
Please read my whole message :)
 
1:44 AM
@AndyProwl Yes, I have to consider those 3 intervals separately. That's the solution. But I thought I can just move everything to the left, and combine it into one fraction. I'm not sure why I wouldn't be able to do it.
 
:|
 
E.g. x/(x-1) - 1 becomes [x-(x-1)]/(x-1) and so on
 
@ŠimeVidas: you cannot because you would have two multiply both sides by the same quantity, but you don't know if that quantity is positive or negative, so you don't know if you have to flip > into < or not
 
@ŠimeVidas That leaves you (x(x+1)-(x-1)(x+1)-(x-1))/((x-1)(x+1)), which is not zero.
Or it is. I'm drunk, btw.
 
1:47 AM
@AndyProwl Subtract 1/(x+1) from both sides. No multiplications.
 
> If c is negative, then multiplying or dividing by c inverts the inequality:
> If c is positive, then multiplying or dividing by c does not change the inequality:
You do not know c so you can't be blazé about it
ooh, Blue Bloods
^ a gift.
 
@R.MartinhoFernandes: yes, but then you have to bring x to the numerator somehow, so you'll need a multiplication. Or am I drunk too?
 
@AndyProwl But you already have one big fraction. Th multiplications come later.
 
So you tried it and what happened? Your team mates couldn't understand the code anymore? — Hans Passant 27 secs ago
 
But you don't need that.
 
1:50 AM
What am I missing?
 
P(x)/Q(x) > 0 <=> P(x) > 0 && Q(x) > 0 v P(x) < 0 && Q(x) < 0.
 
So you have 2/(x+1)(x-1) > 0 <=> (x+1)(x-1) > 0
@ŠimeVidas Step 2 is wrong.
 
Is there anyone left in here who is not ratted? Six pints of Directors does it for me.
 
@R.MartinhoFernandes Step 2 is line 3?
 
1:52 AM
You can simplify that to mean x^2 > 1
lol
 
@ŠimeVidas Yes.
@Rapptz Yeah.
 
Well, when I see 1/(x-1) > 1/(x+1) I would just invert both sides and check under what conditions I have to flip the >. So for instance if X > 1 and I invert the two sides I get x - 1 > x + 1 and that's always false. So I know the equation has no solutions for X > 1. And so on
 
Too much trouble.
 
@R.MartinhoFernandes Ah shit, it's the last step that's wrong. The numerator should be 2.
And then what you said above 2/(x+1)(x-1) > 0 <=> (x+1)(x-1) > 0
 
Oh, yeah, I got the wrong step wrong.
 
1:54 AM
what are you trying to simplify it to?
I don't get what you're asking
 
@Rapptz I've posted a screen shot of the task above.
 
Where?
All I see is you trying to simplify it
 
@Rapptz the Exercise is x/(x-1) - 1 > 1/(x+1)
 
and the answer is x^2 > 1
or if you want 1/(x-1) > 1/(x+1)
 
which means x is in R\[-1, 1].
 
1:56 AM
or 1/(x+1)(x-1)
 
@Rapptz The answer is an interval, e.g. x e <3, infinity>, stuff like that
 
what does that notation mean? lol
 
Too drunk to use the proper Unicode character for the set of real numbers.
 
@Rapptz x element interval
 
1:58 AM
@Borgleader oh look, I'm right.
 
(that's how we denote solutions in Croatia)
 
I just pasted x/(x-1) - 1 > 1/(x+1) into wolfram ^.^
 
needs more LaTeX
 
In this case, the solution is x e <-Infinity,-1> U <1,Infinity>
 
2 mins ago, by R. Martinho Fernandes
which means x is in R\[-1, 1].
 
1:59 AM
I think
 
Called it.
 
@R.MartinhoFernandes yeah seriously
 

« first day (840 days earlier)      last day (4093 days later) »