« first day (552 days earlier)      last day (4414 days later) » 

10:00 AM
@Xeo They had cancelled here sort of, went to a pay only system, then they braught back the free
 
sbi
@Xeo Search for it, I got it off my chest on Wednesday, around midnight local time. The short version: My 12yo son wanted to return deposit bottles, and some guys wanted to rip him off them, and when he wouldn't give them away, one drew a knife. In Pankow!
 
@Xeo Proxies ftw.
 
@classdaknok_t every so often, I just HAVE to listen to 'Raining Blood'
 
@sbi WTF! I’m away for a few months and the whole region goes crazy?!
 
sbi
@thecoshman Yeah, it's been taken over by a special youth crime investigation team.
 
Xeo
10:01 AM
@classdaknok_t Sure, got Stealthy
 
@thecoshman Coincidentally I'm listening that song right now.
My favorite song is Angel of Death though.
 
sbi
@KonradRudolph Actually all the cops agreed that this is rather unusual for Pankow. Also, I suppose those guys considered it mostly a joke on my son. But he almost shit his pants, of course.
 
And now some Counting Crows
 
Xeo
@sbi Wow. That's on the same level as the subway thugs who randomly punch people and start arguments
@sbi If it was a joke, it was a bad one. Very bad one.
 
@sbi oh yeah, it's real funny. You know what would also be funny? Scaring the shit out of them </sarcasm>
 
sbi
10:03 AM
@Xeo As I said, I don't think they even were serious. But a 12yo kids is certainly seriously scared by something like this.
 
Xeo
Everyone would be, if a bunch of guys suddenly pull out a knife in front of you.
 
@notch I may have accidentally cleaned your desk. I was cleaning my own, and then suddenly there was collateral damage.
I'd flip out :P
 
Xeo
Especially considering how bad those subway fights always end, with knifes against unarmed strangers
 
Xeo
lol, cleaning as "collateral damage"
 
10:07 AM
I think I agree with @Sbi with regards to links on the starboard
 
Xeo
@thecoshman What, if a picture gets stars within 2 mins, you replace it with text?
 
@Xeo any link really
 
sbi
@Xeo Yeah. Until those three guys showed up yesterday having obtained security tape, I hadn't wasted one thought on believing they would catch the actual guy who did it. But I want those boys to get feedback for this, so I am happy they also visit the youth leisure center and talked to those guys. I want this to be talked about: Scaring a kid makes you have crime investigators on your heels.
 
Xeo
Well, that, or an upvote and a downvote on the accepted answer...
>_>
<_<
 
10:09 AM
@Xeo rep whore :P
 
ಠ_ಠ
 
Xeo
*heels
@thecoshman Badge whore in this case
 
@Xeo either way, whore
 
sbi
@Xeo Damn, I'm bad at this.
 
Xeo
@sbi Atleast I notified you within 2 mins!
Atleast the whoring works. :D Now I just have to wait for the badge to kick in
 
sbi
10:11 AM
@Xeo Yeah, that's why I could heel this.
 
@Xeo :)
 
is 'SUB' a keyword in C++11?
 
Xeo
nope
 
sbi
Are there whore badges for badge whores?
7
 
@Xeo It's got 42 votes now, so nobody will up vote it anymore.
 
sbi
10:12 AM
Let's suggest that on meta: Whenever someone has X number of badges, they get a badge whore badge.
 
silly ideone highlighting random words :S
 
Xeo
@sbi within Y days, maybe?
@thecoshman Wrong language ticked? :P
@classdaknok_t I like it.
 
hm... C++0x doesn't seem to apply highlighting :S
 
sbi
@Xeo Mere details.
 
Xeo
Ideone needs to update anyways. The GCC versions are way outdated..
 
10:14 AM
Damn, it turns out I’m not the only contender for the best room in a shared flat in all of Cambridge :(
 
ooooh, if you say you want to compile with C++0x, it selects the basic highlighting scheme
 
@thecoshman I think the keyword that most closely resembles SUB is signed. Maybe you mistyped?
 
@StackedCrooked no, I meant to write 'SUB' it's just ideone highlighted it as a keyword, but the highlighting mode was not right
 
Xeo
Thanks to all the accomplices :D
 
@Xeo grats
 
10:17 AM
So now we can all cancel our up votes, right?
 
Xeo
You could... but it's at 42! Can you actually do it?
 
Sure, it'll be at 41.
And then it's not "the answer" anymore. :P
 
Xeo
anyways, afk watching mindcrack ultra hardcode
 
@sbi that's excellent news. I'm roaming (between Frankfurt and Dresden somewhere) an I discover that SO chat is still hard to use on a smartphone ;)
 
sbi
@sehe Yeah, it is. I know that. Should you come by Berlin, drop me a note, and we could have a beer together.
 
10:23 AM
@sehe Does the chat have a public API that could be used to write a frontend?
Or does it maybe use Jabber internally? (is Jabber even appropriate here?)
 
7
Q: Provide a streaming chat API

TheLQAs people try and make IRC and XMPP bindings for chat, they all seem to be using the same inefficient and undocumented AJAX based system to communicate to the chat server by simply reverse engineering chat with Firebug. All current implementations are messy, unreliable, and incomplete. And new pe...

 
sbi
@KonradRudolph I think this chat uses a proprietary protocol. There have been users talking about an SE.Chat to XMPP interface, though.
 
Meh I just got a message from a company on Stack Overflow Careers.
 
what's better, #ifdef or #if defined ?
 
I haven't even completed high school yet…
 
sbi
10:25 AM
@classdaknok_t Oh.
 
@Abyx none of them.
 
@Abyx Neither is better. #ifdef x is equivalent to #if defined(x).
 
@classdaknok_t not-an-answer
 
I have to go, see ya.
 
Seeya
 
10:31 AM
@sbi alas that's not in the schedule and it ll be rather busy weekend regardless. Oh and te chat appears to consume roughly 200kb per 10 minutes :(
 
sbi
@sehe Ugh. That makes for hefty roaming charges.
 
Ok. I'm offline. I'll leave the flags for you guys :)
 
@sehe: Bye
 
sbi
@GManNickG Almost time for you to get up again, huh?
 
@sbi Heh, yup. I just finished up my last project for the semester and school. Only one more class tomorrow, at 10am. Gotta get up at 8am and it's currently 4am...hm. Sleep?
 
sbi
10:46 AM
@GManNickG Use this chance to witness the European morning in this chat!
TBH, it's rather dull today, though.
 
@sbi chat or your work is dull?
 
Then psh to that idea. I'll take my 4 hours of sleep. :P
 
sbi
@thecoshman "...the European morning in this chat"
 
Though, lucky me, surprise bug!
 
sbi
10:47 AM
@GManNickG What, you code until 4am, and then the thing is buggy? I had never guessed...
 
@sbi It's unbelievable, I know.
Aha!
Turns out if you want the negation of something, you have to put a hyphen in front of it.
 
Or subtract it from itself twice.
 
K, night.
 
11:13 AM
morning
 
cpx
mawning
 
Oh, I just noticed Prime95 also exists for Linux. Nice.
Are there any other relevant stress tests for Linux?
 
Fuck the taste of paracetamol.
 
sbi
@classdaknok_t That's a weird name for a stress test.
 
@sbi unless you consider that eating paracetamol is the ultimate stress test. Can you endure its taste?
 
sbi
11:26 AM
@classdaknok_t I don't know. I have no idea what it tastes like. I rarely ever swallow pills.
 
cpx
@classdaknokt I had a premonition that you were going to change your avatar, and you did. i'm surprised.
 
@cpx Why did you have that premonition?
@sbi it's the most bitter thing ever in the history of eatable things.
My inconsistency in starting some sentences with capitals and others not reminds me of this.
 
sbi
@classdaknok_t He had that premonition because you did indeed change your avatar, of course. Otherwise it wouldn't have been a premonition, after all.
 
cpx
Maybe I can't tell in words
 
sbi
Today, my inability to type is only surpassed by my inability to concentrate.
 
11:31 AM
@sbi Either you don't know the definition of "premonition", or I don't understand what you mean.
premonition |ˌprēməˈniSHən| n. a strong feeling that something is about to happen, esp. something unpleasant
That doesn't mean it really is going to happen, but it might.
 
sbi
@classdaknok_t Oh, then it's probably me. I thought a pre-condition for something to be a premonition is that the thing actually happened. Sorry.
 
Wouldn't that be a postmonition?
 
sbi
@classdaknok_t Well, you only know after the fact whether something predicted really happened, so I guess I will have to answer this one with "yes".
 
Unless you have a time machine.
 
11:47 AM
how 'wrong' is it to use a namespace with constants rather than an enum, especially as I want to be able to switch back and forth a lot, and also need to enforce the use of the enumOrNamespace::value as I need (want) to use the same value name with different values
 
You can use enum class if you want ::.
enum class foo { bar, baz }; foo func() { return foo::bar; }
 
but I can't implicitly convert to and from an unsigned int with those, going to need to do bit shifting with these values you see
I know that with enums, I get a bit of type safety, but I think that will mostly get in the way. All I really 'need' is a convenient way to be able to have these values defined in one place
 
Then go for const unsigneds or constexpr unsigneds.
 
Enums suck.
 
with in a name space?
 
11:54 AM
Yeah.
 
@CatPlusPlus that seems to be what I am finding out :P
egh, name space with a load of const's sure doesn't look pretty, but I think it is gonig to work a lot better for me
 
You can also use an inconstructible class if you dislike namespaces.
 
const int a, b, c; <-- does this make all three const? and I am fine then follow up with a = 0; b = 1; c = 2 or do I have to assign them as I declare them? (I feel so noobish)
 
Woot open Diablo 3 beta.
 
@classdaknok_t I think I prefer seeing the :: used to help show it is a const, though I might change to using a class, as I might want some helper functions
 
12:00 PM
@CatPlusPlus Is it actually open now?
or just another technical problem?
 
Gawd, 15GB.
And here I thought they couldn't possibly beat WoW's size.
 
15GB?
when I dled the beta a few days ago, it was only 3MB or so
 
surely that was just a dl client
 
ahem
I meant to say 3GB
 
12:16 PM
lol
 
Maybe it expands.
 
and they let me launch the game after dling only another 100MB or so
maybe the full game is 15GB but you can play the client with only 3-4GB
 
Fun fact: D3 uses ICU.
 
I did not know that
 
Why isn't it recommended to use #define in c++?
 
12:21 PM
erm... which ICU
@0x90 it almost always leads to pain and broken code
 
why?
 
Because const and inline are superior alternatives most of the time.
 
in c it works fine
 
no, it doesn't
 
not it works just as badly
 
12:22 PM
in C, it compiles, if you're lucky
 
ah ok :)
 
the whole reason that inline was invented was because #define sucks
 
@thecoshman Take a guess.
 
what is the diffrence between inline and #define?
 
Macros work directly with tokens, not with types or and blocks and stuff, they cannot be scoped, they are allowed to produce malformed pieces of code, the list goes on.
 
12:25 PM
@0x90 #define is handled by the preprocessor. Inlining is done by the compiler after preprocessing.
Bottom line: inline is good, #define is bad.
 
@0x90 if you write #define funnyFunc(x) x += x and call it like funnyFunc(i++) it is not going to do i++ and then add. it is going to expand to i++ += i++ which is not going to compile
@CatPlusPlus erm...
 
@thecoshman how do you write it inline style?
 
you just write a function
the compiler nowadays is probably smarter than you about when to inline things and when not to
 
@0x90 well, I wouldn't bother using 'inline' but I would use templates -> template <class T> T funnyFunc(T var){ return var += var);
 
You have to use inline to get around ODR.
 
12:30 PM
ok thanks
 
@thecoshman Not everything makes sense as a template.
 
#define and the other ppm's have their place, mostly for sorting out what code to compile, such as debug options
 
And codegen.
 
@RMartinhoFernandes well, it is a funnyFunc :P but your right, probably not a good case for templates
 
I use #define for code generation, mostly. Quickly followed by #undef.
 
12:33 PM
With boost pp you can define sequences, and then generate cartesian product of those sequences, and then apply a filter on that, and... If wish I could find a reason to use it.
 
Does anyone here had used opencl?
 
It's Friday. Time to do something crazy.
 
@CatPlusPlus giving Java a go are you?
 
I have no ticket to the burning man ! that is a crazy thing
 
I was thinking about C++ codegen in Haskell.
 
cpx
12:37 PM
FRAIIDAY!
 
fuck
you can't modulus floats?
 
@KonradRudolph Gosh. Nooo!
 
@DeadMG fmod?
 
I should flag that.
 
@KonradRudolph I call your "Friday" and raise you "Void Rays"
 
12:45 PM
@DeadMG Modular arithmetic in mathematics is conventionally defined on integer modules even though the concept can of course be extended to fractions
 
I
Just
Want
To
Scroll
The
Shit
Away
 
go
 
0
Q: How to inherit variables from between forms in Visual Studio, C++

krishkuleSo im working with windows forms, and i stumbled upon a problem, when i press a button a form called Form2 opens and Form1 hides.. But the problem is i need to inherit a integer variable from Form1 to Form2, but i can't figure out how to do that... i tried to make the class Form2 Inherit From For...

 
@thecoshman resize your browser window.
Or install thousands of toolbars.
 
Those are two of the stupidest solutions I have ever heard to a problem ಠ_ಠ
 
12:55 PM
Okay, okay. Zoom in.
 
Three
 
Go to your desktop and create a folder named "007".
 
Is it possible to write a number on a binary base similar to using std::hex ?
 
Nope. You can use std::bitset though.
 
@RMartinhoFernandes why?
 
1:01 PM
@thecoshman It will solve your problem.
Trust me.
 
sbi
SCNR.
 
Unless @thecoshman has an enormous screen, the problem is already solved…
 
@sbi give me back that star
"SCNR." does not deserve a star
 
What star?
 
The sun.
 
1:03 PM
@classdaknok_t I still knew it was up their... waiting
 
@RMartinhoFernandes I'm noticing a distinct lack of anything awesome happening.
 
@DeadMG TIL robots can troll
 
lol
It's an in-joke I have with my friends. We once convinced my roommate that was the solution to some problem he was having with Windows.
 
@KonradRudolph: Those aren't real conflicts - they are all defined within namespaces - so even if you open all the namespaces - ambiguity is only a problem when you try and use an unqualified name with two definitions visible from the translation unit (eg ref could mean std::ref or phoronix::ref). You just qualify the name with the appropriate namespace to resolve the ambiguity when the compiler complains. — user1131467 3 mins ago
 
sbi
@thecoshman You took back your star yourself, and now you come and ask me to give it to you again?
 
1:04 PM
Now it's taken as the solution to anything, right before rebooting.
 
@sbi I can't trust you with stars, I have to take theses matters into my own hands
 
He has a point – are there common opportunities for real conflicts when opening a namespace (or importing names) in a header? I always thought I knew that this was the case but now I can’t think of a scenario that’s not convoluted and really a bug in the respective library …
 
@KonradRudolph meh worry about it when it happens
 
I need to use google test within a windows application
 
@KonradRudolph do C libraries count as "a bug in the respective library"?
 
1:07 PM
@thecoshman That’s the point. “When it happens” could be too late and necessitate a complex rewrite
 
3
Q: How to capture stdout/stderr with googletest?

Jan RüeggIs it possible to capture the stdout and stderr when using the googletest framework? For example, I would like to call a function that writes errors to the console (stderr). Now, when calling the function in the tests, I want to assert that no output appears there. Or, maybe I want to test the ...

 
@jalf Well … no, but I’d prefer something in C++
but actually, this is a good point
 
@jalf Yes.
 
redirecting cout / cerr to a console works for me, but not the whole input of googletest
I think it probably just uses printf.
 
a lot of libraries clutter up the global namespace with all sorts of junk (even C++ libraries). Assuming that it's clean and pristine and contains only that which you explicitly imported with a using directive seems naive :)
 
1:09 PM
any idea how I could do that?
 
The global namespace is pretty much unusable.
 
The new XKCD is nice ’n all, but one of the XKCD forum users killed it:
 
Right now I have codepad.org/iBWhu9FD, but I still do not see googletests output.
 
> A bit contrived. Doesn't everybody find guidelines help ideas? Just keeping lengths minimized never opens possibilities. Quite reversely, since the users verily will Xerox your zeitgeist.
@Nils I urge you to use Catch instead of Google test. It’s the best C++ testing framework, hands down.
4
 
lol
well I already know google test
 
1:14 PM
Look, it's Pacman!
 
@KonradRudolph if you tell me how to get catch's output into a console in windows applications ;)
 
@KonradRudolph what makes it "best"?
 
@KonradRudolph but catch seems to be less intrusive
 
Erm, it runs in a console. What more do you need to get the output in a console?
 
@RMartinhoFernandes complicated to explain, but I need to run it inside a windows application
 
1:17 PM
@Abyx That you can write REQUIRE(a == b) and the diagnostic you get back literallly reads “Test a == b failed for 42 = 23” … no other testing framework offers anything comparable
 
where I open a console via AllocConsole()
 
Catch simply has the best user interface by far
 
@KonradRudolph it looks quite easy to use
will give it a shot
 
@KonradRudolph That gets a bit clunky for some expressions though.
 
@KonradRudolph what about REQUIRE(foo() == b->ar) ?
 
1:18 PM
@Nils Never tried it but should be easy. As far as I know pluggin a new test runner into Catch should be straightforward
@Abyx As far as I know, (almost?) every expression works in the current version
 
@Abyx Works too.
 
oh... but how? separate preprocessor ?
 
I've had some expressions that didn't compile.
@Abyx Expression templates.
Can't quite remember what it was, though. It was something easily fixable, but annoying still.
 
@RMartinhoFernandes Yes, some things may need redundant parentheses. No idea how this is handled in newer version, I know that Phil was working on that
 
@Nils what do you mean? My tests print to the console by default on Windows
unless you're making a win32 app (with subsystem:windows) so it doesn't have a console. But that'd be a weird thing to do for your unit test executable
 
1:21 PM
yes that's what I have, don't ask ;)
but I need to get the output into a stringstream or something
 
@KonradRudolph I've had a few fail for me. But then I got a nice error printing a type name which was something like TOO_COMPLEX_EXPRESSION
 
@RMartinhoFernandes ah... but what about compile time? I don't want to have tests compiling for minutes
 
@Abyx The expression templates aren’t particularly complex, compile time isn’t seriously affected
it’s not like this is Boost.Spirit or Boost.MPL …
 
@Abyx It's been fast enough for me so far. Can't say what'd happen if you have thousands of tests across many files
but it comes in a single-header format, so it's easy to set up (no library to link against), and obviously that speeds up compilation too (no need to touch dozens and dozens of files)
 
@Abyx I currently have ~500 assertions in my project and I don't see any big hit on compile time.
Can't speak for bigger projects.
Compiling the main takes some time (seconds!), but that can be done once and never touched again.
 
1:26 PM
@RMartinhoFernandes That's really minimal if you consider that source files after preprocessing often can be 30k lines or so.
Oh, wait, maybe not 30k.
 
yay, finally editing privileges are mine
 
Wait, what is minimal?
 
@RMartinhoFernandes 500 relative to 30k.
 
I mean that it won't impact compilation time.
 
1:28 PM
Depends on amount of template machinery, really, not the preprocessed size.
 
I know, but it's somewhat of an indicator.
And a measurable one.
 
oh dear, my 'read later' book marks folders is getting bigger and bigger, I really need to actually read through some of them
 
I used to read a lot of books when I commuted to work by train.
 
I need a hand debugging
how can I ask VS to break when a variable has a certain value?
I tried using if (condition) __debugbreak(); but it never fired
 
@DeadMG don't use the debugger, apparently :P
 
1:32 PM
But since I moved closer to my workplace I can walk to work. And I stopped reading.
 
Can't you set a conditional breakpoint?
 
so there is the possibility to redirect stout/stderr to a console..
 
@RMartinhoFernandes Half the problem is that I don't seem to have a programmatic condition that's good for picking up the problem.
 
@DeadMG Data breakpoints.
 
1:33 PM
@DeadMG yeah
@DeadMG just forgot where exactly they are in VS, but google should help
 
the debugger says that my type is full of 1.#QNAN or something like that
 
Or maybe it was something else.
 
but when I tried if (var == std::numeric_limits<float>::quiet_nan()) it always comes back false
 
lol
NaN == NaN is false.
rofl
 
@DeadMG Of course, by definition
 
1:34 PM
Yeah, you can't compare NaNs.
Use is_nan or something.
 
use var != var
 
well, WTF is that good for then?
 
@CatPlusPlus sure you can. But the result might not be what you expect :)
@DeadMG telling you whether a number is NaN?
 
Right.
 
@DeadMG For assignment
 
1:35 PM
X is NaN iff X != X
 
is_nan is more descriptive than X != X.
 
@RMartinhoFernandes old news
 
Just don't remember how it was actually called.
 
@FredOverflow Apparently, not so old for the puppy.
 
@CatPlusPlus yes. But IEEE specifies the behavior of equality tests, it doesn't require an is_nan function :)
 
1:36 PM
@CatPlusPlus As far as I remember libc++std doesn’t have that function
 
std::isnan
 
@jalf I don't think the standard guarantees that.
 
I looked for a std::isnan but didn't see one
 
@FredOverflow Which standard? The IEEE one does
 
@jalf C++11
 
1:36 PM
in any case, x != x worked equally well
 
Oh, right, it's missing in VS.
 
@FredOverflow True, but the C++ standard doesn't say anything about NaN either, does it?
 
@jalf not sure
 
ok
 
Meh, who uses non-IEEE754 implementations.
 
1:37 PM
wtf is -1.#IND000?
 
@jalf It acknowledges their existence.
 
Does C++11 require IEEE floats, btw? I know C++98 didn't
 
Probably not.
 
@jalf It has a flag for testing if that's what the implementation uses.
 
1
Q: what does -1.#IND000 mean in visual studio debug window?

shapeareIn the visual studio 2010 watch window, I found the value of a variable became -1.#IND000. what does this mean?

 
1:40 PM
ah, nice find
I tried Google but it came back with 0 results
in fact, I've got the exact same problem as he mentioned- the argument to std::acos was 1.000001.
 
I’m a bit appalled that -ffast-math causes isnan to fail. That’s … fail.
 
Did you type -1.#IND000 in Google?
That means "everything that doesn't contain 1.#IND000".
 
There could well be a dedicated check to exclude this specific case from the clutches of the fastmath optimiser
 
Then it wouldn't be fast!
 
so
how can x dot y produce a value above 1?
isn't it practically in the definition of dot that it's [-1, 1]?
 
1:43 PM
(2,0,0) dot (2,0,0).
@DeadMG No.
 
I normalized the vectors before dotting them
 
In that case, yes.
 
modulo rounding errors
 
although looking at their contents, they're not exactly normalized
 
Lol.
They fight the system.
 
1:44 PM
Well, of course not. Finite precision, rounding and stuff.
 
I guess that if the FP errors are towards rounding up in the normalize
 
yeah
so if the dot value is above 1, I just need to hit it down.
 
Don't you mean
clamp?
 
1:45 PM
lol
 
Give 'em clamps.
 
kek
 
Or you could set the FP rounding mode to "towards zero".
 
ok
well, it seems to have staved off that specific error
now I just need to figure out why all the other errors are going on :P
lol, my unit is flying around like a brain-damaged bumblebee
 
1:52 PM
what unit?
 
my in-game entity
 
ok
my Octree is also quite clearly broken
I have 100 units, but this one leaf node 7 levels down has 358 entries
 

« first day (552 days earlier)      last day (4414 days later) »