« first day (1633 days earlier)      last day (3541 days later) » 

16:00
@LightningRacisinObrit cross-reference this with google maps to find where you live.
Mwahahahahhaah.
well all know where he lives
and the ring he stores inside his home
some say it's worth $1.000.000
others say it's been passed down through generations since Julius Caesar
oh crap, do you know where we can find it again?
All we know is that it's called the ring-stig.
@LightningRacisinObrit None taken, since I've been saying that about you for quite a long time in multiple places.
16:03
@Griwes Have you? :( I've never said it about you before and I was joking. :(
Charming.
@Cinch What is the thing that makes it distinct? What's the grand feature that makes doing that make any sense?
@Griwes it's focused on embeddability and has the power of C++ in a simpler syntax
@LightningRacisinObrit Yeah, especially in the context of useless bashing of s/foo/bar vs s/foo/bar/ and similar. :P
@Griwes Application in embedded situations while being close to C++
didn't you get it the first time
16:04
@AlexM. That ain't a feature and that ain't distinct.
@Cinch Define "embedded situations".
well don't tell me that
As in I should be able to fully bind a C++ object to a Hyper object and then play with it in... wait for it... HYPERSPACE
argh this almost hurt
god I'm so hungry
yet I'm heading out
this does not bode well
16:05
@LightningRacisinObrit Nope
@LightningRacisinObrit well don't make it too long
if needed, give Georgeta a call ;)
you'll be back for dinner in no time
ba dum tschh
@Griwes So yeah
I want to be able to program C++ but not in C++
I've also removed inheritance and the distinction between post and pre-increment in favor of just pre-increment.
Also automatic function return value determination.
@Cinch That’s the same as saying 'my language has a syntax for return values'. Presumably you meant return type.
16:09
@LucDanton sorry yeah
I should make a language called noobl/C++
I'm pulling an all-nigter
return 5; /* return value automatically determined to be 5 */
user1804599
Woo, it works very well! <3
16:12
@LucDanton Automatic return value determination would be "Do what I mean". I just tell the compiler I want a function that takes a double and returns a double, and it figures out whether the return value should be the sine, cosine, logarithm, etc., of the parameter. :)
@Cinch Still nothing warranting a new language. Does it have first class something that hasn't been first class before? Dependent typing? Cure for the halting problem?
@JerryCoffin Oh, of course. There is such a thing but I forgot where to find it. Might take me some time googling.
does anyone know a workaround for delaying the instantiation of constexpr template functions?
@Griwes macros are first class citizens
@gnzlbg You mean "how to force them to be executed at compile time"?
16:15
@gnzlbg please explain
it seems that clang is instantiating constexpr template functions too eagerly :/
@AlexM. ...that makes no sense
@Griwes Welp it's primary purpose is to integrate with C++ in applications
But it should also be able to standalone
include: "cpp_iostream.hyp";
include: "hyp_vararg.hyp";

//Classes for iostream should be presumably defined already
//as a part of the port of the C++ and C library headers to Hyper

def main(int argc, hyp..args argv):

while(argc > 0 && !argv.empty()):
cpp..cout.(argv.pop()).("\n");
argc--;
;

return 0;
;
16:16
@Cinch That makes no sense.
@Cinch This is ugly as hell and makes no sense.
That makes no sense.
@Griwes i mean to work around the fact that constexpr template functions get instantiated by clang and gcc when as of the standard they shouldn't
It's just uglified C++ (lol)
@gnzlbg Huh? Is there a "they cannot be executed eagerly when possible" clause in the standard?
@gnzlbg An SSCCE would be welcome. :P
16:17
@Griwes is not about execution, is about instantiation, marking a function constexpr is required not to break decltype
Here's an example of it printing out command line arguments
basically for decltype the compiler is required to look just at the function signature without instantiating the function, however, if you mark the function constexpr clang and gcc do instantiate the function and thus valid code breaks
So... both gcc and clang do the right thing, while the standard is wrong. ;P
actually it is the other way around :D
decltype(constexpr_template_function) is broken in both clang and gcc :/
That snippet in the bug report should be ill-formed, if it's well-formed by the standard, something's fishy. :P
16:19
why?
decltype doesn't need to instantiate the function
decltype(g(0)) asks for an instantiation of g() that is invalid.
it is defined that way, it breaks std::result_of...
no
This shouldn't be allowed.
decltype(g(0)) asks for the return type of g if it were valid to be called with 0
g(0) is invalid, hence decltype(g(0)) should also be invalid.
16:20
i think i have the current draf here, wait, it was the last decltype feature accepted into c++11
It makes no sense for decltype(g(0)) to be valid if g(0) is not valid.
there is the motivation, it makes lots of sense actually
but is... unexpected at first that it makes sense
for example you can use decltype on incomplete types among other things
Well, TIL that C++ is broken in a yet another way. :P
anyhow clang and gcc do the wrong thing here and I don't seem to find any workarounds for fixing these issues
We should not hotfix other problems by giving new stuff semantics that make no sense.
16:24
@Griwes a lot of people argued that it was useful to break c++ that way :D
It's never "useful" to "break" stuff.
the rule is basically, decltype(expr) gives the type of the expression, if it doesn't need to instantiate the expression, it will not
IMHO this "feature" is an abuse.
for example a recursive function
i think FIT has a fix point combinator that cannot be constexpr because the compiler tries to instantiate infinitely many templates
when it shouldn't :D
wait for it :D
there is the appropiate comment :D
Another fun thing - decltype must (I'm pretty sure of that) instantiate functions when they are written using the C++17 feature of not specifying the return type... ;p
But well, what do I know, I think I understand monads, so I can't possibly be on the level to talk about C++ features.
16:28
that is actually a C++14 feature
so yes, not specifying the return-type changes the semantics of decltype
in particular, specifying the return-type using decltype is can be used to do SFINAE
while if you omit the decltype the body is instantiated and you get a hard error
Oh yes. Sure. That 17 was a derp.
so basically, if you want SFINAE you use -> decltype(...) in C++14
@gnzlbg ...which is a gigantic fail. :P
if you omit it, you don't get SFINAE
people wanting to "port" C++11 code to C++14 will learn that pretty soon
but doing sfinae on the trailing return type is nicer than using a template parameter
But what do I know. I want HM type inference, the committee wants their silly "concepts lite".
16:31
so i don't know, I like SFINAE there, but i don't like the inconsistency with C++14 no return
There’s nothing to port. Deduced return types is C++14.
some people might want to delete the "-> decltype(...)" when they switch to C++14
that changes semantics
@Griwes They don’t solve the same things. Why mention both at the same time?
@LucDanton They have a common subset of problems they solve.
Also give me proper type classes :x
@Griwes That is very wrong.
16:34
@LucDanton So you claim they don't overlap in the slightest?
There’s some piece missing at the very least. E.g. are you assuming something out of the type system (other than one where HM is useful/tractable)?
HM is how type inference works (how types, template parameters,...are inferred), concepts/type classes are ways of constraining/refining generic code
Concept-lite is not to help the writer, it’s for the client/caller. I don’t see where HM enters the picture, it’s long gone by then.
@gnzlbg Please don't compare "concepts lite" and type classes :F
@Griwes E.g. are you assuming C++ with a nice structural type-system?
16:36
They are lightyears apart.
If so, I could see an overlap indeed: better error messages.
@Griwes I said concepts, not concepts lite ;)
@gnzlbg Alright.
holy shit you're all green again
I hate clang and gcc
what a mess they've made
16:37
But you can’t HM anything out of auto foo(auto x) { return x.lol; } :v
@LucDanton Kinda possibly yes.
they should have noticed this in C++11
now it is too late
Okay uh...
@LucDanton That should SFINAE, not hard error ;_;
16:38
So how might I go about creating a parser?
Or... what should I try first?
@LightningRacisinObrit lol
@Griwes Same deal with decltype( /* repeat after me */ ).
@Cinch google is always a good start
@gnzlbg already did
@Cinch Actually learning C++>
16:38
only Cinch and I are normal
4
Learning to Read.
It's the year 2150
any workaround for this bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52269
the bug is also in clang-trunk and gcc-trunk
16:39
humans have colonized the entirety of the universe
But seriously
the Lounge still takes Cinch and his language seriously
@AlexM. /s
I think I pretty much have the language designed
I am surprised that this works ideone.com/ID28Jv. It totally looks like infinite instantiation but I am probably missing something.
@Cinch /s
16:40
@Cinch How long have you been "designing" it?
@Griwes I guess with that perspective CL does seem like an approach from the opposite end: we already have the barely working language, let’s drop a type system into the type system and see what happens. Rather than getting it right from the get go.
@Griwes It's basically C++ lite
@Cinch How long have you been "designing" it?
@Griwes Since today
I don't care what you say anyways
It's an experiment dude
I can’t really sympathise though, I don’t feel like an 'ideal' language rests inside C++. It’s horrible all the way in. Salvaging it is practical.
16:41
Then you haven't designed shit.
@Griwes ...
You can't "design" a "language" in a day.
it was the last decltype feature that entered C++11
It's not possible.
16:42
yes this is what I was looking at. Still surprised that bar is valid.
yep
unless you make it constexpr
then you get the infinite instantiation you are looking for
So... constexpr fixed it. :P
and thats where my headache comes from
so how does this work, do the instantiations not happen since the result of bar is never used?
16:43
Apply constexpr to unbreak the language.
No, not salvage. That’s what you want to do. I want to scavenge it for good parts.
@Veritas it doesnt need to instantiate it to figure out the return type
@Veritas They don't happen because apparently decltype is broken.
so the instantiations never happen
Well uh...
16:44
@LucDanton I? No, if I wanted to, I'd be writing proposals, not trying to create a language on my own :P
so it simply produces type names without actually instantiating the types?
@Griwes You should try Rust. Its trait system is disappointing.
@Griwes 'C++ should X', 'why don’t we have X in C++' etc.
@LucDanton why? I like it, feels like concept maps from the start
@LucDanton I tried Rust. I yelled at at it pretty quickly and left it alone.
Then looked through the docs.
They strongly suggest it's targeted at C programmers, not at C++ programmers.
So I guess that's the main problem I had with it :P
@gnzlbg Settles on 1 for 0, 1, infinity.
16:46
Also it gives you nothing to metaprogram with, really.
@Griwes That sounds wrong.
@LucDanton sounds right to me, it feels like a better C, but it misses lots of generic programming features
The way they talk about the lack of overloading or lack of RAII-by-default seems to suggest that.
HKTS, variadics, type level values, ...
> misses lots of
More like "has none of" :D
16:47
@gnzlbg Wrong in that lots of people involved are knowledgeable about C++ and have drawn parallels to it.
the traits are concepts + concept maps
@Griwes It does have RAII. Wtf have you been reading? I know the docs were really bad at some point and I never bothered with them though.
@LucDanton it might be an alternative to C++ one day, it isn't right now
Xeo
Xeo
@Puppy I think your interwebs just died
16:48
@LucDanton don't you explicitly have to implement Drop to get RAII ?
@gnzlbg That’s right. It still aims for the programmers though.
@LucDanton It has RAII, but not by default.
@LucDanton hey I like the language
And no one is listening...
but you cannot even implement a generic array class in it
16:49
E.g. the borrowing system has everyone agreeing 'thank god I’m not doing this in C++'.
type level integers are coming briefly after 1.0
and so will variadics
but without overloading you are in function name hell
@gnzlbg 'Cannot presently replace C++' is not a slur, no matter the language.
Also I've seen lots of people yelling at the annotated lifetimes thing. ;d
I haven't missed overloading that much too
and I haven't missed function specialization either
basically Traits gives you that too
16:50
@gnzlbg Nonsense, use unary arithmetic and encode the size in types! :)
It's not terrible
But it's not that great either
@Cinch Terrible.
@Griwes You REALLY didn't read all of that in one second.
@LucDanton type_level_int!(1, One)
that kind of sucks
@Griwes It’s kinda like yelling at the type checker though. You’re yelling at an automated system telling you you are doing it wrong.
16:51
@Cinch I glanced at it. It's terrible.
@Griwes one second isn't a glance.
By God does anyone else want to criticize it?
@LucDanton I haven't tried it, but I've heard that it's terribly hard to use right.
@Cinch No, because everyone agrees that it's terrible.
you have to wrap your mind about it
Also needs moar semicolons and new.
@Griwes "everyone"
16:52
most of the docs explain the borrow checker wrong
there is one talk from nico
@Griwes And I heard static types give autism!
that made it click for me
@LucDanton lol
@LucDanton What do you think though
@LucDanton Also "move by default" and calling the shallow copy function clone(), ugh.
Also functions are supposed to be treated as first-class citizens.
Thats the talk: https://air.mozilla.org/guaranteeing-memory-safety-in-rust/
It really explains the borrow checker and concurrency
@Griwes That’s in the past ;)
A talk, meh.
Is no-one writing docs anymore?
There are lots of docs, but nico can really explain it awesomely well
16:53
@LucDanton What's in the past, is it no longer move-by-default?
The docs, just didn't make it click for me :/
@gnzlbg You know, I want to read about something quickly. Not watch a talk. Especially when commuting to work and stuff.
You can read the docs
@Griwes More seriously I don’t do anything with Rust references that I don’t do with C++ already in terms of cognitive burden. Having a borrow checker is reassuring. See why this is exactly like static typing vs dynamic typing?
they might click for you
16:54
@LucDanton Maybe. Dunno. It's just... I'm not a fan, personally.
The idea is right, that is sure.
But I'm not so sure if the way they did it is correct.
the first things to let go is that the borrow checker is not like unique/shared ptr at all.
it is just so much better
at least i had that misconception, I was trying to C++ify the borrow checker to understand Rust
thats actually a pretty bad way of going about it
Also I believe that immutable vs mut is not enough.
is not really about that
I believe that even with immutability by default and mut, you also need const-ish thing.
is about, if you dont share something, you can mutateit
16:56
@Griwes They settled on the semantics of assignment, so to speak. It used to be that it didn’t exist and you had to explicit copy or move. Then it was explicit copy, implicit move. Now it’s implicit everything, although writers of a type can opt out of implicit copy (and IIRC writers of a type have to take a stance, either you opt in or opt out—no default there).
otherwise if you share something, you cannot mutate it,
@gnzlbg Sure, I was starting another point.
is ok to have mutable things in Rust
@Xeo It just undied.
but the borrow checker ensures that if you mutate something you are its only owner
16:57
That's not great.
this prevents data races, and memory leaks (destroying a heap allocated value is a mutation)
@Griwes To be fair I’m told the system is too limited for e.g. implementing data structures. So you have to grab other types (which do come with the standard lib) than &T and ensure nothing goes bad manually.
you can always write unsafe code
the type system helps you a lot there too
but the borrow checker shuts up and you are on your own
My approach in my vaporware lang is to implement uniquely owned values with normal mutability, immutable shared objects are just functional (duh, immutability) and mutable shared objects implement an actor model.
@gnzlbg I’m not even talking about unsafe per se though.
More like RefCell etc.
16:58
So you ask it nicely to do something, and get a future, not an immediate result.
which yeah you can use unsafely
(and you can also unwrap optionals)
yes the type system sometimes break there
I believe this is the "correct" approach to the problem.
Time will tell.
not that it breaks
I've just launched C++ Samples (http://www.cppsamples.com/), a repository of modern C++ code samples! And you can contribute! #cpp #cplusplus
16:59
but if you have e.g. structs, and some of the members have immutable borrows, but a single member have a mutable one
you basically have to tell it exactly what you are doing in those cases
if you just consider structs as a whole you don't run into these issues, but as one tries to do more complicated things they appear, and the error messages aren't great
@Griwes That’s very Rust-like on the whole.
user1804599
Woo inheritance diagrams.
user1804599
libclang is terrific.
@pgaref Hi :)
17:16
@райтфолд Not too much.
user1804599
Cool.
Cinch is designing a language? =o
just designing or also implementing a compiler for?
I'd laugh at all the hilarious wrongs he does if he actually tried to implement
@LucDanton Still doesn't seem able to deduce whether a particular situation calls for sine, cosine, log, (i.e., figure out the right function among many that all have the same type signature).
can you imagine how long it'll take him to build LLVM?
user1804599
17:29
Ugh, libclang doesn't find macro definitions.
@Puppy Probably not as long as it did me the first time.
user1804599
Oh, it's an undocumented flag.
@JerryCoffin Ah, that’s where the interesting(er) bits begin! Now we want even better types for those functions!
user1804599
It has the wrong file information, though.
@LucDanton Well, I did like what HP used to provide--instead of doing a sine/cosine (or arcsine/arccosine) they had a rectangular->polar and polar->rectangular conversion, so you'd feed it a pair of one type, and it'd give you a back a pair of the other type. Of course, on a calculator, it didn't know about "type" per se, but you and I both know they were different types.
Might be a bit harder to sort out (for example) natural vs. common logarithms though.
17:47
Does anyone know why optional<T> was removed from the c++ 14 draft?
Its like, one of the main things i look forward to sprinkling over every c++ codebase i see
I don’t even remember that it was ever in.
After reviewing national body comments to N3690, this library component was voted out from C++14 working paper into a separate Technical Specification. It is not a part of the draft C++14 as of n3797.
I am dissapoint
The rationale was probably along the lines of ensuring that C++14 is more of a bugfix release on the one hand (i.e. removing it), and I don’t recall the rationale for having TSs (i.e. why it’s not on the roadmap for C++17 either).
IIRC it is to replicate the success of TR1.
@DavidKron Well I’m dumb, it’s right here in the n3690 copy I use all the time.
@DavidKron If it makes you feel better it’s been tweaked since then. Possibly for the better.
Yea probably
17:55
but its not like it would have bottle-necked anything il code until it arrives
? Once it’s in the Standard, it more or less stays in the Standard forever.
wow, an optimus laptop is so much more useful when it's running Linux.
I never thought I'd say that.

« first day (1633 days earlier)      last day (3541 days later) »