« first day (513 days earlier)      last day (4418 days later) » 

3:03 PM
I just discovered git flow lately - really love this overlay on top of git!
 
> I [...] love [...] git
I want what you're smoking
 
3:24 PM
hi guys =)
 
sup
 
@ScottW most likely you won't keep feeling fine ;)
 
@ScottW you must be doing something interesting... ...I get tired more easily if I'm bored
@ScottW well - if it's for work, maybe not... ...if it's for fun, maybe so
@ScottW an UI builder tool?
@ScottW so to configure an UI based on some input? almost every company I worked for had some variant of this type of tool...
I mean someone at the company wrote such a tool for internal use...
 
Is this borken for you guys as well?
Also, snapshot tool fail.
 
Xeo
3:40 PM
I don't even have that info tab
 
@RMartinhoFernandes no
 
@Xeo I'm not on the info tab.
FTR, that's this page: .
Not the general question page.
 
@RMartinhoFernandes for it's broken like that on code review
not on SO though
 
Dammit, I don't want to go to meta with a no-repro issue.
 
@RMartinhoFernandes I can send you a screen from codereview if you want
 
Xeo
3:50 PM
@RMartinhoFernandes I know why I didn't have that info tab - I was on
 
@Xeo So, is it borken?
 
Xeo
Nope
Browser?
 
ff 10.0.1
 
FF 10.0.2
Well, I'll report it if not fixed by the end of the day.
I've got to write code to make random items now.
 
I had that already yesterday on codereview
 
3:54 PM
Hey, what's up?
 
space
I like riddles :D
 
Xeo
@RMartinhoFernandes Whatcha working on?
 
0
Q: Exception Handling and Opening a File?

MosheIs it possible to use exceptions with file opening as an alternative to using .is_open()? For example: ifstream input; try{ input.open("somefile.txt"); }catch(someException){ //Catch exception here } If so, what type is someException?

 
man, getting 4.7.0 to work on windows is a chore...
 
3:59 PM
is this gcc?
 
@kmore Erm, just download prebuilt binaries?
 
@thecoshman yes...I caved; I need alias templates
 
Xeo
@RMartinhoFernandes Oho, in Haskell?
 
lol, you guys love building gcc :P
 
Xeo
@kmore Virtualbox -> Clang.
 
4:00 PM
Usually all I have to do is download the binaries, and unpack into some path.
 
Xeo
Or get the Windows Clang binaries from @rubenvb
 
@RMartinhoFernandes it's the includes that's the problem... it couldn't find ::isblank
because it wasn't #undef'd in c++config.h
 
@Xeo It's been a while since I wrote something non-trivial in Haskell, so I decided to try it.
 
Xeo
4:03 PM
Cool. I think I'll take a look at the code afterwards, since I still can't really imagine how one would write stateful things, like games, in pure functional languages
 
Xeo
Hrhr, re Monads. I was thinking a bit about them yesterday, and realized that they simply work through overloads / pattern matching.
That was also when I realized why you need an identity kind of monad
 
I don't really know how monads work, but I image state could be implemented in a stateless language by having a loop that reads the current state from stdin, creates a modified copy and pushes that to stdout (and repeat cycle). This way you can implement state without ever modifying anything internally.
 
while (true)
That's not stateful, is it?
 
4:08 PM
It is.
 
recursion?
 
Dammit, there goes my plan.
 
If the body is not stateful, you don't need to run it over and over again.
Just run it once and you already have the result.
You can thread the state from one function to another.
 
from what I can work out about functional programming is that is just like every other damn 'next best thing' in that it only works for a few situations
 
Xeo
@StackedCrooked IO is state
 
4:10 PM
Something like f :: Argument -> State -> (ResultOfF, State) and g :: ResultOfF -> State -> (ResultOfG, State). Every function takes the state as argument, and produces a new state along with the normal result.
 
Xeo
189
A: Monad in plain English? (For the OOP programmer with no FP background)

Eric Lippert In terms that an OOP programmer would understand (without any functional programming background), what is a monad? A monad is an "amplifier" of types that obeys certain rules and which has certain operations provided. First, what is an "amplifier of types"? By that I mean some system which...

Is a great explanation btw
 
This gets really annoying because the functions are not composable, and that's where monads step in.
 
Xeo
@thecoshman Nah, functional programming is awesome.
 
just like <every next best thing>
 
But it's awesome for real.
 
4:12 PM
ahem, just like <every next best thing>
 
Xeo
You can also code functional style in C++
Boost.Range adaptors ftw
 
You can get a Maybe-monad-like feel with optional<T> and abusing ranged-for.
 
Xeo
Well, you need to add free functions for optional
 
I'm gradually beginning to accept that as an acceptable abuse, because the resulting code looks soooooo sweet.
 
Xeo
Or make a Range monad xD
@RMartinhoFernandes Kinda like using resource_stuff in Java?
 
4:14 PM
I can see the sense in taking a functional approach to things, but I can't see it working for an entire project
 
for(auto&& value : some_optional) {
    do_stuff_with(value); // runs only once, and only if some_optional is not empty!
}
 
Xeo
if(some_optional) do_stuff_with(some_optional.get());
 
@Xeo What if the loop body does_more_stuff?
Do you get() it everytime?
You can take it into a local variable, but... that's what ranged-for does! Don't reinvent the wheel, abuse it!
 
Xeo
if(some_optional)
  [](decltype(some_optional.get()) v){
     // ...
  }(some_optional.get());
Abuse lambdas!
 
Do you really think that's better?
 
Xeo
4:21 PM
No
I just wanted to abuse them
With ranged-for, you can return, which is nice
 
I'm bit late to the party but: triangle strips suck.
 
@Xeo Why not just do some_optional.do_if(...);?
 
Xeo
@DeadMG I didn't remember that member function :P
 
WebGL is pretty impressive.
look at this.
 
4:36 PM
@Xeo Add it!
 
@DeadMG Because abusing ranged-for is superior.
 
It's just OpenGL ES shoehorned into web browsers.
Nothing new.
Geez, pizza place has an old delivery guy who's been here like 10 times, and still can't remember how to get here.
 
lol
 
@CatPlusPlus I know, but I was expecting it to be extremely slow-ass. It's faster than I expected, and smoother.
 
Now he called, 'cause he even forgot where the damn street is.
 
4:39 PM
@IntermediateHacker FTR, I just tried it and it is extremely slow-ass.
 
wtf, hasnt he heard of Google Maps?
 
He probably doesn't hear much.
 
@DeadMG What part of "old delivery guy" did you miss?
 
@CatPlusPlus happens to me all the time, with the KFC delivery guy.
 
My KFC doesn't deliver. :<
 
4:41 PM
@ScottW You're a bad person :P
and why would you care that KFC doesn't deliver? their food is disgusting anyway
 
Pizza always sounds delicious.
@DeadMG No it's not. :<
Also, I don't care. I want moar junk food with home delivery.
 
@ScottW Good people only ever eat wholesome fruits and vegetables, and little children.
 
@DeadMG KFC is not that bad. I like the Zinger burgers.
 
Yay for unhealthy life styles.
 
4:43 PM
Woah.
Calm down.
 
jeez, I've been into the depths of how a transition from user-mode to kernel is made by the CPU.
and meanwhile come to clear up a lot of confusions I had :)
 
No vegetables, huh.
 
me too a very bad person by that definition
I love Nutella :)
 
Meat is the best.
 
I hope the guy will find his way here before tomorrow.
 
4:45 PM
I hate Fruits and Veggies. Meat FTW.
 
If I could, I'd have meat for every meal.
 
@RMartinhoFernandes except for breakfast.
 
And cake.
Cake is good too.
 
you meat consuming monsters :P
 
@IntermediateHacker Why not?
Meat is awesome all the time.
No exceptions.
 
Xeo
4:46 PM
0
A: assigning true/false to std::string: what's going on?

XeoIt's exactly as you say, false can be converted to a valid null pointer constant (sadly so). true, however, is not a null pointer constant and can't be converted to one and as such can't be converted to a pointer and fails to compile. §4.5 Integral promotions [conv.prom] p4 A prvalue of typ...

 
@ScottW lulz, good point, I forgot I was a Lion for a sec :P
 
Xeo
Link dumping!
 
Robot eats humans. It's official now.
 
@TonyTheLion I forgot I was a game-boy. :'(
2
 
Xeo
Oha, seems they pushed the "(x) posts with new activity" thingy to SO
 
4:47 PM
@Xeo What do you think of my edit?
(I can revert it with no traces left if you want)
 
Xeo
Heh
 
@CatPlusPlus Wait, who let that out?
 
Xeo
No, it's okay
 
@RMartinhoFernandes ....I'm scared. You don't eat innocent game consoles do you?
 
@Xeo What's that?
@IntermediateHacker Don't worry, it's all propaganda we spread to divert from the truth.
 
Xeo
4:48 PM
Just linger on the "active" tab for a while
 
(Which doesn't necessarily mean it's false: spreading truth as misinformation is a nice trick to cause misinformation)
 
@RMartinhoFernandes lol.
 
One does not simply linger on the active tab.
What did it do to you?
 
@ScottW So you're the one that eats humans!
 
4:51 PM
If you're evil, it will grow. Or something. I don't remember where it was from.
 
But Nail is a edible component of Human.
 
It probably has your DNA in it.
 
@ScottW you're murdering your own DNA ???
@ScottW lol.
 
Xeo
@ScottW I can't get drunk it seems. :(
 
@Xeo You're not trying hard enough.
 
4:53 PM
Lol, Just reading SDL source, found this comment a lot: /* Stolen from the mailing list */
 
Don't read SDL source, it stinks.
Where's my pizzaaaa.
Damn senile delivery people.
 
apparently half of the SDL API has been stolen from the mailing list.
 
And the other half is bovine excrement.
 
@CatPlusPlus don't they have the 30 minutes or Free Rule?
 
Xeo
@CatPlusPlus I really drank alcohol the first time some days ago, 40% Havana Club. I didn't feel anything. :|
 
4:55 PM
@IntermediateHacker No.
 
@CatPlusPlus guess that rule only works in small towns like mine.
damn, I hate living in a small f*cking suburban town.
 
You hate free pizza?
 
No. That's a plus.
That's it, I am suing SDL for being too incomprehensible.
 
Xeo
SFML
 
SDL, FML.
 
5:00 PM
All I see in the SDL source is a jungle of preprocessor defines and ifdefs, along with some useless comments that are equally mysterious.
 
Xeo
@IntermediateHacker It's C, what did you expect?
 
Worse. It's bad C.
 
I'm not actually using SDL, I just wanted to find out how they abstracted everything, and encapsulated the display, bitmaps and memory-bitmaps into one SDL_Surface.
@CatPlusPlus Is there anything written in Good C then?
 
@Xeo You get drunk, have a memory lapse, and get sober within the hour.
 
The best drunk time is concious drunk time.
 
Xeo
5:05 PM
@Xaade Heh, no, that's not what happened. I clearly remember everything
 
@IntermediateHacker Sure.
 
Xeo
My mother then said alcohol is wasted on me. :(
 
@Xeo You'll feel that way, after a memory lapse.
@Xeo As long as nothing breaks continuity.
Which is pretty easy at a bar or your house.
Unless there's a fire.
 
Mmm, food.
 
I've had memory lapses, well rather sleep lapse? or whatever. I don't notice unless something changes noticeably.
Since I have most of them in the office....
In the same white room.
I started noticing when I noticed my clock jumped 10 mins
Then there was that time, I was coding, and all of the sudden my boss was in my office, without opening the door, talking to me, and me going "mhmm."
 
Xeo
5:09 PM
Eh, it seems someone logged into my FB account.. the fuck.
 
Sorry....
Logging out now.
 
@Xaade lol.
 
I was wondering who changed my profile image.
 
Xeo
> Near Tanta, NO REGION, EG (Yesterday at 7:03pm) from a mobile device
Eh... I don't think I was in Egypt yesterday.
 
Fail.
 
5:10 PM
@Xeo someone logged into my FB account from the Philippines once.
 
@Xeo Um.... that may have not been a log in issue.
@All if it comes from a cell-phone, Sprint et. al. have been remarking that they get FB communication twixted.
 
@Xeo did you visit the pyramids? :)
 
No one ever logged into my FB account. Take that, suckas.
 
So, say, two people on cell phone are logged into facebook, one can post, and the cell phone company can post it to the other's account.
 
@RMartinhoFernandes no one probably wastes his / her time. :D
 
5:12 PM
@IntermediateHacker Exactly, I'm not a time sink.
 
Two-factor auth. Use it.
 
@CatPlusPlus Facebook. Don't use it.
 
Facebook is a hunk of junk
what's that "friend" shit they keep going on and on about, anyway?
 
I was making a bit more general statement.
GMail has TFA, too.
 
Facebook: "Hey guys.... uh.... we accidentally swapped private and public settings."
Facebook: "Us again... We added a new privacy setting for nude photos and defaulted to public."
Facebook: "Nope sorry, we can't remove that embarrassing photo of you that got you fired, that your friend submitted."
 
5:14 PM
TFA: This Fucking Acronym
@Xaade If your boss checks your Facebook profile and fires you based on it, you're probably better off fired.
 
True story.
Facebook: (friend's comment) You %$@# a$$hole, how the f*ck did you manage to take that pic of me?
Facebook: (mom's comment) what does a$$hole mean?
(got me into trouble)
 
@RMartinhoFernandes It was actually a case where a person in a sensitive position worked for a company that made it inappropriate for the employee to be publicly seen drinking. Friend sporadically tagged them in a photo from a private party.
 
Stupid policies are stupid.
 
@IntermediateHacker Great friends you have.
 
@Xaade wtf position could that possibly be?
 
5:19 PM
@RMartinhoFernandes yeah. always standing up for me. damn them. -_-
 
@CatPlusPlus Not necessarily. If say you worked for government with access to classified information... not good thing if there's a friend's photo of you holding a folder with "classified" on it. Even if it was a joke from a party that celebrated your promotion.
 
Got you into trouble?
 
@CatPlusPlus well, it was hard to explain.
 
@DeadMG Campaign manager for some politician that promises to forbid booze.
 
You have to explain what other people are doing? Lol.
 
5:20 PM
@RMartinhoFernandes I'm not seeing it. Doing a job for a politician != agree with his policies.
 
@CatPlusPlus my mom's a pain in the neck. :'(
 
Bad parenting 101.
 
@DeadMG Not to you, but the public is pretty daft.
 
@DeadMG Surely you can expect to be fired for that.
The media will be all over it, and your campaign is fucked.
 
@Xaade It's still stupid, and people overblowing it are stupid, too.
 
5:21 PM
@RMartinhoFernandes Uh, no. If you work for a politician, that does not make you his slave.
 
@RMartinhoFernandes Again, stupid public.
 
a politician's policies are not life law for every employee
 
No, wait, it's just totally idiotic.
 
those guys follow the same laws as everyone else
 
@DeadMG Tell that to the masses.
 
5:21 PM
@DeadMG Dead, STUPID. PUBLIC.
 
what were we talking about?
 
no, no, you're missing the point
I just don't care about the masses or the stupid public
 
@DeadMG Not missing point.... your point is, policy of campaign != personal policy for campaign manager.
 
@DeadMG As a campaign manager it is your job to care.
 
if they're stupid enough to go for that, then no logic or reason is gonna change their opinions anyway, so there's no point trying to gain their vote
 
Xeo
5:22 PM
lol'd
 
@DeadMG but isn't the whole point of democracy giving power to the public ?
How can you not care about them?
 
@DeadMG Uh..... hmmm..... vote = job..... no vote = no job..... no job = no campaign.....
 
@IntermediateHacker Pffft. Giving power to morons.
 
Xeo
Warning: This allows strangers to direct your browser!
They may send you to pages containing
porn, viruses, **or Justin Bieber fanfiction**.
 
@DeadMG Yeah, bring back voting tests.....
 
Xeo
5:23 PM
Yes, that markdown fail was willingly done!
 
@Xaade Sure, but you can't sway the vote of idiots, no matter how good your argument is or isn't, so it isn't going to matter.
 
@Xeo the last one's scary. O_O
 
@DeadMG You don't sway them with a good argument. You sway them with a good Chewbacca argument.
 
sadly, most of the public consists of morons. :(
 
@Xeo lol, it brought me to xkcd.com...
 
5:24 PM
@RMartinhoFernandes Funny, cause I typed in xckd.com and got taken to "What do women want?"
 
@RMartinhoFernandes it took me to some place called "Instant Chess"
 
which appears to be a rather graphical description of the process of sexual arousal for women
 
Interesting.
 
@DeadMG The point of politics isn't to be the right guy. The point of politics is to convince the public everyone else is the wrong guy.
 
@Xeo: Good, you're here. I was going to comment further on your answer, but I know the mods hate discussions in the comments. Anyway, in reference to libraries, I would point to the standard library algorithms, which, for the most part, all handle empty ranges by gracefully doing nothing.
 
5:25 PM
I expect a certain regular to be back in no time.
 
Xeo
@BenjaminLindley Yeah, but it's easier because they don't have to specifically handle the first (or last) element
 
Now it took me to Chicago Tribune
 
@Xaade It's pretty evident to everyone that they're all the wrong guy
 
Xeo
Which is the case with delimiters if you don't want them after the last element
 
@RMartinhoFernandes heh
 
5:26 PM
@BenjaminLindley filter += Exclude(TopicTypes.OnTopic);
 
damn, now it took me to a porn site. :(
 
@Xeo Fair enough.
 
@Xeo I agree with @Ben.
 
@DeadMG Yeah, but if the public isn't convinced by the second guy, the first guy wins.
 
Lol, now it took me to some Adopt a LLama page.
 
5:28 PM
Asserting on an empty range is silly in that situation.
(I know, I did the same. Sue me)
 
Xeo
But but... the branch. :( I don't want it.
 
@Xaade Sure. But, for the people who are stupid enough to think that employees of Guy B should religiously follow his policies, then there's nothing you can do about it.
 
@DeadMG You can not lose their vote! We're not talking about doing the right thing, we're talking about winning an election. Totally different things.
 
@RMartinhoFernandes How? They're too stupid to respond to any logical action you might take.
 
Xeo
Eh, I just thought my last statement through and found out that I get the same number of branches whether I handle the first element specifically or not. Damn.
 
5:30 PM
@DeadMG They respond to your campaign manager publicly acting against what you claim to defend.
 
ASSERT(Politics == Chewbacca Defense)
 
Failed link foiled your evil plan.
 
@Xeo Admit it, there is no elegant way to do it.
You need to special case something.
 
@RMartinhoFernandes logical action.
 
(At least for me, special casing => not elegant)
 
Xeo
5:31 PM
if(first != last)
  s << *first++;
for(; first != last; ++first)
  s << delim << *first;
// same number of branch tests as
for(; first != last; ++first)
  s << *first << delim;
 
@DeadMG Don't expect to win elections like that.
 
@RMartinhoFernandes It's funny, because I watched several documentaries on the BBC about why our country is in so much debt, and they showed a bunch of politicians from the previous government who said that they wanted to cut spending but were too scared to do it.
and I think that the utter failure of basically all of politics might have given people a necessary kick to wake up
 
Sorry, mentions of economy are just words strung together to me. I can't understand a thing about it.
 
@RMartinhoFernandes They wanted to do the right thing but were scared shitless of losing the election.
 
5:36 PM
that's why democracy is fundamentally broken- you get a mindless mob who have no idea what the fuck is going on making decisions
 
@DeadMG I'm not disagreeing. In fact, that's the point I was trying to make. You can't apply logic to this, because people are stupid.
 
that's the whole point I was making
 
Well, we were disagreeing to agree, then.
 
@Xaade I CLICKED THAT LINK
DAMN YOU
 
Btw, everytime I tried holistic.xkcd.com, I typed in tvtropes URLs.
Yes, I'm evil.
 
5:40 PM
I think C++11 will catch on like wildfire now that the language has PRvalue :)
@Xeo Someday I'll program something useful in Haskell.
 
@DeadMG Actually, it's not really a mindless mob, were it so simple. The problem is the voter constituency added together appears to be a mindless mob. No one argues that spending is out of control, but grandpa won't let them touch social security, poor people won't let them touch medicare, farmers won't let them touch the benefits they get, and schools won't let them fire teachers.
 
That reminds me, I'm on a clock.
Stop distracting me, people!
 
Xeo
@RMartinhoFernandes plonk.
 
@TonyTheLion That one wasn't that bad. I pretty much got to bisexual butch, and stopped there.... abruptly.
 
What?
No, wait, I don't want to know.
Especially if that means you're linking me to a trope about "bisexual butch".
 
5:44 PM
@RMartinhoFernandes It's the "overtly masculine counterpart" in a "he/she" lesbian pair.
 
What part of "I don't want to know" didn't you understand?
 
So much so, that they fall into the alcoholic mechanic stereotype with a cosmic colliding meteor.
 
Funny thing is, that it's hard to remember stereotypes are "bad", when you actually know the person who single handedly inspired it.
 
Stereotypes are bad? Isn't that stereotyping stereotypes?
 
5:48 PM
@RMartinhoFernandes Apparently Europeans believe that stereotypes are evil, and they have the moral high ground?
 
Of course we do.
Why would it be otherwise?
 
Overgeneralisation is never good.
Unless you're writing Haskell.
 
There's a reason maps are centered on us.
 
Then, please..... I do not wear a cowboy hat....
Actually, since you have the prime meridian. I find it odd the maps split a day in half. Europe should be split in half on either end of the map, for consistency.
 
But then east would be on the west!
 
5:50 PM
I'm fine with that.
 
BUT ARBITRARY NOTIONS.
 
@Xaade We invented maps.
 
So, if I get this right.... the metric system changes depending on the planet you base it on.
 
Better than the standard system, changing depending on who's foot.
 
5:51 PM
The metric system is pretty much agnostic of that. (Kilograms are still a bit complicated, but the rest is agnostic).
 
@RMartinhoFernandes Um.... cue Chinese, Xaade 1, Martin 0
 
Metre "is defined as the length of the path travelled by light in vacuum in 1 ⁄ 299,792,458 of a second".
And the rest is funny, too.
 
@Xaade Chinese maps were unreadable. We invented readable maps.
 
@RMartinhoFernandes You're holding it upside down. (Chinese maps originally held north to be drawn on the bottom)
 
And I'm pretty sure it was Marco Polo that taught them how to make proper maps (i.e. maps that don't consists of China surrounded by men with heads on their belly).
 
5:54 PM
@RMartinhoFernandes Wrong again, but then again, Europeans are arrogant. We learned it from you.
 
You were Europeans.
 
@CatPlusPlus Hell, I'm a world mutt.
 
I'm a cat.
 

« first day (513 days earlier)      last day (4418 days later) »