ChanServ changed the topic of #elliottcable to: laser printers are fucking awesome
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
Willox has quit []
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
<joelteon> so...i think haskell has a left-recursive grammar
<joelteon> maybe it doesn't
<joelteon> so I could do haskell style space-delimited function application
<joelteon> or
<joelteon> i could do everything else style parens
<joelteon> which I hate
<joelteon> but boy is it easier to parse
<joelteon> so I guess maybe I'll make the tokenizer and the parser eparate
<joelteon> separate
<joelteon> like you're supposed to do
<prophile> you know what I like about languages like python and haskell is that if you search for a problem you get intelligent answers
<prophile> everyone who asks or answers questions about java is a moron
<prophile> it's somewhat frustrating
jeannicolas has quit [Write error: Broken pipe]
<whitequark> prophile: follow @shipilev, hehe
ELLIOTTCABLE has quit [*.net *.split]
nuck has quit [Quit: Nuck Off]
jeannicolas_ has joined #elliottcable
<devyn> prophile: I have to work with PHP at work sometimes
<devyn> prophile: it's even worse
<prophile> every time I feel I've been a bad person
<prophile> I go into ##php
<prophile> and answer questions
<prophile> as a penance
<devyn> you are a good person
ELLIOTTCABLE has joined #elliottcable
Willox has quit [Ping timeout: 245 seconds]
Sgeo has quit [*.net *.split]
jeannicolas_ has quit [*.net *.split]
gazoombo_ has quit [*.net *.split]
Willox has joined #elliottcable
gazoombo_ has joined #elliottcable
jeannicolas has joined #elliottcable
vigs has joined #elliottcable
<joelteon> guys remember 495, 226
<joelteon> 377, -526
<joelteon> ok that's pretty far
<joelteon> 388, -523
<joelteon> done
PLejeck has joined #elliottcable
<devyn> -learn 9b9f9cbc-b8e4-4aa5-b7dc-8de4f8ef620d = 388, -523
<purr> devyn: Learned `9b9f9cbc-b8e4-4aa5-b7dc-8de4f8ef620d`.
<devyn> joelteon: I hope you like looking things up with UUIDs
<devyn> >:D
<glowcoil> joelteon: i can think of plenty of examples proabbly
<glowcoil> joelteon: the point is that you shoudl make the dependency graphs you can express fully general
<glowcoil> joelteon: except *maybe* not circular, but probably actually yeah circular
<glowcoil> whitequark: it makes me feel good about myself when there's a term i get that you don't, like applicative vs monadic :p
<whitequark> lol
<purr> lol
<glowcoil> it's a rare occurence :p
PLejeck has quit [Changing host]
PLejeck has joined #elliottcable
PLejeck is now known as nuck
<devyn> yeah me too :D
<devyn> whitequark knows too much >_>
<devyn> I say we kill him and extract his knowledge
<whitequark> lol
<purr> lol
<whitequark> you
<whitequark> *you'd have to go to russia for that
<whitequark> I for one would welcome that
<devyn> oh fuck that
<devyn> >:D
<devyn> (just kidding)
<whitequark> well, one-way tickets aren't even that expensive...
<devyn> one-way... are you implying something, whitequark
<devyn> :p
<whitequark> ... nah, not really
<whitequark> it's fine
Willox has joined #elliottcable
Willox has quit [Changing host]
gazoombo_ has quit [Changing host]
gazoombo_ has joined #elliottcable
<devyn> whitequark: lol never mind
<purr> lol
<devyn> I would like to come meet you some time, but it's just so far and there's really no other reason for me to go there
<whitequark> sure
<whitequark> that's basically the reason I don't want to fly to us
silentbicycle_ has joined #elliottcable
PLejeck has joined #elliottcable
nuck has quit [*.net *.split]
jeannicolas has quit [*.net *.split]
gazoombo_ has quit [*.net *.split]
vigs has quit [*.net *.split]
vigs has joined #elliottcable
jeannicolas has joined #elliottcable
<yorickpeterse> whitequark X devyn
<whitequark> yorickpeterse X mongodb
<yorickpeterse> Yeah I'll be taking it on a date soon
<yorickpeterse> A date to /dev/null
<whitequark> take it to a gay bar
<yorickpeterse> I'm not gay, soz
<whitequark> well you *are* taking mongodb on a date
<whitequark> that's pretty gay.
<yorickpeterse> what's gay about it?
<whitequark> eh
<whitequark> nevermind
<yorickpeterse> ...
<yorickpeterse> holy shit, apparently the people of Ukraine managed to throw off the old president
<yorickpeterse> dayum
<whitequark> yeah, I'm glad for them. quite some guts
<whitequark> however it's not really clear if the new one will be any better
<yorickpeterse> There's this painting of a group of people tearing down a statue of opression or w/e, only for a new one to arrive
<yorickpeterse> can't find it though
<yorickpeterse> it's like this cross-shaped statue that every time it gets teared down arises again
<yorickpeterse> lets hope that won't be the case
<glowcoil> 12:13:35 <+whitequark> yorickpeterse X mongodb
<glowcoil> hi everyone
<glowcoil> want to hear my uk garage beats
<whitequark> glowcoil: what about yorickpeterse
yorick has joined #elliottcable
prophile has quit [Quit: The Game]
<glowcoil> whitequark: was just funny
alexgordon has joined #elliottcable
<joelteon> should I write my lexer in C
<alexgordon> joelteon: ragel
<joelteon> is that a good idea
<alexgordon> joelteon: yes
<joelteon> ok cool
<joelteon> i'll use ragel
<alexgordon> joelteon: good
<joelteon> so what language should i build the initial compiler in
<joelteon> before, you know, i start writing the compiler in my new language
audy- is now known as audy
<joelteon> C?
<joelteon> gotta be C
audy has quit [Changing host]
audy has joined #elliottcable
<joelteon> for performance!!!!!!!
<joelteon> alexgordon have you written a lexer in ragel before
<glowcoil> alexgordon: is there much benefit of ragel over while+switch? :p
gazoombo_ has joined #elliottcable
<whitequark> fuck C
<whitequark> glowcoil: ragel can compose FSMs
<whitequark> for example ruby uses FSM+switch+... 80 gotos
<whitequark> and ragel has exactly 0 c-like gotos
<joelteon> i don't want to write this in C
<joelteon> i hate C
Sgeo has joined #elliottcable
cloudhead has joined #elliottcable
<devyn> yorickpeterse: yes! I've seen that GIF
<devyn> hold on
<whitequark> haha this 'shared taxi' driver is the shit
<whitequark> at the same time talks on phone, gives me change and drives at 40kph on street
eligrey has joined #elliottcable
<joelteon> hey guys question
<joelteon> ragel doesn't like "expr = lit | var | '{' expr '}'" because i guess recursion is no-no
<joelteon> what's problem
<whitequark> ragel has no stack
<whitequark> well, no implicit stack
<joelteon> wat do
<whitequark> use it as a lexer, not as a parser
<devyn> yeah, you'll have to do it yourself
<whitequark> ragel+bison
<joelteon> so lexing is JUST producing tokens
<joelteon> that's it
<whitequark> yes.
<joelteon> my brain
<devyn> it's not like Parsec; you need to pull it apart first before you can actually put together the scope really
<joelteon> ok ):
<joelteon> but now that I have a token stream, it'll be easier to parse it
<joelteon> well wait a second
<joelteon> why would i combine ragel and bison
<joelteon> don't they do the same thing
<alexgordon> joelteon: no
<alexgordon> and you wouldn't
<alexgordon> because bison sucks
<joelteon> ok explain everything
<alexgordon> joelteon: ragel takes a character stream and turns it into a token stream
<alexgordon> or in other words
<alexgordon> print ( "Hello World" )
<alexgordon> becomes
<alexgordon> IDENT, LPAREN, STRING, RPAREN
<joelteon> right
<alexgordon> then you hand these tokens to a _parser_
<alexgordon> hold on
alexgordon is now known as drparse
<drparse> joelteon: which allows you to build up your parse tree
<joelteon> ok
<drparse> joelteon: what are you parsing?
<drparse> joelteon: there's two major sorts of parsers: "top down" and "bottom up"
<drparse> top down are what real compilers use
<drparse> bottom up are what shitty interpreters like PHP and Ruby use
<whitequark> oh fuck off
<whitequark> LALR is american school, LL is european school
<whitequark> that's all.
<devyn> haha
<whitequark> and if your language is too complex to be parsed by LALR, guess what, it probably has shitty syntax
<drparse> ;)
<drparse> whitequark: it's not _that_ but recursive descent parsers (i.e. top down) have the highest quality error messages
<whitequark> and take an inordinate amount of time to write, yes
<drparse> I never said it was easy :D
<whitequark> you can approach the quality of errors with LALR(1), too
<whitequark> e.g. Menhir+merr
<drparse> look, I generally use bottom up most of the time
<whitequark> it's not *exactly* as good as LL but it's close enough for most practical purposes
<drparse> but recursive descent is the gold standard, no denying it
<devyn> I'm watching something that's kinda like SAO
<devyn> but less fancy
<devyn> with kind of better plot
<devyn> but lighter
<devyn> and funnier
<drparse> sword art online?
<devyn> it's really fluffy
<devyn> yes
<drparse> wtf?
<devyn> lol what
<purr> lol
<drparse> "Sword Art Online (ソードアート・オンライン Sōdo Āto Onrain?) is a Japanese light novel series written by Reki Kawahara and illustrated by abec. The series takes place in the near-future and focuses on various virtual reality MMORPG worlds. The light novels began publication on ASCII Media Works' Dengeki Bunko label from April 10, 2009, with a spin-off series launching in October 2012, and are licensed in North Americ
<drparse> Yen Press. The series has spawned five manga adaptations. A"
* drparse is confused
<drparse> what's a manga adaption?
<devyn> how come
<devyn> manga = comic book
<devyn> tv show -> comic
<whitequark> drparse: you know Batman was a comic and then they made a film?
<whitequark> it's like this but in reverse
<drparse> japan is crazy
<devyn> haha
<drparse> whitequark: DID YOU HEAR? FOUR RUSSIAN MEN SLID DOWN A SLOPE IN A TUBE VERY QUICKLY TODAY
<devyn> oh yeah? did you hear Canada won gold in men's hockey?
<devyn> (that's the only reason I'm up right now. couldn't go back to sleep.)
<drparse> four english gentlemen slid down the same slope in a different tube, but they were slower than the four russian men
<whitequark> idgaf about sport
<devyn> I usually don't, but hockey is kind of a patriotic thing
<devyn> it's important
<drparse> devyn: I saw it on the news! you should be proud, canada was on the news
<devyn> drparse: yeah lol I watch BBC World News a lot and it's always funny when Canada gets a story in there
<purr> lol
<devyn> very rare
<drparse> WE USED TO OWN YOU!
<devyn> well at least we were more polite than the USA about it
<devyn> drparse: quite honestly though I hate watching any kind of local news at all
<devyn> here
<devyn> it's just so goddamn boring
<devyn> nothing interesting ever happens
<devyn> - someone got killed
<devyn> - kids doing silly things
<devyn> - kids doing awesome things
<devyn> - some sob story
<devyn> hmm
<devyn> for some reason this one girl has decided she wants to call the main character "my lord"
<devyn> but his sidekick is just a pervert
<devyn> it's like
<devyn> stereotypes
<devyn> wow
<whitequark> devyn: that sounds like something horrible I'd watch and be slightly ashamed of it
<whitequark> like TKnR
<devyn> whitequark: yes, I didn't exactly find it on my own... girl I'm interested in recommended it
<devyn> it's pretty bad, but amusing
<devyn> it's like they saw SAO and were like "hmmm this isn't representative enough of how MMORPGs are actually like"
<devyn> so this is like
<devyn> let's make an anime about an accurate MMORPG virtual reality experience
* devyn headdesks
<devyn> this is a lot more realistic though, as far as how MMORPGs are actually like >_>
<devyn> community-wise
<devyn> people are kinda dicks, or nice
<devyn> and really rather weird
<devyn> I guess it's not that bad when you take that into account
<devyn> it actually does a pretty good job of representing that
<devyn> it's called "Log Horizon" btw
<devyn> I was just saying to her that it kind of reminds me of Mabinogi, if you've ever played that
<devyn> actually a fair bit
<devyn> there really isn't a point though
<devyn> other than
<devyn> suddenly, we're trapped in an MMORPG
<devyn> for some reason no one really cares
<drparse> "girl I'm interested in recommended it" lol
<purr> lol
<joelteon> ok so what's going on
<devyn> why lol
<joelteon> what do i use for the parsing
<devyn> joelteon: you build that yourself
<joelteon> ok
<joelteon> just manually
<devyn> oh boy and here comes the tsundere part
<devyn> kind of expected it but she's even more I guess
<devyn> wat
<devyn> she looks like she's like
<devyn> 12
<devyn> but she's the same age as them
<devyn> wat
<joelteon> manual parsing
<joelteon> GROSS
<devyn> joelteon: haha now you know why people bitch about it
<joelteon> can i do it not in C
<devyn> but then it won't be web scale
<devyn> >:P
<devyn> you must implement non-blocking parsing joelteon
<devyn> it's the secret in the async sauce
<joelteon> but this is a compiled language
<joelteon> how will that help
<devyn> THE SECRET IN THE ASYNC SAUCE
<joelteon> shit
<joelteon> fuck
<devyn> have you not seen that
<devyn> how
<devyn> drparse: she's pretty attractive, and also probably too young for me... but, fuck good judgement, eh?
<drparse> devyn: too young?!
<drparse> wtf I thought you were 12
<devyn> I'm 17, she's uh
<devyn> like
<devyn> 14
<devyn> >_>
<drparse> LOL
<purr> LOL
<devyn> I didn't know she was 14 at first; she looks way more mature >_>
<drparse> yeah yeah
<drparse> have fun in prison
<devyn> luckily Canada isn't so retarded about that
<drparse> ?
<devyn> we don't really have hard limits like the US does...
<drparse> ???
<devyn> like in the US if you're 18 and your girlfriend is 17, that's a big fucking deal
<drparse> oh well not exactly
<devyn> or so I've heard
<drparse> the most common age of consent in the US is 16
<devyn> oh, okay, then it's like here
<devyn> I guess
<drparse> it's just that it's 18 in california
<drparse> and californians are loud and numerous
<devyn> haha
<drparse> I don't think in canada a 17 year old can get it on with a 14 year old
<drparse> only spain is that fucked up
<devyn> yeahhhh...
<devyn> it's really too bad
<devyn> she actually wanted to date my friend, who is older than me by 2 years
<devyn> he had the common sense to say 'uh, no'
<drparse> on the plus side, nothing weird about a 19 year old and a 16 year old!
<devyn> yep
<drparse> actually, just stick to 16 year olds forever
<devyn> she could easily be 16 though, I swear
<joelteon> hahahaha
<joelteon> lisp
<devyn> I thought she was a senior when I met her >_>
<devyn> granted 16 = senior for probably very few other than me
<devyn> so never mind
<joelteon> i got tired of it in the middle but the ending made it all worthwile
<drparse> joelteon: lisp?
<joelteon> yeah
<drparse> k
<devyn> drparse: she's so brilliant though. she's further ahead in school than I ever was, and she's wanting to study CS at waterloo
<devyn> stupid society
* devyn sighs
<drparse> lol... I guess we look for different things in women :P
<purr> lol
<devyn> well like I said she's also pretty attractive and looks like she's my age
<devyn> >_>
<joelteon> pic
<devyn> no, that's kinda not cool
<drparse> these days I'm just happy if they're _thin_. fuck 25% obesity level
<joelteon> lol
<devyn> lol we don't have that problem in Vancouver
<devyn> you should move here
<drparse> k
<drparse> why don't you have that problem? o_O
<devyn> unfortunately most of the white girls are annoying and most of the asian girls are superficial
<devyn> I don't know, everyone is really obsessed with fitness here
<drparse> strange
<devyn> every time I drink pop at work I have to hide it or someone will say something about it
<devyn> lol
<joelteon> i wonder why they don't have that problem in vancouver.
<drparse> Vancouver is the holy paradise?
<cloudhead> are you guys serious?
<devyn> yeah I'd say at my high school obesity was only like 1-2%
<drparse> hi cloudhead
<drparse> listening in?
<cloudhead> it's the other way around
<cloudhead> the US is the only country with an obesity problem
<drparse> someone hasn't been to the pacific islands ;)
<cloudhead> because of the food
<joelteon> oh is the US the only one now
<devyn> yeah, lots of fat guys on pacific islands, never understood that culture
<drparse> cloudhead: you still in DE?
<cloudhead> drparse: ya
<drparse> people seem healthier there
<cloudhead> yea, it's very healthy
<devyn> what is DE
<cloudhead> germany
<devyn> ah
<drparse> cloudhead: at least in the UK, the problem is that food is expensive. So poorer people can only afford fattening crap
<devyn> that DE
<cloudhead> right
<drparse> in berlin food is cheap, so people can eat better
<cloudhead> still, people in the UK are relatively fit
<devyn> drparse: that's actually part of the problem in the US, too... people just get paid way less, but the effect is the same
<devyn> poor people can only eat shitty food
<cloudhead> yea there's that, but even if you take the cheapest food you can find in germany
<cloudhead> it'll be of much higher quality than in the US
<devyn> surely you have ramen
<drparse> that said, mmmmm berliners
<drparse> we brits are no good at doughnuts
<cloudhead> haha
<cloudhead> and here I was thinking you were talking about girls
<devyn> well we were
<cloudhead> oh right, the diet thing
<drparse> actually that's another thing, german breakfasts are healthier and more filling
<drparse> :D
<drparse> so they keep you sustained for longer
<cloudhead> yea, <3 german breakfast
<drparse> I feel like if I have a bowl of corn flakes, or a piece of toast, I want lunch pretty quickly
<cloudhead> it's funny, I haven't seen this culture of the breakfast anywhere else
<joelteon> dude, i love the IRS
<drparse> pretty similar in denmark
<cloudhead> ah cool
<cloudhead> wasn't used to having 1-2h breakfasts until I moved here
<devyn> oh my god I can never eat breakfast
<drparse> problem in the UK is that all the bakers' shops are going under... because of the supermarkets
<devyn> I'm just not hungry
<drparse> devyn: go to germany
<cloudhead> ah
<cloudhead> hmm
<devyn> no, that's the thing, my family likes big fancy breakfasts
<devyn> waffles and shit
<devyn> I hate it
<drparse> when I was younger I used to stop off at the bakers on the way to school
<cloudhead> well I guess in france and germany there's a very big bread culture
<cloudhead> they have freshly baked bread in supermarkets
<cloudhead> which is quite nice
<joelteon> simple is also cool
<drparse> but now, the two main ones have closed
<drparse> sad really
<drparse> brb essen
<cloudhead> :)
<cloudhead> what's everyone doing these days?
<devyn> a lot of work
<devyn> "uni"
<joelteon> lexing
<devyn> man I just realized something
<devyn> in this little city I have as my wallpaper
<devyn> there's a marina that looks like there's no exit for the boats
<devyn> it's encased in roads
<devyn> maybe the roads go above the water though
drparse has quit [Ping timeout: 330 seconds]
PLejeck has quit [Changing host]
PLejeck has joined #elliottcable
PLejeck is now known as nuck
<devyn> how the fuck did this get printed, Germany
<joelteon> so
<joelteon> would it be possible to combine the parser and the lexer
<joelteon> is that a bad idea
<joelteon> not combine exactly
<joelteon> but have the lexer feed tokens directly to the parser instead of having some intermediate representation
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
alexgordon has joined #elliottcable
<cloudhead> joelteon: is this a general question?
<cloudhead> joelteon: you can, but in the long run it makes things more complicated
<joelteon> no, this is a question specifically regarding my new toy language
<devyn> Parsec only gets away with that because parser combinators are so beautiful
<joelteon> ok so no then
<devyn> I mean you could but it's probably not going to turn out to be very easily maintained
<devyn> a line of Parsec could be one hell of a lot of C
<devyn> okay, well, relatively
<alexgordon> OMG IS IT A QUESTION ABOUT PARSING AGAIN?
<alexgordon> joelteon
alexgordon is now known as drparse
<joelteon> drparse
devyn is now known as drserialize
<drparse> 21:08 <joelteon> would it be possible to combine the parser and the lexer
<drparse> 21:09 <joelteon> is that a bad idea
<drparse> Yes
<joelteon> ok
<drparse> in that yes it's possible, and yes it's a bad idea
<joelteon> that's what i thought
<drparse> joelteon: what do you mean by combine?
<drserialize> just generate injectable SQL
<drserialize> it's more fun
<drparse> lol drserialize
<purr> lol
<joelteon> drparse: i mean feeding tokens to the parser instead of having an intermediate representation
<drparse> joelteon: you mean feeding characters?
<Willox> Where's nurselex?
<drparse> moi?
<Willox> oh oh
<joelteon> no
<joelteon> i mean tokens
<drserialize> iom?
<Willox> lex luthor
<drparse> joelteon: then I'm confused. Feeding tokens to the parser is what you should do
<drparse> what other intermediate representation is there?
<joelteon> no idea
<joelteon> maybe i'm brain-stupid
<drparse> joelteon: a lexer takes a string, and turns it into tokens
<drparse> a parser takes tokens and turns it into a parse tree
<joelteon> right
<joelteon> i'm wondering whether the parser implementation should be partially within the ragel machine definition
<joelteon> is that how it's done
<drparse> usually if you have to ask, your language is wrong
<drparse> think about what tokens you want the lexer to output
<drparse> then write that
<joelteon> output where
<drserialize> this song is so fucking repetitive and I can't get it out of my head
<drparse> what kinds of tokens the lexer should generate
<joelteon> ok
<joelteon> so
<drparse> joelteon: e.g. "(" -> LPAREN, "foo" -> IDENT, "+" -> PLUS
<joelteon> tok => { code goes here }
* drserialize is high on nosleep
<joelteon> people write shit like "EMIT(LPAREN)"
<joelteon> or something
<drparse> joelteon: exactly
<drparse> check out my lexer in furrow
<drparse> it's neat
<joelteon> where's it emitted to
<drparse> joelteon: you can either call the parser straight away
<drparse> or you can buffer all the tokens into an array, perform cleanup, then call the parser
<drparse> oh but it does depend on whether you use bison or not
<joelteon> what if i don't
<drparse> then you're fine
<joelteon> which one do i do if i don't use bison
<drparse> yacc and bison are "back to front" parsers, basically the parser calls the lexer
<drparse> it's not very nice
<drparse> if you write your own parser, or you use lemon, then the lexer calls the parser which is not so dumb
<joelteon> ok
<drserialize> god I love her voice
<drserialize> please everyone just be distracted with me
* drserialize waves
<joelteon> oh you use c++
<drparse> joelteon: for sure
<joelteon> that's a bit less horrifying than C
<drparse> joelteon: this is the "template" for the lexer (in ragel) https://github.com/fileability/furrow/blob/master/generation/lexer_template.rl
<drparse> I use a python script to generate all the definitions for keywords and operators
<drparse> the <<generated>> bit
<drparse> god damn is it a sweet way of building a parser
drserialize is now known as devyn
<devyn> maaaan
<drparse> I use another python script to generate a lemon grammar file from it
<drparse> then run lemon on THAT to generate a parser
<drparse> I have a python script that generates the parse tree structs{} too
<drparse> hopefully you can see how a compiler all fits together now?
<joelteon> ok
<joelteon> thanks
<drparse> joelteon: #1 mistake people make is overcomplicating both their lexer and their parser
<drparse> your lexer should be ultra simple
<drparse> note that I don't try and lex out string literals, I keep them intact
<drparse> then use some native C++ routine to parse the \n and
<drparse> \" yetc
<drparse> *etc
<drparse> similarly, in your parser grammar, don't try and get every piece of detail in there
<drparse> instead get the "gist" of it, and sort out any details in code -- by transforming your "parse tree" into an "abstract syntax tree"