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

05:04
CNUT
Netflix is suggesting I should watch MLP.... @EtiennedeMartel what did you do to my account?!? =/
05:21
@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
05:30
@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
05:45
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?
06:00
(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)
But how do you get rid of the x? How else do you express 'the composition of f and g'?
06:03
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
06:08
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
Xeo
06:34
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.
06:53
@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.
07:00
@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.
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
07:04
@Rapptz it is terrible
Blue blue, blue blue blue blue.
@EvgenyPanasyuk Well, thanks. I guess.
Bye
07:18
@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
07:39
@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
07:55
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
07:57
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
08:07
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
08:20
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
08:31
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
08:47
@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?
08:51
@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. :-)
09:04
@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
09:15
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?
09:19
@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.
09:22
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?
09:26
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
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
09:30
@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
09:37
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
Xeo
> main.cpp:34:41: error: parameter pack ‘<anonymous>’ must be at the end of the template parameter list
mmmmm
Is it?
Xeo
Xeo
template<class... Ts>
struct X{
    template<Ts..., int> struct Y{};
};
It's not a pack :s
It's a pack expansion
Xeo
Xeo
Time to fire up Clang
@JohanLarsson :) cheers. I'm not available. Not planning on something either. :)
Xeo
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.
09:46
@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
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
Xeo
Ah, you meant GCC-limitation?
09:47
Yes.
Xeo
Xeo
ok
@Xeo yeah, but you can have empty changelists or changelists that only have shelved files...
Xeo
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
Xeo
Oh, so, you want to filter them
09:51
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
Xeo
Great. GCC dies on expanding the pack into another template, clang dies on expanding it into a function
Smooth moves.
Xeo
Xeo
Let's see how horrible of a death MSVC dies.
Dies the same way Clang does, hm
09:57
@Xeo What is it you're doing exactly that's ICE'ing the three compilers again?
Xeo
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
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
Xeo
Well, this works on GCC and Clang, but I'd rather have this (which only works on GCC)
10:29
auto(decltype(return_statement)) is so verbose
*-auto
Xeo
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
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
@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
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
Xeo
yea
@EvgenyPanasyuk gcc-4.8 -std=c++1y has it already
10:44
yes
@Xeo decltype((e))
Xeo
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
Xeo
In case of doubt, just add more parens!
user image
3
Never, ever, try to understand anime
Xeo
Xeo
10:47
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
Xeo
back now with meta-computation /cc @bamboon @LucDanton (dunno, you might be interested in some way)
10:59
Another linear chain of instantiations? :<
Xeo
Xeo
You mean the identity part?
Not linear, but superfluous. Ish.
@Abyx NetPoco is his own class
@EvgenyPanasyuk ah, I see
Xeo
Xeo
@LucDanton Yeah, I see what you mean. But I don't see an immediate way to get rid of that.
11:05
@Xeo Don't mix the metafunction with the function. Template.
Xeo
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
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
Xeo
@LucDanton Wait, what would be the difference between the two?
result_of::foo defined in terms of decltype(foo(...))?
11:09
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
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
Xeo
I always forget what uncurry is :<
@Xeo Fire up ghci!
burn it!
11:38
OMG Phil Nash responded to my tweet :)
Xeo
Xeo
11:48
Hmm... @LucDanton, got an idea to generalize back to nth_argument without indices to generate the parameters?
Xeo
Xeo
Too bad

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