« first day (1604 days earlier)      last day (3345 days later) » 

6:00 AM
I prefer the if(not first) approach and assigning the first bool to false in the bottom of the loop.
Before doing it that way I used to do if(first != end) out << *first++; while(first != end) { out << ", " << *first++ } but I don't like doing it this way anymore.
 
Oh, I’ve done that in the else (wouldn’t like splitting test and assignment) come to think of it.
@Rapptz Yeah, but I’m not in an actual loop. Iterating over a tuple, i.e. inside a lambda.
 
Hmrh.
I don't know.
 
It’s fine.
 
cppreference has a trick involving a char array :p
I found it clever.
 
that sounds awful
 
6:03 AM
lmao
 
Indexing with bool?
 
iirc it was char sep[] = { '\0', ' ', '\0' }; and after the first pass they'd do sep[0] = ',';
is it as bad as you imagined? :)
 
Should be "\0" then.
@Rapptz No, I was thinking encoding the check as an array dereference, e.g. lookup[it == start].
 
but the space?!
 
6:06 AM
@Rapptz Oh yeah, having a hard time parsing without colours for literals.
 
Where can I go for free code review?
 
codereview.SE
 
Thanks
Question: do you guys use doxygen?
And should a programmer use it?
 
So now that I have HTTP requests and JSON in C++
I've eliminated approx. 85% of my Python usage cases.
 
6:09 AM
@Cinch I’ve done in the past. Kinda not looking forward to using it again.
 
@Rapptz Why would you want to do web programming in C++?
We already have Python
 
What 'web' programming?
HTTP requests is not my definition of web programming.
Despite that, C++ is used in web programming anyway by other big sites.
@Cinch I used to. Not anymore.
I use Sphinx now.
 
should I use a doc tool?
I feel that it should be standard
 
@Rapptz But Markdown CommonMark!
@Cinch Do what your want & live your own life.
 
@LucDanton ...
 
6:11 AM
Would you rather someone else lives it?
 
@LucDanton The only thing that irritates me about restructuredtext is their markup for tables.
Oh and no nested inline markup.
 
@LucDanton Uh, what does that have to do with anything?
@Rapptz No srs I'm just a novice who wants to do what the big guys do before actually going out on my own
 
The rest is fine.
 
@Rapptz Yeah, I don’t have actually anything against it. It’s the mental gear shift from one markup to the other that’s annoying.
@Cinch Would you?
 
I'm working on documentation actually.
 
6:13 AM
@LucDanton No.
 
@Cinch Then my answer to 'should you do X' is 'do what you want'.
 
Here's an example of Sphinx generated docs.
 
@Rapptz omg this is beautiful
@LucDanton But that's not how anyone learns to master anything
Nobody just "does what they want" if they want to emulate the pros
 
Do what you want.
 
note: heavily modified lol
I don't really hate Doxygen.
 
6:15 AM
@LucDanton What if I want to not do what I want
 
I just don't like how it's bad for TMP which I use extensively.
I assume @LucDanton has the same issues.
 
Well that too. But I also don’t find the defaults terribly useful.
 
Oh that's right.
You have to extensively modify it for it to look remotely decent.
It's a headache tbh.
I forgot I spent ~3 months on the CSS above too.
 
Btw why did you make Gears?
It seems like basically Boost-lite or something
 
cause I like making things
 
6:17 AM
@Rapptz k, but where did you use this in your own personal projects
it seems interesting
 
All the time
 
@Rapptz okay
btw you're not based in hawaii are you?
 
I don't like how Boost requires me to have the entire thing installed btw.
 
@Rapptz what are you talking about
that's not the case, i thought
 
There are a lot of inter-dependencies.
You can't just use e.g. Boost.Filesystem.
You need Boost.System and Boost.Config.
There's no reliable way to just extract a single library from Boost.
 
6:20 AM
The alternative is far worse. Can you imagine every library having their own shared_ptr?
 
Oh no it's understandable.
I just would have liked a way to have better dependency management.
 
@LucDanton shivers
Well anyways
I've decided that I'm going to create a C++ tutorial website as I learn in order to improve myself and improve the current state of C++ tutorials on the web
 
I don't think that's a good idea.
You're not really qualified to make said site.
No offence.
 
I wouldn’t call it a tutorial.
 
@Rapptz The fact that I'm not qualified might be a better idea
 
6:22 AM
Maybe a blog of your adventures would be better.
 
Dumb people can explain things to dumb people
 
blogging happens a lot
 
@LucDanton Blogging isn't that helpful to people because it's too short and unstructured
 
@Cinch Why do you think other C++ tutorials are bad?
 
It requires issue-based inquiry which is not good when you want to learn thing fast
 
6:23 AM
@Rapptz I can’t find how long we’ve had the 'modular' Git repos. Not sure when we’ll get any use out of that, save for hacking on the tree…
 
@Rapptz Im not the one who said it
 
I'm not saying it's wrong.
 
@Cinch You don’t have to be short and unstructured.
 
I was hoping you would piece the statement together.
 
@Rapptz what do you mean by that
 
6:24 AM
Why do you think the people here think C++ tutorials on the web are bad?
 
@Rapptz let me find the comments
how do i quote again?
 
Just copy the permalink.
 
Aug 31 '11 at 16:18, by R. Martinho Fernandes
Online tutorials generally suck.
Mar 18 '13 at 20:00, by ThePhD
@DeadMG Well, I keep going through all these web tutorials and they're... ... pretty shitty.
Mar 18 '13 at 20:00, by DeadMG
most web tutorials are.
 
Alright stop.
I think you've misunderstood my question.
 
i have?
 
6:27 AM
I didn't say who. I asked why.
And I said "do you think"
 
@Rapptz Oh.
 
As in your opinion.
 
Oh....
 
Not the opinions of others.
 
@Rapptz Well okay, I think the C++ tutorials lack a lot of the "development' side of things
For example, they don't go over linking or compiling very well
They don't cover C++11 integration that well
They don't go through STL or other basic data strcutures
Graphic tutorials are separated from console ones
 
6:29 AM
Why would they go over these things? It's fairly integral process to most people.
 
@Rapptz define 'integral'
because the tutorials do not cover it
 
@Cinch There are so many compilers and linkers that it's hard to cover most of them.
 
My school doesn't even cover linking for god's sakes
@Rapptz Doesn't matter, they can't even link
They don't use debuggers
They know nothing about Valgrind
They don't know how to write documentation
 
Compare: a tutorial on the C++ language; a tutorial on software development with C++.
 
@LucDanton True that
 
6:30 AM
None of those things have to do with C++ though.
 
@Rapptz I'm pretty sure compiling and linking C++ style are pretty important
 
It's not part of the language.
 
It's part of the programming to me
And it's half the reason why people have problems in the beginning as well
A lot of this stuff is just opaque and hard to grasp and newbies hit this wall
 
I've spent ~3 years helping noobs with C++ on reddit.
 
@Rapptz Well, I AM the noob and I think it's hard so therefore I will make it easier for noobs like me
 
6:32 AM
It's not the biggest roadblock.
FWIW.
 
@Rapptz What are the biggest ones?
What's FWIW
oh
 
I'd wager that compiling and linking are abstracted so often that most people can get to programming really fast now a days.
 
k
@Rapptz The bad part is that I couldn't figure out how to do such things
 
You can download Visual Studio, Code::Blocks, Qt Creator and it already sets everything up.
 
Library integration is key to working anyways
@Rapptz Nope, I tried linking and compiling wxWidgets as my first library
was not fun
 
6:33 AM
@Rapptz First three years when I had programming classes, everything was done at the OCaml interpreter!
 
I didn't list wxWidgets.
 
SFML and SDL were easier but still hard
 
wxWidgets is shit anyway.
But that's another matter.
 
I'm just saying
 
Anyway I got sidetracked with your rant.
 
6:34 AM
From what?
 
My ulterior point.
I was trying to prove a point.
 
@Rapptz Which way?
 
Sort of Socratic method.
So I'll just say it instead of begging the answer through questions.
I'd wager that most people here don't like C++ web tutorials because they the authors generally don't actually teach C++. They The authors generally don't actually know C++, they the authors generally know C with some C++ sprinkled in and it's full of errors.
A beginner like you trying to teach people would have the same errors that other tutorials are plagued with.
 
Too much 'they'.
 
:v
 
6:36 AM
@Rapptz I myself have been trying to learn better C++11 and I'll go through exercises as well
My job is not to teach
It's to compress and smoothen the material for learning
That's it.
 
@Cinch Not a tutorial then. Which is fine.
 
@LucDanton ENJOY.
 
They are pleased. (No but seriously for the first 5s I thought you were commenting on how those that don’t teach C++ don’t like C++ web tutorials.)
 
Okay then
But I have to ask
What would be the most important topics to cover for new programmers?
 
Values, functions.
 
6:38 AM
The real issue here
 
I'm writing this down btw
 
Is that Accelerated C++ is not updated for C++11.
I've heard nothing but positive things about the way that book teaches C++ :(
I read some of it and it seemed really good.
 
@Rapptz I don't have time for books anymore really
To me, I'd rather have something online
I'm sure a lot of people would agree
 
@Cinch Not really.
 
You can read books online!
 
6:40 AM
Yep.
 
Seems like the perfect match.
 
You can even read them offline on your computer.
Technology's gone pretty far.
 
But wouldn’t you rather be reading online, when you think about it?
 
ugh anyways
 
@Cinch The generally accepted way to learn C++ is through books.
 
6:42 AM
@Rapptz I thought it was by actually coding?
 
The book offers guidance.
You do the actual programming to learn.
It's not mutually exclusive.
 
My recommendation (for programming in general or C++ specifically) is to learn via good teachers. The catch-22 is that you can’t really tell whether a teacher is good or not until you don’t need that teacher anymore. So it’s more of a non-recommendation.
 
To me, I think the book format is too verbose
 
There's a lot to learn.
 
I value short, succinct tutorials that are jam-packed with information
 
6:44 AM
Incredibly unlikely.
 
Well continuing
 
I find books denser than tutorials.
 
So I think lambdas are pretty important or no?
 
They are syntactic sugar.
But they're cool, yes.
 
Fine.
 
6:44 AM
In programming or C++?
 
Function objects are important, right?
 
Yeah.
 
Yes.
 
Okay then that goes on the list
@Rapptz What kind
 
Gonna swiftly change topics.
Does anyone have experience with rating systems?
 
6:46 AM
The canonical example I’ve seen often and bring up to total beginners is producing a counter.
 
@LucDanton I see.
 
auto make_counter = [](int i) { return [i]() mutable { return i++; }; };
 
Hm.. wait a minute.
Is that legal C++11?
 
@Rapptz Nope. All I recall is that there this one equation one is supposed to use instead of the mistakes everyone is making (or used to be making, before that one article).
@Rapptz Yes.
 
Impressive.
I guess I shouldn't be too surprised.
 
6:48 AM
I actually don’t like how it renders in C++.
 
I didn't think Voldemort types were possible in C++11.
 
E.g. that flavour of the mutable keyword is distracting.
 
but const by default!
 
Polymorphism or no?
I hear it can often be bad unless you use it for interfaces
 
@Cinch What kind of question is that?
 
6:49 AM
Or, rather....
 
@Rapptz Sure. But syntactically this doesn’t fit with the rest of the language. You don’t go mutable int i = 0; ++i;, how cruel is that to a beginner?
 
I've been programming a little bit
And I made a small GUI system
I found that inheritance was pretty convouted
and polymorphism became a sort of a mask for interfacing for me
And now I hear composition can be superior to inheritance
So I have the opinion that teaching inheritance and polymorphism are sort of bad just alone
without context
and I should teach composition as well
 
I think I broke GCC.
 
interfacing
 
well that excitement didn't last very long
 
6:52 AM
Do you two agree?
 
cool
 
That’s not a single return statement, so I don’t think it should be accepted.
 
:v
Is that a joke?
 
Well no
 
clang compiles it too
 
6:53 AM
@Rapptz what IS that?
 
I’m looking it up but I don’t recall which documents map to C++11 lol
 
That's like a closure or something?
 
N3376
 
Ah, the venerable n3290.
 
I'll go look it up.
 
6:54 AM
> { attribute-specifier-seq opt return expression ; }
else you return void
mmmh I recall there were some relaxations for things like using blah = foo; and static_assert, which is definitively not covered by attribute-specifier-seq
@Rapptz Hopefully yours is up-to-date
ooooo I have n3337, that’s FDIS or pre-FDIS or whatever!
heh, same thing
 
Oh you mean with the trailing return type
 
wot
 
The quote is about what happens if there's no trailing return type.
 
right
 
The odd thing is that the examples forego that ruling anyway.
 
6:59 AM
where?
 
I just noticed they're void
 
I think it’s happened before that an example is ill-formed, although still somewhat illustrative
hence why they don’t mandate behaviour
 
yoooooooo VTK went BSD... hmmm. Have any of you used VTK before?
 
Not an issue in C++14 anyway.
[](int x) -> decltype(auto) { }
:v
I think you can actually use -> auto in lambdas iirc.
lemme check C++14
 
It’s the default return type, too.
 
7:02 AM
C++11 lambdas suck.
 
It infers void if you don’t return anything (it has to, at least for compatibility with C++11). I don’t think that extends to functions (special rules!!!!!111).
 
wtb C++14 lambdas
 
All it’ll cost you is an -std=c++14 :)
 
I was going to say how my girlfriend is ranting with me
and I looked at the time, 1:57 AM
looked at my clock, 3:03 AM
damn daylight savings time
scared the shit out of me
 
> Starting with the 6.2.0 release, VTK now provides support for mobile architectures, specifically iOS and Android. The new OpenGL2 rendering backend supports both OpenGL ES 2.0 and 3.0. VTK’s build system has also been simplified for cross-compiling to mobile architectures.
awwww yissssss
 
7:04 AM
@Rapptz still have a month to go over here
 
There's just too much open source code... I can't handle it. VTK, Unreal, Tizen Dali. I WANT TO COMBINE THEM ALL INTO THE PERFECT FRAMEWORK
 
what a twist
 
7:23 AM
they include libs like png and freetype and jpg etc all in the source with separate CMake files for everything oh man i think im in love
 
When I'm done with the initial website I'll post it here
And then we can talk about it
 
This overnight bushwalking trip was way too easy
12km in 2 days with 10kg pack was like ... not enough exercise ...
 
Please suggest or add more
Is this a good list?
What should I add?
 
 
1 hour later…
8:44 AM
I woke up at the final station of the wrong train line again.
Hi.
 
@R.MartinhoFernandes you have trains?
at least you have trains
 
user image
3
 
lol
 
lol
 

« first day (1604 days earlier)      last day (3345 days later) »