« first day (1138 days earlier)      last day (3813 days later) » 

7:00 AM
Whats the goal of concepts again? I thought they were amonst other things supposed to make template error messages shorter
(obv thats not the main goal)
 
@jozefg They are neat.
 
@Borgleader Introduce some kind of overload-like feature for generic programming. If I'm not mistaken.
 
@Borgleader It's basically static_assert + SFINAE, but cleaned up.
 
Oh neat, so it should make TMP easier and clearer?
 
its not really, but I think of them like interfaces in java
 
7:01 AM
I like to think of them as "type qualifiers". It qualifies types.
Not the const or volatile or reference onces.
 
@GlennTeitelbaum they are really not.
 
sir,i m not installing actual MC OS. i m trying to install hacked version of MAC OS which is called MAC OS X .You can create another virtual machine which will have features like MAC OS but won't have complete features of MAC OS — Amit Sharma 4 mins ago
 
Oh my.
 
@Jefffrey in that they allow standard names for standard functions for different types of things
 
@Potatoswatter What? SO is a good-reputation website?
 
7:03 AM
They just conglomerate a lot of concepts that ought to be separate and orthogonal. It bothers my slightly that templates + concepts have no real place in the C++ typesystem it's just kinda piled on top
It works, but it's not very.. clean
 
What are you talking about?
 
@jozefg wut?
 
^
 
Well concepts currently cludge interfaces and rewrite rules together
 
No they don't.
 
7:06 AM
Axioms are essentially compiler hints for hot to rewrite an expression yes?
 
for what?
 
for example vector has an emplace_back method, if you had a concept of tailInsertable then all containers would use the same name, not because they follow convention, but because they are restricted by the concept
 
@jozefg Um, concepts simply allows you to express SFINAE in any context besides just template-dependent types within signatures, and allows you to take the result to enable/disable signatures without needing the same template argument dependence.
 
@GlennTeitelbaum They are restricted by the concept, it's just that users can't define their own concepts as part of the language.
 
Any progress on the module proposal?
 
7:08 AM
I want full concepts, not Concepts Lite with Bjarne_case :(
 
didnt you make your own?
 
@Borgleader Supposedly someone's working on it, but there have been no publications about how the new features are supposed to look, so it's early prototypes.
 
@GlennTeitelbaum I understand that. As I'm understanding it, currently templates are essentially compile time duck typed, eg SFINAE but restrict them in a more principled way. This is similar to what a type class is. But it misses a few things, like return type polymorphism and higher kinded polymorphism and higher rank polymorphism that my code tends to make heavy use of.
 
@Potatoswatter Yeah, I'm interested in the prototypes progress too, they mentioned it at GN2013 IIRC
 
It's probably just me complaining. I don't disagree with adding them. I just feel like there is a nicer, more unified approach to this problem.
 
7:10 AM
@DeadMG Users can define their own concepts and the containers aren't restricted, but rather the template parameters into which the containers would be passed.
 
lol templates as duck typing
yikes
 
@Potatoswatter The Standard quite explicitly restricts the container.
 
@DeadMG The Standard defines requirements which would happen to be reflected by concepts. The user-defined TailInsertable would not restrict the standard containers.
 
@jozefg What is "return type polymorphism"? Also, templates aren't "compile-time duck typed"
 
if it were std::TailInsertable and all containers that support it were TailInsertable and you wrote your own container and it was TailInsertable then you could use it where you used any of the std containers that were TailInsertable
 
7:14 AM
Concepts are part of the core language, not a library.
you don't do scope resolution on concepts.
 
once the language supports concepts - there can be library supported standard concepts
 
..?
 
@Rapptz huh? Concepts are function templates of the form template< typename T > bool concept;
 
@Rapptz Perhaps that not the best way to explain it, but if a template expansion type checks then it works. Compare this to Java or ML or whatever where you declare exactly what operations your type parameter must support
 
@Potatoswatter No?
 
7:16 AM
@Potatoswatter since when?
@jozefg That's what Concepts allow you to do and SFINAE.
 
@Rapptz Bjarne's talk in GN12 I think.
 
Whoa.
 
He showed that one concept "function" which has lots of && in it.
 
is that a Concepts Lite thing?
 
I think yes.
 
7:17 AM
@Rapptz Yep, that's what I'm accustomed to with type classes in other languages. My only thought is that templates don't have a clear place in the rest of the type system, (What's the type of a concept?) where as in other languages, a typeclass actually has a type and can ve manipulated in interesting ways
 
@jozefg Concepts allows you to do things like void f(Integral t) using terse notation where the type passed must meet the concept of Integral, how is that not the same thing?
 
@MarkGarcia wait, what? Aren't concepts part of the core language?
 
@MarkGarcia That sucks.
I'm pretty sure Concepts was supposed to be part of the core language.
 
@Rapptz Had to remove it.
 
7:20 AM
that's retarded
 
@Jefffrey It is, but I think it only "affects" the template part like the shorthand syntax of template<Sortable container_type> where Sortable is the concept. Though that's still for Concepts Lite.
 
Are we never getting full fledged concepts?
 
Ok.. But what if I want to make a function from concept to concept, perhaps adding an additional constraint to each? Make a collection of concepts, or any other interesting trick that comes with first class representations of constraint kinds.
 
@Rapptz They couldn't make it work.
 
@jozefg requires clause
 
7:21 AM
I like the Concepts Lite proposal better as it leverages the existing constexpr mechanism.
constexpr functions + type traits is more flexible.
 
No
That's dumb
 
@Jefffrey The concept keyword and using these function templates as if they were typenames is part of the core language. The individual concepts are not, as that would preclude user-defined ones… who would want that?
 
You can already do that if you wish. :|
well, this pretty much ruined any hope I had left for concepts tbh
 
> There is no magic to the definition of Sortable: it is just a constexpr function returning true when its type argument is a permutable random access container with a totally ordered element type.
Apparently I was wrong.
 
Problem is that everyone wants these features without reading about what they actually are.
 
7:23 AM
Concepts Lite just blows.
@Potatoswatter I read about what actual Concepts are, the old proposal.
 
TBH I don't even know what was removed from concepts to produce concepts lite.
 
@Rapptz That's not a function, thats a way to combine concepts into one.
 
@Potatoswatter Most of it.
 
@Potatoswatter Looks like everything that was good about it.
You can do Concepts Lite by hand.
 
the specification of full Concepts was more than took to describe like, the entire of templates and the Standard Library, or something ridiculous like that.
 
7:25 AM
Also, is there any sort of mechanical checking of axioms?
 
minus some syntactic sugar
 
and ConceptGCC was a failure.
 
Concepts Lite only requires the require syntax and shorthand syntax to be included in the language. That's pretty good considering they don't want feature bloat.
 
what feature bloat?
they already have a bunch of useless shit in the standard library that no one uses
 
and they want to avoid making those mistakes again.
 
7:26 AM
@Rapptz Well, aside from how it fixes SFINAE to work with any context or declaration…
 
@Rapptz Concept maps and stuff.
 
those were the good things :(
oh well :/
I have my own concepts thing so I don't get much benefit from this
 
I still think Bjarne has made a very good use of existing language (constexpr) and standard libary (type traits) features. It's basically recycling them so they don't become bloat.
 
can we stop using the word "bloat"
 
srsly
 
7:29 AM
ok. :P
 
I wanted concepts because it made defining them way easier.
 
@Rapptz bloat bloat bloat, corpses in the water bloat bloat bloat, bloat bloat bloat, corpses in the water bloat bloat bloat ... bloat to the surface!
 
Compare this:
template<typename T>
constexpr bool Equality_comparable()
{
    return has_eq<T>::value && Convertible<eq_result<T>, bool>() && has_neq<T>::value && Convertible<neq_result<T>, bool>();
}
to this:
auto concept EqualityComparable<typename T> {
    bool operator==(T, T);
    bool operator!=(T, T);
}
stupid.
 
Still, they also need to see forward and make sure the syntax part of concepts isn't dragging the semantics part behind.
 
@Rapptz That's not what concepts lite looks like.
 
7:32 AM
@Potatoswatter word for word from the proposal. section 2.2
 
@Rapptz Which is before they have introduced all the nice syntax.
 
It'd be nice if you could provide default implementations

auto concept EqualityComparable<typename T> {
bool operator==(T, T){ return ! (T != T); }
bool operator!=(T, T){ return !(T == T);}
}
 
why would you do that?
 
auto concept EqualityComparable<typename T> {
    return requires( T t, T u ) {
        t == u;
        t != u;
    };
}
 
you're missing a brace
 
7:35 AM
@Rapptz You can partially satisfy the imlementation. Let's say you want <, <=, >=, >, ==, and !=. Providing some specific subset and having sane defaults for the rest saves a lot of typing over 10-12 types
 
@Potatoswatter fail
 
@Potatoswatter That's new. They made a revision to Concepts Lite or another remake?
 
it would be nice if you could have a default higherarchy
 
@Potatoswatter where'd you get this from?
I've been looking for the latest Concepts Lite proposal
 
so if you are doing equilityComp - it could use: ==, or != or < or > in that order
 
7:38 AM
^ Might be related.
 
okay found the latest one
 
user1804599
@Potatoswatter Why is that auto?
 
user1804599
Isn’t it like, always bool?
 
@Rapptz Link?
 
It's not, it's bool in Concepts Lite.
 
user1804599
7:43 AM
> A requires-expression a constant expression, and its result type is is bool.
 
user1804599
I think they a word.
 
:13181130 kept hitting return without holding shift, then my connection dropped and I couldn't finish. But it's close.
 
how is this not part of the core language?
 
@rightfold They compressed it! "A requires-expression requires a constant..." They don't tolerate any redundancy.
 
user1804599
lol
 
7:45 AM
also this is radically different from the previous paper :|
 
user1804599
Yay!
 
user1804599
Ugly_case!
 
user1804599
CodeIgniter also follows Ugly_case convention. It’s ugly.
 
I think it still has many committtee hours to go before we know what it will be
 
7:46 AM
Bjarne_case
 
user1804599
Cold_case
 
Don't.
 
I dislike CamelCase and prefer normal_names
 
Concepts in the standard follow CamelCase
InputIterator, etc.
It should be consistent with it.
 
yes it should be changed to input_iterator
 
7:47 AM
no it shouldn't :v
 
it's fine the way it is
 
@GlennTeitelbaum no
 
I also always liked _p in lisp
 
user1804599
@GlennTeitelbaum Input_iterator.
 
I think the proposal introduces too much new syntax.
 
7:48 AM
@Jefffrey Bjarne_case is horrible.
 
Though familiar ones.
 
and functions named _
 
@MarkGarcia Good.
 
user1804599
I think the proposal does not introduce too much new syntax.
 
Screw your bloat argument.
 
7:49 AM
@GlennTeitelbaum I prefer the predicate? that Scheme/Clojure/Ruby have.]
 
user1804599
Syntactic sugar for commonly-used idioms is good.
 
@Rapptz It is.
 
The previous way of defining it is horrible.
 
user1804599
We also need syntactic sugar for scope guards.
 
user1804599
Fuck having to name them.
 
7:49 AM
nite all
 
scope guards?
 
nait
@Borgleader include guards
 
user1804599
@Jefffrey No. Wtf. That’s not at all the same thing.
 
@Jefffrey #pragma once
 
> Windows
 
user1804599
7:50 AM
std::lock_guard<mutex> guard(why_the_fuck_do_I_have_to_name_this_thing);
 
Hmm. Actually not. It's just -> for type requirements.
 
@Jefffrey Common compilers such as GCC, Clang, and EDG-based compilers include special speedup code to recognize and optimize the handling of include guards, and thus little or no speedup benefit is obtained from the use of #pragma once.[2][3][4]
^ Wiki
 
user1804599
#pragma once is less ugly and less error-prone.
 
user1804599
Every compiler that is worth using supports it.
 
And the braces which includes the expressions.
I the new Concepts Lite is nice.
 
7:53 AM
@rightfold because if it's anonymous then it destructs instantly making it a useless lock_guard.
 
@rightfold I use #pragma once, but I don't think it'll get to the standard.
 
T(); // calls destructor after expression ends
 
There's still that same files but in different locations argument.
 
@Borgleader Oh, nice.
 
That's why we need modules!
 
7:54 AM
hey, I think the Concepts Lite thing is going in the right direction I guess.
 
@MarkGarcia Modules cannot get here fast enough
 
@Rapptz It's like a compromise between your syntactic sugar and my feature bloat argument. :)
 
Screw your argument.
 
Hehe. :P
Reuse and recycle!
 
anyway, Bjarne's email gave me hope that we won't get Bjarne_case
 
7:57 AM
the Committee wouldn't accept it
 
Bjarne_case?
 
yeah
 
it's just too ugly.
 
doesn't matter
the bikeshedders will bitch until he changes it because it's not consistent
 
Time to watch Lost again
inb4 lost sucks
 
7:59 AM
Is it still bikeshedding if I know what the actual topic is about
because if so, I'm bikeshedding.
 
yes it's still bikeshedding
 
@Jefffrey lost socks
 
@DeadMG So there only Bjarne on the comittee who like Bjarne_case ?
 
obvious_case
 
likes it is irrelevant.
 
8:02 AM
Still, we can't be denied of having personal preferences. Only when you're slowing down the process of approval without any good substantial argument would be considered bikeshedding.
 
it's not consistent.
 
@sehe lol
 
@MarkGarcia It's bikeshedding whenever there are more substantial problems to be discussed.
 
life is bikeshedding
 
I like to think that naming a baby is bikeshedding. Maybe some programmers could just say "Name him <uninspired-name-here>". :)
 
8:05 AM
yeah but that's personal, not an International Standard.
else you've got one hell of a baby right there
 
@MarkGarcia I see a market for exorbitantly priced random name generators installed in maternity wards.
 
I'm gonna name my firstborn Fudge.
 
lol.
period.
 
@Potatoswatter And the name generators are seeded with reddit usernames. How funny would it be once they get to school.
 
user1804599
@Rapptz I know. There should be some way of declaring it without naming it and without having the dtor being called immediately.
 
8:15 AM
@StackedCrooked mee
 
user1804599
@MarkGarcia It doesn’t have to. vOv
 
@ScottW eens
 
@rightfold SCOPE_GUARD ;)
 
user1804599
Hmm, that could work.
 
user1804599
With __COUNTER__. \o/
 
8:17 AM
@rightfold std::lock_guard<mutex> why_the_fuck_do_I_have_to_name_this_thing(guarded); // FTFY
 
@MarkG I'm at the end of episode 2. This is so stupid.
 
Goddamn... My latest "popular" answer on while vs. do-while loops is... controversial...
I keep getting ripped at by different people.
 
@rightfold In Wide, I set the temporary lifetime to the full scope, as opposed to the full-expressions.
 
user1804599
@DeadMG nice.
 
@rightfold Dunno. There's a reason why Stroustrup didn't do that in C++, I just don't really know what that reason is.
 
8:18 AM
@rightfold Noooo the ODR.
 
user1804599
You don’t want to keep resources acquired longer than needed!
 
Xeo
@DeadMG Ask him
 
@DeadMG You could e-mail him. I did and he replied to me pretty quickly.
 
what's his address?
 
user1804599
Or ask on Stack Overflow and farm shitloads of reputation. :D
 
8:20 AM
bs@cs.tamu.edu
 
Send him that sparkling Bjarne GIF! It's almost christmas!
5
:P
 
@DeadMG Because then objects wouldn't be temporary. Folks have a habit of writing lots of lines between braces.
 
lollerskates
 
@MarkGarcia That reminds me. Pubby's been gone for a while :(
 
@Rapptz Yeah I noticed. I think he's got a compatible time zone with mine.
 
8:25 AM
morning :|
 
user1804599
morning :)
 
morning :D
 
¬_¬ you all suck
 
nite all
 
@Jefffrey Good night.
@Mysticial Hmm... Who could that downvoter be?
 
user1804599
8:39 AM
brrrrrr
 
user1804599
It’s so cöld.
 
@MarkGarcia Dunno. H2CO3 is the first person I checked out shortly after I got the downvote. I usually do this by comparing the person's rep before and on the day of the downvote. And looking for a 1 point discrepancy. But he has a serial voting reversal on that day. And I don't know how that plays into the calculations.
 
@JamesSnell exactly. And that's what the top rated answer supports/encourages. — H2CO3 2 days ago
What is this guy's problem lol
 
I wish I could downvote comments.
 
Xeo
@Rapptz You think he has only one?
 
8:47 AM
well, that's been agreed, I am not the build for being a Santa. shucks, I was so looking forward to having a horde of smelly, snotty, filthy kids pawing all over me.
@Mysticial my god you really do have issues don't you o_0
 
@thecoshman If curiosity is an issue. Then yes, I have an issue.
 
user1804599
Heh.
 
@Mysticial you need help hommie :P
 
user1804599
F# compiler warns if you use = instead of <- as = does comparison. :)
 
Xeo
@Mysticial People seem to confuse "interest in the low-level details" with "advocation for premature optimization"
 
8:49 AM
@rightfold what does it use for assignment?
 
@Xeo Right. And I actually got ripped at by both extremes.
Both by the premature optimization camp. And by the low-level programmers camp.
 
Xeo
lol
 
I'd love to put them against each other. But I got caught in the middle simply because my answer has the most votes... lol
I actually considered deleting that answer at one point. But when I woke up the next morning seeing an additional 20 votes on it... I was like... well... goddammit... fuck...
 
@Mysticial link?
 
morning
 
9:02 AM
@DeadMG Oh. The comments under my answer here: stackoverflow.com/questions/20172402/…
First I get into an argument with H2CO3. Then I get few other guys start nitpicking on my assembly examples. (a couple of them have been deleted since)
 
welp
I didn't even realize that you could implement while loops by duplicating the condition.
in Wide I automatically implemented them with the extra jump.
 
@DeadMG That was actually how I was taught in grad school.
But it didn't take me long to realize that it wasn't the usual case.
 
well
 
Unless the condition is as simple as i < end or something.
 
it's a quirk of LLVM IR that it doesn't have any kind of "block fallthrough", as it were.
but then I have no idea what the resultant post-optimization assembly of my Wide code actually looks like :P
 
9:08 AM
The unconditional jump, while it doesn't have to deal with branch prediction bullshit, still has to go through the CPU branching logic that swaps out the instruction queue.
So it isn't free. And sometimes it's worth just duplicating the condition instead.
Larger code size, but no need to jump.
 
I wonder if the optimizer can make that decision automatically
 
But anything larger than a single int compare, and the compiler will probably do something else.
@DeadMG I've always trusted the compiler to do whatever it thinks is best for that. Mainly because, if I get the point where such a minor thing matters, then there are probably other things that can be improved. (loop unrolling?)
 
@melak47 What I said was impossible is still impossible and you still haven't done it.
@Polymer With the wrong iterator, yes. I don't know why you assume the wrong iterator, though.
 
user1804599
> This page was intentionally left almost blank.
 
@ThePhD You mean even in the generated code? It doesn't matter if you compile it with MinGW. Executables gonna execute.
 
9:14 AM
what even is capnp
 
oh, some serialization something.
 
@EtiennedeMartel Yes, it is quite old. And like many old things from the same age, it never noticed that its original goals have become meaningless.
 
damn, you becoming the ape or something, reading the whole transcript?
 
@DeadMG I had nine pings when I logged in.
 
9:17 AM
orite
well, I wrote a really simple string class thing for Wide, and I've got a list of about ten language features I need to implement before it will become even remotely viable.
 
I think I just found out why my Haswell machine refused to be stable above 4 GHz. And it would occasionally die even at 4 GHz...
 
you insulted its mother?
 
@DeadMG yeah kinda.
 
You insulted its motherboard?
 
The mobo prefers that you use the automatic overclock settings. I said no. And I overclocked the CPU manually.
The mobo apparently took that as an insult to its mother and decided to bump up the cache frequency along with the CPU frequency.
 
9:25 AM
You mean.. you screwed up?
 
But I never increased the voltage on the cache...
So... yeah...
 
hmm
 
user1804599
@Mysticial The mofo didn’t like how you insulted his mother.
 
overclocking cpu once or twice is called exploring, overclocking cpu all the times is called dumb
 
@rightfold Mobo's are usually female.
 
9:27 AM
@MartinJames But that doesn't mean they can't be a mofo.
 
as soon as they fix that RTTI descriptor problem
maybe LLVM-VS will be actually good for something
telling ya, I'd be happy as shit to compile even some parts of my project with Clang.
 
Starting to despise MSVC?
 
btw it's probably possible to make mingw-cl
(of course clang > g++, except it doesn't support Windows)
 
@Mysticial I looked at your profile and found this :D
 
9:33 AM
@R.MartinhoFernandes I'd switch in a heartbeat if anyone else had a useful debugger.
 
@FredOverflow :)
 
I had to use gdb when I was on Linux.
 
@DeadMG there is a DWARF -> PDB converter, so you could use MSVS debugger
 
@Abyx I'm using Clang on Windows for Wide all the time.
 
@DeadMG a mingw-based version?
 
9:35 AM
I only need MinGW for some of the headers and libstdc++.
and the linker, I guess.
 
@DeadMG perhaps the IDE? This is how a compiler called Visual GDB works.
 
speaking of which
I haven't checked on the progress of lld in a while.
 
A compiler called what
 
@R.MartinhoFernandes visualgdb.com
@R.MartinhoFernandes Its a nice package because they have a lot of tools that will get many microcontrollers working right away.
 
Well, that's called a debugger.
 
9:39 AM
@Mikhail that looks neat but it's not a compiler.
 
@Rapptz w/e its a distro of a compiler
@Rapptz and ubuntu is not an OS
 
...
 
@Mikhail Why not?
It has a kernel and a shell.
 
@R.MartinhoFernandes related to why VisualGDB, based on GCC is not a compiler
 
@R.MartinhoFernandes I can only assume he's going to say it's a "linux distro" based on his previous comment
 
9:42 AM
@Mikhail Ubuntu is not a kernel. And VisualGDB is not a compiler.
"compiler" refers to the thing that is included. "OS" refers to the collection. Your analogy is broken.
 
@MarkGarcia I want that sparkling Bjarne GIF! I can trade it for this:
Aug 23 '11 at 20:54, by FredOverflow
user image
 
user1804599
lol
 
user1804599
@FredOverflow here
 
@rightfold awesome thx
 
user1804599
@FredOverflow Oh God that thread.
 
user1804599
9:49 AM
Lounge<Gosling>
 
JBL
Haha what's with the 10 repost ? :D
 
user1804599
@FredOverflow Way better logo than the current one.
 
@JBL I don't know, it's one of those things that seemed funny at the time, but is unexplainable in hindsight.
 
JBL
Aug 23 '11 at 21:11, by FredOverflow
Ga(y)tes :)
Huehuehue !
 
9:54 AM
@FredOverflow I hereby coin "hindsight blocker".
 
pics of the coin or didn't happen
 
aaaargh.
not only do LLVM use a bunch of shitty error codes
but they use the same error code for every single filesystem function
 
Xeo
ERR_LOOK_ELSEWHERE?
 
and it's not even like, an error code enumeration or anything, it's just "true" or "false", effectiely.
@Xeo More like, ERR_FUCK_YOU.
 
JBL
> lol it crashed
 
user1804599
9:56 AM
errno and -1 is best error reporting.
 
I don't want to handle errors by cotinually checking everywhere . I want exceptions raised.
 
@DeadMG Are you sure there isn't a global "last error" thing?
 
@R.MartinhoFernandes I hope not.
 
@R.MartinhoFernandes Yep. They all return error_code and half of them take an output parameter of error_code.
 

« first day (1138 days earlier)      last day (3813 days later) »