« first day (1597 days earlier)      last day (3577 days later) » 

21:00
k
@LucDanton Don't forget to remove qualifiers on pair just in case!
So uh C++11 or C++14?
user3010322
C++1z.
whatever you can get from your compiler
user3010322
-std=c++1z
21:01
which should of course be the most recent you can get that meets your needs
user3010322
in clang++ and g++
C++11
@Rapptz And what if the pair-like was made with std::tie?!
@ThePhD what's that?
@Cinch Compilers
21:02
Real compilers.
user3010322
@Cinch std=c++1z is the flag you pass to the compiler that you want to have the most bleeding edge version of C++. g++ and clang++ both honor these options.
@ThePhD no i know that
what's different about c++1z
Just do -std=c++11
user3010322
Not too much.
Very little atm
user3010322
21:03
@Rapptz No make_unique
not much is different about C++1z since C++1y is fresh off the presses.
@Cinch It has implementations of proposals for the next C++ standard (which will probably be C++17)
@jPlatte Why are they iterating faster now?
because they were iterating way too fucking slowly before.
I’ve only switched on -std=c++1z once or twice when hunting bugs. I don’t remember why though.
21:04
C++ has been worked on for a long time.
user3010322
C++11 was supposed to be C++07 or something.
C++11 is the byproduct of many years of standardisation labour.
they bit off a lot more than they could chew.
And somewhen they realized that they had to call it a release
(and they're still teaching C++03 in my classroom)
21:04
@Cinch Classrooms tend to teach C and pretend it's C++.
"Pass a C++ class" and "Learn C++" are often completely orthogonal goals.
C++0x!
user3010322
They're still teaching C89 in my classrooms. .-.
@Puppy They have two separate courses and he goes on about encapsulation and etc. etc
in the C++ one
The new fast iterations are kind of a way of preventing the errors they made with creating such a huge change for the standard
encapsulation is just as important in C as in C++.
21:05
@Puppy True that but C++ is made for accomidating that
@jPlatte The only errors they made is not shipping the good features like lambdas and auto sooner. Also their usual raft of batshit insanity but that'll happen regardless of the speed.
user1804599
The only C++ classes I pass are the ones I pass as template arguments.
@Cinch So is C.
Well, they also forgot to add make_unique for example
user3010322
When I introduced some templates in a code base to better work with Json,
21:06
make_unique not very important.
user3010322
after seeing the implementation everybody started saying "Hail Satan" to me.
Which is part of the reason they now want to get users to try out the new standard before it comes out
user3010322
It's really shitty working for people that don't understand the code you're writing. :/
Which is expressed by things like the feature test TS
@jPlatte No, they always want to do that. The only thing that's new here is that implementations can actually implement at that rate.
21:07
@pup
especially since Clang is kicking everybody up the asshole.
I keep trying to do autocomplete with enter instead of tab...
So uh...
C++11 is standard?
has been since 2011.
hence the name.
@Puppy (then why are the schools so far behind)
21:08
because they're schools.
10 mins ago, by Borgleader
@Cinch C++11 was standardized in... drumroll 2011
@Cinch Schools are bad
@Puppy make_unique isn't so important, but the fact that it isn't in C++11 shows that the proposals weren't really tested pre-standardization
we answered you 10 min ago
@milleniumbug no but i get that
But I mean why hasn't there been an effort to standardize?
21:09
@jPlatte No, they explicitly considered it pre-release. They didn't include it because it's really not important.
@jPlatte make_shared is way different than make_unique hence why it was included and not make_unique.
@Cinch There has been. It was Standardized in 2011.
@Puppy Then why is it 2015 and my school still doesn't teach it?
1 min ago, by Puppy
because they're schools.
@Cinch Because your school is bad.
21:10
Because teaching something new takes time and money.
school teachers don't give a shit about what's currently standard.
user1804599
@Rapptz So uh...
Your professors are probably not willing to learn something new and share it to students.
@Rapptz And so why don't the C++ committee push for that?
21:10
they give a shit about what they can claim is educational with minimal effort and understanding.
@Cinch They do.
@Cinch Why should they?
Because they have 0 influence in the matter.
If you think about it you have thousands of students learning C++ worldwide
Herb puts out a new video every few months telling people that C++03 is deader than a pterodactyl
schools just ain't listening.
@Cinch Consider Indian schools. They teach Turbo C++ which is from 1992.
21:11
If they're all learning C++03 then the industry is flooded with people who are not using C++11
@milleniumbug Holy shit
yes, and it's a serious problem
but nothing that the Committee can do about it.
@Puppy But somebody should do something
right
So I'm curious about some stuff related to this very topic.
so go to your school and tell them that they're a fucking embarassment to education
21:11
@Cinch Yeah, and many people with a big name to them took small attempts to change it
You do something.
Ask your representative to give ISO more teeth!
At least give a major web presence to the biggest tutorial websites
No good C++ tutorial sites.
and stand up in a lecture and tell your lecturer that he's a lazy pile of shit who should give you something real for your money.
user3010322
21:12
cplusplus.com huhuhuhuhu.
@Rapptz I might actually talk to the dean
@Cinch There are no good C++ tutorial sites.
@Rapptz Cprogramming and Cplusplus?
That's where I first started
Both awful.
@Cinch They're both god-awful.
21:12
So uh...
@caps its not a tutorial, its a reference
Should I try put one together?
no.
user3010322
I would teach my programming classes if they'd let me, :v
user3010322
I'd even do it for free.
21:12
Not really.
you clearly don't know C++ up from C++ down.
user3010322
I'd cover all the material, and have the biggest pass rates.
user3010322
EZED PZED.
Those who don't know the material shouldn't teach it.
yeah, but then they'd learn from you...
21:13
@Borgleader You edited.
user3010322
I already do it during every Lab Session in CS 110.
@caps Before you posted (but to your defense, by about a second)
user3010322
I literally go around and sit down and teach people Java, even though this is the first time I'm using Java. <___>
@ThePhD ikr
I'm in C++ lab and I literally do all of the code work
Anyway, so where do the latest versions of Visual Studio fit into this?
21:14
we had to do a 1d implementation of Conway's Game of Life
I thought they used clang?
user3010322
Buahahaha.
@caps lol "MSVC uses clang"
NO, MSVC USES MSVC
user3010322
Visual Studio uses Visual C++ for their compiler.
Huh.
I heard they used clang.
user3010322
21:14
It's a pile of shit that sucks and has more bugs than a condemned mold-infested house.
@ThePhD also stfafx
user3010322
@caps They do SOME work with clang for cross-compiles.
@Cinch llvm.org/builds Plugin for VS to compile with clang.
@Borgleader So?
C++11 to auto or not to auto?
user3010322
auto auto everywhere.~
21:15
I think it's ugly and harder to understand but what do you guys think?
user3010322
No really don't use auto that much.
user3010322
@caps Read the article: it's just for Android and iOS builds.
@Cinch Using Visual Studio doesn't mean you use Microsoft's compiler.
It could be clang, or Intel's (afaik theres a plugin for that too)
@Cinch auto is superior to typename pair::first_type::value_type::iterator
21:16
@milleniumbug but then auto crazy is not good either
@ThePhD Ah, so you can't use VS to compile windows apps in clang?
@Cinch You're completely wrong.
Well that is disappointing.
always auto unless for some reason like you need a derived-to-base conversion for later assignment.
@Puppy Well it some cases but isn't it bad to use auto for everything?
21:17
Bikeshedding time.
no.
While you guys bikeshed about auto
@Rapptz yay!
Who wants to discuss API design with me?
But doesn't VS have the best programmer-assistance features and such? Isn't it the best IDE?
21:17
@Rapptz I’m around.
Do you have to choose either command-line compiling or a crappy compiler?
@caps Yes
@LucDanton Things must be pretty quiet from your point of view huh?
@Borgleader Must be neat in a way.
@caps Either good debugging or good compiler. Not both.
user3010322
21:18
@Rapptz usertype D:<
@caps Yes, but that's not saying a great deal.
@LucDanton Should something be async-by-default or provide overloads for async vs non-async?
@milleniumbug Well that sucks. It's kind of upsetting, really.
The issue I have with the latter is if I have 3 read function overloads then I need 3 more async_read overloads.
And that seems annoying.
@Rapptz for maximum flexibility, let the user write the library themself.
21:19
@caps As far as I can tell, you either have a terrible environment or a terrible compiler and you can't have both good.
@Rapptz Async by default because the user can trivially convert async into sync by just blocking until it's done.
@Rapptz ooo, that’s a tough one—what flavour of async though? with futures?
@LucDanton Yeah with std::future.
Can anyone hear speak to whether MSVC is much better than BCC32?
6
@Puppy I can agree with this.
As far as bugs, exceptions, etc. in the compiler itself?
21:20
BCC?
you mean, Borland?
@Puppy Yes
lol Borland
MSVC is the worst of the current compiler crop but it's actually at least part of the current compiler crop.
Borland is not.
it's not even in the running.
@Rapptz Strictly speaking (when it comes to API design), you can in fact provide a sync interface on top just by get()ing everything. Or let the user do it. So that tips the balance in favour of async I would say.
don't bother even thinking about it.
To me, having support for at least some of C++11's features makes it better.
21:21
Even without futures it’s generally easier to go async -> sync than the other way around.
Borland don't support any C++11 features and have crappy support at best for C++03.
But others I've discussed it with claim it is just as buggy about rejecting valid code and crashing, randomly throwing access violations, etc.
perhaps you're being confused with the Embarcadero thing, where the new-ish versions are actually based on Clang and don't use BCC at all.
@Puppy Unfortunately, that's false.
Borland is not even worth considering as a compiler.
21:22
Hm. So async-by-default?
Embarcadero technically has Clang as an option, but only if you don't want to use any of the RAD features.
I guess I agree.
So then you're effectively just using Embarcadero as a text editor with built-in command-line compile support.
So yeah, they advertise Clang, but it's false advertising.
Ok, time to re-watch Sherlock and study MVVM
Honestly the only reason I was iffy is cause having to specify .get() to get sync behaviour seems like something people would miss.
21:23
@caps Which is what all IDEs are, give or take.
user1804599
Are NTMs related to multithreaded computers the same way DTMs are related to single-threaded computers?
no.
user1804599
Fascinating.
the threading-ness has nothing to say about NTM vs DTM.
it's closer (although not proven) to say that an NTM is a quantum computer and a DTM is a classical computer.
user3010322
21:27
@Rapptz The only issue I could see with that is that synchronous reads, with data ready, could be faster than read_async -> launch thread -> do work -> finish -> synchronize
I think after this I'm gonna finish my json library
user3010322
But that's probably something for API version 1.1.
missing a few things
user3010322
Like what?
user3010322
Also jesus fuck dropbox syncs slow.
21:28
@ThePhD No reason to not use threadpools
user3010322
@CatPlusPlus You still have to pay (very small) cost of throwing the work up to a thread.
@Rapptz Do you allow user-definer types to have parsers/serializers?
user3010322
I'm just saying you can gain something if there's already a synchronous API.
user3010322
21:30
But like I said, that's a version 1.1 thing
user3010322
Not a version 0.4 beta thing
user3010322
@LucDanton That's one of the bug reports I think.
@LucDanton I don't know how to do the former.
I've thought about it.
Serialisation is done on my local copy though.
@Rapptz Well, what I was going to point out is that defining one is the same as defining either.
If you make it possible to modify the file while preserving the comments then I'd have an use for that parser
21:32
I don't support comments.
Terrible I know
I made this before all these "Modern C++ JSON" libraries existed.
user3010322
@CatPlusPlus What use would that be?
config with documented comments
Uh, not losing the comments when the structure is manipulated programmatically?
user3010322
Ooh.
to preserve comments I'd need a new parser I think
user3010322
21:38
Well.
user3010322
Comments would just be that a comment value could appear between any set of tokens.
@CatPlusPlus I think that the manipulating program would have to be comment-aware as well, right?
user3010322
Well, the only odd thing about comments is that... uh.
user3010322
They don't have a key.
user3010322
So they don't really fit into the standard json structure.
21:41
it's not standard JSON
You can have an AST and key-based access
user3010322
They'd have to be tacked on / associated with whatever they happen to be next to or above.
standard JSON doesn't have a lot of things
user3010322
Well, standard JSON can go fuck itself. Comments are great.
dolphin-emu.org/blog the dolphin guys are pretty crazy for just being an emulator project
user1804599
21:42
JSON is terrible.
user1804599
No redundant comma before ] and } allowed is instant nightmare.
user3010322
Alternatively, users can insert "comment":"Lolol #yolo" in their JSON.
@CatPlusPlus Yeah. That's what I thought too.
I have a recursive descent parser though.
So where does Eclipse fit in as a C++ IDE?
Garbage
Also as anything else IDE, too
user1804599
21:49
Cat
user1804599
let's play games together IRL
I thought you lived in Holland?
user1804599
yes but I can visit Cat!
you can, it would just be tremendously expensive and pointles.s
is this valid:
std::function<auto(auto)> lfib = [&lfib](int n) {return n < 2 ? 1 : lfib(n-1) + lfib(n-2);};
21:56
19
A: What is the issue with std::async?

Anthony WilliamsThere are several issues: std::async without a launch policy lets the runtime library choose whether to start a new thread or run the task in the thread that called get() or wait() on the future. As Herb says, this is the case you most likely want to use. The problem is that this leaves it open...

wot
c plus plus
@Cinch No.
@Puppy hm okay
@Cinch no
is std::function trying to implement the first-order function in c++
?
21:58
no.
lol
so uh what's it for?
Storing a function.
Like a callback.
Polymorphic, type-erasing holder.
so... treating functions like a variable, then?
pass it around, change it, etc etc etc
21:59
It allows you to store things of differing types.
You can pass functions as parameters by using a template.
C++ has had higher order functions since C++98.
@Rapptz as function pointers, right?
@Cinch as templates
No.
As templates.
@Cinch You can pass around regular function objects just fine.
22:01
oh
function pointers are one way the type is deduced
i thought higher-order = pass it around like a variable
the point of std::function is type erasure, nothing more.
user1804599
I think comefrom statements are related to aspect-oriented programming.
22:03
@Cinch lookie
user1804599
AOP is to comefrom what function calls are to goto.
@LucDanton oh....
gee i never knew this existed
i thought templates could only be applied to objects and datatypes
oh wiat
F is an object *facepalm
call_with_4 is a function template though.
hmm
VS doesn't support inheriting constructors, right?
it does now
22:09
in a stable version of VS?
Which version of VS is stable
vs2013 update 4 is the newest stable that I know of
It was a joke
I know, but it wasn't funny so I ignored it
it was added in VS2013
wasn't it?
or was that delegating constructors
22:11
I think inheriting was in the CTP.
ah well it only has three constructors, I'll just explicitly forward to them.
@Cinch it accepts functions, too
user1804599
I neither agree nor disagree with this — cindi Jan 7 '10 at 11:49
22:34
@CatPlusPlus Mildly funny. I give it a 6/10.
user1804599
22:45
> Yesterday my girlfriend told me reading is cool.

I then started to read the java source code
user3010322
@Rapptz I don't think Vs has inhereiting constructors at all.
user3010322
It has Delegating Constructors, however.
user3010322
And that was since the Compiler CTP November of like... 2014?
user3010322
Or was that 2013...
user1804599
22:47
Ionising radiation is healthy.
user3010322
> Inheriting Constructors A derived class can now specify that it will inherit the constructors of its base class, Base, by including the statement using Base::Base; in its definition. A deriving class can only inherit all the constructors of its base class, there is no way to inherit only specific base constructors.
user3010322
Fuck if I know that it'll work in complicated code, though.
my desired use case is not
user3010322
How surprising.
22:50
at least not complicated for the compiler.
one thing that has helped me find duplicate code is re-using error conditions.

« first day (1597 days earlier)      last day (3577 days later) »