flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
authentic has quit [Remote closed the connection]
authentic has joined #ocaml
netx has quit ["Leaving"]
netx has joined #ocaml
thelema has joined #ocaml
netx has quit [Client Quit]
netx has joined #ocaml
netx has quit [Client Quit]
authentic has quit [Remote closed the connection]
seafood has joined #ocaml
dabd has quit ["Ex-Chat"]
LordMetroid has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
Amorphous has quit [Read error: 113 (No route to host)]
Amorphous has joined #ocaml
Ched- has quit [Read error: 110 (Connection timed out)]
Ched- has joined #ocaml
ixdy has quit [Read error: 104 (Connection reset by peer)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
RobertFischer has joined #ocaml
authentic has joined #ocaml
LordMetroid has quit [Client Quit]
jbarbero has left #ocaml []
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
seafood_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
<palomer> there's a little voice inside my head that's going "forget left recursion"
<palomer> but I can't!
<thelema> If you do some work with packrat parsers, you'll have to drop left recursion.
<thelema> s/drop/give up/
<palomer> no way!
<palomer> besides, I'm not using packrats
<thelema> really... wow.
<palomer> though the packrat algorithm looks a lot like mine
<palomer> maybe mine's a copy!
<thelema> Yup, that's probbaly it. You pre-emptively copied their algorithm.
<palomer> post-emptively
<palomer> I don't understand the packrat algorithm
<palomer> can you explain it?
<thelema> basically it's memoization + recursive descent.
<palomer> memo(R,P) <--what do R and P stand for?
<palomer> (memo is the memoization table)
<thelema> rule, position
<palomer> and what's stored?
<thelema> read section 2
<thelema> M EMO maps a rule-position pair (R, P) to a tuple
<thelema> consisting of
<thelema> • the AST (or the special value FAIL1 ) resulting from applying R
<thelema> at position P, and
<thelema> • the position of the next character on the input stream.
<thelema> or NIL, if there is no entry in the memo table for the given rule-
<thelema> position pair.
<palomer> gotcha
<palomer> funky, it's a simple enough algorithm
<thelema> yes. But without the memoization, it's O(2^n)
<thelema> because the process requires arbitrary lookahead.
<palomer> but with memoization it's linear!
<thelema> but with memoization (which takes up memory that wouldn't be appropriate back in the 60's-70's), it's nice.
<palomer> has anyone thought of extending it to support ambiguous grammars?
<thelema> ? why wouldn't it support ambiguous grammars?
<palomer> err, PEGs are unambiguous by definition
<palomer> but what if we removed the unambiguity clause?
<palomer> so Memo(R,P) would return an array
<thelema> hmm, maybe the class of CFGs that it can parse would be the unambiguous ones.
<thelema> returning a list of options would lose linearity because of the branching...
<palomer> in PEGs, the choices are ordered
<palomer> and they're tried linearly (until one succeeds)
<thelema> yes.
<palomer> so, for example: A := a / b can only parse the string "a"
<palomer> so, why not try every choice?
* palomer wonders...
<palomer> that would solve most of my problems
<thelema> huh? A := a / b can parse "a" and "b"
Jedai has joined #ocaml
<palomer> oh, righto
<palomer> I meant to say
<palomer> A := a / B
<palomer> B := a
<palomer> given string "a", that will only give one parse tree
<palomer> (when two exist!)
<thelema> true. two would exist if / was non-deterministic
<palomer> righto!
<palomer> I wonder if any work has been done in that direction
<thelema> why would you want to?
<palomer> I sometimes parse with ambiguous grammars
<palomer> (natural language, for example)
<palomer> actually...
<palomer> maybe it would be more profitable to only parse with unambiguous grammars
* palomer ponders it
<thelema> ... don't parse natural language like that. lots of heuristics.
Snark has joined #ocaml
<palomer> thelema, for example?
<tsuyoshi> natural language doesn't follow rules very well
<palomer> still, certain fragments do
<palomer> PEG memory requirements are huge
<thelema> yup. Tradeoff of time for space.
<palomer> but typical LR parsers usually parse in linear time and take little space
<thelema> otoh, they can be attacked -- giving evil input can cause non-linear efficiency.
<palomer> good point
<thelema> what else... oh yeah, LR does restrict lookahead. There's a lot of CFGs that can't be parsed by LR, no?
<palomer> well...there is the LL(infinity) parsers
<thelema> not a typical LR parser.
<palomer> true
<palomer> my my
<palomer> this gives me much to ponder
ygrek has joined #ocaml
Linktim has joined #ocaml
Jedai has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"]
m3ga has joined #ocaml
m3ga has quit [Client Quit]
bluestorm has joined #ocaml
filp has joined #ocaml
seafood_ has quit []
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
LordMetroid has joined #ocaml
Yoric[DT] has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
smimou has quit ["bli"]
l_a_m has quit [Remote closed the connection]
^authentic has joined #ocaml
l_a_m has joined #ocaml
flux has quit [Read error: 60 (Operation timed out)]
flux has joined #ocaml
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
jarimatti has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Jedai has joined #ocaml
acidjnk has joined #ocaml
acidjnk has left #ocaml []
LordMetroid has quit ["Leaving"]
jarimatti has quit []
jarimatti has joined #ocaml
ofaurax has joined #ocaml
bluestorm has joined #ocaml
authentic has left #ocaml []
seafood has joined #ocaml
jarimatti has quit []
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
Linktim has quit [Read error: 104 (Connection reset by peer)]
Linktim has joined #ocaml
pango has quit [Remote closed the connection]
LordMetroid has joined #ocaml
pango has joined #ocaml
Jedai has quit [Read error: 113 (No route to host)]
seafood has quit []
ofaurax has quit ["Leaving"]
coucou747 has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
<thelema> Yoric[DT]: hi
<thelema> it seems you're getting a funny resistance from the extlib community. your code seems judged both "not enough" and "too much" by them.
<Yoric[DT]> Have you seen new e-mails ?
<Yoric[DT]> I haven't received anything recently.
<thelema> no, it's been quiet recently - I was referring to the previous activity
<thelema> just like I've been quiet...
<Yoric[DT]> But yeah...
<Yoric[DT]> I'm waiting for a final outcome before I commit any additional code.
<Yoric[DT]> s/commit/submit/
<thelema> maybe you expect too much.
<thelema> and maybe they're waiting for revisions.
<Yoric[DT]> ...
<Yoric[DT]> Well, I'll try and submit something one of these days.
<Yoric[DT]> Possibly my improved IO.
<bluestorm> you could make an in-passing mention of the Option.bind patch :-'
<Yoric[DT]> :)
bebui has quit ["leaving"]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
smimou has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
<bluestorm> # let module H = Hashtbl in let t = H.create 1 in let id x = let k = Obj.repr x in H.add t k k; Obj.obj (H.find t k) in id;;
<bluestorm> - : '_a -> 'b = <fun>
<bluestorm> how comes it is not polymorphic on the input ?
<thelema> hmm... odd
<bluestorm> hmm
<bluestorm> # let id = let id x = x in id;;
<bluestorm> val id : 'a -> 'a = <fun>
<bluestorm> # let id = let _ = ref None in let id x = x in id;;
<bluestorm> val id : '_a -> '_a = <fun>
<thelema> once you mix in refs, x might get written to that ref (somehow)
<bluestorm> i suppose that's the idea
<bluestorm> so i have to make the ref/hashtable global :]
* Yoric[DT] likes this '_a -> 'b .
<Yoric[DT]> It's a nice type.
<thelema> it's not an easy one - I'll recommend it to Jane street for their tricky inteerview questions.
Jedai has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
musically_ut has joined #ocaml
vixey has joined #ocaml
bohanlon has quit ["leaving"]
LordMetroid has quit ["Leaving"]
jeremiah has joined #ocaml
RobertFischer has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
shortcircuit has quit [Read error: 110 (Connection timed out)]
jeremiah has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
Snark has quit ["Ex-Chat"]
LordMetroid has joined #ocaml
<palomer> hot weather makes me lazy
<Yoric[DT]> TheDailyWTF makes me lazy.
<palomer> Yoric[DT]!
<palomer> what's up?
<Yoric[DT]> I placed myself on limited holidays.
<Yoric[DT]> Well, on week-end.
<Yoric[DT]> First one since... can't remember when.
<palomer> cool, where do you work?
tomh has joined #ocaml
<Yoric[DT]> University
<Yoric[DT]> I'm a researcher.
<palomer> postdoc?
<Yoric[DT]> Nope.
<Yoric[DT]> Lecturer.
<palomer> is that the first step to professorship?
<palomer> I don't get france, it seems that people work friggin hard in academia
ygrek has quit [Remote closed the connection]
<Yoric[DT]> Yes, it's the lowest permanent position as a researcher/teacher.
<Yoric[DT]> The other position being professor.
<palomer> which is the next step
<Yoric[DT]> yep
<palomer> here we have three positions
<palomer> lecturer, professor and assistant professor
<palomer> lecturers are people who aren't legible to become assistance professors, often
<Yoric[DT]> Oh, I may have mistranslated.
jeremiah has joined #ocaml
<palomer> yesterday I'm like "forget left recursion, it's too friggin hard"
<palomer> I think ill change my mind today
<palomer> (again!)
* palomer is off
<Yoric[DT]> Here, on the Path of the Researcher-Teacher, we have several variants of Post-doc, followed by Maître de Conférences, followed by Professeur.
asmanur has joined #ocaml
coucou747 has quit ["bye ca veut dire tchao en anglais"]
asmanur has quit [Remote closed the connection]
Linktim has quit [Remote closed the connection]
filp has quit ["Bye"]
LordMetroid has quit ["Leaving"]
flitex_666 has joined #ocaml
struk|busy has quit [Read error: 110 (Connection timed out)]
Jedai has quit [Read error: 113 (No route to host)]
Axioplase has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
bzzbzz has quit ["leaving"]
RobertFischer has left #ocaml []
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
bluestorm has quit [Remote closed the connection]
authentic has joined #ocaml