« first day (1588 days earlier)      last day (3359 days later) » 

user1804599
9:00 PM
else if doesn't have to be a language feature unless you require braces.
 
i have elif
no braces; too much work
 
user1804599
I have else { if and switch true.
 
user1804599
Fuck else if.
 
i went through hell to get elif to work properly
 
> Elif, a Turkish feminine name meaning "first", "strength", or "slender"
 
9:01 PM
4 hours of hell (with some procrastination, obviously), to be precise.
 
user1804599
lol
 
user1804599
you suck
 
user1804599
Getting elif to work properly is like, adding it to the parser and constructing the same AST as else { if.
 
user1804599
It's like a minute of work.
 
@Puppy do. do while. do while if.
 
9:07 PM
whilst I wouldn't use that tactic myself, I must concur with rightfold that if you already have if and else, then you have elif.
 
@Puppy ive been considering using elif, still haven't taken a decision on the issue
 
terrible.
 
Youtube comment post button is grayed out and I don't know why.
 
they finally got some sense?
 
Oh, this time it worked.
 
9:11 PM
i prob wont though, but the lazy part of me is considering it
 
user1804599
@Puppy not if you require braces
 
user1804599
you'd have else { if which is even more terrible than else if.
 
requiring braces is dumb
 
user1804599
instead you want non-retarded (any type with == and no implicit fallthrough) switch.
 
user1804599
alright, let's try eastern europe with a different facecamo
 
9:21 PM
user image
10
lol
 
@Puppy "requiring braces is dumb" Dat depends on context :P ...
 
@Rapptz lol
 
user1804599
@πάνταῥεῖ he is relatively dumb
 
user1804599
9:27 PM
(pun intended god dammit)
 
@райтфолд relatively dumb? Which pun? Theory of relativity?
 
user1804599
Yes.
 
user1804599
In the Netherlands we call such guys "hate beards."
 
Well, he's actually proofing being dumb with that cup.
I'm just scared such people are seen as authorities of whatever :( ...
 
@Puppy Optional braces are extra dumb and make people defend them, so they deserve to die
 
user1804599
9:38 PM
Sniper troll videos are hilarious.
 
Dunno. Foucault's pendulum already proofed that such reasoning is dumb just more than a 150 years ago now.
 
LRiO really made it out for the pub that evening it seems :(
 
9:57 PM
@CatPlusPlus I didn't realize that making people defend a thing was enough for that thing to deserve to die.
 
It's that dumb
 
'I managed to get thread pool working but the threads are not as busy I would like them to be'...

'Thread.sleep(rnd.nextInt(1000));'
 
user1804599
Time to get some parsing working.
 
10:19 PM
> Sweden's emergency services have launched an internal investigation into how the operator handled the case.
That's gonna be interesting.
It's also probably going to turn into a witch hunt.
 
@EtiennedeMartel But maybe not (it might start out as a witch hunt!) :-|
 
But hey, Sweden is perfect anyway.
It's the bestest country in the entire world.
 
@EtiennedeMartel Many fans of blondes agree...
@MartinJames The mind boggles giggles.
 
I miss @Steve
 
Guys. Why am I still at work?
Oh, right, beer.
 
10:35 PM
Hm.
 
@Blob Be sure you have a good sight picture then remember to squeeze the trigger, don't pull. You won't miss again.
 
user1804599
src/lex.ll:31:50: error: implicit instantiation of undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
 
user1804599
wtf
 
@EtiennedeMartel You're scared to go somewhere that you might find out what games the Canadian politicians have been up to today?
 
You forgot to include <string>?
 
10:40 PM
@JerryCoffin Oh, there's not much going on in Canadian politics. In Quebec politics, though, it's pretty fun.
 
user1804599
Yes.
 
user1804599
:D
 
Recently, our Education minister said that naked searches on students were fine if they were done "respectfully".
And I'm talking about minors.
 
if there's sufficient evidence to indicate that they're carrying something sufficiently serious and that a regular search won't do it.
 
@EtiennedeMartel I can't remember what it was, but heard something on the radio last night about a Canadian politician that immediately made me think: "Oooh, Etienne wouldn't like that!"
 
10:43 PM
> radio
 
@EtiennedeMartel I guess I can believe there might be some circumstance under which there's no real choice, but it certainly seems like it should be the last resort (and if there's a situation so serious it truly has to be done, it should probably be done by the police with their parent/guardian present).
 
i can't imagine being an adult willing to be stripped naked, so last resort for adults too please
 
@Blob I quite agree--and while I don't know Canadian law well at all, it certainly seems like it would be the case for adults. And when I say "last resort", I mean it should require something like a warrant signed by a judge to certify that the police have convinced the judge that there truly was no reasonable alternative.
 
that's a fairly long process, though. I imagine strip-searching is only useful in-the-moment and not a few weeks later.
 
@Blob Not at all--in the US it can be (and sometimes is) done in a matter of minutes (e.g., 15-20 minutes) when truly needed. In most cases, you can simply keep somebody watching/guarding them for the duration so they can't ditch/hide whatever it is you're searching for.
Obviously Canada isn't the US, so there are undoubtedly differences in procedures, but there doesn't seem (to me) to be a lot of reason the time frame couldn't be similarly prompt if truly needed.
 
10:59 PM
I imagined some court case... apparently not.
 
Can I convert any type of struct into char* or does it have to be a POD?
I always forget the rules for this.
 
@Blob Yeah, not a real court case, just a short hearing for the police (or whomever) to tell the judge why this is truly needed. Judges can be bribed (etc.) so it's far from 100% foolproof or perfect, but creates a barrier to prevent obvious abuse and such.
@Rapptz Has to be trivially copyable (slightly looser requirement than POD).
 
Oh right.
 
@Rapptz When you say "converted" I'm presuming you mean something like copying the contents of an object into an array of unsigned char, then copying that back sometime later (and expecting the previous value to be restored).
 
Yeah. Exactly that.
I'm sending things over a network.
 
11:08 PM
@Rapptz Yup--in that case, you need trivially copyable (but before C++11 they did need to be POD).
 
Hm. I just noticed void g(void*); int main() { char* x; g(x); } is valid.
I've always casted to void*.
 
@Rapptz Yup--pointer to T can be converted to pointer to void for any type T. In C, you can also convert pointer to void to pointer to any other type T (but C++ requires a cast in that case). You can sort of think of pointers as a class hierarchy with pointer to void at the root (and as usual, conversions toward the root can be done implicitly, but away from the root require casts).
 
Well I knew that. I just found it odd because void* g(); int main() { char* x = g(); } is invalid.
any pointer to void* is okay but void* to any pointer isn't (without a cast).
Seems a bit inconsistent.
 
@Rapptz It is similar to base class to derived class cast.
 
Ok, I went shopping then called at club on way back. They've made me sit in the corner, on my own, like a naughty boy:(
 
11:17 PM
I don't consider that the same.
 
@Pris everything that starts with std:: just lures him in
 
error: 'is_trivially_copyable' is not a member of 'std'
Well then.
I see it in the libstdc++ trunk.
Dang.
  // is_trivially_copyable (still unimplemented)
 
@Rapptz The standard says it is! (no real news there though, I'd guess).
 
this ruins everything
I guess I'll use std::is_pod for now.
All PODs are trivially copyable but not vice versa I suppose.
though that feels pretty lame
 
user1804599
woo parser works with bison and flex
 
11:27 PM
@Rapptz It requires a bit of rather...warped thinking, but I can sort of see it--void * defines a small set of functionality, and T * adds other capabilities (e.g., add, subtract, dereference) to the basics provided by the base.
 
user1804599
 
@Rapptz Right--POD is something that's both trivially copyable and standard layout (transitively--so all members must also be trivially copyable and standard layout).
@райтфолд That looks like a lexer, not a parser.
 
Nah, it's a parser
Tokens are input
 
user1804599
There are two hyperlinks.
 
@райтфолд Ah, I missed that. Cute.
 
11:33 PM
If by cute you mean annoying
 
using is_trivially_copyable = !std::is_pod_v<T> && std::is_standard_layout_v<T>; :D
 
> #define union struct
lol
 
@Blob Automatic union-related UB removal.
Actually that's the best hack I've seen recently
 
std::error_code being the last parameter was an awful idea.
I can't use default parameters anymore :(
I could wrap the parameters in a struct but.. iunno.
Seems like a bad way of solving the problem
 
Come one, someone. 'std::make_lrio_go_away' was forecast to reach 16, but it needs another star.
 
Xeo
11:47 PM
I can remove the stars, if you so wish.
 
@LightnessRacesinOrbit Here you go.
 
@Blob 'typedef struct struct' is valid??
 
doubt it
 
@CatPlusPlus I had rather stronger words in mind, but just going further in that basic direction.
 
@Rapptz \o/
 
11:50 PM
@CatPlusPlus obviously :)
2 days ago, by райтфолд
#define union struct makes it a little easier.
 
@Xeo Perhaps one of us should pin it...
 
Oh look another Terraria clone on Steam Early Access
 
user1804599
It parses a hello world program!
 
user1804599
Now AST. :D
 
user1804599
Also my GC tried to allocate terabytes of memory since I didn't initialise a variable.
 
11:59 PM
<< >> //print user input
 
'[Stuck for 2 hours]' - I'm amazed that posters think that getting stuck for 2 hours is unusual.
 
@MartinJames took me 4 hours to properly get elif working which pantoona said would take 1 min
 

« first day (1588 days earlier)      last day (3359 days later) »