« first day (2053 days earlier)      last day (2894 days later) » 

Ven
12:00 PM
@rightfold (also, summerofgoto.com)
 
nwp
thunderstorm and lightning, very very frightening me :(
 
Ven
galileo
 
@Ven galileo, oh figaro
oh wow
 
nwp
lets declare the lounge<band> project a failure before this continues
 
user1804599
12:17 PM
@Ven not production ready
 
user1804599
I'll just use a switch in a labeled for loop.
 
Ven
@rightfold :c
 
Ven
@rightfold oorrrr you could use break
 
What's the difference between a lexer and a parser? They both seem to convert text into some data structure :/
 
Ven
12:28 PM
@Shoe lexer does text -> tokens, parser does tokens -> AST
 
I see
 
Ell
Token stream is just a list of tokens
Parser takes flat data and puts into structure
 
And what's the component which verifies if AST makes sense?
 
Well a lexer is really a parser of a kind.
A lexer will probably parse a regular grammar.
A parser will do something more sophisticated.
 
Ven
@Shoe example, lexer – matches tokens, parser – rules.
 
12:29 PM
A lexer is basically something that will help you write your parser without having to deal about string representations, and will allow you to, say, compare integers instead of strings to detect terminals.
 
nwp
@Shoe I don't think it exists. The parser might reject something or the optimizer or the code generator, but there is no dedicated checker as far as I know.
 
Ven
@Griwes wat
 
@Ven wat "wat"
 
Ven
comparing integers to detect terminals?
 
Well, your lexer probably produces tokens that have a field called token_type, which will probably be an enum or something like that.
 
12:31 PM
Is there a textbook on Lambda calculus?
 
So in a parser you just deal with that and not with actual representations.
 
I'm guessing both Wizard and Dragon both don't have it
 
@nwp Hmm, wouldn't there still be a component that for example checks if f(x) is valid for the input x for the function f?
@CatPlusPlus Like check type system coherence
 
@Shoe Define 'make sense'
 
@Shoe That part is part of semantic analysis
 
12:33 PM
Or check that function f actually exists
 
That's semantic analysis yes
 
What is a SSCCE? — Bobface 7 mins ago
 
@Shoe That's part of semantic analysis
 
Ven
@Griwes ah, in that sense
 
What are the names of the components? I'm trying to name something that is doing semantic analysis :/
SemanticAnalyzer
 
nwp
12:33 PM
@Shoe no. The part that does overload resolution fails. If you don't have that like in C then the linker fails.
 
@Ven yes; what other sense did you think of? :D
 
Just name it after what it does
 
@Shoe Why don't you take a look at CPTT?
 
Ven
@Griwes I was wondering what you meant indeed
 
The first chapter gives a very thorough outline on the stages of acompiler
 
Ven
12:34 PM
well, that means your language can't actually compare tokens, so shrug
 
I'm not writing a compiler
I'm kind of extending markdown with some syntax of my own
And I'm terrible at naming things
 
nwp
syntax checker
 
user1804599
@Ven yeah but that won't work inside loops etc
 
user1804599
this is robust
 
nwp
but really, you can expect some part somewhere to fail when it encounters invalid syntax, or so VS thought, which is why VS accepts all sorts of crap
 
user1804599
12:36 PM
@Shoe type checker
 
user1804599
not really sure what you mean by "makes sense"
 
user1804599
ASTs which would result in syntax errors if converted back to text should never be generated by the parser
 
user1804599
ASTs that don't represent a well-formed program are rejected by the type checker.
 
semantic analysis I meant
 
Ven
The best part of LiveScript is, converting the token stream back to text would often generate syntax errors.
 
user1804599
12:38 PM
The check function here is an example of such a verifier: try.purescript.org/?gist=a742166306ba7d6435a327bd9e5821ea
 
Ven
I can think of such cases, at least
 
user1804599
Expr is the AST type. check makes sure it's well-typed.
 
:D
 
Question: what happens when you multiply (not integrate) a continuous function with the Dirac delta/unit impulse?
 
Anyway, thanks everybody for your help :)
 
Ven
12:43 PM
@Shoe np bby <3
 
@Ven lolwhat
 
Ven
@milleniumbug the lexer fuses a lot of stuff together
 
Ven
so, it wouldn't parse error (...except maybe for some special cases), but it wouldn't be the same thing as your originating program
@milleniumbug i.e., if you write [1 to 10] in LiveScript, the lexer rewrites it to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 
@nwp depends I'm guessing
 
12:46 PM
@Ven lol
 
@nwp There are cases where the precision matters but eh
 
@Ven what
 
Ven
let me find the code
 
@nwp It's... unusual, but I see no problems with it otherwise
 
OH SHIT
 
nwp
12:47 PM
cool thanks
 
CONVOLUTION IS SIMULATING A SIGNAL UNDERGOING A FILTER OVER TIME INTEGRAL-STYLE IN ONE DIRECTION
 
@nwp Better to static_cast I'd guess
 
Ven
(notice the fallthrough, right before the case, so that the rewriting is the same in both cases)
 
I'm actually surprised int doesn't implicitly convert to double. It's one of those terrible thing you would expect a terrible language to do
 
nwp
12:49 PM
int does implicitly convert to double, but when you give an int to a template it gets deduced as int, not as double
 
I see
 
Ven
Also there's a difference in LS between "tokenize" and "lex". It's two pass because of all the steps
 
CONVOLUTION'S MATH IS WEIRD KINDA LIKE RELATIVITY
 
@Shoe vOv
 
@nwp Does it deduce int there because i is the first argument? If so, can't you just put the double first?
 
12:50 PM
No
 
Then wouldn't it be ambiguous?
 
nwp
and it makes sense that std::max doesn't know which type to return when determining the maximum of different types
no, the types have to be the same
 
@Shoe It is. That's why the types have to be the same
 
nwp
you can write a different max that accepts different types and tries to detect the larger type, but std::max doesn't do that
 
But the example above seems to compile
 
12:51 PM
@nwp return common_type_t<Args...> (not to be confused with std::common_type_t) :v
 
@Shoe Because the types are the same
 
oh wait it's commented out
nevermind
 
OH MY GOD YES
 
I'd still go with static_cast though
 
12:53 PM
@nwp It's actually possible to do with C++11, it's just std::max is "oldschool"
And nobody changed it
 
Ven
@LucDanton TIL
 
nwp
@milleniumbug send a pull request to the standard
 
@LucDanton How are they different
 
@milleniumbug std::common_type_t suffers from bad separation of concerns and is equivalent to std::decay_t<common_type_t<Args...>>
e.g. using a sane common_type_t allows you do to ++min(i, j)
 
std::max is surprisingly tricky
 
Ven
1:01 PM
"surprisingly"
 
nwp
I remember some trickiness about which element should be returned when they are equal, I think std::max returns the left but should return the right for algorithms such as lower_bound
 
It returns a reference so actually you can't really change it to return common type because you either get dangling references or interface breakage if you return by value
 
Ven
@LucDanton what's the stdless version of common_type_t?
 
@Ven dunno, I roll my own
@milleniumbug the common type is a reference where it makes sense, and a value otherwise
 
hmmm okay, so this seems solveable
 
1:03 PM
it’s my opinion that ++min(i, j) should literally be a refactored ++(i < j ? i : j)
(and variadic min is a folded binary min)
 
Ven
#disgusted
 
Xeo
#discussted
 
@Xeo heh
now stop wasting time here and start wasting time in vidya gaems
no no-fun allowed
 
Xeo
I can assure you, I'm wasting time in vidya games
 
So fun is allowed?
I'm confus
 
1:06 PM
typedef decltype(true ? i : j) type is it good enough?
 
Xeo
but having two screens allows me to drop stupid remarks in here while wasting time in vidya games
 
Ven
\o/
 
@milleniumbug for my purposes, yes
 
Ven
@milleniumbug yes
 
Is vidya games the company where he works?
 
Ven
1:07 PM
no
h'es off'
 
Is it the company that makes games that he plays?
 
Xeo
5 hours ago, by Xeo
Whee, I'm awake. And on vacation. Time to be a useless piece of shit until tonight. \o/
 
It's an intentional misspelling of 'video games'
 
Oh wow
 
nwp
poor spelling is cool
and here I thought the lounge was better than youtube comments
 
1:10 PM
nop u didnt m9
 
Ven
The lounge pretty much writes the youtube comments.
The transcript is pre-written as well.
 
user1804599
Amulet of Vendor
 
1 message moved to bin
 
Ven
Remember LRiO? He tried to decide his own text. Look at how that ended.
 
nwp
@rightfold vendor prices -10%, selling value +10%
 
user1804599
1:14 PM
😭😭😭
 
Ven
> "This form of perversion and taboo of revenge porn is a trend from our European Neighbours, but this act was two notched below eurotrash."
 
1:34 PM
0
Q: Is it possible in C++ to access to global template variable throw non template function

Sergey KolesovI have template class Application It should be something like singleton, I want to create it once, and get from other files. //main.cpp Application<NetworkService, User, Policy> a; a.run(); //other files //instead of auto a = Application::getInstance<NetworkService, User, Policy>() I want just ...

lol that title
Sounds just like something @VermillionAzure could come up with
 
user1804599
oh boy only 24 days till brexit
 
user1804599
I'm so brexcited.
 
eww singletons
also THAT'S NOT HOW YOU SINGLETON
 
nwp
10
Q: Merge chat.SO into chat.SE

BraiamThis has been in the back-burner long enough. There isn't any good reason other than historical that prevent this. I'm aware that this will remove some complexities on chat.SE, since the SO moderators have to keep moderator status in chat.SE. We would have a larger pool of moderators so we would ...

 
Someone know if exist a integer with this value? 0xe73ac1da
16
 
user1804599
Imagine you weren't a fool.
 
user1804599
Good. Now accept it as a mere dream.
 
nwp
I'm supposed to make vertical text with Qt. Qt doesn't support that directly, I would need to manually paint and rotate the text. How bad is it to just put a newline after each character and call it good?
 
That results in different bitmaps, though, doesn't it?
 
nwp
yes, the characters are not rotated 90°
which I could sell as a usability improvement so people don't break their neck trying to read the text
 
2:01 PM
lol
That's still a different feature though.
 
@nwp terrible
 
nwp
:(
work sucks
 
vertical text is a localization nightmare
 
@Xeo you still coming to Uncon?
 
Xeo
ye
 
2:03 PM
if you don't care about that, then sure why not
 
Xeo
is there a slack / discord / whatever channel for Uncon yet?
And is the pirate still alive?
 
pirate & cicada both vanished into 17th dimension
 
pirate is alive
mostly having sex
discord has uncon channel
 
Xeo
uuugh, discord hijacks browser shortcuts...
 
2:10 PM
sorry
 
user1804599
discourse
 
Xeo
@TonyTheLion anyhow, how do I get into the uncon channel?
 
@Xeo are you on discord yet?
don't see you logged in
 
Xeo
ye
 
2:17 PM
gotta give you perms
should work now
 
Ven
@Xeo yeah it fucking sucks
GIVE ME BACK MY CTRL-, DISCORD
 
Xeo
ctrl+numbers for me
to switch tabs
 
@Griwes It would be warm. I had air cond set to 25 degrees, now I am having cashmere jumper on, socks and thick pants on ... and it's only just alright ...
 
user1804599
@Ven add proper eta conversion to LiveScript
 
Ven
@Xeo Yeah, it was meant as a catch-all. The "," is literal in the sentence
@rightfold fork it
 
Xeo
2:23 PM
ah
 
user1804599
;_;
 
it's about 10 degrees celsius outside
 
Ven
@rightfold ;D
 
user1804599
;D;
 
Ven
@rightfold I think I'm gonna leave the project soon-ish, anyways. Dealing with @gkz is too much trouble
he doesn't show up for 3 months, disregard everything I've said or started to build, release a new version which has breaking change without as much as updating the docs or asking whateverelse, then disappears again.
10/10
 
user1804599
2:26 PM
man, there's no good YAML parser for Rust
 
Ven
but there's a good TOML one
 
user1804599
Guess I'll just use JSON.
 
Ven
I am now writing CMake code. I'm excited
 
user1804599
RIP
 
doki doki cmake experience
 
user1804599
dat code
 
user1804599
rewrite it in COBOL
 
kpop?? NSFW
 
Ven
heard at work "you'll have to detect infinite loops"
 
nwp
@Ven trivial, I solved the halting problem first year in college
 
2:43 PM
@Ven How is that exciting?
Or was the excitation unreltaed to you writing CMake code?
@rightfold Write one?
 
user1804599
@Ven You can easily write a program that detects all infinite loops.
 
user1804599
Just have it detect everything. It will sure detect all infinite loops.
 
user1804599
@Morwenn no it's a pain
 
user1804599
I'd rather write a libyaml binding
 
@Morwenn I guess sarcasm
Even I, the CMake fan, don't consider writing CMake exciting
 
2:45 PM
I'm often excited about anything else when writing CMake code.
It's inspirational.
 
user1804599
yummy, sea salt crisps
 
Tear salt crisps best crisps.
 
user1804599
Salt is nice.
 
sweat salted crisps
 
user1804599
> 502 kcal per 100 gram
 
user1804599
2:49 PM
lol
 
Ven
@Morwenn sarcasm.
 
how many times was the JS room frozen in the past 36 months, does anyone know?
 
Ven
We have a custom language at $work for generating SQL code, instead of using Lua or something else...
 
user1804599
Ac-Cent-Tchu-Ate the Positive
 
user1804599
@Ven use Mercury
 
3:21 PM
@Ven Never heard of halting problem? ;p
 
Ven
@Puppy the language isn't turing-complete :P
so we don't need to detect anything *g*
 
correct me if I'm wrong, but didn't Turing only prove that you can't solve the problem for TC languages?
I don't recall him proving that it could be solved for any non-TC language.
 
3:39 PM
@R.MartinhoFernandes maybe you like this
 
3:50 PM
Just came back from the dentist. Half of my jaw is numb.
 
4:07 PM
1 message moved to bin
 
@Puppy ?
 
curious fact: you can't kick people who didn't speak
5
and if you bin a thing, then technically, they didn't speak recently in the room, they spoke in the bin
so you can't bin it and then kick them
 
user1804599
I'm gonna leave Pædo Ltd. (commonly disguised as Catholic Church).
 
you were a part of the Catholic Church?
 
user1804599
4:09 PM
Still angry at my parents for having me baptized.
 
Ven
@Puppy well, that'd make sense
 
eh
 
user1804599
Motherfuckers
 
correct me if I'm wrong, but baptism is a pretty pointless ceremony that has no meaning whatsoever
it's not like you get a permanent scar or anything
 
huh
 
4:15 PM
@pupp
@Puppy please explain why that question is bad?
 
it's a question
 
because it can be answered with "go to definitive book list, get the book and read it"
 
Ven
Gonna implement nested set for $work
I'm trying to convince colleagues it's better than storing json paths, or parent_id.
might be overcomplicating this...
 
@Puppy It makes you Christian by definition.
 
that's a dumb definition that defines Christian as "People whose parents are Christian and wanted them to be Christian too"
 
4:29 PM
@Puppy In that sense, it is very permanent.
@Puppy No shit, Sherlock.
 
so use a more useful definition, Moriarty.
 
@Puppy ...
 
it's their definition
 
Ven
is it possible to have a FOREIGN KEY WHERE in postgres? (or maybe mysql)
 
@Ven WHERE?
 
4:34 PM
@AndyProwl That just makes them dumb too
 
user1804599
@Ven no; foreign keys are unconditional
 
@wilx Ven? Vere?
 
user1804599
What is the problem you are trying to solve? I have experience with neatly working around this limitation.
 
@milleniumbug :D
 
Ven
@rightfold I have a polymorphic relationship, and I want FK to hold it. so storing relation_type string, relation_id int...
because the only other solution is having 15 columns ID_X ID_Y ID_Z (nullable)
@wilx uhhh... in a foreign key?
 
user1804599
4:37 PM
@Ven remove those columns, add a nullable column for each relationship type, add a CHECK constraint that checks that exactly one of those is non-NULL
 
Ven
@rightfold yeah, right
 
user1804599
If you're feeling adventurous, use PostgreSQL table inheritance.
 
user1804599
No really don't it's broken just go with 15 columns
 
Ven
lol
 
@rightfold Is it? How?
 
user1804599
4:42 PM
@wilx indices consider the individual tables, but not the inheritance relationships
 
user1804599
So you can end up with duplicate keys in the base table
 
user1804599
If you want a named aggregation of many tables, use a view based on a join or union query
 
nwp
4:54 PM
I watched some of the ACCU 2016 talks. They all have pretty bad audio quality. 'Declarative Thinking, Declarative Practice' - Kevlin Henney is the only one I would recommend watching besides 'Fastware' - Andrei Alexandrescu.
 
user1804599
@Ven what's probably the easiest language to write parsers for lambda terms in?
 
user1804599
\x.f (x x) kind of stuff.
 
user1804599
sweetjs :L
 
user1804599
FORTRAN
 
any Turing-Complete language ought to be able to do it
 
user1804599
5:08 PM
@Ven there's another way
 
user1804599
The only problem with this is that discovering which table contains the actual thing requires visiting all tables in the worst case.
 
user1804599
Also this allows for multiple things to have the same ID.
 
user1804599
23
A: P and NP classes explanation through lambda-calculus

Martin BergerTuring-machines and $\lambda$-calculus are equivalent only w.r.t. the functions $\mathbb{N} \rightarrow \mathbb{N}$ they can define. From the point of view of computational complexity they seem to behave differently. The main reason people use Turing machines and not $\lambda$-calculus to reason...

 
user1804599
Very interesting.
 
user1804599
5:15 PM
I think Perl 6 is the easiest to write such a parser in.
 
5:56 PM
yes, that's a stupid question
 
sup
10
A: Falsify brief truths

Michael KleinHaskell, 59, 58, 55 bytes import Data.List ((=<<)=<<(=<<)(<$).(==).maximum).group Fun note, this works on any list of values where falsy < truthy. So False/True, 0/1, 'f'/'t', etc. Explanation: I'll first desugar without the group, and then add it back. First, I find that words are often eas...

 
nwp
never mind
yeah, make_unique is C++14 and gcc 4.8 only knows C++11
 

« first day (2053 days earlier)      last day (2894 days later) »