musically_ut has quit [Remote closed the connection]
jlouis has quit [Remote closed the connection]
jlouis has joined #ocaml
musically_ut has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
hsuh has joined #ocaml
postalchris has joined #ocaml
postalchris has quit ["Leaving."]
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
middayc has quit []
jlouis has quit [Remote closed the connection]
paczesiowa has joined #ocaml
jlouis has joined #ocaml
<paczesiowa>
hi, is anyone familiar with pcl lib? I want create module FOO:Language.LanguageDef, when defining opStart like this: "let opStart = oneOf (explode "<>-+*!=")" it doesn't compile because of "Values do not match: val opStart : ('_a, char) CharParse.M.char_parser is not included in val opStart : ('a, char) CharParse.M.char_parser" but if I change that definition to "let opStart st = oneOf (explode "<>-+*!=") st" it works, but I have no
<paczesiowa>
idea why, and what's that st value. Could someone explain it to me?
* pango
suggest googleing for "value restriction"
* pango
or even for `sml "value restriction" "eta expansion"'
seafood_ has joined #ocaml
seafood_ has quit []
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
seafood_ has joined #ocaml
kmeyer has quit [Remote closed the connection]
kmeyer has joined #ocaml
paczesiowa_ has joined #ocaml
paczesiowa has quit [Nick collision from services.]
paczesiowa_ is now known as paczesiowa
<paczesiowa>
pango: thanks, I think I understand that mechanism, but I don't know how this applies to that parser types, parser is just regular value (I think) it's not a function so why do we have to eta expand it?
<thermoplyae>
if 'oneOf (explode "...")' were not a function, how could you possibly be applying it to something
<paczesiowa>
I think it's being applied
<thermoplyae>
then it's a function
<paczesiowa>
I mean, I apply that parser value to function parse (I know that this doesn't necessarily mean it's not a function)
kmeyer has quit [Remote closed the connection]
kmeyer has joined #ocaml
<paczesiowa>
anyway, thanks for that tip on value restriction
<paczesiowa>
gtg, bye
paczesiowa has left #ocaml []
jderque has joined #ocaml
olleolleolle has joined #ocaml
ttamttam has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
ygrek has joined #ocaml
buluca has joined #ocaml
thermoplyae has quit ["daddy's in space"]
seafood__ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit [Read error: 104 (Connection reset by peer)]
olleolleolle has quit [Read error: 110 (Connection timed out)]
rwmjones has joined #ocaml
Tetsuo has joined #ocaml
filp has joined #ocaml
olleolleolle has joined #ocaml
filp has quit [Read error: 104 (Connection reset by peer)]
seafood__ has quit [Read error: 104 (Connection reset by peer)]
filp has joined #ocaml
rwmjones has quit ["Closed connection"]
rwmjones has joined #ocaml
alexp has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
bongy has joined #ocaml
filp has quit ["Bye"]
junis has joined #ocaml
<junis>
isn't [1] just the same as 1::[] ?....
hkBst has joined #ocaml
<tsuyoshi>
yep
<junis>
so why is let rec rev = function x -> match x with [] -> x | h::t -> (app (rev t) h::[]);; wrong...
<junis>
..but let rec rev = function x -> match x with [] -> x | h::t -> (app (rev t) [h]);; is right
<flux>
precedency
<flux>
(h::[])
<junis>
oh... i see... thank you flux...
hsuh has quit [Remote closed the connection]
<junis>
...why does application precede cons application...
<junis>
... woops... sorry ... i get it ...
olleolleolle has left #ocaml []
buluca has quit [Read error: 104 (Connection reset by peer)]
<petchema>
junis: what about writing let rec rev = function [] -> [] | h::t -> (app (rev t) [h]) ? function already features pattern matching...
middayc has joined #ocaml
asmanur has joined #ocaml
ygrek has quit [Remote closed the connection]
seafood has joined #ocaml
filp has joined #ocaml
bongy has quit ["Leaving"]
Tetsuo has quit [Remote closed the connection]
Sparkles has joined #ocaml
middayc_ has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
asmanur is now known as asma
revax has quit [Read error: 104 (Connection reset by peer)]
musically_ut has quit [Remote closed the connection]
RobertFischer has joined #ocaml
dramsay has joined #ocaml
Morphous_ has joined #ocaml
dbueno has joined #ocaml
dbueno has left #ocaml []
Morphous has quit [Connection timed out]
musically_ut has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
musically_ut has quit [Remote closed the connection]
dbueno has joined #ocaml
filp has quit ["Bye"]
bluestorm has joined #ocaml
Snark has joined #ocaml
ttamttam has left #ocaml []
<flux>
nice, menhir (a parser generator) apparently is still alive and kicking, latest release (..snapshot..) from december
jderque has joined #ocaml
<flux>
whoa, it's surprisingly large, 20k lines
dbueno has quit ["This computer has gone to sleep"]
leo037 has joined #ocaml
<flux>
nah, time to try aurochs
<flux>
argh, it requires ocaml 3.10.0, which my old ubuntu doesn't have
Morphous has joined #ocaml
<hcarty>
flux: Perhaps godi is worth a try? Or a manual backport of Debian 3.10.x packages
<flux>
I'll just install 3.10.1 to /opt/stow/ocaml-3.10.1 to try that out
<flux>
there's a small project I wanna try out with aurochs
<flux>
although, I suppose I could just upgrade.. but then I'd be out of ubuntu package management, which is a pain too
rwmjones has left #ocaml []
<flux>
heh, I was wondering why hd space wasn't going down while compiling.. turns out I'm compiling on the wrong host.
<flux>
although now I also see that my laptop has insufficient space, need other options :)
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
Morphous_ has quit [Connection timed out]
postalchris has joined #ocaml
<flux>
now, if this .peg-format was documented somewhere..
<flux>
I suppose examples must do :)
<Yoric[DT]>
peg ?
<flux>
the format aurochs (packrat parser generator) inputs
<bluestorm>
hm
<bluestorm>
i guess you're aware of the limitations of packrat parsing
<bluestorm>
(regarding memory usage)
<bluestorm>
(i mean, switching from yacc/menhir to aurochs is not a light decision)
<flux>
I'm going to parse small files
_KS has joined #ocaml
alexp has quit ["Leaving"]
ttamttam has joined #ocaml
<flux>
it's a joy writing that grammar, without thinking of the lexing stage :)
jderque has quit [Read error: 113 (No route to host)]
ita has joined #ocaml
jderque has joined #ocaml
musically_ut has joined #ocaml
_KS has quit []
petchema has quit [Remote closed the connection]
Tetsuo has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
ygrek has quit [Client Quit]
Snark has quit ["Ex-Chat"]
ygrek has joined #ocaml
asma has quit [Remote closed the connection]
flyfish has joined #ocaml
FZ_ has joined #ocaml
FZ_ is now known as FZ
ttamttam has left #ocaml []
dbueno has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
<Snrrrub>
Is it possible to terminate a fold early without throwing an exception?
<Snrrrub>
I'm guessing the for_all is an early termination variant of iter?
<bluestorm>
hm
<bluestorm>
Snrrrub: fold can't
postalchris has joined #ocaml
<bluestorm>
and for_all is traditionnaly used with pure predicates, not for iteration
<bluestorm>
(but you can do that too, even it's a bit messy imho)
<jonafan>
what do you mean?
<jonafan>
pure predicates
<bluestorm>
hm
drams has joined #ocaml
rogo has joined #ocaml
FZ has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.11/2007112718]"]
dramsay has quit [Read error: 110 (Connection timed out)]
rayno has joined #ocaml
thermoplyae has joined #ocaml
dbueno has quit ["This computer has gone to sleep"]
dbueno has joined #ocaml
dramsay__ has joined #ocaml
dbueno has quit ["This computer has gone to sleep"]
musically_ut has quit [Remote closed the connection]
mwc has joined #ocaml
drams has quit [Read error: 110 (Connection timed out)]
<thermoplyae>
probably trash that first "let _ ..." bit too, it's just sequencing the call to main, may as well use the sequential computation operator
<mwc>
Yeah
<mwc>
the only reason I can think of to do it that way is to surpress spurious warnings in case some of those method invocations on window don't return ()
<mbishop>
you can just use ignore instead
<middayc_>
yes I imagined it it like you wrote only with only the first "let = windown" line and no "let _ ="
<middayc_>
aha ... thanks for clearing it up ...
<mwc>
mbishop, personally, I find that the ignore is more line noise than the let cascade
<mwc>
but that's just religion
<mwc>
I suppose that in its favour, wrapping ignore around only the things that produce a warning is both self documenting, and has the advantage that if the API changes to return a value, you'll notice
<middayc_>
but you can probabyl make ignore to just one line (which for example returns soemthing) but if you start with let _ = you have to make all up to that line in this style then
<thermoplyae>
that's not true
<thermoplyae>
"a; let _ = b in c; d" is fine syntax
<thermoplyae>
well, legal syntax
<middayc_>
aja? I thought all "let .. in" must be on top
<middayc_>
but as I saind I am new..
<middayc_>
so I better shut up
<mwc>
middayc_, let a = b in c is an expression
<mwc>
middayc_, ; merely sequences expressions
brooksbp has quit [Read error: 104 (Connection reset by peer)]
<middayc_>
aha interesting... I looked it more primitive way.. it now makes more sense