<
joelteon>
whitequark: i was inspired by your comments
<
joelteon>
I got the dependency install for my site down from 46 minutes to 67.301 seconds
<
joelteon>
the only problem is that it requires saucy salamander
<
joelteon>
i'll work on that later
<
joelteon>
anyway gotta go home
Sgeo has joined #elliottcable
eligrey_ is now known as eligrey
<
purr>
<micahjohnston> yeah Haskell is a lot of filigree on top of lambda calculus :p
alexgordon has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<
devyn>
Great repository names are short and memorable. Need inspiration? How about massive-hipster.
<
purr>
Let it be known that devyn hates github.
<
purr>
Let it be known that devyn hearts github.
inimino` is now known as inimino
eligrey has quit [Quit: Leaving]
brr has quit [Ping timeout: 240 seconds]
brr has joined #elliottcable
<
purr>
<gqbrielle> devyn: yeah well then i got manic and suicidally depressed and now everything sucks.
<
joelteon>
fuq that bich
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
<
devyn>
holy fuckity fuck
<
devyn>
[master 42d3bae] [subscriber] Producer capability from subscriber! 13 files changed, 763 insertions(+), 86 deletions(-)
<
devyn>
yes, that is a commit with 763 insertions. in Ruby.
cloudhead has joined #elliottcable
cloudhead has quit [Ping timeout: 260 seconds]
Sgeo has quit [Quit: No Ping reply in 180 seconds.]
Sgeo has joined #elliottcable
Sgeo has quit [Quit: No Ping reply in 180 seconds.]
Sgeo has joined #elliottcable
Sgeo has quit [Read error: Connection reset by peer]
Sgeo has joined #elliottcable
Sgeo has quit [Read error: Connection reset by peer]
Sorella has joined #elliottcable
Sorella has joined #elliottcable
<
purr>
<devyn> elliottcable: eboyjr's boobs
cloudhead has joined #elliottcable
fwg has joined #elliottcable
PragCypher has joined #elliottcable
yorick has joined #elliottcable
cloudhead has quit [Ping timeout: 260 seconds]
alextgordon has joined #elliottcable
<
purr>
<elliottcable> brb macrowave. … microwave.
alexgordon has joined #elliottcable
fwg has quit [Quit: zzzzzzZZZz]
fwg has joined #elliottcable
fwg has quit [Ping timeout: 248 seconds]
<
purr>
ELLIOTTCABLE: hi!
<
ELLIOTTCABLE>
devyn: why brackets at the start?
<
ELLIOTTCABLE>
devyn: c'mmon, get on the .gitlabels bandwagon. ('=
<
ELLIOTTCABLE>
alexgordon: hi
<
ELLIOTTCABLE>
girlfriend is coming back from surgery, soon, I hope
<
ELLIOTTCABLE>
so I'll be incommunicado for a while, perhaps
<
alexgordon>
ELLIOTTCABLE: surgery?!
<
ELLIOTTCABLE>
mmhmm
<
ELLIOTTCABLE>
fuckin' blessed is such an excellent thing
<
ELLIOTTCABLE>
an alternative to ncurses? yes please!
<
ELLIOTTCABLE>
even if it's unstable and incomplete by comparison, it's still excellent.
<
purr>
<alexgordon> FUCK cups
fwg has joined #elliottcable
cloudhead has joined #elliottcable
eligrey has joined #elliottcable
PragCypher has quit [Quit: Leaving]
fwg has quit [Ping timeout: 248 seconds]
cloudhead has quit [Ping timeout: 248 seconds]
* jvulc
wants to get a PocketMine server running by the end of the weekend.
<
jvulc>
Kind of surprised the mobile version of Minecraft supports external servers now ... but goddamn, it's not a great experience.
<
joelteon>
whitequark, how do you memoize parsing operations?
<
joelteon>
also you were right
<
alexgordon>
joelteon: memoize parsing?
<
joelteon>
that's what whitequark said
<
whitequark>
so funny I'm crying
<
whitequark>
the garden chair of solitude
*sob*
<
joelteon>
whitequark, how do you memoize a parser?
<
joelteon>
also i love that tumblr
<
whitequark>
joelteon: um, associate the position in the token stream and a rule with the resulting AST fragment or failure
<
joelteon>
so this is happening on ubuntu saucy salamander
<
alexgordon>
whitequark: hahahaha
<
alexgordon>
joelteon: if you have to memoize a parser you're doing it WRONG
<
joelteon>
yeah, i know
<
alexgordon>
joelteon: let me refer you to a specialist
alexgordon is now known as drparse
<
joelteon>
that's what's confusing me
<
drparse>
joelteon: I hear you have a parsing problem
<
drparse>
joelteon: first things first, why is this parser not written in C or C++?
<
drparse>
or maybe haskell if you're masochistic
<
joelteon>
it's written in haskell
<
drparse>
MASOCHIST
* drparse
needs to work on his bedside manner
<
joelteon>
doesn't matter, same issue happens if it's written in C
<
joelteon>
see: pcre
<
drparse>
joelteon: err, haskell is lazy you know :P
<
drparse>
no idea what your problem is anyway
<
drparse>
joelteon: parsers are not hard to do fast (at least in C and C++)
<
drparse>
UNLESS you have a stupid grammar
<
whitequark>
drparse: the problem is that he has backtracking
niggler has joined #elliottcable
<
drparse>
but if your grammar is anything approaching sensible, you don't need any tricks
<
joelteon>
here's an example string
<
whitequark>
it's also dumb to say that you don't need any tricks
<
joelteon>
where "\t" is a tab character
<
whitequark>
I mean
<
whitequark>
go parse C++
<
joelteon>
&b\t&/b&/b&/b&/b&/b\t
<
drparse>
whitequark: C++'s grammar is not what I would call sensible
<
whitequark>
it's goddamn context-free
<
whitequark>
-sensible
<
joelteon>
should parse to <b>&/b&/b&/b&/b&/b</b>
<
joelteon>
err, remove one of those &/bs on the inside
<
whitequark>
drparse: also lol, that could be a very good pun
<
whitequark>
er it's sensitive
<
whitequark>
argh I need to sleep
<
joelteon>
&b\t&/b&/b&/b&/b&/b\t => <b>&/b&/b&/b&/b</b>
<
joelteon>
how should i parse that
<
drparse>
joelteon: jesus fuck
<
joelteon>
that's an uncommon, but valid example.
<
drparse>
what's the &/b stuff
<
joelteon>
that's text inside the tags
<
joelteon>
it can be whatever
<
joelteon>
&b\t hello world! &/b\t is fine
<
drparse>
this language is not exactly pretty
<
drparse>
let me rephrase that
<
whitequark>
drparse: you could be british
<
drparse>
whitequark: could I?
<
drparse>
whitequark: you could be russian
<
whitequark>
that's was an excellent understatement.
<
joelteon>
ok so go on dr parse
<
whitequark>
arghI can't grammar today
<
whitequark>
also type
<
drparse>
joelteon: basically this language is such an eyesore I can only look at it for 3 seconds at a time
<
joelteon>
ok, here, let me simplify it
<
joelteon>
let's just say a colon instead of \t, because \t is painful to read
<
joelteon>
&b: &/b &/b: should parse to <b> &/b </b>
<
joelteon>
how would you implement a parser for it
<
prophile>
with a PEG
<
drparse>
pegs suck!
<
drparse>
joelteon: why WOULD you implement a parser for it?
<
joelteon>
because i have to
<
joelteon>
ok, so you don't have an answer
<
joelteon>
thanks for your help
<
drparse>
no problem
<
joelteon>
anybody have anything useful to contribute
<
whitequark>
fuck this shit
<
prophile>
joelteon: it's not context-free
<
prophile>
i dunno if that's interesting or new information
cloudhead has joined #elliottcable
<
drparse>
joelteon: I don't understand the syntax so I can't say how to parse it
<
drparse>
what's with all the & and / and tabs
<
joelteon>
it's a format for passing messages that need to have HTML markup through a chat server
<
joelteon>
i didn't invent it
<
joelteon>
&b: is <b>
<
joelteon>
&/b: is <b>
<
joelteon>
the reason they designed it this way is because this chat server has only a web frontend by default
<
joelteon>
which means they just have to perform a string replace
<
joelteon>
and then let the browser worry about rendering
<
joelteon>
i'm trying to make it readable in plain text
<
drparse>
this is a really stupid format btw :P
<
drparse>
stupider than html
<
joelteon>
i didn't fucking invent it
<
drparse>
alright but
<
drparse>
at least in HTML if you have <b></b></b> it doesn't end up as <b></b></b>
<
drparse>
it's just an error
<
joelteon>
yeah, i know
<
joelteon>
but in HTML, <b></b</b> needs to be readable to the user
<
joelteon>
you'd see a bold </b
<
joelteon>
it's not valid HTML, but browsers still display it properly
<
drparse>
joelteon: could you like, reverse the string and then just parse it backwards lol?
<
drparse>
not sure if that would break it
<
joelteon>
why would i do that
<
drparse>
it would work for that example
<
joelteon>
so you mean
<
joelteon>
instead of &b: &/b &/b:
<
joelteon>
:b/& b/& :b&
<
joelteon>
and i look for the :b/& token, then the :b& token?
<
drparse>
yeah then when you get to the second one you know it's literal since you're not expecting it
<
drparse>
that might cause the reverse problem though, not sure
<
joelteon>
okay, what about the string which reversed is :b/& :b/ :b&
fwg has joined #elliottcable
<
drparse>
what is :b&
<
joelteon>
that's the reversed opening token
<
joelteon>
&b: /b: &/b: would be it forwards
<
joelteon>
or here, &b: &/b /b: &/b:
<
joelteon>
which addresses both problems
<
drparse>
gaaaah this is making my brain ment
<
drparse>
joelteon: lol there's four different types of tags there
<
drparse>
fairly sure I have no idea what's going on now
<
joelteon>
the middle two aren't tags
<
joelteon>
they're just text
<
joelteon>
the first one is <b> and the last one is </b>
<
drparse>
if they're not tags then there's no problem?
<
joelteon>
yeah, so how do you write a parser for them?
<
drparse>
first you have to tokenize it
<
drparse>
I don't know much about haskell parsing
<
drparse>
so I don't know how to do that
<
drparse>
but in C/C++ I'd use ragel
<
joelteon>
ok how would you tokenise it
<
drparse>
write regexes that match individual tags
<
drparse>
joelteon: are you using parsec?
niggler has quit [Ping timeout: 264 seconds]
niggler has joined #elliottcable
<
joelteon>
attoparsec
<
joelteon>
how is regexes to match tags any different
<
joelteon>
regex still has to backtrack on &/b
drparse is now known as alexgordon
<
purr>
<devyn> gqbrielle: yes, because I have a bowl of meth
<
alexgordon>
joelteon: it's different because you don't have to write it
<
joelteon>
no, it isn't
<
joelteon>
the parser works fine
<
joelteon>
it has quadratic time complexity, worst case on invalid input
<
alexgordon>
joelteon: also because it's only backtracking very small amounts there's almost no performance penalty
<
joelteon>
tokenizing with regex won't help that
<
joelteon>
okay, a tokenizing step might be worth trying
<
alexgordon>
I dunno how to do that in haskell though
<
alexgordon>
this is why I write parsers in C++ :P
<
joelteon>
parsec can do it
Sgeo has joined #elliottcable
jvulc|znc has quit [Ping timeout: 264 seconds]
jvulc|znc has joined #elliottcable
yorick has quit [Remote host closed the connection]