« first day (827 days earlier)      last day (4347 days later) » 

22:00
@FredOverflow It's not the first time a moderator put up a notice in response to a bunch of non-answers pouring in.
Unless you can type really fast, I don't think it's going to make any difference. :-) Just kidding. I like 2 too. Nice job on counting the number of allocations. — Howard Hinnant Aug 20 '12 at 23:46
lol
> People use memes because most people aren't clever enough to be funny. It's easier to parrot a set of pre-made joke templates that the community has deemed funny.
good point
Quiz.
is this valid?
15 mins ago, by sehe
> People use memes because most people aren't clever enough to be funny. It's easier to parrot a set of pre-made joke templates that the community has deemed funny.
@JohannesSchaub-litb Nope. There is no quiz.
Ell
Ell
Chemistry, y u so hard!
struct A { int operator[](int); auto f() -> decltype((*this)[0]); };
^^ please consider
Ell
Ell
22:09
I mean err...
I need to finish this little project of mine before sun-rise (in about 7 hours), but I don't have any smokes left and I'm almost dead broke.. where do I find a perverted man which I can hook up to some sex-talk-bot who could then send me money to my account?
@Ell Yeah yeah
yes, I'm almost serious.
please find the problem!
zip. I'm blind
22:10
no clever tricks please!
@JohannesSchaub-litb look who's talking
the problem..
Ell
Ell
What is the problem? o.O
I don't see it
that's the question...
Ell
Ell
22:11
I don't see the need for trailing return type there
there is one bug in the code but it is the job to find it
Ell
Ell
Ohh
it's a compile error but it is not easy to find for the untrained eye
whaa..
user142019
Hello.
22:11
@JohannesSchaub-litb "f returns an int" would be too easy, right?
Ell
Ell
I have no idea :P
@FredOverflow that would not be the solution. it would merely be an "unnice thing"
Why would it be unnice?
i mean writing "int" would be nice
user142019
Today I learned more interesting and useful things in two hours playing with C# than in school for the past few months.
22:12
i mean, the above code is illformed
but the question is, what is the bug
@JohannesSchaub-litb you are trolling, right?
@refp no, it is illformed.
there is no illformation in that code, is it?
and in fact clang rejects it
@JohannesSchaub-litb Oh wait, we're not inside a member function yet?
22:13
because of what?
@refp this is the quiz
wait..
Can't use this in decltype there? Static evaluation context? (gcc eats it)
@FredOverflow that could be it, but doesn't the standard.. hold on
Ell
Ell
22:14
@JohannesSchaub-litb undefined reference to f()? :P
@Ell i mean there is an inherent bug.
@sehe can use it there
@JohannesSchaub-litb clang rejects it for this reason
i think this could be a nice SO question if you asked it
@sehe clang is wrong then
just give us the answer already
22:15
because I can't see any problem with the code given
sbi
sbi
user image
2
@KonradRudolph I don't think I would be able to hear the difference to my €25 headphones.
i would certainly upvote it
struct A { int operator[](int); auto f() -> decltype((*this)[0]); }
@FredOverflow I would
22:15
^ we are talking about that, aren't we?
@sbi wut
@JohannesSchaub-litb then post it as a question and I'll star it so that I get to see the answer
(I had expensive headphones until two weeks ago when they broke … but those are more expensive still)
or you just give us the answer right now..
22:16
@refp but i am not allowed to post it because we must post only question that are based on "actual problems you have"
you have a problem with the above; "why can't the fellow chatters of Lounge<C++> see what is wrong with this snippet, I mean; isn't it obvious?"
there is your title
@JohannesSchaub-litb But @refp could post it, because he has a problem with your question!
@JohannesSchaub-litb so, that'll solve two issues at once
sbi
sbi
@R.MartinhoFernandes Indeed. Thanks for pointing this out! I liked this one, too. Another one I watched I couldn't make much sense of. (Most likely that due to me missing references.)
@refp so if one of you would post it it would be OK because it was an actual problem of solving the quiz
22:17
Post the answer here and be done
@JohannesSchaub-litb no, it wouldn't
@sehe I agree.
sbi
sbi
@sehe It just goes to show that TI is Satan's work.
> Interglobal Trading Fund, a shadow agency that serves global governments and conglomerations, plucks its recruits straight from the foster-care system. After erasing their memories, the agency trains these orphans for 15 years, programming them to become the world's greatest time-traveling assassins.
@sbi really
22:18
@sbi ...It's a movie, right? :)
user1182183
@sehe yes. but there is another laptop of my friend, the same model. same performance. and a powerfull desktop which reaches 200 FPS but drops sometimes to 20 in some cases where I believe it even shouldn't.
sbi
sbi
@FredOverflow A short movie.
Is there an elegant way to convert a nested initializer_list to an array?
Ah okay, thought it was a trailer.
I might know the answer now, let me do some research
22:18
@Rapptz Why do you want arrays?
sbi
sbi
@sehe Yeah, of course. I am totally serious.
@FredOverflow It could be any arbitrary type that provides a multi-dimensional aspect, i.e. std::array, pure C-arrays, or std::vector
sbi
sbi
Also, I'm tired. Thanks for your attention, folks. God night!
I can't seem to get it to work so I'm about to give up
@Rapptz Is the nesting level fixed?
22:19
Yes, two dimensions.
Have you asked on stack overflow yet?
No ;_;
Why spoil the fun, right? :)
@sbi Sorry, I missed all the references, apparently. (How did you come by the calculator that doesn't know how Harry Potter came by it?)
@sbi Good night
@refp don't be afraid if you can't solve it my friend!
22:21
@JohannesSchaub-litb I'm just thinking in terms of "what if someone decides to change the ret-type of operator[](int) to int& /* which is more common, preferably */", then f () will most probably break
but that isn't the problem you are referring to
also; the difference between decltype(foo) and decltype((foo)), but that wouldn't cause a problem with the snippet either
Would you please post the answer? I want to go to bed :)
This is going to drive me crazy all night.
I'm guessing litb is either sadistic or a lier, can't see the fucking problem
ideone sees a problem, but he says that's not it.
22:23
and I'm already crazy since I haven't had a smoke in hours now
@FredOverflow what does ideone see?
cuz I don't see it.
> error: invalid use of 'this' at top level
that shouldn't be a problem
...
@JohannesSchaub-litb you are an asshole.
lol
what is a quiz if the quizzer solves it alone
22:27
you are. I'm already annoyed since, as said; I haven't had a smoke for too long and I can't go out and buy any because I'm broke
you show up with a "funny" problem, which isn't funny cuz nobody can solve the "quiz"
@JohannesSchaub-litb it would be a lesson, and you would be our teacher
now i feel bad
:(
give us the answer so we can all join in a synchronized "oh, yeah.. of course"
but this is my life insurance i can't simply give it away
Ell
Ell
22:28
@refp it's a good thing?
@Ell what is?
Ell
Ell
@refp not being able to smoke?
@JohannesSchaub-litb how is it your life insurance. You're being melodramatic
Ell
Ell
Mmmm my cereal has gone gooey and sludgy
@Ell not really, going from a pack a day to nothing causes a lot of stress.. can't focus
Ell
Ell
22:29
@refp But it's one step towards quitting
@refp how's modeling
Ell
Ell
Oh wait, sorry I assumed you were intending on quitting >.<
@Ell if I keep it up for a few days, yeah.. but that won't happen since I need to focus, and therefore I'll smoke to ease up a bit
@Ell I bet he is
Oh wait, I didn't upload that properly.
22:30
I'm not :/
what was the question?
@sehe it's good, just got back to stockholm
user142019
SCHOOL

Y U SO UNINTERESTING
WHAT THE FUCK IS WRONG WITH: "struct A { int operator[](int); auto f() -> decltype((*this)[0]); }"!?
22:31
@Zoidberg on sundays?
@refp Strictly, this isn't in scope in a member function's argument list/return type.
user142019
@sehe no, this month and past month.
irritating, I know
@refp Wait, I know what's wrong with the code: it's completely useless!
user142019
The first two months were fun and interesting.
22:31
@DeadMG that's not it
@refp Missing semicolon at the end?
@DeadMG that's what we all said
@DeadMG using "this" there is allowed in c++11
@DeadMG copy+paste error
18 mins ago, by FredOverflow
@JohannesSchaub-litb Oh wait, we're not inside a member function yet?
22:32
@JohannesSchaub-litb it wasn't in the first draft though, that's why most people think it's still not allowed
@JohannesSchaub-litb I'm pretty sure it's not.
user142019
But now we get UML and Java, this just makes me feel bored and miserable.
23 mins ago, by Johannes Schaub - litb
struct A { int operator[](int); auto f() -> decltype((*this)[0]); };
at least, no compiler I have seen accepted it
@DeadMG i am surer it is
22:33
@DeadMG gcc does
@Zoidberg What was before Java and UML?
user142019
@FredOverflow JavaScript and Scrum.
@DeadMG I think litb is just fucking with us, as always
well, GCC 4.7.2 accepts the given sample without complaint.
I see no reason to believe there is anything wrong with that struct.
22:33
@Zoidberg You could combine Scrum and UML to get ScrUML :)
@DeadMG clang does not
user142019
lol
@JohannesSchaub-litb What is clang's complaint?
user142019
Scrotum
the quiz is: the code is ill-formed, but why is it?
22:34
it's not FUCKING ILLFORMED
it's formed, super-formed.
Ell
Ell
A is a really bad name
@Zoidberg Although that sounds more like "Screw ML" :)
> struct A { int operator[](int); auto f() -> decltype((declval<A>())[0]); };
^ does that have the same issue? /cc @JohannesSchaub-litb
@JohannesSchaub-litb Because you posted it!
@sehe it should have..
22:35
@refp let's hear it from the horse's mouth
user142019
@FredOverflow I think ML is fun.
Has Johannes ever posted normal, working code in the Lounge? :)
@sehe sure
user142019
I have used F# which is influenced by OCaml.
@FredOverflow Yes. Has been a looong time, though
Ell
Ell
22:36
ONoSheDidn't
CamelCase?
@sehe yes, it has the same issue
is litb high or something?
Ell
Ell
maybe.
sorry, i am not high :(
22:36
then give us the answer..
@JohannesSchaub-litb To the edit: (I didn't parenthesize the full argument to decltype :))
i will give the answer on SO site, so that others can benefit from it
lol
Good thinking
post the question and answer it yourself then
I don't see why you are so hung up on the fact that someone else should post it as a question
:'(
@refp why so imperative? I mean, this guy knows SO
22:38
@JohannesSchaub-litb Please add it to the C++ faq, it's a very important question. I stumble upon that problem like every week!
@sehe I know he does..
@refp So, chill, perhaps?
@sehe Because imperative > declarative? :)
@sehe I can't, I'm not feeling well.
22:38
please chill out. it is only a quiz!
Precisely. Why should anyone be so hung up on knowing the solution (if any)
is there a functional way to stuff 0..n-1 into a vector?
user142019
My school is listed as one of the worst CS school of The Netherlands.
@JohannesSchaub-litb If you don't post the answer until midnight, I will send an email to your boss telling him you quit. And I will have anchovies Pizza delivered to your house.
I may be late to the party but did you guys know that Ars Technica publishes a “best of Stack Exchange”?
@kfmfe04 Yeah. The cat posted it, but you should look at boost::irange, std::iota
user142019
@kfmfe04 fromList [0..n - 1]
fcuk
@sehe coolio - ty for the tip
Nov 2 '12 at 21:11, by Xeo
@sehe auto v = boost::copy_range<std::vector<int>>(boost::irange(1,5));
22:40
@Zoidberg lol too late :) What kind of vector is that in Haskell, the tree with 32 children?
Sorry, it was Xeo, not the Cat
@sehe fantastic - tyvm
user142019
@FredOverflow Data.Vector.Vector
@sehe What we need is a std::iota_iterator since most initialisation in C++ happens via iterator ranges, not generators
@Zoidberg Why two Vectors?
22:40
(I’ve got it flying around somewhere)
@KonradRudolph WTF does iota stand for, anyway?
user142019
@FredOverflow data Vector in module Data.Vector.
@KonradRudolph So look at the boost range constructing wrapper, like the one I quoted
@FredOverflow I think it's like an integral identity function, or like monotonously ascending integral series thingie. I bet WP knows
@FredOverflow the Greek letter, as far as I know. I think it used to be the name of some mathematical function/series that describes increasing elements
22:42
@KonradRudolph Somehow I always have to laugh at this title :) Like his grandma died, and his will said he should have 200k lines of spaghetti code :)
@JohannesSchaub-litb big. fat. hint.
@sehe sorry it is unrelated :)
@KonradRudolph Oh, it's a letter, that makes sense. I always saw it as a weird permutation of itoa :)
@FredOverflow lol, me too
22:44
lulz
  foo.cpp:5:43: error: type 'A' does not provide a subscript operator
  auto f() -> decltype((std::declval<A>())[0]);
@FredOverflow > The iota symbol is used to generate a vector of consecutive integers in the programming language APL.
that's all clang is saying..
I don't get it..
@KonradRudolph See, there's my benefit of having classical Greek in highschool. I knew it would pay off one day
@refp obviously, clang's error message is lying
but it's the right gist
22:45
How can I live my life if I cannot even trust error messages?
obviously..
@sehe I also had that, the most useful thing that class taught me was the Greek letters. Sad.
And you still missed the clue?
@KonradRudolph I only know alpha, beta, gamma, delta, epsilon. Not even sure those are Greek ones :)
2 hours ago, by FredOverflow
Why do we love C++? It's such a terrible language, but I can't get enough of it!
@FredOverflow Yup. eta, theta, iota, kappa, lambda, mu, nu etc.
22:46
@JohannesSchaub-litb auto f() -> decltype(A::operator[](0)); would that suffer from the same problem?
@refp frankly, I think I forgot why it is illformed :(
@sehe I'm pretty sure I don't love C++ for its terrible error messages. If that were the case, I would be in love with practically every woman on this planet.
@JohannesSchaub-litb RUN FOR YOUR LIFE!
...
22:47
@JohannesSchaub-litb ARE YOU KIDDING ME???
it's not illformed!
and I second FredOverflow; WHAT THE FCUK LITB??
Ell
Ell
Hehe :L
@refp LTIB, FFTY
I've been scratching my head (not literally, but still)
@sehe I have no idea what those acronyms are meant to tell me
:(
no, seriously now. i am pretty well knowing why it is illformed
user142019
22:48
Hey guys.
@refp "I've been" doesn't deny you could still be
Ell
Ell
Let's calm down. Now I will propose a quiz challenge, you've all got 10 years to make a million pounds and give it to me... Go!
user142019
Is it noble to skip school and go work?
@JohannesSchaub-litb supah troll
@Zoidberg Am I noble?
user142019
@sehe I think so.
22:49
@sehe "I've been scratching my head (figuratively speaking) trying to come up with an answer".. butter?
user142019
You have a job and a house (I presume).
@Zoidberg Well, there you have it
user142019
So it is?
the only thing is: I don't know whether the committee would change this if I told some core guru
butter.
better.
user142019
22:49
mayonnaise.
@refp somewhut
Ell
Ell
@zoid is "school" university?
user142019
@Ell exactly.
@sehe somewhat*
@Zoidberg Your call. Your life. Noble has little to do with it. Except as far as you value the expectations of others
22:50
yes, I can do it too..
Ell
Ell
have you considered a better school?
@refp badly
user142019
@Ell I could go to Avans Hogeschool before February.
@JohannesSchaub-litb dat pun
user142019
22:51
@FredOverflow throw new Exception(); one statement.
@FredOverflow Just shows what an epic fail that whole Object bullshit is.
@Zoidberg That would have been too obvious.
Ell
Ell
Make c++ crash with one statement
user142019
*(int*)nullptr = 42;
*(nullptr)(int*) = 5; // just gonna crash here for a while
22:52
@Ell 0[""] = 0;
Ell
Ell
exactly.
@Zoidberg What's special about Avans? I mean, do they have "Patience Pills", tailor made for Zoidbergs?
@FredOverflow Not legal C++11
Ell
Ell
Point in case, java is 3x better than c++
@FredOverflow illformed
user142019
22:52
@sehe wel, volgens Elsevier zijn ze de beste, en het HRO is like een van de slechtste. xD
user142019
Qua informaticaopleidingen.
illegal in both c++03 and c++11
@JohannesSchaub-litb Oh yeah? Your quiz is illformed!
user142019
@Ell you suck!
@Zoidberg That's not a crash
user142019
22:53
Pedant.
@JohannesSchaub-litb Indeed. assignment to const array element
@Zoidberg A noble pedant
user142019
You won the Noble Price?
anyone in here knows java?
@0gravity Yes, but you don't make friends with Java in this room.
@Zoidberg Also, they're liars:
user142019
22:54
@0gravity Use C# at least.
i will give a hint: replacing it by "-> decltype(this->operator[](0))", it becomes wellformed
@Zoidberg Nah. They must have forgotten
user142019
@sehe eww stock photos.
@JohannesSchaub-litb Maybe (*this) is constant or something???
oh fuck, I completely forgot.. I was watching a movie before litb came with taht quiz..
22:55
@0gravity Why Java, specifically?
ploff
replacing it by -> decltype((*this).operator[](0)) it becomes wellformed too
@0gravity int[][] a = new int[4][4]; will give you the general structure.
@0gravity And why ask this in a C++ room?
@Zoidberg To be perfectly honest, I'm not so sure. Zoom in. Watch phone/mp3 player and wall finish. This might be a legit picture
22:56
@0gravity Oh, you don't want 1234 as one number, but as four numbers? Or any other number of numbers?
How can I get everything I say binned?
user142019
@sehe the perspective is bad.
yea 4 numbers
@0gravity Sudoku somewhere else
22:56
@0gravity int[][][] a = new int[4][4][4]; then.
@0gravity Ever thought about asking that on SO?
Read a good book. Obviously about java
user142019
Java is a terrible language.
user142019
Use C# or Python if you want OOP.
user142019
Also use Haskell.
22:57
I thought someone would know...instead of just asking in SO
Ell
Ell
Read the rules before you feel the wrath of the banhammer!
@Zoidberg true
well how would you do that in python?
user142019
@0gravity What? Number of people in room: a handful. Number of people on Stack Overflow: a thousand.
@0gravity You're quite right. Someone would know. Surprisingly, that someone isn't you. The question is, how come. (Find that book. There is "head first java")
Ell
Ell
22:59
how functional would you describe ruby as?
Jun 4 '12 at 13:26, by sehe
EVERYBODY: Commit chatticide and PRESS IGNORE simultaneously?
Probelmo solvo
@Ell dys-

« first day (827 days earlier)      last day (4347 days later) »