« first day (1203 days earlier)      last day (3731 days later) » 

11:00 AM
makes you feel like you pissed and shat yourself.
 
@BenjaminGruenbaum Well they propose to use future in the standard, it's just that PPL has its own task model and its own classes.
 
ah it only lasted a couple minutes
 
In the proposal for await/resumable task is replaced with future
 
not to mention that if I actually pissed myself, I wouldn't have needed to piss so badly.
 
11:03 AM
@Lightness are you sure C++03 used the C99 preprocessor?
 
@R.MartinhoFernandes It didn't.
 
IIRC C99 preprocessor features were one of the features of C++11.
 
Damn, I want to have an operator bool() for my boost::variant type
but there doesn’t seem to be a way to get that
 
@KonradRudolph What would it possibly return?
 
@DeadMG true or false, duh.
4
 
11:04 AM
But depending on what?
 
heh
 
@R.MartinhoFernandes ahahaha
 
@DeadMG Well in my case the semantics are straightforward, my variant represents an AST node (expression), and its value would be true if the evaluated node is truthy
 
@AndyProwl I wonder if it'll make it in, async/await and generators are two things I really miss in C++ but I admit they're rather complicated to coordinate across implementations well and they're very high level (although that shouldn't be a problem with the current mindset)
 
@KonradRudolph Ah, so it has absolutely nothing whatsoever to do with the variant then
 
11:04 AM
@DeadMG ?
 
@BenjaminGruenbaum I read something about generators being very unlikely, but async / await is actively worked on
 
the semantics of the type the variant holds has nothing to do with the variant.
 
Well I have this code (verbatim):
auto&& cond = eval(env["cond"], *parent(env));
return eval(cond ? env["conseq"] : env["alt"], *parent(env));
 
@KonradRudolph It's something specific to your use case, not to the variant itself
 
you don't want variant::operator bool() just because for variant<T...>, T... supports it.
 
11:06 AM
@ScarletAmaranth link? Sounds strange - why are generators unlikely?
 
@BenjaminGruenbaum yeah I am trying to find it, give me a moment, been a while
 
@ScarletAmaranth Indeed, the proposal for async/resumable does mention generators and yeild but only as a "further generalization with troublesome aspects"
(to be handled in the future)
 
@DeadMG Well, of course not. But thanks to the wonders of template metaprogramming this is a non-issue. The operator bool() would only exist once you implement the necessary visitor (and/or all the types of the variant implement that operator)
 
@R.MartinhoFernandes no
What did it use then?
 
@LightnessRacesinOrbit C89's preprocessor plus a few extra predefined macros I believe.
 
11:07 AM
You lot keep telling me I'm wrong about everything but fail to actually correct me
 
@KonradRudolph So... just implement the visitor outside the variant, call it with apply_visitor, and there's no need for any changes to variant itself at all.
 
@DeadMG C90, surely, based on &sect;1?
 
@LightnessRacesinOrbit I didn't fix the question because I was confused about what you really wanted the question to be about.
 
@DeadMG You do realise that I specifically want that syntax, don’t you?!
 
@BenjaminGruenbaum mmm, I can't seem to find it
 
11:08 AM
@LightnessRacesinOrbit Same thing realistically.
 
The same exists for the other operators, after all
 
@LightnessRacesinOrbit Same thing, just different bodies, no?
 
@R.MartinhoFernandes I think "What's new in the C++11 preprocessor?" is very clear.
 
@KonradRudolph Well... no, not really. As far as I can see, you're throwing away clean logical separation in favour of a syntactic triviality.
 
@R.MartinhoFernandes I'm asking you!
@DeadMG OK well C90 is explicitly mentioned in C++03, whereas C89 is not, so...
 
11:09 AM
yield is very useful in other languages that support it. I would have really liked something like LINQ in C++ but that's kind of 'magic'.
 
@DeadMG So does every other operator implemented for variant
 
@LightnessRacesinOrbit C89 and C90 are identical except for some page numbering.
 
@DeadMG Thank you
 
@LightnessRacesinOrbit Ok: C was ratified by ANSI in 89, and the same standard published by ISO in 90.
 
(And arguably this is the purpose of variant)
 
11:09 AM
@BenjaminGruenbaum You need to ask Meijer for that :P And he'll tell you he'd rather die :)
 
@LightnessRacesinOrbit But it didn't read that at first!
 
I get all antsy thinking about ANSI
 
@KonradRudolph I wasn't aware that variant had any operators implemented for it except =. But I'd also hazard that most of them are implemented as free functions rather than members. The Boost docs do not mention any operators other than = as far as I can tell.
 
@ScarletAmaranth haha, why?
 
11:10 AM
@R.MartinhoFernandes As soon as you told me off for "inheritance", that's what it became. That was twenty minutes ago.
 
@LightnessRacesinOrbit Ok, ok, maybe there was something else I could have corrected, but I'm lazy.
 
@BenjaminGruenbaum He doesn't care much for C++ (or at all it would so seem), to me it seems he lives just barely in front of an ivory tower
 
Oh gosh.
Ok, I'll correct your answer.
 
@DeadMG I thought it had the whole shebang but I might be mistaken. It definitely has some operators (such as stream output) – which is dead useful
 
@R.MartinhoFernandes You could simply write your own
That was the purpose of my asking the question, after all
 
11:13 AM
@KonradRudolph Oh yeah, and don't forget about the questionable idea of implementing operator bool() in C++03.
 
@DeadMG Sure. We need a C++11-style variant anyway
 
The C++11 preprocessor is the C99 preprocessor, not the C90 preprocessor. In particular, variadic macros are supported. — Sebastian Redl 46 secs ago
Someone around here is full of bullshit
It's either him or you two!
;)
 
@LightnessRacesinOrbit Oh well, I fixed yours now.
22 mins ago, by R. Martinho Fernandes
The answer is "the same as in C99"...
@LightnessRacesinOrbit You seem to be quite distracted today.
 
@R.MartinhoFernandes "Distracted"? I'm simply baffled by how every time I ask a question and suggest a possible answer, you spend 100% of your response time going "hur, you're wrong" "you're confused" "you're distracted" rather than simply actually answering the question and telling what the real situation is.
I already admitted I don't know the answer, by virtue of asking the question. I don't need to be constantly berated about that.
 
But I did!
 
11:16 AM
sigh
 
I admit that shit can be quite confusing because it's sort of fucked up and maybe I was not eloquent enough to avoid such confusions.
 
23 mins ago, by DeadMG
yeah, but C++11 preprocessor includes C99's changes, I think.
 
C++03, even though published 4 years after C99, uses the C90 preprocessor. C++11 updates to the C99 preprocessor. C11 came after C++11 and AFAIK its additions are minimal, but not required in C++11. C++14 will still use the C99 standard as its basis. @Lightness Is this better?
 
11:18 AM
I only said that the C++03 preprocessor was the C89 one.
 
@ScarletAmaranth House as you've never seen him before
@R.MartinhoFernandes Then wtf are MS on about with C11! Does this mean they're deliberately going non-standard? (Sort of)
 
@LightnessRacesinOrbit Black adder has some of the top notch-est actors ever to walk this planet. Stephen Fry, Rowan Atkinson, Hugh Laurie, etc...
 
@ScarletAmaranth And yet with all of that talent it still failed to ever make me laugh
 
@LightnessRacesinOrbit Well, that's how MS rolls, no? ;)
 
Really? I laughed permanently watching Blackadder
 
11:22 AM
Did you watch it high on laugh gas?
 
nope, perfectly sober
actually, sober refers to alcohol-free only, right?
 
I've heard it used for other drugs.
 
>>> (square (if (quote ()) 1 2))
1
well, fuck
 auto operator ()(list const& list) const -> bool {
     return empty(list);
 }
okay, that explains it
 
Why are you implementing a Lisp interpreter?
 
@KonradRudolph I’ve rolled my own variant and I wouldn’t dream of adding operators. Although that’s more to do with the state of the language than as a philosophical objection. IOW I’d do it if the 1k lines of code didn’t already make my skin crawl.
 
11:30 AM
@R.MartinhoFernandes because Peter Norwig recently did it in Python, somebody tried replicating his feat in C++. And while his code is certainly interesting, it does all the usual horrible mistakes
I wanted to show how to do it in modern C++
 
(and no, my code isn’t even near 90 SLOC)
 
Hmm, doesn't look that bad, apart from leaking environments like a sieve.
 
yeah
I know it doesn’t look too bad
 
@KonradRudolph lol at the auto and -> bool part
 
11:39 AM
@Jefffrey I like my syntax uniform
3
 
AHAHAHAHAH
 
@KonradRudolph do you also auto main() -> int?
 
@ScarletAmaranth Yes.
 
ehehehehe
 
11:42 AM
@KonradRudolph genius, have a star
 
I also use uniform variable declaration syntax, i.e. auto[const][&&] var = expr; throughout
 
brutal video ... so brutal, it is hilarious :p
 
ew
auto&& plix.
 
11:44 AM
why bother adding const to auto&&.
 
@DeadMG Either–or
although I often do auto x = and I’m honestly uncertain whether I need this at all – i.e. whether making a copy really makes sense
didn’t Herb write about this somewhere?
ah yes, Gotw #94
 
yeah but I usually don't care whether or not I make a needless copy.
you can always optimize later if necessary
 
that’s what I thought as well
 
@sudorm-rfTelkitty what the fuck
 
@KonradRudolph why bother with C++ then
 
11:50 AM
lol
 
if you're just gonna auto everything
 
@LightnessRacesinOrbit Are you replying to the correct comment? How is that related?
 
@KonradRudolph Yes, I am
 
@LightnessRacesinOrbit Then your comment makes no sense
 
@KonradRudolph I'd warn against leaping between "I disagree with your comment" and "your comment makes no sense"
It's well-known in here that I find the sort of advice found in GOTW #94 to be totally unpatriotic as far as C++ is concerned ;)
 
11:52 AM
@LightnessRacesinOrbit I agree with that. But from a purely understanding point of view, I maintain my previous comment
 
@KonradRudolph Okay well I'm not going to get into it again
 
And as for “unpatriotic”, lol. I’ve also replaced classic for loops completely by range-based for loops
 
ahahahaha auto x = type{...}
AHAHAHAHAH
 
@KonradRudolph That's totally patriotic
 
It’s consistent with Gotw #94
 
11:54 AM
oh gawd, I'm dying
 
I’m lying, actually. I’ve just found the following loop in my code:
for (auto current = this; current != nullptr; current = current->parent) …
@Jefffrey ?!
 
brb relaxing my stomach
 
for (int x : vecOfInts) is the correct way to iterate a std::vector<int>.
USE THE TYPE SYSTEM
it is there to help you
 
@LightnessRacesinOrbit Well I’m going further than that – much further. I’ve banned classic for even when I really have to iterate over integral ranges
 
11:56 AM
@KonradRudolph I've found that I probably use classic for loops more than range-based ones. Mostly because when I need to use for loops, I need the iterators to write an algorithm.
 
change for the sake of change. I hope you feel sufficiently hip! :)
 
I’m using for (auto i : range(…)) or for (auto i : indices(cont)) instead
@LightnessRacesinOrbit No, change for the sake of readability and bug-freeness
 
I wish there were a way to turn the volume down on SO chat notifications
 
anyway, I’m off to lunch. Which is a pity because I’d love to fight this out
 
11:57 AM
@KonradRudolph Hiding types reduces readability and bug-freeness, but whatever
@KonradRudolph I wouldn't. It usually goes on for too long
 
@LightnessRacesinOrbit Nonsense
 
@KonradRudolph Again, feel free to disagree but there is no need to be rude
 
I disagree that calling something “nonsense” is rude.
 
Nonsense!
Anyway search for auto spoken by me and you'll soon find out the truth
 
@KonradRudolph how is for (auto i : range(...)) more bug free than for (int i = x; i < y; ++i)?
 
11:59 AM
/** Simple Enum class. */
private static class Enum
o_0 what am I reading?
 
@Jefffrey Isn't it obvious?
It should be.
There's three instances of i there, just to start.
 
I'm a retard, probably
 
> Telling a programmer there's already a library to do X is like telling a songwriter that there's already a song about love.
22
 
@ScottW Conflicts with YouTubing and iPlayer
 
12:01 PM
@Abyx Best quote of 2014, but seriously... use preexisting libraries.
@R.MartinhoFernandes are you serious? I can't tell.
 
Btw, @Konrad, I ended up writing my own bootstrapping function :(
KDE next, I think.
@Jefffrey I'm serious.
 
lol
I love you
 
@Jefffrey It's about DRY, and the amount of 'moving parts' involved.
 
I see @thecoshman got engaged then spent the rest of the night in the Lounge
must be one special lady!
 
12:04 PM
lol
@LightnessRacesinOrbit You're just jealous.
 
@R.MartinhoFernandes Not really, seeing as I got engaged 9 months ago
though, to be fair, I'm not engaged any more
 
@R.MartinhoFernandes you are not repeating yourself
you are using an identifier in three completely different expressions
that's what identifier are there for
 
Three times.
You're free to re-define what "to repeat" means.
Just don't expect to sound intelligent while you do it.
 
@R.MartinhoFernandes that's not what repeat in DRY means, and you know it
 
i have an existencial crisis
 
12:09 PM
@ScottW because I don't care about writing a character 3 times that much ?
 
There's a lot of hostility here today.
 
Can I be sure at all that when an exception is thrown, everything is correctly cleaned up?
 
@Jefffrey It was never about keystrokes.
 
I'm spraying love all over the carpet
 
12:09 PM
@ScottW so i just live with that?
 
@R.MartinhoFernandes I know.
 
@ScottW but destructors can fail to clean up
 
That's hopeless.
 
as far as I know even the destructor from a mutex can fail
then im screwed
 
did SO just go really slow for anyone else?
 
12:11 PM
they dont throw
 
@Jefffrey Wikipedia puts it this way "Additionally, elements that are logically related all change predictably and uniformly, and are thus kept in sync."
 
@ScottW e.g. fstream destructor calls close, but close can throw, and the destructor swallows the exception
so who knows if the destructor failed
 
@R.MartinhoFernandes I was wrong then.
 
so even destructors should not throw, that doesnt actually mean that they cannot fail
 
@gnzlbg Because it's hopeless.
 
12:13 PM
they just fail silently
 
If you can do something when close() fails, call close().
That's what close() is there for.
 
fucking unuseable - just SO! gr
 
@R.MartinhoFernandes yes, but then I cannot trust that anything is cleaned up at all
 
@gnzlbg If close() fails, you cannot clean it up anyway. The problem is not the nature of exceptions and destructors. It's the nature of that particular resource.
 
but i can call close wrapped in a try catch myself
 
12:16 PM
Then do.
But... do what in the catch?
 
inb4 logging
 
throw? :D
i dont know, till today i assumed that when an exception is thrown, the stack is unwinded, all destructors all called, and everything is cleaned up
 
@W4lker I'm pretty sure you can combine the edge properties. After all that's the entire reason that properties are tagged (edge_index_t and edge_weight_t being the tags). I'd read the documentation for you if I had the time :) — sehe 21 secs ago
lol
 
and because destructors shouldnt throw, nothing could go wrong
 
@gnzlbg It is. As much as it's possible to clean up.
 
12:17 PM
but TIL that destructors can fail to clean up
and my mental model blowed up
 
It’s not about destructors.
 
2 mins ago, by R. Martinho Fernandes
@gnzlbg If close() fails, you cannot clean it up anyway. The problem is not the nature of exceptions and destructors. It's the nature of that particular resource.
 
so i have to consider the nature of each resource that can fail to clean up
i guess they are not that many
hopefully
 
@LightnessRacesinOrbit SO has been exceptionally slow for me since ~16 hours. It lags in bursts (although that sounds contradictory)
 
thanks for the therapy
 
12:19 PM
I think there's an appropriate TDWTF for this.
 
In the case of I/O, failure to close is easy to to handle. There’s nothing anymore to attempt. The call to close was the best effort.
 
You just have to accept that there situations that are simply hopeless and there's nothing else you can do.
 
welp
 
@LucDanton i dont know what it means for close to fail
trying to close a file multiple times in case it fails seems pointless
 
government people sent me another request for documents that they already had
at least this implies they're thinking about me again
 
12:23 PM
@DeadMG You dropped the 'W'?
 
i know, i just thought about it
if something fails, just try again, but for file close failing, i dont think that makes much sense,
 
I have yet to fully decide whether this different branch is also W
 
logging sounds like an option
 
@gnzlbg The hardware holding the file could have died.
 
Xeo
IWFKVJWIFJD
 
12:24 PM
or someone else is writing to the file without a mutex?
 
@gnzlbg Depends on the abstract model of file you’re dealing with. For the most part with C++ streams the close is one attempt and that’s it. For C I think you can in fact retry in some situations (should check the man page).
 
Xeo
I can't even rage enough anymore.
 
@LucDanton @R.MartinhoFernandes anyways thanks for the discussion, my mental model of exceptions expanded today and I freaked out a bit, i'll sleep over it :P
 
Oh, the errors don’t seem too useful either actually.
 
@R.MartinhoFernandes How would this cause closing the file to fail? You certainly can't read from or write to the file anymore.
@Xeo About what?
 
12:25 PM
@DeadMG Closing flushes the buffers, so it fails to write the remaining data.
 
Xeo
stupid doctors
 
@R.MartinhoFernandes my face turned white too today when i learned that ~~destructors~~ releasing a resource might silently fail in some cases
 
@R.MartinhoFernandes Assuming there is any remaining data.
 
Yup, fclose is useless on failure and Posix’s close not any better really.
 
@Xeo What did they do now?
 
Xeo
12:26 PM
I went there, waited 10mins, talked 1 minute, and went home again.
 
@DeadMG Yes, but you asked how it would cause it fail...
 
@R.MartinhoFernandes Well, I guess that if you were banking on close() to write any remaining data, and then it didn't, that would be a failure.
 
Xeo
doc told me, after asking a single question, that nothing could be done without an MRI
WHY THE FUCK DID I EVEN GO THERE, argh
 
@Xeo did he prescribe you an MRI?
spanglish?
 
Xeo
well, luckily, I already made an MRI appointment 2 weeks ago, for Monday
 
12:28 PM
good :)
 
@Xeo Was the question "Do you have an MRI?"
 
Xeo
but he wants a written analysis, not the CD, so I have to wait some days for that
 
dan
hi guys
 
Xeo
@R.MartinhoFernandes no, 'what's going on'
 
@Xeo You commented about missing on coding before. Time to start hacking from the bed!
 
Xeo
12:29 PM
@LucDanton it's highly annoying with a touch keyboard
even the small sample for sbi yesterday was annoying to write
 
You don’t have a favourite keyboard to bring with you everywhere ._.
 
Xeo
I just want to be able to sit again :<
 
a mind-to-computer controller would be nice to write code :)
 
Brain-computer interface is something we'll be working on soon.
So much awesome.
 
Xeo
@R.MartinhoFernandes need a tester?
 
12:33 PM
With a propriatary driver though :(
 
Xeo
@R.MartinhoFernandes also, just one-way (brain -> computer) or two-way?
 
What do octopi have to do with alcohol?
 
@Xeo Ever read or played shadowrun? :D
 
Xeo
yes
 
@KonradRudolph Can we see a picture of you wearing the syntax uniform?
 
Xeo
12:35 PM
I read Heitz' shadowrun book series
 
@FredOverflow It makes tentacle-counting much more difficult.
 
@sudorm-rfTelkitty What the actual fuck.
 
@Xeo I would hope it's one way. Brain API is not documented.
 
> This is what happens when you slack off
No it fucking isn’t.
 
@Xeo yeah read the heitz' ones too
 
12:39 PM
Who the hell thought this advert was a good acceptable idea?
 
I dont want my brain to become burned though :S
 
How to make brownies (not really -- but very funny)
@KonradRudolph Is it an actual advert, or just some art project?
 
@MartinJames Whats about reverse engineering? ^^
 
@Paranaix Please feel free to volunteer:)
 
@FredOverflow It is: learnforlifewa.org.au
 
12:52 PM
It's too goddamn cold
@KonradRudolph Ahahahaha that's the stupidest fucking thing I've seen in months
 
yeah, it's great : D
 
It's like someone read the definition of non-sequitur and went "yeah, that sounds great, let's do that!"
This is what really happens when you slack off, you're too stupid to grasp basic logic and then do shitty videos like that
 
or like someone reading the definition of probabilistic "impossible"
 
I bet million funbux that if you told them that, they'd be all like "WELL WE WANTED TO SHOCK PEOPLE blah blah" and yeah you're shocking me with your inability to form a coherent thought
That is just so hilariously stupid
 

« first day (1203 days earlier)      last day (3731 days later) »