« first day (909 days earlier)      last day (4265 days later) » 

15:00
@kbok Oh god, more spaces before punctuation.
why hello friends
Someone please shoot him
:(
@Crowz Sorry, I'm grabbing my shotgun.
Hunting crows is a bad sport. Caw.
15:01
> everything should look basically the same whatever compiler you're using
@Crowz Not unless it's duck season.
@CatPlusPlus wtf zoom
wtf C++ video tutorial
It's 2008, Youtube was at the stage of growing.
15:03
@CatPlusPlus You're contradicting yourself -- paraphrasing (or quoting) that video is trolling.
@JerryCoffin Not really
It's making fun of
@CatPlusPlus Unless you make clear what you're doing, yes, it is.
w/e
C++ video could work if done right, but this is very far from 'right'
Especially when you look at how many people rated the video with "Thumbs Up".
But I do think, we need a middle man in order to introduce hardcore C++ to newcomers to C++.
In other words, we need a layman to help us churn standardized terms into something people can understand.
Hmm auto(x) makes a temporary copy, right? (no MVP)
15:09
What the video CatPlusPlus mentioned, it's likely something that's sort-of 50-50, so-so, etc.
@R.MartinhoFernandes Dunno, I've never seen that syntax before
> note: candidate template ignored: disabled by 'enable_if'
I know only new auto(x); probably auto(x) works same way
main.cpp:4:11: error: conflicting declaration 'auto i'
     auto(i);
           ^
main.cpp:3:9: error: 'i' has a previous declaration as 'int i'
     int i;
main.cpp:4:19: error: invalid use of 'auto'
     int j = auto(i);
Eh.
@tom_mai78101 More like 10-90 than 50-50 -- maybe, at most, 10% is worthwhile, and at least 90% is just garbage.
15:13
@JerryCoffin Agreed. It's just a pity there's no term for 10-90 in English.
@R.MartinhoFernandes IIRC the 'deducing' kind of auto can only appear in declarators, so no.
@tom_mai78101 If only Sturgeon's Law existed...
just realised 50-50 looks like so-so
wonder whether that's deliberate
That's actually the origin of so-so. 50-50 => so-so.
15:14
your doubts are not my concern!
@tom_mai78101 Prove it
@StackedCrooked fuck AT&T syntax
@StackedCrooked nice use of coliru
what the fuck... my simple render loop prototype in WPF only runs at 10 FPS... I'm drawing a fucking square what the hell is going on
@StackedCrooked what did he claim about wrapped objects?
15:16
@LightnessRacesinOrbit here you go.
@tom_mai78101 A non-threatening introduction is fine -- but that doesn't have to be done by a "layman". Just for example, You can do it! was written by Francis Glassborrow, Principal UK Expert on the C++ committee.
@StackedCrooked use template<int>
NOINLINE void ASM_MARKER() http://stackoverflow.com/a/15964113/1762344 , in order to mark places of interest
I like how Assembly is complete gibberish
@tom_mai78101 uh-huh
@LightnessRacesinOrbit Gotta go fast.
G'damn, is python really really fucking slow or something?
15:17
When I read articles like this, I usually flip between wry amusement and abject horror a few times: http://stevelosh.com/blog/2013/03/list-out-of-lambda/?utm_medium=referral&utm_source=t.co
@JerryCoffin those photos on the front cover are great
@LightnessRacesinOrbit only with that crappy syntax
@EvgenyPanasyuk it may break optimizations
@LightnessRacesinOrbit Well written assembly (with a decent syntax, not AT&T) can be quite readable.
@Abyx - not between markers
@LightnessRacesinOrbit It's that understated British humor. :-)
15:18
@bamboon They the cause an extra load & store when accessing the contained object.
llvm assembly is quite ok, even with that %
@LightnessRacesinOrbit It's one of the reasons why I enabled command line access. :)
Ell
Ell
@Crowz haha no
I remember I checked generated asm code by msvc2010 - iterators were fully inlined, there were no "penalty". Perhaps Stepanov is talking about expirience with old compilers.
@Ell well then I think I'm doing this wrong...
Ell
Ell
15:20
@Crowz probably :3
@StackedCrooked ok, interesting
btw, is it only me who hates code like return ...; } else ...?
@JerryCoffin that understated British what?
@Abyx Conditional returns?
@Abyx Yes
15:22
@tom_mai78101 else after return
can anyone direct me? trying to study/learn linked lists, not sure if it's better for me to learn it via structs or classes. anyone have any good links?
@Abyx No. Some other people are wrong, too.
if(...)
   return x;
return y;
// this just looks awful
I also have people who write such code
The asymmetry... It's horrendous.
15:23
@R.MartinhoFernandes Not really.
if (...) {
   return x;
}

return y;
@LightnessRacesinOrbit You know, that thing that's surgically removed from Germans at birth.
What do you know about awful?
@R.MartinhoFernandes add an empty line there
@JerryCoffin Spaces?
47 secs ago, by R. Martinho Fernandes
The asymmetry... It's horrendous.
15:24
How else would you do conditional returns?
@Rapptz inb4 spagetthi variables
@R.MartinhoFernandes No it's not. Indentation exists- deal with it!
@LightnessRacesinOrbit {} are redundant there.
Better safe than sorry.
if (checkError()){
	log("Something is wrong.");
	return 0;
}
else {
	return 1;
}
wow the numbers
15:24
@Abyx Functionally, yes. Aesthetically? Hardly.
@tom_mai78101 die
@Rapptz return ... ? x : y;
@Abyx Haha, I was copy/pasting a sample code. Is this what you meant?
@JerryCoffin Granted, I knew this would be coming but I was thinking on multiple conditions where nesting would be quite ugly :S
@tom_mai78101 I mean just die
15:25
@Rapptz Like your digit counting code? hehehe
Shh. There's nothing wrong with it. :(
single-return-point zealots all have incredibly short attention spans (and/or very long functions)
6
I still don't know why you guys laughed at it.
@LightnessRacesinOrbit "that thing" would be singular, not plural (but I guess I can't blame you there -- Brits seem to have difficulty understanding that concept).
@Abyx Just making sure I know what you're asking for, sweetie. :D
15:26
@JerryCoffin Forgive me for willfully omitting the prefix "The notion of writing with ", in the false assumption that Americans could comprehend the silent inference
@Rapptz If you're nesting them very deep, chances are pretty good you have more in one function than really belongs there.
@R.MartinhoFernandes what would you rewrite here instead
I disagree! Like my digit counting code that everyone laughed at yesterday.
@JerryCoffin That
@Rapptz I reckon "that everyone laughed at" may be the key here
It really wasn't that bad, I don't know what was so bad about it.
16 hours ago, by Rapptz
I didn't do it "mathematically" though, I just used this
^ that
Ah didn't even notice I put a comma there.
@LightnessRacesinOrbit Some of us probably could, if we weren't willfully ignoring it for the sake of humor (or humour, if you prefer to act like you don't recognize the correct spelling).
:)
@JerryCoffin Oh, did you mean "humour" before??
"It really wasn't that bad I don't know what was so bad about it."
There, comma abuse gone.
@JerryCoffin I admit, it's hard to recognise the correct spelling [in those cases where it's not employed]. You've got me on that one!
15:30
CUDA here we go.
Do Americans actually spell it "fetuses"?
No, they spell it "humor".
Or "foetus"
What is wrong with you?
Oh I was thinking of something else
Since the topic of British vs American spelling came up.
Ell
Ell
15:31
Fetus vs Foetus ?
@tom_mai78101 Yeah that's how I always learned it. Foetuses.
Stillborn.
Ell
Ell
foetus' aren't babies. But let's not get into that :P
@R.MartinhoFernandes Bad!
Ell
Ell
15:32
nor are foetus' stillborns o.O
@Ell They are stillnotborns.
Ell
Ell
heh genious genius
@ScottW Insanity wolf?
@Ell "genious"?
@R.MartinhoFernandes Oh, you.
Ell
Ell
15:33
I always spell it wrong :(
No o
Geniuses don't need Os.
lol
The problem with the abortion debate is that, if you try to apply any logic at all to decide "at what stage is it bad to kill this thing", you end up with "it was very rude of the human race to come into existence in the first place because, by this action and all actions that followed, many many many humans didn't." There's just no obvious delineation or cut-off point, so you have to make one up. And that is something about which there can be no agreement.
@LightnessRacesinOrbit Ah, but humor (or humour, for those who still haven't learned how to spell correctly) was being employed.
@JerryCoffin ... or it would have been, were it something that exists
also, I can spell "correctly" just fine thank you
@LightnessRacesinOrbit Althought "before it gets out" seems like a reasonable approximation
15:37
@LightnessRacesinOrbit Have a star -- nicely misunderstood.
@kbok I'd go with that
@JerryCoffin thank you again!
Too bad a lot of people aren't willing to be reasonable
Always taking out of contexts... Always.
I'd go up to 25 to 30 weeks
Ell
Ell
I have to hold myself back when it comes to people's views on abortion, I get muy frustrated
15:38
@tom_mai78101 #alltehcontexts
@Ell Y'know, if you'd just stayed frustrated in the first place, you wouldn't have had an issue.
@Rapptz I'd go up to about 18 years in some cases
Muy Thai frustration is indeed frustration to the max.
Ell
Ell
You guys are going way too high. it only needs 8/9 hours in the oven on 200C
@LightnessRacesinOrbit lol
@kbok They are -- provided you're willing to agree with their idea of what's reasonable.
15:39
starred not because it makes any fucking sense in isolation (it doesn't), but because you deserve it
@JerryCoffin That seems reasonable
Ell
Ell
@LightnessRacesinOrbit thank you! :D
can anyone direct me to a good linked list tut?
@Ell You are welcome, dipshit.
no context is reasonable? I'm not a good typer. :(
@JohnSmith What makes you think a "tut" is useful?
15:40
@JohnSmith "good linked list" borders on the oxymoronic.
@JohnSmith Also how come you can't spell "tutorial"? And what's wrong with std::list? And who are you? And what are you doing here??
tut
Tut may stands for Ttutankhamun.
@LightnessRacesinOrbit Feels like some stranger asking you for directions in the city when you're hanging out in front of a bar
15:41
@JerryCoffin How so
Hi, I'm lost - what is this place? I'm looking for the linked list tutorial. Do you know where is it?
@LightnessRacesinOrbit Twist: He's a C programmer.
@StackedCrooked I like how you made it easier to identifier individual ASM markers in the ASM than in the actual fucking C++ source code
@Rapptz Directed by M. Night Shyamalan.
@JohnSmith When you think a linked list is the optimal data structure, chances are at least 90% that you're wrong.
15:43
@kbok More like it feels like somebody asking you for help clearing their horse's dung off the road, when you're fueling up at motorway services.
Since when is it optimal or not optimal?
doesn't that depend on what it's trying to accomplish
Yes.
And 90% of the time it's trying to accomplish something that's not suitable for a linked list.
okay but a misuse of linked list doesn't mean it's inherently "not good." it just means it's good for some things, not for others
@LightnessRacesinOrbit ASM_MARKER is from stackoverflow.com/a/15964113/1762344
@StackedCrooked Adding markers may interfere with the optimiser. I recommend trying -fverbose-asm first, in order to make sure the Heisenberg uncertainty principle isn't fucking up your results.
15:45
and i'm asking about good tutorials, not the merits of the linked list itself
@JohnSmith That leaves the question: what is it good for. The answer is "nearly nothing."
linked lists are now officially war
> linked lists are now officially war
What?
...nobody gets that reference?
So like, what is your issue with a linked list? It's the easiest data structure to make
15:46
I don't. I'm sorry.
the list is like the mother of all data structures
@EvgenyPanasyuk so?
@tom_mai78101 youtube.com/watch?v=-dKAX7Jp8wo famous song
@LightnessRacesinOrbit never mind
15:48
AHHHHHH. Rush Hour...
@JohnSmith There are no good "tutorials". There is a reason that they are free, you know. Get yourself a good, peer-reviewed book. And study. Put some fucking effort in, you lazy fucktard.
Wow, sorry, that escalated quickly.
@Rapptz Well it seems like some people implement them with nodes, others with classes, others with disconnected voids, etc. I'm also not sure when it's a good idea to even use linked lists.
He has a point
@LightnessRacesinOrbit " There is a reason that they are free, you know"?
Online free tutorials are free and never hit the paper for a reason
15:49
This is a fallacy
@LightnessRacesinOrbit spoken like someone who probably went to university and had everything paid for
@Rapptz They are free for no reason, then?
also that logic is horrible
argh, frustrating Itanium ABI, why couldn't you do the sensible thing and position hidden arguments at the end? :(
@LightnessRacesinOrbit What are you implying?
Ell
Ell
15:49
@LightnessRacesinOrbit they are free because people like to share knowledge
@JohnSmith I never met anyone who went to university and had everything paid for came up to me and said "wow, sorry, that escalated quickly". Also, no, I didn't.
@Ell That's not making it good though
@kbok Because the authors don't have the time to do it?
@Ell In this case, they seem to enjoy wilfully sharing incorrect knowledge, poorly.
Just because someone is teaching you for free doesn't mean the knowledge is incorrect
I can't believe you think that
Ell
Ell
15:50
@LightnessRacesinOrbit well, that's unfortunate. But just because something is free it doesn't mean it's bad
@DeadMG And also not disappear from the interwebs
or do you claim that my online tutorials are terrible too?
so apparently all freely available knowledge online is inherently inferior, gotcha
@Ell I am well aware of that.
15:50
Just saying.
@DeadMG Are you speaking for yourself? :p
@Ell B->A for some B and some A, doesn't imply A->B for all A and some B
Ell
Ell
@LightnessRacesinOrbit Right okay, it came off that you didn't is all
@Ell You assumed
@JohnSmith Nope, just the crappy tutorials. They are free because they are shit. That does not mean that everything free is shit. But these are.
Ell
Ell
@LightnessRacesinOrbit I inferred it from "There is a reason that they are free, you know"
15:51
@kbok Well, since I am in that position, it makes logical sense to assume that I am not alone.
Ell
Ell
as if them being free makes them low quality
@Ell Right, and I have already pointed out the flaw in your logic.
so you're saying there isn't a single, solitary tutorial on linked lists that is up to par
@JohnSmith You sound like you think that (1) people who go to uni have everything paid for and (2) uni teaches programming, and both are wrong
Mmmh, I have a const T t[] = { { a, b }, { b, c }, }; that compiles, but if I turn that constexpr I get 'array must be initialized with a brace-enclosed initializer'. Am I overlooking something stupid or should I investigate for a bug?
15:52
anywhere online, at all, whatsoever
@JohnSmith There are some, I'm sure. But in the general case, no.
Ell
Ell
@LightnessRacesinOrbit when? "You assumed"?
GET A BOOK
@Ell Bored of you now
such as
2415
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

15:52
@LucDanton What's T?
@JohnSmith You've been here for over a year, and posted 41 questions. You know where the books are.
@DeadMG Template class.
lol
@LucDanton I am leaning on latter.
@DeadMG Custom literal type. Let's see if that has an impact.
15:52
I am leaning on my desk.
truly you have a dizzying intellect
@tom_mai78101 The compiler doesn't error for "some template", it errors for a specific argument.
@LightnessRacesinOrbit "You've been here for over a year. You know where the books are." said the librarian to the moron.
all I'm saying is that if T is std::array or something, you might need an extra pair of {}, not sure.
@R.MartinhoFernandes Correct. In fact, you just quoted the event!
15:53
@JohnSmith It depends if you want singly or doubly.
Also, in other news, WTF is wrong with clang.
@ScottW I don't think so
Ell
Ell
@JohnSmith You don't need a book, you can learn from online tutorials, but a book does help. I learned from online tutorials first, then read "C++ Primer". I knew most of it already, but it makes sure you haven't picked up bad practises. (Imho)
[Testing completed. 2 of 33 test cases failed (25264 of 236081 assertions failed)]
15:53
It's a clanger of a compiler, it really is...
I am sure it's not my code that is broken!
@Ell I came in here asking for online tutorials in the first place
nobody can recommend any
@R.MartinhoFernandes starbait evaded, captain
Ell
Ell
@JohnSmith Oh right
15:54
i'm trying to avoid bad practices which is why i am asking for recommendations
@JohnSmith Nobody wants to. Get a book.
@DeadMG ~~linked list~~
otherwise i'm going to be that annoying programmer who works at your firm who makes life hell for you because he codes like shit
@Rapptz What about linked list?
15:55
@ScottW I think boost docs are pretty bad for some of them, it really varies.
@DeadMG That's what he wanted a shitty tut for
@JohnSmith Here.
In computer science, a linked list is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a datum and a reference (in other words, a link) to the next node in the sequence; more complex variants add additional links. This structure allows for efficient insertion or removal of elements from any position in the sequence. A linked list whose nodes contain two fields: an integer value and a link to the next node. The last node is linked to a terminator used to signify the end of the list. Linked lists are among...
@JohnSmith Ahahaha trust me when I tell you that there is no chance you will ever work at my firm.
no online tutorial of any quality will go through rolling your own linked list in C++.
@DeadMG Well, that's what I've been saying for the past fifteen minutes.
@LightnessRacesinOrbit It's not meant to be taken literally...
15:55
they will just go "std::list, time to move on and learn difficult/interesting/useful things".
@JohnSmith Reply to specific messages, please. It's hard to know what you're talking about.
@LightnessRacesinOrbit I've only been paying attention for the last minute or so
what firm do you work at Lightness
Okay. The error is that I'm using a non-constexpr to initialize something declared constexpr. And the diagnostic is bogus.
@JohnSmith In short, the best recommendation for creating a linked list, is to create it that's understandable and readable by other developers.
15:57
@tom_mai78101 So it's not a big deal if I learn the struct method or class method etc?
@LucDanton haha
@JohnSmith You can choose to create a linked list using nodes, structs, etc. But readability needs to be at a priority.
Not sure why I thought it was a good idea to mark the thing constexpr when I'm stuffing lambda expressions in it, but whatever.
Could be worse. The compiler could be compiling your code in a way that 10% of your tests now suddenly fail :<
@JohnSmith The rest of the code will be optimized accordingly by the compiler.
15:58
@R.MartinhoFernandes Ouch
Btw, libc++ seems a lot less lenient than libstdc++.
how so?
i had a general question about compilers in C++; if I write something in iterative form vs. recursive form, will the compiler optimize/flatten them out to be the same thing (roughly) in terms of runtime and memory, or is it like python where you can run out of stack space or whatever with tail recursion etc
@JohnSmith C++ is quite capable of tail call optimization. But then, Stack Overflow.
i know C++ is capable
15:59
Less headers that you did not ask for get included; various functions SFINAE with their requirements so you don't get accidental compilations.
@SudhakarChaudhary check http://liveworkspace.org/code/2jnHiC$1 , markers are outside of accumulate loop:
.L522:
addsd (%rdx), %xmm0
addq $8, %rdx
cmpq %rbx, %rdx
jne .L522
std::next(input_iterator_here) compiles with libstdc++, but not with libc++.
but i wasn't sure if that implied it was roughly equivalent to iterative post-compile

« first day (909 days earlier)      last day (4265 days later) »