« first day (1084 days earlier)      last day (3880 days later) » 

4:00 PM
@DeadMG Right, I prefer throwing const char* -- less overhead ;)
 
Wide's handling of unqualified vs qualified names, semantically, is totally broken though.
 
Though, sadly, the standard exception classes don't do that as I recall.
 
@StackedCrooked flavoured strings, yum.
@JerryCoffin Yeah. I always avoid them entirely.
 
Xeo
@StackedCrooked Strongly stringly-typed, even!
 
@FredOverflow ...and you know when you're throwing an exception, minimizing overhead is crucial.
 
4:01 PM
Yep. Strongly flavored strings,.
 
What should I throw?
 
Sure, like when you throw an expection to get out of deep recursion ;)
 
A tantrum
 
@Pawnguy7 std::runtime_error.
 
4:02 PM
@FredOverflow call/cc!
 
@Pawnguy7 A dedicated error class that contains enough information that when the user catches it, he or she should be able to immediately understand what the problem was.
and by that, I mean, determine it with their program, not a human reading the error string.
 
The only thing that comes to mind is enumerating it (RESOURCE_MISSING), etc.
 
NO.
resource_missing- WHAT resource was missing?
 
user1804599
@DeadMG I was thinking of having something like this. As for expressions that consist of solely a name; struct reference_expr : expr { unique_ptr<name> name; };.
 
4:03 PM
@JerryCoffin lol
 
@sehe It was actually a really cool little glider.
 
@not-rightfold I had struct Identifier : public Expression { std::string name; }.
 
@DeadMG And there is the problem. Enumerating every case seems bad, though.
@Jefffrey what compile errors are left?
 
@FredOverflow I've actually thought for years that exceptions were the perfect way to implement a back-tracking parser.
 
user1804599
@DeadMG I don’t really like that, but yeah it’s possible too.
 
4:04 PM
@JerryCoffin Have you ever worked with the SMPP protocol?
 
Actually I've never understood string error messages in exceptions. if (response == "to print errors") { return "that's not what exceptions are made for"; }.
 
@not-rightfold What's the point in holding a unique_ptr<name> inside the reference_expr? Just make name derive from expr instead.
 
user1804599
I like to keep names and expressions separate; names are not always expressions (e.g. SomeName myFunction() { … }.
 
@Pawnguy7 Nah, it's one of the only ways to go.
 
@Pawnguy7 What is "every case" here?
 
4:06 PM
@GamesBrainiac Not really. I've done a little with a code base that (I believe) also included some SMPP stuff (it did SMS somehow or other, anyway), but I never really dealt with that part of it.
 
@not-rightfold Names are only expressions if you assign it to an Expression*. If you have an Identifier*, it can obviously only ever be an Identifier.
 
@Pawnguy7 error: no member named 'bgMusic' in 'Resource' is still there. If you want to remove files then do git rm <file>.
 
also, for functions (well, overload sets), it turns out that I just used a std::string name; again, instead of holding an Identifier node.
there's no point in using the Identifier class for non-expression-purposes.
 
@JerryCoffin I see. I'm havving a difficult time trying to find good resources or answers for what I need.
 
:1217315 strange. What I currently have doesn't have that. It must be the old version somehow.
 
4:07 PM
@JerryCoffin Why would you want backtracking parsers?
 
@Pawnguy7 do git status to see what edits were not committed yet.
 
@FredOverflow For languages you can't reasonably implement any other way (e.g., Fortran).
 
@Jefffrey not Resource
@R.MartinhoFernandes Every resource, at least, and any other cause for exception that I don't yet know of.
 
@Pawnguy7 It's MusicPlayer that is triggering the error though
 
Ell
Is it a reasonable assumption that signed integers are stored in twos compliment on major archs ?
 
user1804599
4:09 PM
std::cout << "Hello, weekend!\n";
 
Probably. That assumption is not as useful as one might think, though.
It's a bad idea to make assumptions that the compiler doesn't make, even if they are true.
 
@Jefffrey do you have the most recent version?
 
@Pawnguy7 Yup, the seventh commit.
 
@FredOverflow Actually, I've never tried it, but it wouldn't surprise me if a backtracking parser might not be a simpler way to deal with C++. The big problem with backtracking parsers (IMO) is that when they were really needed (again, Fortran) nobody had a clean mechanism to do the unwinding to backtrack.
 
I see // if (music == Musics::BACKGROUND_MUSIC) return Resource::bgMusic;.
 
4:10 PM
@Pawnguy7 Actually no. Let me check something.
 
@JerryCoffin Exceptions would be good for that now, I think.
try { left_branch; } catch(std::runtime_error& fuck) { right_branch(); }.
 
@DeadMG so I should make a, say, Cause enumeration, and extend an exception class (from runtime_error) that uses it?
 
@DeadMG s/std::runtime_error/parse_error/
 
@R.MartinhoFernandes AAAARGH, IT'S SO FUCKING ANNOYING
 
4:14 PM
@JerryCoffin I think you're right. The unwinding required for C++ is limited to some well defined set of cases, so it's not so hard to handle nicely.
 
I had to use Parser::Error for my enumeration, so I can't use it to name my exception class.
I had to use Parser::ParserError.
 
@Pawnguy7 With the recent version there's still the std::exception("..") kind of thing.
 
@DeadMG Precisely. Actually, pretty clean and simple. Of course, there is an alternative some C++ parsers use: take both branches simultaneously, then when you get to a point you can determine which is right, you just discard the one that was wrong.
 
@Jefffrey working on that at the moment. Anything else?
 
Xeo
@DeadMG Errors :D
 
4:15 PM
@DeadMG Parse::Failure?
 
Ell
@DeadMG that seems like abuse of exceptions :O
"exceptions for control flow"
 
This is so fucking fascinating.
 
@Pawnguy7 After that error it aborts so I don't know.
 
@Ell It's not an abuse at all. They do exactly what I wanted them to- unwind the stack, clean up.
 
Ell
4:16 PM
But it's not an exceptional circumstance is it?
 
that exceptional circumstance thing is utter bullshit.
come on dude, you're talking to a Jedi C++ Master here.
 
Xeo
lol
 
Oh, not again...
 
@DeadMG Unfortunately it gets rather expensive to backtrack and reparse a million times. Memoising the parse-tree/AST solves that.
 
4:17 PM
I wasn't excepting that at all.
Keeping the typo.
 
hello
 
@willj I wouldn't know. But memoising the AST is a bad thing, I think.
 
Xeo
Robot, is my gut feeling correct, that Either Error would allow you to handle this rather nicely?
 
Ell
@DeadMG I don't know. I feel like it's messy and a "hack"
 
@Ell Your feelings are wrong, young padawan.
 
4:18 PM
Exceptions are a control flow mechanism and everyone who says otherwise is retarded
user image
4
 
the "exceptions for exceptional circumstances" thing is nothing but a sound bite made by C programmers.
 
@DeadMG How so? In practice, the failed production shares a common subtree with the one that will later succeed.
 
Ell
CatPlusPlus is a retarded and everyone else who says otherwise is retarded :3
 
Every path other than the success path is exceptional.
 
Ell
well okay, exceptions are for error handling
 
4:19 PM
exceptions are good for precisely three things: unwinding the stack, cleaning up, and not having to return a value that indicates failure.
if you need those things, then you need exceptions.
 
@Ell So, if parsing fails, what do you call that?
 
Ell
@R.MartinhoFernandes an error
but the parsing doesn't fail there does it?
ah I have to go anyway. You'll inevitably prove me wrong anyway
 
Errors require propagation, and exceptions are a mechanism to do that
 
@CatPlusPlus one catch (Exception e)
 
@Ell Erm yes, it does. It's the whole point: try one parse. If it fails, try another.
 
4:20 PM
@Ell The boost guidelines say this: "An oft-cited guideline is to ask yourself the question is this an exceptional (or unexpected) situation?'' This guideline has an attractive ring to it, but is usually a mistake. ... A more appropriate question to ask is: do we want stack unwinding here?'' "
 
You could say you'd try an alternative.
 
@willj Hmm. I would say that the final AST should not have any memoized elements- re-using the elements that would otherwise have been discarded doesn't really count for me. Sorry for the confusion.
 
I'm only saying that because I'm back to toying with futures ._.
 
If the situation is unexpected, then you didn't fucking account for it
 
4:21 PM
Hm, headache.
 
If you make a check about something, then you EXPECT that this is a possibility
 
@R.MartinhoFernandes Drink someshit.
 
Therefore that "guideline" is shit
 
@CatPlusPlus They're not called expections, though.
 
lol, expections.
 
4:22 PM
@DeadMG I think I'm coming down with a cold.
 
@JerryCoffin Monads
 
not unsurprising considering that it's gonna be fucking winter soon.
 
@R.MartinhoFernandes New std proposal?
 
Yes, people love spending time on ~words~ instead of semantics
 
Words are fun.
 
4:23 PM
@Jefffrey try now
 
Xeo
@LucDanton I have no clue how Parsec handles this stuff internally, but just being able to to parse1 <|> parse2 <|> parse3 <|> ... is nice.
 
Exceptions should be called interrupts
 
@Xeo Well, with an error monad.
 
Xeo
5 mins ago, by Xeo
Robot, is my gut feeling correct, that Either Error would allow you to handle this rather nicely?
 
4:23 PM
@CatPlusPlus BUT INTERRUPTS ARE FOR KERNEL CODE
 
Someone should writing a script that automatically starts a C++ program as soon as it crashes from the last image it had taken before the program crashed
 
@R.MartinhoFernandes Ah, the main fond memory I have of exceptions is that throwing up thing.
 
Someone should writing a programming
 
Karel's call stack while solving the eight queens problem :)
 
4:25 PM
nice function names
 
@DeadMG And throw throw throw throw throw throw throw :P
 
throw up
 
lol
 
@ÓlafurWaage And I had hoped nobody would notice :)
 
@FredOverflow Okay, just nobody who was writing Fortran compilers...
 
4:26 PM
you just love to remind me of throw throw throw throw throw throw at any opportunity, huh
 
@Jefffrey Not sure why I don't get this error.
 
@R.MartinhoFernandes ?
 
I found it!
 
@Pawnguy7 Because VS is too stupid to issue it.
 
user1804599
@Pawnguy7 Because you called your class “ScreenError.”
 
4:26 PM
@Pawnguy7 Have you tried clang?
 
Why all the screenshots?
 
Because people are visual.
 
we would like to waste your bandwidth
 
@FredOverflow Very early Wide grammar iteration allowed for that.
 
It makes sense, though
 
4:27 PM
I had throw expression; as an expression.
 
Jul 11 '11 at 16:44, by Cat Plus Plus
You can do throw throw throw throw throw throw something; by the looks of it.
 
@DeadMG Of what type?
 
Xeo
Holy crap, been 2 years already?
 
@Xeo That's what I was just thinking.
 
4:28 PM
You should rename Wide to Old.
 
@FredOverflow Dunno. I didn't get that far.
 
Xeo
Imma make a language called New. And it will not have a new keyword.
 
@DeadMG class boat : public virtual std::exception; life() { throw new boat; } Throw throw throw your boat, gently up the stack. Merrily merrily merrily merrily, life is but a dream.
 
the full LR grammar is several times that large anyway
 
old and wide wild
 
4:29 PM
@JerryCoffin Sounds like that newfangled GLR thing that Ira Baxter is always going on about
 
@BenjaminGruenbaum Oh gawd a cargo cult programming add-in.
 
someone invented GLL parsing
 
@R.MartinhoFernandes That's a great way to put it :) Cargo cult programming ftw.
 
@willj Sounds about right (though I don't pay enough attention to Ira Baxter to realize he's using it).
 
@BenjaminGruenbaum dat menu bar
 
4:30 PM
I've been thinking about my own parser generator
 
Why?
 
because
 
I see.
 
duplicate symbol _main in:
    /var/folders/4j/_hqyh9z54p3f9qrqk3r_8r800000gn/T/Main-4VfBvx.o
    Main.o
 
the realistic fact is that a lot of the code in the Wide parser is kinda repetitive.
 
4:30 PM
Can I safely remove the first object file?
 
@LightnessRacesinOrbit MFW I go back to work tomorrow after a month abroad and see it installed on a computer.
 
especially error handling- almost all of which could be automatically generated.
 
@BenjaminGruenbaum s/How Flow helps us programmers/How Flow helps non-programmers/
 
@DeadMG Most parsing code is a good fit for being generated
 
@not-rightfold OBTW, don't forget the need to parse and lex multiple files in parallel.
 
4:32 PM
but you can use macros and templates to generate a lot of stuff..
 
inline virtual ~IScreen() {};
 
@JerryCoffin "How many times have we needed to read tons of documentation pages that contain a lot of irrelevant words and sentences, " - apparently now "words and sentences" in the documentation are now elitist terms coders don't really need to know. Why read the docs or code when you can copy pasta off stack overflow.
 
Is this the correct way to make a virtual destructor for an interface?
 
user1804599
@DeadMG nono.
 
@Pawnguy7 Just do virtual ~IScreen() {}.
 
4:33 PM
Guys, isocpp.org is down. Does nobody even care!?
 
@Pawnguy7 Drop inline and don't put semicolons after method definitions
 
user1804599
@StackedCrooked No.
 
@StackedCrooked I definitely don't.
 
user1804599
This is the end of C++.
 
user1804599
4:34 PM
Let’s party!
 
Let's party like it's 2013.
 
@StackedCrooked Kinda in general, if it were to stay down a long time, I guess that might not be great -- but otherwise, whatever.
 
@DeadMG isn't that a constructor?
 
> Flow automates the process of browsing through Q&A sites (like StackOverflow) and reading exhausting online documentation
 
@BenjaminGruenbaum I think I'll pull a @Neo and try to delete all my answers...
 
4:35 PM
I like how it automates the process of reading.
 
@Pawnguy7 Four more seconds and I couldn't have edited it.
 
@R.MartinhoFernandes Ahahaha what a piece of crap
 
@JerryCoffin Please don't, that would deprive "real" coders from writing "good code".
 
How does this not have multiple definition errors?
 
I should start posting answers with subtle bugs in them
@Pawnguy7 Defining methods inside class def makes them implicitly inline.
 
4:37 PM
Congratulations on your efforts.
 
@Pawnguy7 Fixed.
Have you solved the warning?
 
The garbage collection in this lounge is like the one they have in Java
 
user938787
Did my message disappear?
 
could kick in at anytime
 
Yes, it was eaten by the grue
 
user938787
4:38 PM
(From about 2 minutes ago)
 
I removed it.
 
So does this look like how people want to use futures?
 
user938787
Why was that?
 
because unless you intend on paying me, I am not your private help service.
go post a question on Stack Overflow.
 
4:39 PM
@LucDanton C#'s async/await is how I want to use futures
 
@BenjaminGruenbaum It's pretty much an empty threat -- given the number of accepted answers I have, I'm way too lazy to even try to get all the OPs to unaccept all of them.
 
@CatPlusPlus Futures may subsume that though. Still thinking about it though.
 
> I think they drastically misspelled 'copied'.
 
user938787
@DeadMG Technically I did.
 
@CatPlusPlus Stuff like that and yield return always has me in two minds. I hate the idea of language-level integration of what is essentially a library design. But I also think that the known alternatives certainly appear to suck.
 
4:40 PM
@JerryCoffin Thank god, now users can safely copy paste your code blindly, crisis averted :)
 
Would you be more offended if people call you a donkey instead of a monkey?
 
@Consciousness Oh really?
 
@CatPlusPlus is this in the standard?
 
user938787
I asked a question and this is stack overflow, is it not?
 
I don't see any such in your question list.
 
4:41 PM
@DeadMG The building blocks can be a library feature, but they can't replicate the language support
 
@DeadMG It's just that it's so useful that putting it in the language makes sense. It's not about how easy it is to add similar behavior without adding a keyword or something.
 
user1804599
This is not Stack Overflow.
 
user938787
However I didn't see the no-questions tag, my apologies.
 
@Consciousness No, it's chat.stackoverflow.
 
user1804599
This is Stack Overflow Chat.
 
4:41 PM
Because yield/await essentially amounts to generating a state machine.
 
@CatPlusPlus Back when there was still , I sort of did that regularly (usually not exactly a bug, but code that produced the right answer in a thoroughly unexpected way, and would break completely with even the most minute change in the specification).
 
@Jefffrey it runs for you now?
 
user1804599
Just like the world isn’t the USA just because the USA is part of the world.
 
user938787
I was being a pedant, I do know the difference, thank you.
 
@Pawnguy7 Yes.
 
4:41 PM
@Pawnguy7 Yes, just fine. I'm going to push the make file and the arial font.
 
@CatPlusPlus when was it added?
 
@Pawnguy7 1998
 
Maybe I am thinking of redeclaration instead.
 
@Jefffrey Took me way to long too understand how "the arial font" made sense there.
 
@CatPlusPlus Was in the 1998 standard, but was true long before that.
 
4:43 PM
@CatPlusPlus I am thinking that maybe it could be a library feature if you had enough compile-time introspection as a language feature.
 
1998 was so long ago ... 15 years ago
 
So inline is basically a useless keyword? Or do you still need it for templates?
 
poor lobster was only 3
 
Templates are implicitly inline too.
 
Cat++ was only 5
 
4:44 PM
It's still needed to get around ODR for regular free functions
 
@Pawnguy7 It's for non-template non-member functions.
 
@Pawnguy7 You mostly need it for non-template code that goes in a header, to avoid ODR violations.
 
Ah.
 
@Telkitty猫咪咪 Strange -- it doesn't seem that long ago to me.
 
I'm lacking an operation to prevent resources from escaping the current context/scope (which is not what a future destructor should be in charge of) I think.
 
Xeo
4:45 PM
@LucDanton you mean block-on-scope-exit?
 
@DeadMG Nah, still not the same. With AST rewriting and macros and stuff like that, maybe, but the end effect is the same: syntax extension.
You could maybe make more generic syntax for this sort of things. do notation or whatever
 
@Pawnguy7, created pull request
Time for a shower.
 
@JerryCoffin neither to I, but I am sure Cat++ could not remember much from back then
 
@Xeo Sort of. An async provider could decide to make the operation a no-op, e.g. a thread pool. So it's more about semantics/correctness than flow control.
Resource usage, so to speak.
 
Xeo
auto g = provider.guard(f);? :P
 
4:47 PM
@CatPlusPlus It wouldn't be a syntax extension, it would be existing syntax that was just creatively re-used. For example, I might have async(expr) instead of async expr.
 
Xeo
Also, Async::provider::async looks funny
 
@DeadMG Yeah, but you'd need to rewrite the entire function that uses that.
 
@Xeo Worth contemplating, yup.
@Xeo In what way?
 
not if I have a library pass to rewrite it for me.
 
Xeo
@LucDanton The repeated "async".
 
4:49 PM
@BenjaminGruenbaum ew
 
@Jefffrey should we switch fonts?
 
Xeo
@DeadMG Maybe take a look at Boo for that? IIRC they allow such crazy stuff
 
I intend to allow such crazy stuff
 
Quasiquotations <3
 
@LucDanton The repetition of "async" does seem a bit odd -- Async::provider::synchronous seems entirely strange, and saying X is usually a poor idea if the opposite/alternative to X is clearly wrong.
 
4:50 PM
@Xeo For the function (template) I picked the name up from std::async. You can substitute using Provider = annex::naive_async::provider; if you want.
To clarify the naive provider is an implementation detail. The interesting bit is that a provider gives a way to obtain future results.
 
@Pawnguy7 Under the circumstances, yes.
 
Haha.
 
well
I ate a sandwich at 13:30, and now it's 18:00 and I'm just about feeling better enough to take a drink.
stupid guts.
 
Xeo
4:59 PM
Apropos it being close to 7pm, I should head home.
Sucks that the next bus comes in 20 minutes, though
 
what time did you arrive at work?
 
I'm boooooooooooooooooooooooooooooooooooooored.
Need to get some laundry done.
 
59 pounds lost.
 
27 Kg ?
 
yep
 
5:03 PM
I am going to fix part of mortgage in 3 weeks time - going to save me $150 a month
Also have $4500 debt on my credit card, how sweet
 
Xeo
@MarcClaesen 10:20, roughly
 
@Xeo sounds like you are home
 
@Xeo You have some long ass work days o.O
 
Xeo
nope
@Borgleader Today was an exception
Have a milestone early next week and need to get some other stuff done
Oh fuck, my stomach
It felt like it was burning just now.
 
Sorry, not that big.
 
5:06 PM
@Xeo I know DeadMG is cool, but you don't have to inherit all of his traits :P
 
Xeo
There was not even a reason for it to hurt just now
@R.MartinhoFernandes Punctuation's important, eh
@R.MartinhoFernandes Play Terraria
 
Don't own it.
 
@Telkitty猫咪咪 you can sell yourself.
 
@Xeo Oh yeah the provider shouldn't be part of the call. The future concept is for abstracting away from that. (E.g. given an initial future result you can compose your way to other future results.)
 
@R.MartinhoFernandes Play with yourself, you own that :P
 
5:09 PM
@R.MartinhoFernandes Then buy it.
 
Xeo
@LucDanton Then futures::guard(f), with some internal magic to get the provider?
 
And I only have 5.47 euros in my Steam wallet and my Portuguese credit card expired and I can't use Steam with Paypal because the fuckers still haven't changed my account to Germany and Steam doesn't like it.
 
Yup. (Unless it's a no-op, but ya know.)
 
Xeo
@R.MartinhoFernandes Ow
 
@R.MartinhoFernandes Need to fix that before the holidays.
 
Xeo
5:11 PM
Welp, time to leave.
 
@LucDanton Or maybe not!
 
Xeo
Excuses!
 
That reminds me that maybe I should change my Portuguese account address to here.
 
@Xeo Later.
@R.MartinhoFernandes ...unless you're planning to move back to Portugal sometime soon.
 
Erm, no.
Awesome, the local agency for my bank is just down the street from where I live.
 
5:17 PM
@Xeo If any_of(r) is the range version of the variadic any(r...), what is it for guard? :p
 
And the same building as the Portuguese embassy. Sweet.
 
Oh yeah, Alternative does have empty.
 
@JerryCoffin lol
 
In case anybody cares, it appears that isocpp.org is back up.
 
@Pawnguy7 I don't care that much about fonts. But yeah, if you prefer another, just download it and put it in the directory.
 
5:28 PM
Ha, error 500 on YT.
 
BRB (in 2 hours)
 
@Xeo wow, the Chihaya route is really entertaining
she has an excellent voice actor
 
0
Q: Why doesn't C++ have a private_cast?

BennoRight now, accessing the private members of another class seems to require a fair bit of template voodoo programming, like this. However, when working with badly designed libraries or libraries originally built to serve another purpose, it sometimes seems desirable to be able to do just that. Al...

lolwut
 
Xeo
@LucDanton futures::guard(futures::{any,all}[_of](args))?
 
@Griwes lol
 
5:34 PM
Why was that downvoted? Its a fun question.
 
I can see how that could be useful.
 
Xeo
Oh wait, guarding any would be kinda silly, eh
 
I suspect that semantically that should work, yes.
@Xeo I don't think so. But that's because I've written it to return a new future value (that represents the first available future value), it's not some kind of select.
 
@Griwes -.-; omfg...
 
ok, ok
I think the reaction to the private_cast question is bullshit.
we've had lots of other "Why doesn't C++ have XYZ?" questions.
 
5:49 PM
<IgnisInCaelum> C++ doesn't like anything. It is a language of pure, burning hatred.
<Oxyd> So, it likes cats?
 

« first day (1084 days earlier)      last day (3880 days later) »