« first day (910 days earlier)      last day (4044 days later) » 

5:04 AM
CNUT
 
Netflix is suggesting I should watch MLP.... @EtiennedeMartel what did you do to my account?!? =/
 
5:21 AM
@Borgleader It's karma.
 
@LucDanton Wasn't that done.. on purpose for irony?
 
@Rapptz Does that make it any less bettar?
 
It bumps it up from "wtf" to "oh it's just a lame joke"
 
I'm bored you guys
 
@ScottW im worst
 
user1357851
5:30 AM
@Crowz you can try & troll the meta site, it can be very entertaining
 
user1357851
for us that is
 
hahah from reddit : http://imgur.com/ML3G7cT
 
@Rapptz wat
I'm going to bed O_o
 
lol
night
 
5:45 AM
7:44 AM actually :D
but thanks :p
 
@StackedCrooked morning
 
@EtiennedeMartel Kids these days...
 
@ThePhD It's a real language apparently.
It influenced Haskell.
 
Cute o operator.
 
hm?
 
6:00 AM
(f o g) x = f (g x)
 
oh that's cool
 
I learned about that in math class in highschool.
Never thought it'd be used in programming.
 
Yeah, I never liked it though. I thought f(g(x)) was clearer than f o g(x)
 
Same.
 
But how do you get rid of the x? How else do you express 'the composition of f and g'?
 
6:03 AM
However, now I think function composition is cool.
Because it's useful in programming.
@LucDanton replace it with _1 :P
 
@LucDanton Well.. um I've never dealt with parameterless functions in math.
 
I think boost phoenix supports function composition though..
@Rapptz It isn't parameterless. (f o g) requires a parameter.
 
@Rapptz No doubt.
 
I think the latter only becomes clearer when you start doing it with 3 or more functions, i.e. f o g o h to be determined as f o (g o h) or (f o g) o h
 
" f' is the time-wise derivative of f " <- no parameter
" garbl is the derivative of f . g " <- no parameter, composition operator
 
6:08 AM
Oh that's what you mean.
 
Too early in the morning for formulas, blech.
 
Usually did those in terms of u substitutions. i.e. f'(u)du g(u) + g'(u)du f(u) due to possible chain rule.
 
Maybe later today, it's 2AM and I should really be sleeping
 
Pfft.
Sleeping at 2 AM.
Quitters.
 
Xeo
6:34 AM
Mornin
 
@Xeo Morning!
 
bump istream problem
 
Oh hey, a drive by link. How wonderful
 
bump.
@DavidKarlsson std::istream and std::ostream etc are non-copyable so you have to pass them by reference.
std::istream &is;//<-Initialized this line doesn't even make sense.
 
6:53 AM
@Xeo Moorniing
@ScottW Niiight. <3
@Rapptz Awww, titties. =[
Ooh, I thought you were already asleep.
So I said good niight.
SLEEP IS FOR THE WEAK.
 
hey guys can i ask a c++ question
 
NO. D:<
 
quick question tho
 
@FreddieWillow Let's see how quick it is.
 
7:00 AM
@FreddieWillow is it about 32 bytes int?
 
wht ? noo
 
Fucking blue gravatars.
 
i hav this file, so i have to scan a specific chars from it and store in a new file
 
Blue blue, blue blue blue blue.
 
7:02 AM
 
Consider making an effort to spell properly when you post to SO.
 
@Rapptz fucking anime avatars
 
@FreddieWillow You're probably better off asking on Stack Overflow.
 
I'll have you know my gravatar is a drawing I made.
:(
 
thanks mate
 
7:04 AM
@Rapptz it is terrible
 
Blue blue, blue blue blue blue.
 
@EvgenyPanasyuk Well, thanks. I guess.
 
Bye
 
7:18 AM
@ScottW Sweet. :O
EB let's plays are long, though. By the nature of the game. :P
Yeah....
A lot of people just don't know how to keep people entertained while they play games.
 
user1357851
7:39 AM
@sehe you are going to report me to the moderators for posting a picture of plastic? Have you ever heard of the story of a boy who cried wolf?
 
user1357851
I think the moderators are going to get sick and tired of this room reporting me and found out that I did nothing wrong.
 
user1357851
@ScottW maybe the boy saw some little doggie when he cried wolf ...
 
user1357851
 
user1357851
Huh? That pic was posted on the NY times!
 
user1357851
Maybe you should not be reading newspapers in the public :x
 
user1357851
7:55 AM
baby wolves are cute <3
 
user1357851
I want a husky
 
user1357851
lol
 
user1357851
true, except wolves might have tempers at times - a bit hard to control
 
wolfs are dangerous in group
 
user1357851
I settle for huskies - they will charge at intruders, then lick them :x
 
7:57 AM
yeah, that's the groupname
ok, that was not very funny
 
user1357851
evil looking little thing:
 
user1357851
 
@ScottW What the hell did I just watch
@Rapptz o wow
I'd saddle your pet tiger
 
user1357851
@ScottW this:
 
user1357851
 
user1357851
8:07 AM
Maybe you should settle for a little turtle, like my cousin - much easier :p
 
I'd ride him as a welcoming.
 
user1357851
My cousin has a turtle, he's only 14 :p
 
That's a young turtle.
Some of them become over 100 year old.
 
user1357851
lol, stop trying to turn my cousin into a turtle >_<
 
user1357851
 
user1357851
8:20 AM
are you having plastic surgery - have never heard of people under go the knife & try to look like a wolf :p
 
user1357851
but you are only a little were-housetrained-doggie :p
 
user1357851
8:31 AM
I think one of your favorite activities is to put food related things on your dog :p
 
user1357851
your dog must have really good temper :)
 
finally figured out how to do a shallow git svn clone with branches/tags
I think
 
^ wolf
A cool one at that.
 
@ScottW dog not fully appreciating your brand of humor quite yet
s/he/she/ and note how that's suddenly a creepy line.
now realize that there really not much of a difference.
Presto: line ruined
 
8:47 AM
@ScottW that sounds kinky
Eeuw!
Just kidding ;)
 
@StackedCrooked Century!
 
@ScottW Oh, your dog is female? :-P
 
My Dog has no gender
 
All dogs have a gender stupid.
 
0
Q: Hanoi Tower amount of combination?

Timur KukharskiyRecently i was on an interview for C++ Develpoer position, and i was asked to write a program that solve a hanoi tower puzzle with 3 columns and 1000000 discs, the program must write an output of moves to disk("1->3","1->2",... and so on), i told them that this will be a very big file for solutio...

Am I missing something, or wouldn't solving a Tower of Hanoi puzzle with 1000000 discs take an insane amount of time?
 
8:51 AM
@Insilico Yes it would. But not quite as insane as with 1000 stacks :)
 
@sehe Wolfram|Alpha craps out with computing how long it would take to do 2^1000000-1 moves assuming something insane like 10^50 moves per second :-)
 
@Insilico actually, the problem is really quite simple: it is statically defined and constrained, so we can formally proof that a solution is possible in n steps, and that the solution is "X". So, a proper implementation would then just proceed to jump to the final state "X" in one "step" based on the proof. There. Optimal test driven solution!
 
@sehe So basically it amounts to writing double calculatePi() { return 3.14159274101257324; }? Certainly a valid solution. :-)
 
Basically. Yes. Though that's a wrong answer for Hanoi (also, those last digits seem ... odd)
 
@sehe Argh copy-pasta.
Really should be return 3.14159265358979; or something. -__-
Of course, pre-computing the solution to a 1000000 disc Tower of Hanoi puzzle might take a while, to put it lightly. :-)
 
9:04 AM
@Insilico Not at all. The power of math is abstraction. If you can prove that (a) the solution must be X (b) the solution must be arrived at in finite time then (C) you can just state the solution
 
@sehe Not sure if the OP's interviewer is expecting that, if the OP's story is to be believed.
 
@Insilico In the case of search problems/puzzles like this, the saving grace is often that the solution is given.
 
@sehe Ah, I see.
 
@Insilico I'm sure it isn't. But it neatly shows (a) programmatic developership (b) professionalism (IYAM). If the size of a problem would become intractable for brute force, we have to get smarter.
If the task were to provide a visual simulation of the steps, I'd make a UI that allowed the user to pick any point "n" in time and jump to the (short-cut evaluated) problem state at that time :)
And as an interviewer I'd really appreciate this kind of thinking, since it comes up everyday in software design!
(think of yet another result set of >1000 rows being displayed in a (web) grid....)
 
Skeet has chatted in C# a couple of times
 
user1357851
9:15 AM
 
Oooh. C# envy
@Rapptz It was "ok". It just was surprising and looked rather .... you know. Without context that is ridiculous code. Also, the same code could have been presented with a comment and in two lines.
 
in C#, 2 hours ago, by Gordon
@VivekParikh moderator flags are for serious content issues only. DO NOT use them to ask for help. Thanks.
guy flagged himself it looks like
 
@JohanLarsson lol
 
^ This gone take a while
Support API Freedom http://wh.gov/Lh1H
 
@sehe did you sign the Monsanto one?
 
9:19 AM
@JohanLarsson Hmmm. Monsanta?
 
@JohanLarsson Oh god. No more avaaz. They are giving me so much spam. And frankly their "herd" marketing strikes me as far worse than any government propaganda or commercial advertising I detest.
 
@sehe That whole petition system the U.S. government doing is a joke IMO. It seems more like a device to provide the illusion of transparency.
 
Although I do give them credit for their epic response to the "Build a Death Star" petition.
 
9:22 AM
what was the response? lazy here
 
I just once happened to sign an avaaz petition someone sent me. Since then, it's "act now!" / "ZOMG what great response" at least 4x a week
@JohanLarsson +1
 
Spoiler: they will not be building one.
 
@Insilico starlol
Anyone here live in Switzerland?
 
user1357851
why, are you looking for a stalking target?
 
9:26 AM
Lemme think. I do remember a guy. But who was it
 
I've heard much good about their direct democracy thing
@sehe not that important :)
 
Xeo
> Sutter gives option for making progress: C++ can stop maintaining C compatibility. C++ has greatly benefited from C compatibility. Stroustrup agrees and adds that C has also significantly benefited from C++ compatibility. Sutter says that C++ has widespread adoption now. From marketplace, do we still benefit from compatibility?
 
Apr 16 '12 at 17:18, by Nils
I'm Swiss..
 
ty sir, Nils sounds very Swedish
 
In related trivia:
Mar 11 at 20:55, by sehe
TIL: Bram Molenaar moved to Switzerland
 
user1357851
9:30 AM
@sehe it is also stated on his twitter
 
@sehe how do you keep brain/memory working at such a respectable age? Mine is pretty wrecked
 
I don't. I just keep on trying :|
 
got to walk puppy
 
user1357851
lol nice to way to call sehe old :p I must be old too in that case, although younger than sehe >_<
 
@JohanLarsson Honestly, I find I get annoyed at my reduced capacity for detail in large structures.
However, I also find that I still get faster/better at most jobs, by being able to see the big picture much fast, and being able to "intuitively" select viable solutions (dangerous, I know, but also realistic: no one ever has time to consider all the options).
So, don't have me design the next GPU chip, or a new formula to approximate Pi. But, do have me on your software design team
 
9:37 AM
k, my debugging woes are very much toolchain related. Compiling the simplest of the 'Hello debugging world' with the distro GCC with dumb options makes for a debuggable executable, while swapping out the snapshot GCC doesn't. Aw.
 
@sehe when can you start?
Getting old is getting dumb in my case
One good thing is that I don't worry about forgetting stuff anymore, I don't even try
 
Xeo
> main.cpp:34:41: error: parameter pack ‘<anonymous>’ must be at the end of the template parameter list
mmmmm
 
Is it?
 
Xeo
template<class... Ts>
struct X{
    template<Ts..., int> struct Y{};
};
It's not a pack :s
It's a pack expansion
 
Xeo
Time to fire up Clang
 
@JohanLarsson :) cheers. I'm not available. Not planning on something either. :)
 
Xeo
@LuchianGrigore Erm, for a file to be in your changelist, it needs to be checked out, as far as I'm aware.
 
It looks like a very similar limitation as [](Params...) {} and others.
 
9:46 AM
@JohanLarsson I never actually tried. I'm bad at remembering facts. I'm good at remembering things I have made to work or I have seen work
 
and transcript
 
Xeo
@LucDanton I can generate parameters into a function no problem
 
@Xeo Well nowadays, sure.
 
@JohanLarsson that's basically the same - also, don't confuse search with memory :)
 
Xeo
Ah, you meant GCC-limitation?
 
9:47 AM
Yes.
 
Xeo
ok
 
@Xeo yeah, but you can have empty changelists or changelists that only have shelved files...
 
Xeo
@LuchianGrigore I still don't see the issue
Hm hm, nice
 
I have a bunch of changelists, and I want it to show me which of them are empty or only have shelved files
 
Xeo
Oh, so, you want to filter them
 
9:51 AM
Anyways, I have taken the opportunity to select a stronger password for linode manager. My former password was 9flyiCLdPfV1lf2KMyXr - granted, a little on the simple side :)
 
@sehe correct horse battery staple? :-P
 
@Xeo pretty much, yeah
 
Xeo
Great. GCC dies on expanding the pack into another template, clang dies on expanding it into a function
 
Smooth moves.
 
Xeo
Let's see how horrible of a death MSVC dies.
Dies the same way Clang does, hm
 
9:57 AM
@Xeo What is it you're doing exactly that's ICE'ing the three compilers again?
 
Xeo
They're not ICEing, just erroring out :P
Although I kinda expected MSVC to ICE
 
Ah okay. So the compilers didn't die so much as complained loudly to you. :-)
 
Xeo
Grrr.... Y, SFINAE, WHYYY
Eh, and after a small transformation, GCC fails me too now.
Nvm, I'm an idiot for forgetting static.
So, Clang likes that way, but not the other...
 
@Xeo So do it the way Boost does it and use macros all over the place to fix compiler-specific issues.
(of course, if there's a way that avoids that, by all means use that method instead)
 
Xeo
Well, this works on GCC and Clang, but I'd rather have this (which only works on GCC)
 
10:29 AM
auto(decltype(return_statement)) is so verbose
*-auto
 
Xeo
Then why not have more than just one variant object? Perhaps several laid one after the other, one would say as if they were... a row? No, that's not it. It's on the tip of my tongue though. — Luc Danton 4 hours ago
lol @LucDanton
 
I felt like the OP figuring out where I'm leading him would be a more valuable experience than just "Yeah but you can have a whole array of 'em". And didn't want to take the time to write a full answer.
 
@LucDanton blabla valuable experience blabla I was lazy.
 
Xeo
@bamboon I'll express it as a meta-computation
Back<T, Ts...>&&
 
@rubenvb First part justifies the form the comment takes. The second, lazy part justifies the comment instead of an answer.
IOW the laziness is assumed as a matter of fact.
 
10:39 AM
@Xeo tbh, I don't understand what you mean there but all I meant was that I think the current possible syntax in C++ without auto return type deduction is very verbose.
 
Xeo
@bamboon template<class T, class... Ts> meta::Back<T, Ts...>&& back(T&& v, Ts&&... vs){ return ...; }
But yeah, it is verbose
There's a reason people have a #define RETURNS(e) -> decltype(e){ return e; }
 
that's a useful macro
 
Next ISO versions may have return type deduction for functions, like in lambda
 
Xeo
yea
 
@EvgenyPanasyuk gcc-4.8 -std=c++1y has it already
 
10:44 AM
yes
 
@Xeo decltype((e))
 
Xeo
@LucDanton Right, I was wondering if it was that or the other
 
No idea if that one is foolproof, by any measure. I don't run that macro.
 
Xeo
In case of doubt, just add more parens!
 
user image
3
Never, ever, try to understand anime
 
Xeo
10:47 AM
Never, ever, trust translators.
 
or that.
Results are hilarious though :3
 
@Xeo like learning Japanese is a choice
 
Sorry guy, I seem to have lost my mind, i need to bump this question
im trying to return the result after a json parsing but my code keeps throwing sigbus 128 on android.
 
RefListComplexType *ref = NetPoco::getJson(); - I didn't think POCO is that bad
 
Xeo
back now with meta-computation /cc @bamboon @LucDanton (dunno, you might be interested in some way)
 
10:59 AM
Another linear chain of instantiations? :<
 
Xeo
You mean the identity part?
 
Not linear, but superfluous. Ish.
 
@Abyx NetPoco is his own class
 
@EvgenyPanasyuk ah, I see
 
Xeo
@LucDanton Yeah, I see what you mean. But I don't see an immediate way to get rid of that.
 
11:05 AM
@Xeo Don't mix the metafunction with the function. Template.
 
Xeo
The meta-function itself will still instantiate a chain of identity and any if used, I thought you were referring to that part.
 
Yeah, which is fine if the user wants that. If they just want to forward the last item of a pack though don't have him instantiate that.
 
Xeo
True
 
So result_of::foo is not redundant with meta::foo.
(One could also discuss if meta-ops really need to share an identical name and 'signature' as some generic counterparts.)
 
Xeo
@LucDanton Wait, what would be the difference between the two?
result_of::foo defined in terms of decltype(foo(...))?
 
11:09 AM
Not necessarily but it represents that yes.
Sometimes you want to express 'the type of fetching the last element of a variable pack', sometimes you want 'the last type in a pack'.
Not everything I write has an associated result_of::whatever though. They're really not as necessary as they were in C++03.
 
Xeo
They save a bit of declval, atleast in some circumstances
 
The tuple algos have theirs because I do a lot of pack manipulation via tuples anyway.
> using candidate = Invoke<meta::BindOver<make_variant_over, meta::Map<result_of::uncurry<Functor, meta::Arg1>, product_type>>>;
Heh that's borderline between a meta-computation and a generic result.
 
Xeo
I always forget what uncurry is :<
 
@Xeo Fire up ghci!
 
burn it!
 
11:38 AM
OMG Phil Nash responded to my tweet :)
 
Xeo
11:48 AM
Hmm... @LucDanton, got an idea to generalize back to nth_argument without indices to generate the parameters?
 
Nope.
 
Xeo
Too bad
 

« first day (910 days earlier)      last day (4044 days later) »