« first day (1813 days earlier)      last day (3135 days later) » 

> makeBackingLayer
Creates the view’s backing layer.
Thanks, I didn't know that.
 
.. cpp:class:: template<int Y, int InfX = 0, int SupX = ((Y==1)?1:Y/2), bool Done = ((SupX-InfX)<=1?true:((SupX*SupX<=Y)&&((SupX+1)*(SupX+1)>Y)))> meta_sqrt
nice
 
@ElimGarak Noise-comments are depressing feel so #enterprise
 
@JohanLarsson yes. Or rather the contract ended early though with mutual agreement
Slightly different from quitting
 
That does not sound like you were all happy.
We are not hiring at the moment, the opposite I think.
 
8:26 AM
Yeah. Well, it ceased being my dream job in ~march 2014 - I start in nov 2013
 
C# job next right?
 
I prefer c++ :) But yeah c# has enough lure
 
Your SO-profile should be pretty god when looking for jobs
 
> god
:)
 
ah, typo is better than the correct version
unexpected downvote on this
not gonna cry on meta about it :D
just unexpected
maybe just a misclick
 
8:31 AM
lol god damn C++ throws attribute-specifier-sequence-opt around everywhere
the grammar is littered with it
 
to be expected really
 
user1804599
hi
 
enum values are identifier attribute-specifier-sequence-opt = constexpr
 
tjenahej
 
also today I learned that the sequence for multiple attributes is [[attr1, attr2, attr3]] and not [[attr1]] [[attr2]] ...
 
8:33 AM
@Rapptz Both aren't allowed?
 
don't think so
 
@elyse Hiyo. You didn't calls us all fools or sluts today?
@Rapptz RIP, I would have liked the second syntax.
Do they at least allow trailing commas?
 
There, Johan, nicely rounded to 5700. :P
 
user1804599
@ThePhD yes
 
don't think so
 
8:34 AM
Damnit.
Trailing commas are so useful for code generation. =/
But hardly any languages let them go.
I think Python is one.
 
user1804599
Trailing commas should be supported everywhere.
 
And C++ does it... but only in CERTAIN places.
Not sure about C#, I think it's No there for enums and other things.
 
user1804599
Python allows trailing commas everywhere except after a keyword argument unpacking.
 
You lower the frequency of any black singer out there, instant SL Jackson.
 
the only place I know where it's supported it's in enums.
 
user1804599
8:35 AM
f(
    x=1,
    x=2, // ok
)

f(
    x=1,
    **xs, // syntax error
)
 
Compiler detected shit
 
user1804599
aka fuck python
 
tbh attribute-specifier-sequence is ruining a lot of my parsing
 
are you attempting to write a C++ parser?
 
not necessarily
well I don't know anymore.
Maybe
 
8:38 AM
solid spec :)
 
It's mainly because libclang is really bad.
value = 1 } vs value = 1
value = 0 } vs value = 0
value = 0 } vs value = 0
value = 1 } vs value = 0
left is tokens, right is enum_value attribute of the cursor.
 
I would always recommend using their C++ API directly rather than libclang
 
I wouldn't.
 
I would recommend his mother.
 
Absolutely unstable, breaks everywhere, asserts firing for god-knows-what-reason. ;~;
 
8:42 AM
yeah after dealing with this shit I'd agree
libclang is just all around awful
 
@JohanLarsson there's bound to be some noise. Probably someone who didn't spot how you buried the conversion to unit conversion deeply in there.
I have found it a good principle to point out the actual problem in the first sentence. Even - as you are well aware - I go way past the call of duty dissecting the OP's code nonetheless :)
 
I would not say that the C++ API is not all around awful.
I would merely say that once you deal with the awful, you actually have a vaguely positive outcome.
 
I'm basically using libclang as a tokenizer.
 
@JohanLarsson Current status: still listening again
 
and it even gets that wrong lmao
template<...>> has the last token as >> rather than two separate >.
 
8:43 AM
@Rapptz That's like saying you're using a Lexus to get to the bus stop
@Rapptz Obviously their compiler must be completely broken
 
@sehe It was a microscopic rant, just unexpected. The only reason I wrote it was to have a searchable gist for the snippet as it comes up every now and then.
 
I said absolutely nothing about their compiler.
 
@sehe I switched over to shrooms
 
Obviously clang works.
 
@Rapptz It seems to me that that is pragmatic. Their grammar rule reads something like X '>' '>' | X '>>'
 
8:45 AM
@Rapptz I did. My point is: there's probably a reason (there's a reason this case was hard to parse) and perhaps it's even something in the way it's used (hint: clang works)
 
Clang does not use libclang.
 
Oh.
What is the link - if any
 
@JohanLarsson Good.
 
libclang is a C wrapper on Clang.
 
libclang is a weird higher level C interface to libtooling which I think is what clang uses. libclang uses the concept of cursors and what not but libtooling doesn't have that, and the tokeniser for libclang is different than the one in libtooling I think.
 
user1804599
8:47 AM
@Rapptz that's the only sane way you can lex it.
 
somewhat.
 
@elyse That's what I thought too. The disambiguation will come later meguesses
 
@elyse C++11 requires correct lexing as two separate > in many cases.
if I recall correctly, in the normal Clang API, you simply always have to provide a full stack including semantic analyser so that cases like that can be treated correctly.
 
@Puppy C++ does not specify what work needs to be in the lexer pass
 
These day we vote vote online to tell the government how we would like our laws about open data and stuff to be. That's fun.
 
user1804599
8:48 AM
C++11 doesn't specify a lexing interface, so you can lex it however the fuck you want, as long as the parser interprets it correctly.
 
^
 
true but I'm pretty sure that Clang does not defer work like that
 
Erm.
 
yeah I don't think it does either
 
user1804599
You can lex static_cast<void>(x) as a single token for all C++11 cares.
 
8:49 AM
5 mins ago, by Rapptz
template<...>> has the last token as >> rather than two separate >.
 
> and the tokeniser for libclang is different than the one in libtooling I think.
 
So. If you don't think ^ is on purpose, then 90% says you're using it wrong
 
they're different lexers.
 
@Puppy Yeah. I have a hard time getting that
@Puppy So, now we went from Rapptz "I think" to "Puppy claimed fact" in seconds. I'd much rather see the link to the source for that :)
I'm not saying it's impossible
 
to be fair, I have worked with the real Clang API for a long time now.
 
user1804599
8:51 AM
My COBOL lexer also has to deal with crap like this.
 
I just don't see why they would have this kind of code duplication; where one is clearly inferior
 
@elyse As a language designer, how would you have prevented the template<...<...>> parsing problem?
 
I've browsed the code repo a lot
 
user1804599
Picture clauses are special.
 
I just remember seeing a lot of different parsers.
it's honestly very strange
 
8:51 AM
I've seen a lot of cases where Clang makes the opposite choice, i.e. their parser must have an analyzer to tell it how to resolve typenames.
 
@Rapptz amen
 
user1804599
@fredoverflow By not having a >> operator or by not using > to end template argument/parameter lists.
 
I looked it up just now and it includes llvm/Support/Compiler.h
 
it would be very strange to have a completely different solution here
 
@elyse I prefer the first one. I mean, how often do you need a right-shift?
 
user1804599
8:52 AM
Almost never.
 
exactly
 
user1804599
Can be a library function just fine.
 
Kotlin does it like that, it's called shr.
 
user1804599
also
 
user1804599
having <> for both templates and comparison is dangerous if expressions and type names can appear in the same places.
 
8:53 AM
@fredoverflow likely the particular token in this lexer context is a special one, not the operator one, nor > >
 
user1804599
e.g. T<x>(y).
 
user1804599
Rust solves this with T::<x>(y).
 
Or you could have context sensitivity
 
That's what we're stuck with
 
user1804599
Context-sensitivity is instant cancer.
 
user1804599
8:53 AM
It's a recipe for disaster.
 
Making C++ more like Perl than anybody is comfortable with
@GregorMcGregor Prove it.
 
user1804599
You always want context-free grammars.
 
user1804599
There's no reason not to want it.
 
user1804599
Not being able to tell what T*x; is without knowing what T is is really dumb.
 
8:54 AM
It makes for faster and much less error prone tools. Not to mention fewer surprising edge cases for programmers reading/writing code
 
@sehe What do you mean?
 
user1804599
(Context-sensitivity includes operators with custom associativity and precedence.)
 
jesus
 
user1804599
It's a pain.
 
8:55 AM
@fredoverflow I mean that if the lexer returns the token(">>") there it might not at all imply operator>>
 
Context sensitivity is nice when it allows you to reuse keywords as identifiers for example
 
@Rapptz I assume SmallVectorImpl is a vector that does not need dynamic allocation for a small number of elements? nice
 
user1804599
My COBOL lexer has two methods for extracting lexemes. One for normal lexemes, one for picture clauses. :P
 
@sehe "There"? Context-dependent lexer?
 
user1804599
And it has to do two-character lookahead.
 
user1804599
8:57 AM
COBOL is terrible.
 
By the way, I solved C's grammar ambiguity in sizeof and casting contexts without backtracking :)
 
@fredoverflow ah. you were looking to eradicate on of the two. Missed a turn there
 
@Rapptz That's odd. They use a lexer directly instead of the preprocessor?
 
The TranslationUnit thing is already preprocessed
 
@sehe Yup. D does it by using !(...) instead of <...> which is also a nice solution.
 
8:59 AM
I'm surprised they seamingly create a full "DOM"-style token vector there instead of streaming things (it might be in the SourceRange there)
 
user1804599
Dat is dom.
 
They use jQuery to query the token tree
 
I forgot what I was doing
oh yeah
fucking enums
22 mins ago, by Rapptz
value = 1 } vs value = 1
value = 0 } vs value = 0
value = 0 } vs value = 0
value = 1 } vs value = 0
I should find out why this happens ^
because it's the dumbest thing I've seen today
:/
 
@Rapptz What is that a result of?
 
uh enum values
tokens vs enum_value attribute
 
9:06 AM
@sehe Oh, they do? Cool.
 
@fredoverflow not sure, depends on how they use SourceRange
Anyhow, they surely must have this capability to allow all these refactoring/analysis goodies to work
 
I think people would use libtooling for that
that's what they recommend anyway
if I wanted to work with C++ code I'd definitely use libtooling next time lol
way more features, seems more sane to work with surprisingly
I looked just now and the C++ API has a way to get attributes and everything
but then again I think clang was written in it so I'm not surprised
 
Fun: everyone has the right to vote for the new law in France, but as of now, only ~2500 people did so.
 
@Morwenn Everyone? Even non-French people?
 
@fredoverflow lol
 
9:14 AM
@fredoverflow I was wondering actually. But basically you only have to register.
 
You guys have online voting now?
lmao
 
@Rapptz Well, it's a big system.
 
yeah it's just a bit funny :p
 
user1804599
I want to write a compiler for an existing language that isn't COBOL.
 
@Rapptz Well, the future articles of the law are online, and we can vote, comment and propose modifications. Then the government may take all of this into account or simply ignore everything before publishing the law.
 
9:20 AM
@ElimGarak Do you know why they got rid of the Quad/Points/TriangleFan render styles in DirectX?
Was it to make the drivers smaller?
 
@Morwenn Oh. That.
That's pretty much a trash bin of opinions.
 
@Morwenn Online voting? What law is it?
 
@GregorMcGregor Law about opening public data, mostly.
For example, there's an article stating that publications from public research should be open.
 
Of course!
 
Is there a way to pass, uh
an array to a bat file?
Is it just a b c d
Wait
I can just look this up, duh.
 
9:24 AM
@GregorMcGregor We all agree that it should, but how much is actually open as of today?
 
@ThePhD lol bat files, haven't done those since the 90s
 
@Morwenn I am not sure. It would be great to have a web platform where every citizen of the country could vote on every law.
 
@fredoverflow Well, I've got a simple git mv --force {PascalCase}.{whatever} {snake_case}.{whatever} transformation to do.
 
@Morwenn I wanna vote stupid stuff out of the C++ standard, where do I register?
 
Figured I might as well just whip one of those up.
 
9:25 AM
@fredoverflow Too bad it's not handle but the French government.
@fredoverflow But you can write a proposal and send it to the lwgchair address.
@GregorMcGregor Well, I guess everybody would vote abusive laws just in case.
 
user1804599
omg I have a great idea for a new programming language
 
user1804599
@fredoverflow does Kotlin have pattern matching?
 
@elyse No, but it has "type matching".
return when (locator.type()) {
    is ArithmeticType -> PostfixIncrementArithmetic(locator)
    is PointerType -> PostfixIncrementPointer(locator)
    else -> lexer.error("operand of increment operator must be arithmetic or pointer")
}
 
user1804599
Meh.
 
Honestly, I don't miss pattern matching at all.
 
user1804599
9:31 AM
Can you have guards?
 
> About a third of adult humans are ophidiophobic, making this the most common reported phobia.
If 1/3 humans have a phobia then doesn't that contradict the definition of phobia?
phobia meaning abnormal fear
 
user1804599
@StackedCrooked irrational, not abnormal.
 
@elyse example please
 
user1804599
@fredoverflow is Foo if foo.x > 2 ->
 
9:36 AM
@ThePhD Nobody really cared about them, they aren't relevant anymore. Just baggage. :D
 
when (x) {
  in 1..10 -> print("x is in the range")
  in validNumbers -> print("x is valid")
  !in 10..20 -> print("x is outside the range")
  else -> print("none of the above")
}
 
@ElimGarak I see.
 
> Care must also be taken to differentiate people who do not like snakes or fear them for their venom or the inherent danger involved. An ophidiophobe would not only fear them when in live contact but also dreads to think about them or even see them on TV or in pictures.
Wikipedia, 2015
 
Kill all snakes. Burn. Vaporize. Skin. Terminate. Obliterate. Destroy. Strangle. Choke.
 
@melak47 Are ophidiophobes afraid of snake_case as well?
 
9:38 AM
@ElimGarak I have a snake in alcohol. And it simply tastes horrible.
 
@melak47 My sister is like that. She totally freaks out if she sees even anything resembling a snake.
 
@StackedCrooked Does she have a boyfriend?
 
lol
yeah
 
user1804599
I'm afraid of wasps.
 
they have 3 kids already :)
 
9:38 AM
Well, I guess we'll just have to settle for Stacked then.
 
user1804599
And anything resembling them.
 
user1804599
Fuck wasps.
 
I have a phobia for stinkbugs
 
@StackedCrooked Do they have boyfriends?
 
and pretty much all insects
 
9:39 AM
I am asking for a friend.
 
@ElimGarak they are all boys
 
@StackedCrooked Like this? warning, gif!
8
 
fuck grasshoppers too
 
user1804599
I never open my window in July, August and September.
 
what did the grasshoppers ever do?
 
9:39 AM
I hate grasshoppers. Such unpredictable creatures
 
they're disgusting
 
@melak47 lol
 
The idea of one jumping on me terrifies me. Well, it's probably in self defense, because I am only approaching it to kill it.
 
user1804599
Grasshoppers are chill.
 
@ElimGarak Totally
 
user1804599
9:40 AM
And delicious.
 
I wouldn't approach it to kill it either
 
I throw pillows from the other side of the room. And then it gets riled up and shit.
 
hi
nice pic elyse
 
also I seem to attract the shit I'm scared of
 
user1804599
@Mr.kbok dankeschon
 
9:41 AM
@AndyProwl Not at all, they look delicious.
 
user1804599
It looks nice at 16x16. Crisp and sharp.
 
@Morwenn disgusting
 
@Morwenn holy shit, disgusting
It'll probably jump around in your stomach.
 
lol
 
Honestly, I've never eaten grasshoppers, but I would seriously try something like that.
 
user1804599
9:42 AM
Yes, but you're French. You also eat frogs and snails.
 
@elyse well, it's the native res :3
 
Fuck all big insects and insects that fly
 
try fucking?
 
9:43 AM
I almost fucking fainted like a little bitch. They can't be that big. Imagine mosquitos that big.
 
I'd have heart attack if it approached me
 
@Morwenn disgusting
 
@ElimGarak Haha, they look cute :D
 
@AndyProwl yea fuck that
 
Imagine a female mosquito of that size.
 
user1804599
9:44 AM
 
Cicada killers :D
 
that looks better
 
NOOOOOOOOOOPEEEEE
 
A tarantula hawk is a spider wasp which hunts tarantulas. Tarantula hawks belong to any of the many species in the genera Pepsis and Hemipepsis in the family Pompilidae (spider wasps). The more familiar species are up to 5 cm (2.0 in) long, with blue-black bodies and bright, rust-colored wings (other species have black wings with blue highlights), making them among the largest of wasps. The vivid coloration found on the bodies, and especially wings, of these wasps is an aposematism, advertising to potential predators the wasps' ability to deliver a powerful sting. Their long legs have hooked claws...
 
All aboard the NOPE train to NOPEVille!!!
 
9:45 AM
This one has a fucked up way of making babies. It paralyzes a tarantula, drags it below the surface and puts babies inside it which feed on its inside until it dies. It has to be alive for the babies to have enough food to mature. They then puncture the abdomen, resulting in death. Nature is seriously fucked up.
 
1 min ago, by Tony The Lion
NOOOOOOOOOOPEEEEE
 
whatever eats insects and is not an insect has my sympathy
 
user1804599
@TonyTheLion NOPE
 
@elyse good gif :)
 
user1804599
I'm out FUCK IT AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 
9:48 AM
@elyse I just noticed it probably died in the end.
Or serious injury.
 
> Tarantula hawk wasps are relatively docile and rarely sting without provocation.
I suppose thats something
 
@ElimGarak lool
 
> Category: Autos & Vehicles
 
10:02 AM
@melak47 That jump!
 
user1804599
COBOL has switch (true). COBOL > C++.
 
user1804599
EVALUATE TRUE
    WHEN str (i:1) = SPACE
        ADD 1 TO offset
    WHEN offset NOT = ZERO
        MOVE str (i:1) TO str (i - offset:1)
END-EVALUATE
 
user1804599
:D :D :D
 
10:16 AM
whoever thought caps was a good idea
 
Grace Hopper
 
user1804599
Keywords are case-insensitive.
 
Damn that looks cool.
Way cooler than how I program.
> The A-2 system was developed at the UNIVAC division of Remington Rand in 1953 and released to customers by the end of that year.[2] Customers were provided the source code for A-2 and invited to send their improvements back to UNIVAC. Thus A-2 was an early, and perhaps the first, example of free and open-source software. [3]
1953
damn
 
> Liberation des licornes et des pingouins de jamaïque!
That sounds like a serious law proposal.
 
Actually, it works with <=, but fails to compile with ==. Bizarre, but that's VC++ for you :) — melak47 1 min ago
lol
Does anybody wanna claim that VC++ is a good compiler? I offer now is the time to bring that up.
 
user1804599
10:34 AM
I'm so bored.
 
Is that a nested lambda?
 
@TonyTheLion ...not quite
It's an array of autogenerated functions that all generate their own array of autogenerated functions inside.
 
Is nested lambda even a thing?
 
10:37 AM
@AndyProwl :D
 
add some override and final :P
 
@Griwes so its a copulating array?
 
@ʎǝɹɟɟɟǝſ try this and change the == 0
 
@Griwes So if its nothrow, it does the first, otherwise, it preserves the old value to attempt to make sure it constructs it properly and puts it back inside of it fails?
 
Yes.
I'm trusting the compiler to be smart enough and eliminate dead code. :D
 
10:40 AM
It will eliminate the dead code, but IIRC clang++ will give you a stupid tautology warning.
 
It doesn't.
Hmm. I might be compiling this without -Wpedantic.
 
That's bizarre.
 
I'd try to refactor it so the run-time if is not there, but it would likely lose on readability. I'd also try to extract part of that stuff into helper functions, that function is a bit too long for my taste. But then again - my taste
 
Well, for me my tautology errors came from things like for( int x = 0; x < TemplatedIntegerThatHappensToBeZero; ++x ) and if ( my_trait_that_is_true::value )
 
I've almost read all the C++ proposals that I found interesting and the CppCon slides are not available on GitHub yet. What am I gonna do? :o
 
10:43 AM
Even though they're dependent on template params.
 
@ThePhD Compiles with -Wall -Wextra -Wpedantic -Werror.
 
@Griwes Works for me, then! \o/
 
(...haven't checked with GCC yet, though. :D)
 
> United States may have bombed a Doctors Without Borders hospital in northern Afghanistan
good job
Doctors Without Bombs
 
10:51 AM
Hello
 
whats up?
 
Nothing much, you?
 
I'm enjoying the lack of stress because Saturday
This week has been mad.
 
What happened
 
Deadlines
 
10:54 AM
Deadlines are cancer
 
Very stressful indeed
 
is gregor cicada
 
k
fifty shades of gregor
 
@AndyProwl *cicuda
 

« first day (1813 days earlier)      last day (3135 days later) »