rwmjones changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.1 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
* LordMetroid goes away now, tells himself to stop being a gool fool
<mbishop> Str.regexp " +" or something? *shurg*
<hcarty> mbishop: I don't know how to use Str from inside ocamlbuild
<bluestorm> let is_empty str = Array.fold_left (fun b c -> b && c = ' ') true (Array.init (String.length str) (String.get str))
<hcarty> bluestorm: Ah, nice. That should do the trick. Thanks.
<pango> # let is_all_whitespace =
<pango> let whitespace_re = Str.regexp "[ \\t]*$" in
<pango> fun s -> Str.string_match whitespace_re s 0
<hcarty> ocamlbuild does not have an option (that I see) to use external libraries in its plugins
<hcarty> So I'm stuck with String.* functions, unless I find a way to link Str or PCRE
<mbishop> well bluestorm's should work then
bluestorm has quit ["Konversation terminated!"]
<pango> # let is_all_whitespace s =
<pango> try
<pango> String.iter (fun c -> if c <> ' ' then raise Exit) s;
<pango> true
<pango> with Exit -> false
hkBst has quit ["Konversation terminated!"]
mwc has joined #ocaml
thermoplyae has quit ["daddy's in space"]
netx has joined #ocaml
olleolleolle has quit []
<hcarty> pango, bluestorm, mbishop: Thank you for your help and tips. I went with pango's latest suggestion as that seems to be about as clean as I will get for now
thermoplyae has joined #ocaml
ttamttam has joined #ocaml
ttamttam has left #ocaml []
postalchris has quit [No route to host]
seafood_ has joined #ocaml
Quaver has quit [Connection timed out]
seafood_ has quit []
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
netx has quit [brown.freenode.net irc.freenode.net]
mwc has quit [brown.freenode.net irc.freenode.net]
jsk has quit [brown.freenode.net irc.freenode.net]
Smerdyakov has quit [brown.freenode.net irc.freenode.net]
petchema has quit [brown.freenode.net irc.freenode.net]
dibblego has quit [brown.freenode.net irc.freenode.net]
orbitz has quit [brown.freenode.net irc.freenode.net]
Oatschool has quit [brown.freenode.net irc.freenode.net]
morner has quit [brown.freenode.net irc.freenode.net]
thermoplyae has quit [brown.freenode.net irc.freenode.net]
uuuppz has quit [brown.freenode.net irc.freenode.net]
evn has quit [brown.freenode.net irc.freenode.net]
jdavis_ has quit [brown.freenode.net irc.freenode.net]
flux has quit [brown.freenode.net irc.freenode.net]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
coucou747 has quit [brown.freenode.net irc.freenode.net]
pattern has quit [brown.freenode.net irc.freenode.net]
thelema has quit [brown.freenode.net irc.freenode.net]
rwmjones has quit [brown.freenode.net irc.freenode.net]
seafood has quit [brown.freenode.net irc.freenode.net]
awesame has quit [brown.freenode.net irc.freenode.net]
mbishop has quit [brown.freenode.net irc.freenode.net]
RobertFischer has quit [brown.freenode.net irc.freenode.net]
jonafan has quit [brown.freenode.net irc.freenode.net]
__suri has quit [brown.freenode.net irc.freenode.net]
szell has quit [brown.freenode.net irc.freenode.net]
dwmw2_gone has quit [brown.freenode.net irc.freenode.net]
Illocution has quit [brown.freenode.net irc.freenode.net]
noob has quit [brown.freenode.net irc.freenode.net]
romanoffi has quit [brown.freenode.net irc.freenode.net]
Ugarte has quit [brown.freenode.net irc.freenode.net]
svenl has quit [brown.freenode.net irc.freenode.net]
l_a_m has quit [brown.freenode.net irc.freenode.net]
|Catch22| has quit [brown.freenode.net irc.freenode.net]
sgnb has quit [brown.freenode.net irc.freenode.net]
Sapan has quit [brown.freenode.net irc.freenode.net]
qwr has quit [brown.freenode.net irc.freenode.net]
gim has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
jdev has quit [brown.freenode.net irc.freenode.net]
Morphous has quit [brown.freenode.net irc.freenode.net]
Mr_Awesome has quit [brown.freenode.net irc.freenode.net]
fremo has quit [brown.freenode.net irc.freenode.net]
mattam has quit [brown.freenode.net irc.freenode.net]
jlouis_ has quit [Remote closed the connection]
khigia has joined #ocaml
thermoplyae has joined #ocaml
uuuppz has joined #ocaml
evn has joined #ocaml
jdavis_ has joined #ocaml
cmeme has quit [Killed by ballard.freenode.net (Nick collision)]
jdev has joined #ocaml
Morphous has joined #ocaml
Mr_Awesome has joined #ocaml
fremo has joined #ocaml
mattam has joined #ocaml
netx has joined #ocaml
mwc has joined #ocaml
jsk has joined #ocaml
Smerdyakov has joined #ocaml
petchema has joined #ocaml
dibblego has joined #ocaml
orbitz has joined #ocaml
Oatschool has joined #ocaml
morner has joined #ocaml
cmeme has joined #ocaml
ben has joined #ocaml
jlouis has joined #ocaml
ben has quit [Killed by ballard.freenode.net (Nick collision)]
|Catch22| has joined #ocaml
RobertFischer has joined #ocaml
sgnb has joined #ocaml
coucou747 has joined #ocaml
flux has joined #ocaml
pattern has joined #ocaml
thelema has joined #ocaml
rwmjones has joined #ocaml
jonafan has joined #ocaml
romanoffi has joined #ocaml
__suri has joined #ocaml
l_a_m has joined #ocaml
Sapan has joined #ocaml
szell has joined #ocaml
dwmw2_gone has joined #ocaml
Illocution has joined #ocaml
noob has joined #ocaml
Hadaka has joined #ocaml
ulfdoz has joined #ocaml
seafood has joined #ocaml
svenl has joined #ocaml
mbishop has joined #ocaml
Ugarte has joined #ocaml
awesame has joined #ocaml
qwr has joined #ocaml
gim has joined #ocaml
Dazhbog has quit [Killed by ballard.freenode.net (Nick collision)]
Dazhbog has joined #ocaml
cygnus__ has joined #ocaml
bebui has quit [Remote closed the connection]
bebui has joined #ocaml
cygnus_ has quit [Connection timed out]
ecc_ has quit [Remote closed the connection]
AxleLonghorn has joined #ocaml
jlouis has quit [brown.freenode.net irc.freenode.net]
jsk has quit [brown.freenode.net irc.freenode.net]
mwc has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
Oatschool has quit [brown.freenode.net irc.freenode.net]
petchema has quit [brown.freenode.net irc.freenode.net]
morner has quit [brown.freenode.net irc.freenode.net]
netx has quit [brown.freenode.net irc.freenode.net]
Smerdyakov has quit [brown.freenode.net irc.freenode.net]
dibblego has quit [brown.freenode.net irc.freenode.net]
orbitz has quit [brown.freenode.net irc.freenode.net]
jlouis has joined #ocaml
cmeme has joined #ocaml
netx has joined #ocaml
mwc has joined #ocaml
jsk has joined #ocaml
Smerdyakov has joined #ocaml
petchema has joined #ocaml
dibblego has joined #ocaml
orbitz has joined #ocaml
Oatschool has joined #ocaml
morner has joined #ocaml
jsk has quit [brown.freenode.net irc.freenode.net]
mwc has quit [brown.freenode.net irc.freenode.net]
Oatschool has quit [brown.freenode.net irc.freenode.net]
petchema has quit [brown.freenode.net irc.freenode.net]
morner has quit [brown.freenode.net irc.freenode.net]
netx has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
Smerdyakov has quit [brown.freenode.net irc.freenode.net]
dibblego has quit [brown.freenode.net irc.freenode.net]
orbitz has quit [brown.freenode.net irc.freenode.net]
jlouis has quit [brown.freenode.net irc.freenode.net]
AxleLonghorn has quit [brown.freenode.net irc.freenode.net]
fremo has quit [brown.freenode.net irc.freenode.net]
Mr_Awesome has quit [brown.freenode.net irc.freenode.net]
jdev has quit [brown.freenode.net irc.freenode.net]
mattam has quit [brown.freenode.net irc.freenode.net]
Morphous has quit [brown.freenode.net irc.freenode.net]
uuuppz has quit [brown.freenode.net irc.freenode.net]
thermoplyae has quit [brown.freenode.net irc.freenode.net]
evn has quit [brown.freenode.net irc.freenode.net]
jdavis_ has quit [brown.freenode.net irc.freenode.net]
flux has quit [brown.freenode.net irc.freenode.net]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
Dazhbog has quit [brown.freenode.net irc.freenode.net]
rwmjones has quit [brown.freenode.net irc.freenode.net]
thelema has quit [brown.freenode.net irc.freenode.net]
seafood has quit [brown.freenode.net irc.freenode.net]
awesame has quit [brown.freenode.net irc.freenode.net]
coucou747 has quit [brown.freenode.net irc.freenode.net]
mbishop has quit [brown.freenode.net irc.freenode.net]
pattern has quit [brown.freenode.net irc.freenode.net]
romanoffi has quit [brown.freenode.net irc.freenode.net]
__suri has quit [brown.freenode.net irc.freenode.net]
jonafan has quit [brown.freenode.net irc.freenode.net]
RobertFischer has quit [brown.freenode.net irc.freenode.net]
svenl has quit [brown.freenode.net irc.freenode.net]
noob has quit [brown.freenode.net irc.freenode.net]
szell has quit [brown.freenode.net irc.freenode.net]
dwmw2_gone has quit [brown.freenode.net irc.freenode.net]
Ugarte has quit [brown.freenode.net irc.freenode.net]
Illocution has quit [brown.freenode.net irc.freenode.net]
l_a_m has quit [brown.freenode.net irc.freenode.net]
qwr has quit [brown.freenode.net irc.freenode.net]
sgnb has quit [brown.freenode.net irc.freenode.net]
|Catch22| has quit [brown.freenode.net irc.freenode.net]
Sapan has quit [brown.freenode.net irc.freenode.net]
gim has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
bla has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
bebui has quit [brown.freenode.net irc.freenode.net]
cygnus__ has quit [brown.freenode.net irc.freenode.net]
khigia has quit [brown.freenode.net irc.freenode.net]
prince has quit [brown.freenode.net irc.freenode.net]
hcarty has quit [brown.freenode.net irc.freenode.net]
acatout has quit [brown.freenode.net irc.freenode.net]
TaXules has quit [brown.freenode.net irc.freenode.net]
pango has quit [brown.freenode.net irc.freenode.net]
smimou has quit [brown.freenode.net irc.freenode.net]
huh_ has quit [brown.freenode.net irc.freenode.net]
ppsmimou has quit [brown.freenode.net irc.freenode.net]
tsuyoshi has quit [brown.freenode.net irc.freenode.net]
ahf has quit [SendQ exceeded]
unfo- has quit [Connection reset by peer]
letrec has quit [Connection reset by peer]
katz has joined #ocaml
letrec has joined #ocaml
morner has joined #ocaml
Oatschool has joined #ocaml
orbitz has joined #ocaml
dibblego has joined #ocaml
petchema has joined #ocaml
Smerdyakov has joined #ocaml
jsk has joined #ocaml
mwc has joined #ocaml
netx has joined #ocaml
cmeme has joined #ocaml
jlouis has joined #ocaml
AxleLonghorn has joined #ocaml
bebui has joined #ocaml
cygnus__ has joined #ocaml
Dazhbog has joined #ocaml
gim has joined #ocaml
qwr has joined #ocaml
awesame has joined #ocaml
Ugarte has joined #ocaml
mbishop has joined #ocaml
svenl has joined #ocaml
seafood has joined #ocaml
ulfdoz has joined #ocaml
Hadaka has joined #ocaml
noob has joined #ocaml
Illocution has joined #ocaml
dwmw2_gone has joined #ocaml
szell has joined #ocaml
Sapan has joined #ocaml
l_a_m has joined #ocaml
__suri has joined #ocaml
romanoffi has joined #ocaml
jonafan has joined #ocaml
rwmjones has joined #ocaml
thelema has joined #ocaml
pattern has joined #ocaml
flux has joined #ocaml
coucou747 has joined #ocaml
sgnb has joined #ocaml
RobertFischer has joined #ocaml
|Catch22| has joined #ocaml
mattam has joined #ocaml
fremo has joined #ocaml
Mr_Awesome has joined #ocaml
Morphous has joined #ocaml
jdev has joined #ocaml
jdavis_ has joined #ocaml
evn has joined #ocaml
uuuppz has joined #ocaml
thermoplyae has joined #ocaml
khigia has joined #ocaml
pango has joined #ocaml
ertai has joined #ocaml
bla has joined #ocaml
prince has joined #ocaml
hcarty has joined #ocaml
smimou has joined #ocaml
huh_ has joined #ocaml
acatout has joined #ocaml
ppsmimou has joined #ocaml
TaXules has joined #ocaml
tsuyoshi has joined #ocaml
ozzloy has quit [SendQ exceeded]
LordMetroid has quit [SendQ exceeded]
guyzmo has quit [Connection reset by peer]
zmdkrbou has quit [Nick collision]
zmdkrbou has joined #ocaml
netx has quit [Remote closed the connection]
unfo- has joined #ocaml
ozzloy has joined #ocaml
guyzmo has joined #ocaml
jonathanv has joined #ocaml
evn has quit []
evn has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
RobertFischer has quit [Read error: 110 (Connection timed out)]
<hcarty> Is it possible to create an account on the Gallium/ocamlbuild/camlp4 wiki?
<hcarty> The "Login/Create account" page does not have an option to create one
<evn> the front page says
<evn> (please send an email to nicolas.pouillard@inria.fr if you wish to obtain an account).
<hcarty> evn: Ah, thanks... I should have checked there :-)
musically_ut has joined #ocaml
<evn> oh that is the front page of the camlp4 section
<evn> which i thought was the actual front page
<hcarty> Oh, on the camlp4 section. I was looking through ocamlbuild.
<evn> so it is kind of burried
<evn> buried, even
<hcarty> I have a camlidl ocamlbuild plugin/rule to add to the list of examples
postalchris has joined #ocaml
thermoplyae has quit ["daddy's in space"]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
thelema has quit [brown.freenode.net irc.freenode.net]
seafood has quit [brown.freenode.net irc.freenode.net]
katz has quit [brown.freenode.net irc.freenode.net]
awesame has quit [brown.freenode.net irc.freenode.net]
Dazhbog has quit [brown.freenode.net irc.freenode.net]
rwmjones has quit [brown.freenode.net irc.freenode.net]
coucou747 has quit [brown.freenode.net irc.freenode.net]
mbishop has quit [brown.freenode.net irc.freenode.net]
pattern has quit [brown.freenode.net irc.freenode.net]
katz has joined #ocaml
Dazhbog has joined #ocaml
coucou747 has joined #ocaml
pattern has joined #ocaml
thelema has joined #ocaml
rwmjones has joined #ocaml
awesame has joined #ocaml
mbishop has joined #ocaml
ulfdoz has joined #ocaml
seafood has joined #ocaml
postalchris has quit ["Leaving."]
AxleLonghorn has left #ocaml []
bla has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
bla has joined #ocaml
ertai has joined #ocaml
khigia has quit ["Leaving."]
thermoplyae has joined #ocaml
pattern_ has joined #ocaml
pattern has quit [Read error: 110 (Connection timed out)]
pattern_ is now known as pattern
evn has quit []
dibblego has quit ["Leaving"]
|Catch22| has quit []
goalieca has joined #ocaml
<flux> I figured out a use case where I'd like the function to be last in libev functions: let's say I wanted to provide an "any of these" combinator. now it would be: any ((fun f -> timer_init f 1.1 2.2); (fun f -> io_init f Unix.stdin))
netx has joined #ocaml
<flux> (add [] somewhere there)
<flux> and I suppose a simple minded non-blocking non-buffering forwarder could be (with the parameter location changed): let buf = String.create 1024 in any [timer_init 10.0 0.0; all [io_init Unix.stdin; io_init Unix.stdout]] (fun io revents -> if List.mem Ev.TIMEOUT revents then stop io else let n = Unix.read stdin buf 0 1024 in if n <= 0 then failwith "argh" else ignore (Unix.write stdout buf 0 n)) - not that bad I'd say
mwc has quit ["Leaving"]
bluestorm has joined #ocaml
ttamttam has joined #ocaml
olleolleolle has joined #ocaml
bla has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
jonathanv has quit [Killed by douglas.freenode.net (Nick collision)]
jonathanv has joined #ocaml
bla has joined #ocaml
ertai has joined #ocaml
bluestorm has quit [brown.freenode.net irc.freenode.net]
ozzloy has quit [brown.freenode.net irc.freenode.net]
jlouis has quit [brown.freenode.net irc.freenode.net]
jsk has quit [brown.freenode.net irc.freenode.net]
Smerdyakov has quit [brown.freenode.net irc.freenode.net]
petchema has quit [brown.freenode.net irc.freenode.net]
morner has quit [brown.freenode.net irc.freenode.net]
Oatschool has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
orbitz has quit [brown.freenode.net irc.freenode.net]
goalieca has quit [brown.freenode.net irc.freenode.net]
musically_ut has quit [brown.freenode.net irc.freenode.net]
mattam has quit [brown.freenode.net irc.freenode.net]
Mr_Awesome has quit [brown.freenode.net irc.freenode.net]
fremo has quit [brown.freenode.net irc.freenode.net]
Morphous has quit [brown.freenode.net irc.freenode.net]
jdev has quit [brown.freenode.net irc.freenode.net]
pattern has quit [brown.freenode.net irc.freenode.net]
guyzmo has quit [brown.freenode.net irc.freenode.net]
uuuppz has quit [brown.freenode.net irc.freenode.net]
letrec has quit [brown.freenode.net irc.freenode.net]
jdavis_ has quit [brown.freenode.net irc.freenode.net]
flux has quit [brown.freenode.net irc.freenode.net]
ttamttam has quit [brown.freenode.net irc.freenode.net]
zmdkrbou has quit [brown.freenode.net irc.freenode.net]
romanoffi has quit [brown.freenode.net irc.freenode.net]
svenl has quit [brown.freenode.net irc.freenode.net]
szell has quit [brown.freenode.net irc.freenode.net]
__suri has quit [brown.freenode.net irc.freenode.net]
dwmw2_gone has quit [brown.freenode.net irc.freenode.net]
Illocution has quit [brown.freenode.net irc.freenode.net]
Ugarte has quit [brown.freenode.net irc.freenode.net]
noob has quit [brown.freenode.net irc.freenode.net]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
netx has quit [brown.freenode.net irc.freenode.net]
thermoplyae has quit [brown.freenode.net irc.freenode.net]
thelema has quit [brown.freenode.net irc.freenode.net]
katz has quit [brown.freenode.net irc.freenode.net]
seafood has quit [brown.freenode.net irc.freenode.net]
Dazhbog has quit [brown.freenode.net irc.freenode.net]
awesame has quit [brown.freenode.net irc.freenode.net]
rwmjones has quit [brown.freenode.net irc.freenode.net]
coucou747 has quit [brown.freenode.net irc.freenode.net]
mbishop has quit [brown.freenode.net irc.freenode.net]
l_a_m has quit [brown.freenode.net irc.freenode.net]
sgnb has quit [brown.freenode.net irc.freenode.net]
Sapan has quit [brown.freenode.net irc.freenode.net]
qwr has quit [brown.freenode.net irc.freenode.net]
gim has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
bla has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
jonathanv has quit [brown.freenode.net irc.freenode.net]
TaXules has quit [brown.freenode.net irc.freenode.net]
hcarty has quit [brown.freenode.net irc.freenode.net]
cygnus__ has quit [brown.freenode.net irc.freenode.net]
acatout has quit [brown.freenode.net irc.freenode.net]
prince has quit [brown.freenode.net irc.freenode.net]
bebui has quit [brown.freenode.net irc.freenode.net]
olleolleolle has quit [brown.freenode.net irc.freenode.net]
tsuyoshi has quit [brown.freenode.net irc.freenode.net]
ppsmimou has quit [brown.freenode.net irc.freenode.net]
huh_ has quit [brown.freenode.net irc.freenode.net]
smimou has quit [brown.freenode.net irc.freenode.net]
pango has quit [brown.freenode.net irc.freenode.net]
unfo- has quit [Connection reset by peer]
ertai has joined #ocaml
bla has joined #ocaml
jonathanv has joined #ocaml
olleolleolle has joined #ocaml
ttamttam has joined #ocaml
bluestorm has joined #ocaml
netx has joined #ocaml
goalieca has joined #ocaml
pattern has joined #ocaml
thermoplyae has joined #ocaml
seafood has joined #ocaml
ulfdoz has joined #ocaml
mbishop has joined #ocaml
awesame has joined #ocaml
rwmjones has joined #ocaml
thelema has joined #ocaml
coucou747 has joined #ocaml
Dazhbog has joined #ocaml
katz has joined #ocaml
musically_ut has joined #ocaml
guyzmo has joined #ocaml
ozzloy has joined #ocaml
zmdkrbou has joined #ocaml
letrec has joined #ocaml
morner has joined #ocaml
Oatschool has joined #ocaml
orbitz has joined #ocaml
petchema has joined #ocaml
Smerdyakov has joined #ocaml
jsk has joined #ocaml
cmeme has joined #ocaml
jlouis has joined #ocaml
bebui has joined #ocaml
cygnus__ has joined #ocaml
gim has joined #ocaml
qwr has joined #ocaml
Ugarte has joined #ocaml
svenl has joined #ocaml
Hadaka has joined #ocaml
noob has joined #ocaml
Illocution has joined #ocaml
dwmw2_gone has joined #ocaml
szell has joined #ocaml
Sapan has joined #ocaml
l_a_m has joined #ocaml
__suri has joined #ocaml
romanoffi has joined #ocaml
flux has joined #ocaml
sgnb has joined #ocaml
mattam has joined #ocaml
fremo has joined #ocaml
Mr_Awesome has joined #ocaml
Morphous has joined #ocaml
jdev has joined #ocaml
jdavis_ has joined #ocaml
uuuppz has joined #ocaml
pango has joined #ocaml
prince has joined #ocaml
hcarty has joined #ocaml
smimou has joined #ocaml
huh_ has joined #ocaml
acatout has joined #ocaml
ppsmimou has joined #ocaml
TaXules has joined #ocaml
tsuyoshi has joined #ocaml
unfo- has joined #ocaml
uuuppz has quit [brown.freenode.net irc.freenode.net]
letrec has quit [brown.freenode.net irc.freenode.net]
guyzmo has quit [brown.freenode.net irc.freenode.net]
jdavis_ has quit [brown.freenode.net irc.freenode.net]
pattern has quit [brown.freenode.net irc.freenode.net]
letrec has joined #ocaml
pattern has joined #ocaml
guyzmo has joined #ocaml
uuuppz has joined #ocaml
jdavis_ has joined #ocaml
<flux> I suppose the CPS style is suitable for this case anyway, because I could see one using that approach with this lib
guyzmo has quit [Read error: 104 (Connection reset by peer)]
guyzmo has joined #ocaml
filp has joined #ocaml
seafood_ has joined #ocaml
olleolleolle has quit []
mfp has joined #ocaml
Snrrrub has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
naufraghi has joined #ocaml
naufraghi has quit [Client Quit]
thermoplyae has quit ["daddy's in space"]
naufraghi has joined #ocaml
hordf has joined #ocaml
filp has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]
munga has joined #ocaml
dwmw2_gone is now known as dwmw2
jsk has quit ["Leaving."]
naufraghi has left #ocaml []
letrec has quit []
Linktim has joined #ocaml
OChameau has joined #ocaml
ttamttam has left #ocaml []
Linktim_ has joined #ocaml
Linktim- has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
Linktim- has quit [Read error: 110 (Connection timed out)]
gaja has joined #ocaml
ygrek has joined #ocaml
fixnum has joined #ocaml
goalieca has quit ["keep your stick on the ice"]
letrec has joined #ocaml
seafood_ has quit []
jlouis_ has joined #ocaml
ahf has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
bongy has joined #ocaml
haraldk has joined #ocaml
<haraldk> Is there a standard library function equivalent to python's "range" function?
<petchema> I don't know python, but probably not
<haraldk> OK, thanks
<haraldk> easy to roll my own, I just don't like to do it if I don't have to :-)
<petchema> it's easy to do something not idiomatic that will have poor performance, yes
<haraldk> in this case it's more than enough
<Smerdyakov> haraldk, it's a red flag that you want one.
<Smerdyakov> haraldk, you probably really want a higher-order functions that calls an argument function with every element of your hypothetical list.
<haraldk> well, maybe
<haraldk> I really just want to do like [1..10] @ [2..5]
<Smerdyakov> And then your program prints the resulting list and exits?
<haraldk> um, sorry, that's not exactly what I needed
<haraldk> more like the cross product of the lists
<Smerdyakov> You're saying you really want to do something, without saying what you're trying to achieve.
<haraldk> Smerdyakov: Not quite that simple,
<Smerdyakov> You can write a higher-order function that calls its argument function with every pair of integers drawn from the appropriate ranges.
<haraldk> I'm writing some small practice program to recall Ocaml, since I'm supposed to document/mantain a small ocaml program
<haraldk> I've mostly done Haskell...
<Smerdyakov> And this is said by way of an excuse for discarding my suggestion?
<haraldk> no, no, do not take offense. I just want to do something like [(x,y) | x <- [1,2,3], y <- ['a','b','c']] in Haskell
<bluestorm> haraldk:
<bluestorm> there is Array.init
<bluestorm> wich often can provide the same services
<haraldk> bluestorm: Thanks, that looks like just the thing
<haraldk> no need for me to think in terms of lists in the first place
<bluestorm> (at the array level you've maps and folds, if you need filter you can use Array.to_list)
<Smerdyakov> haraldk, and I was telling you how to do that. Maybe my explanation wasn't clear enough.
mfp has quit [Read error: 104 (Connection reset by peer)]
ben__ has joined #ocaml
ben__ is now known as ziph
mfp has joined #ocaml
musically_ut has quit [Remote closed the connection]
TheLittlePrince has joined #ocaml
musically_ut has joined #ocaml
Sapan has quit [Read error: 110 (Connection timed out)]
LordMetroid has joined #ocaml
fixnum has quit ["Leaving"]
ecc has joined #ocaml
bongy has quit ["Leaving"]
rwmjones has quit [Remote closed the connection]
Shunafyr2 has joined #ocaml
haraldk has quit ["Harald har logget ut"]
TheLittlePrince has quit [Client Quit]
TheLittlePrince has joined #ocaml
uuuppz has quit [Read error: 113 (No route to host)]
sergez has joined #ocaml
sergez has quit [Read error: 104 (Connection reset by peer)]
sergez has joined #ocaml
sergez is now known as skatz
rwmjones has joined #ocaml
<flux> I wonder why there are Sys.sigxxx values instead of a sum type.. the numbers they give still need to be converted to the actual signal numbers anyway.
hordf has quit ["Bye"]
mfp has quit [Read error: 104 (Connection reset by peer)]
delamarche has joined #ocaml
<bluestorm> flux: the conversion might be easier than with variants
<flux> I dunno, it's a table lookup
<flux> except the reverse is a linear search :)
<thelema> I guess the interface is designed to allow catching signals that don't have names
rwmjones has quit ["Closed connection"]
<flux> there could always be SigUnknown of abstract type and signumber_of_sig or something
<flux> I find it more troublesome that Unix.kill takes two integer arguments :)
rwmjones has joined #ocaml
<flux> and for example it's not very helpful to output those signals to user, who needs to dig into caml sources to find the relationship..
<flux> it's difficult to write code handling unnamed signals anyway, if you don't know how they map to "real world" signals
skatz has quit [Read error: 110 (Connection timed out)]
<thelema> ah, that's why... the sig numbers are all negative. It'd need to sig_to_int function to wrap the call anyway.
<flux> it would make a lot more sense if the integers were the same as they are in the surrounding operating system
<flux> there must be some reason for that approach..
bongy has joined #ocaml
mfp has joined #ocaml
<thelema> I expect the current approach was the simplest thing that could possibly work, and hasn't proved in need of replacement.
AxleLonghorn has joined #ocaml
<thelema> too much boilerplate code in a variant type
postalchris has joined #ocaml
<flux> hm, ocaml-ev has 11% (!) overhead over using raw C in a case where the handler is always activated after a loop, but if one takes system call overhead into account, it drops into 3%
<bluestorm> sounds great
<bluestorm> was the (!) meaning "a lot" ?
<flux> well, I was hoping less..
<flux> but I suppose 11% is reasonable, for a program that does nothing intelligent
oliver_ has joined #ocaml
oliver_ has quit [Client Quit]
<flux> program being: let l = Ev.default_loop [] in let count = ref 0 in let output_io = Ev.io_init Unix.stdout [Ev.WRITE] (fun io evs -> incr count; if !count = 10000000 then Ev.stop io ) in Ev.start l output_io; Ev.loop l []; (I guess you can decipher that even without documentation)
<bluestorm> is the eventlib time a big part of the total time in the general use case ?
<flux> doubtful
<bluestorm> i'd say it isn't, but i have never used such things so :p
<flux> perhaps in some rare applications
oliver_ has joined #ocaml
oliver_ is now known as oriba
<flux> I'm not sure if the main reason for wanting to use libev would be just for its performance though.. it handles everything in a consistent fashion, has nice features that can be annoying to write - such as system time leap -safe timers, consistent periodic timers based on wall-clock time, signal handling, child status and file status change tracking, and with the cvs version you can send asynchronous messages to the main loop, which I think not many ...
<flux> ... other systems have (you need to kludge with pipes or signals)
<flux> huh, what just happened?
<flux> I couldn't possibly have hit arrow up and enter by accident :-)
<flux> (did it come twice?)
<bluestorm> i don't think so
<flux> strange, I'm seeing it twice
<bluestorm> maybe your client splitted a too-long-message
<bluestorm> (maybe he does split correctly, but fails to render it :p )
<bluestorm> anyway
<bluestorm> i've had a quick look at the libev website when you began talking of it on the chan
<bluestorm> there is a benchmark section where they compare to gnu libevent
<bluestorm> and their supposed speedup is much more than 11%
<flux> well, a good performance is always a plus
<bluestorm> so i think 11% over them is still "fast" for applications were it matters
<flux> libevent interface is also a bit strange
<flux> it has file io and timer system bundled together
<flux> I hope ocaml-ev will give a fully safe interface to libev - it's not there yet, though. for instance one isn't supposed to _set active event watchers.
<bluestorm> hm
<bluestorm> something I kinda dislike to do, when doing graphics programming, is to regulate the framerate and so on
<bluestorm> can an event lib help me with that ?
<letrec> Hello.. I'd like to write a function that returns 2 values. Is using a tuple the only way?
<flux> (it will cost some runtime, but at this point I feel it is better to get errors from a big networked program early rather than late)
<flux> bluestorm, I think it can provide millisecond-precision timers
<bluestorm> (the easier solution i've found so far is while Unix.the_precise_time_function < !next_frame do done; , wich is very ugly )
<flux> which I suppose is worse than select :-)
<flux> libev has periodic timers
<bluestorm> letrec: using a tuple is the good way
<flux> and it claims to have good long term stability with them, however I'm not sure about the short term-
<flux> ocmal-ev's torture1.ml runs a few timers in parallel, perhaps that will give a hint on the jitter
<bluestorm> i guess that granularity of such things is quickly limited by the kernel
<bluestorm> (on an usual not-too-realtime desktop kernel)
<flux> with 60fps a frame is 16 ms
<flux> perhaps for exact frame rates one would like to use some operator-specific real time facilities, such as linux' /dev/rtc
<bluestorm> 16 ms should be reasonable, i guess Linux kernels use usually 100 to 1000 Hz timers
<bluestorm> but i wouldn't try, say, 3ms and hope for something "periodic"
oriba has quit ["Verlassend"]
<flux> bluestorm, I suppose it could be tested
<flux> request for n ms period, log actual wall clock times
pango has quit [Remote closed the connection]
<flux> bluestorm, it is infact quite accurate at 16ms.. variance is 0.000000 :-o (or there's a bug ;-))
<bluestorm> :p
AxleLonghorn has left #ocaml []
postalchris has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
Waleee has joined #ocaml
delamarche has quit [Read error: 104 (Connection reset by peer)]
Morphous_ has joined #ocaml
jonathanv is now known as jonafan
Morphous has quit [Read error: 110 (Connection timed out)]
jonathanv has joined #ocaml
Waleee has quit [brown.freenode.net irc.freenode.net]
hkBst has quit [brown.freenode.net irc.freenode.net]
jonafan has quit [brown.freenode.net irc.freenode.net]
bla has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
Waleee has joined #ocaml
hkBst_ has joined #ocaml
hkBst has joined #ocaml
jonafan has joined #ocaml
bla has joined #ocaml
ertai has joined #ocaml
hkBst has quit [SendQ exceeded]
jonafan has quit [Nick collision from services.]
jonathanv is now known as jonafan
jlouis_ has quit [brown.freenode.net irc.freenode.net]
jdavis_ has quit [brown.freenode.net irc.freenode.net]
pattern has quit [brown.freenode.net irc.freenode.net]
jlouis has joined #ocaml
Morphous_ has quit [brown.freenode.net irc.freenode.net]
LordMetroid has quit [brown.freenode.net irc.freenode.net]
ziph has quit [brown.freenode.net irc.freenode.net]
Snrrrub has quit [brown.freenode.net irc.freenode.net]
unfo- has quit [brown.freenode.net irc.freenode.net]
Smerdyakov has quit [brown.freenode.net irc.freenode.net]
petchema has quit [brown.freenode.net irc.freenode.net]
morner has quit [brown.freenode.net irc.freenode.net]
Oatschool has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
ozzloy has quit [brown.freenode.net irc.freenode.net]
bluestorm has quit [brown.freenode.net irc.freenode.net]
orbitz has quit [brown.freenode.net irc.freenode.net]
Waleee has quit [brown.freenode.net irc.freenode.net]
TheLittlePrince has quit [brown.freenode.net irc.freenode.net]
musically_ut has quit [brown.freenode.net irc.freenode.net]
munga has quit [brown.freenode.net irc.freenode.net]
mattam has quit [brown.freenode.net irc.freenode.net]
Mr_Awesome has quit [brown.freenode.net irc.freenode.net]
fremo has quit [brown.freenode.net irc.freenode.net]
jdev has quit [brown.freenode.net irc.freenode.net]
flux has quit [brown.freenode.net irc.freenode.net]
ecc has quit [brown.freenode.net irc.freenode.net]
romanoffi has quit [brown.freenode.net irc.freenode.net]
svenl has quit [brown.freenode.net irc.freenode.net]
szell has quit [brown.freenode.net irc.freenode.net]
__suri has quit [brown.freenode.net irc.freenode.net]
dwmw2 has quit [brown.freenode.net irc.freenode.net]
Illocution has quit [brown.freenode.net irc.freenode.net]
Ugarte has quit [brown.freenode.net irc.freenode.net]
noob has quit [brown.freenode.net irc.freenode.net]
zmdkrbou has quit [brown.freenode.net irc.freenode.net]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
jonafan has quit [brown.freenode.net irc.freenode.net]
mfp has quit [brown.freenode.net irc.freenode.net]
rwmjones has quit [brown.freenode.net irc.freenode.net]
katz has quit [brown.freenode.net irc.freenode.net]
thelema has quit [brown.freenode.net irc.freenode.net]
seafood has quit [brown.freenode.net irc.freenode.net]
Dazhbog has quit [brown.freenode.net irc.freenode.net]
awesame has quit [brown.freenode.net irc.freenode.net]
netx has quit [brown.freenode.net irc.freenode.net]
coucou747 has quit [brown.freenode.net irc.freenode.net]
mbishop has quit [brown.freenode.net irc.freenode.net]
l_a_m has quit [brown.freenode.net irc.freenode.net]
sgnb has quit [brown.freenode.net irc.freenode.net]
qwr has quit [brown.freenode.net irc.freenode.net]
gim has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
bla has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
hkBst_ has quit [brown.freenode.net irc.freenode.net]
pango has quit [brown.freenode.net irc.freenode.net]
Shunafyr2 has quit [brown.freenode.net irc.freenode.net]
TaXules has quit [brown.freenode.net irc.freenode.net]
hcarty has quit [brown.freenode.net irc.freenode.net]
cygnus__ has quit [brown.freenode.net irc.freenode.net]
acatout has quit [brown.freenode.net irc.freenode.net]
prince has quit [brown.freenode.net irc.freenode.net]
bebui has quit [brown.freenode.net irc.freenode.net]
jlouis has quit [brown.freenode.net irc.freenode.net]
bongy has quit [brown.freenode.net irc.freenode.net]
letrec has quit [brown.freenode.net irc.freenode.net]
ygrek has quit [brown.freenode.net irc.freenode.net]
gaja has quit [brown.freenode.net irc.freenode.net]
tsuyoshi has quit [brown.freenode.net irc.freenode.net]
ppsmimou has quit [brown.freenode.net irc.freenode.net]
huh_ has quit [brown.freenode.net irc.freenode.net]
smimou has quit [brown.freenode.net irc.freenode.net]
ahf has quit [SendQ exceeded]
guyzmo has quit [Connection reset by peer]
RobertFischer has joined #ocaml
marmottine has joined #ocaml
jdavis_ has joined #ocaml
pattern has joined #ocaml
jlouis_ has joined #ocaml
jlouis has joined #ocaml
ertai has joined #ocaml
bla has joined #ocaml
hkBst_ has joined #ocaml
Waleee has joined #ocaml
jonafan has joined #ocaml
Morphous_ has joined #ocaml
pango has joined #ocaml
mfp has joined #ocaml
bongy has joined #ocaml
rwmjones has joined #ocaml
TheLittlePrince has joined #ocaml
Shunafyr2 has joined #ocaml
ecc has joined #ocaml
LordMetroid has joined #ocaml
musically_ut has joined #ocaml
ziph has joined #ocaml
letrec has joined #ocaml
ygrek has joined #ocaml
gaja has joined #ocaml
munga has joined #ocaml
Snrrrub has joined #ocaml
unfo- has joined #ocaml
bluestorm has joined #ocaml
netx has joined #ocaml
seafood has joined #ocaml
ulfdoz has joined #ocaml
mbishop has joined #ocaml
awesame has joined #ocaml
thelema has joined #ocaml
coucou747 has joined #ocaml
Dazhbog has joined #ocaml
katz has joined #ocaml
ozzloy has joined #ocaml
zmdkrbou has joined #ocaml
morner has joined #ocaml
Oatschool has joined #ocaml
orbitz has joined #ocaml
petchema has joined #ocaml
Smerdyakov has joined #ocaml
cmeme has joined #ocaml
bebui has joined #ocaml
cygnus__ has joined #ocaml
gim has joined #ocaml
qwr has joined #ocaml
Ugarte has joined #ocaml
svenl has joined #ocaml
Hadaka has joined #ocaml
noob has joined #ocaml
Illocution has joined #ocaml
dwmw2 has joined #ocaml
szell has joined #ocaml
l_a_m has joined #ocaml
__suri has joined #ocaml
romanoffi has joined #ocaml
flux has joined #ocaml
sgnb has joined #ocaml
mattam has joined #ocaml
fremo has joined #ocaml
Mr_Awesome has joined #ocaml
jdev has joined #ocaml
prince has joined #ocaml
hcarty has joined #ocaml
smimou has joined #ocaml
huh_ has joined #ocaml
acatout has joined #ocaml
ppsmimou has joined #ocaml
TaXules has joined #ocaml
tsuyoshi has joined #ocaml
guyzmo_ has joined #ocaml
gunark has joined #ocaml
<sgnb> hcarty: private doesn't make sense inside struc...
jlouis_ has quit [Connection timed out]
<sgnb> I would say no
<hcarty> I'm just looking for the "can't create value..." outside of module functions
<hcarty> The module is quite large and I am hoping to not have to maintain the interface/signature by hand
<hcarty> It looks like the simplest work around is something like
<hcarty> module Foo = struct module Test : sig type t = private A val a : t end = struct type t = A let a = A end include Test end;;
<hcarty> Which is not particularly attractive or elegant, but may be what I am stuck with. Unless there is a way to provide a partial signature which only constrains a few types and values. But that does not seem to be possible either.
<flux> partial signatures could be nice to have, infact
sgnb has quit [Read error: 104 (Connection reset by peer)]
<flux> something that says "type t = copy from the struct part"
sgnb has joined #ocaml
<hcarty> I would like something along the lines of sig type t ... end = struct type t = float let foo = (rest of module here) end
<hcarty> With the only effect being that type t is made abstract. The rest of the module still gets exported
<hcarty> This may be possible with camlp4, but if so it's far beyond my experience with it
<bluestorm> hm
<flux> bluestorm feels his camlp4 urges raising?-)
<bluestorm> you can't (reasonably) generate a whole module signature from camlp4
<flux> (rising)
<bluestorm> but if your work around is reasonably local
<flux> good point. something that has type information would be required.
<bluestorm> it may be possible to translate a form of your choice into that workaround
<hcarty> This is where I find OCaml's objects appealing
RobertFischer has quit [Read error: 110 (Connection timed out)]
<bluestorm> hm
<hcarty> bluestorm: Yes, that's what I'm thinking of using now
<bluestorm> yes, it's only your code, indented
<bluestorm> (i really can't read ML-modules IRC one-liners)
TheLittlePrince has quit [Client Quit]
<hcarty> It was copied and pasted from the toplevel, and there edited repeatedly
RobertFischer has joined #ocaml
<bluestorm> i might be able to make you a little camlp4 extension to generate that kind of code
<bluestorm> but i'd like to be able to understand it first :p
<hcarty> bluestorm: Thank you very much for the offer - I would happily use it
<flux> I too wonder what's the point of that piece of code.. surely you would really use something more complicated?
<hcarty> flux: Yes, definitely
<hcarty> The real module has a large number of automatically generated functions (C library binding) along with some higher level hand written functions
<hcarty> I would like to restrict a part of the interface (file I/O for a specific file type) so that a valid interface can only be generated by a Module.open_file function
<hcarty> http://ocaml.pastewith.us/36 - This is a short piece of code, implemented using the method we are discussing
<bluestorm> hcarty: would a syntaxic extension that would *not* try to infer any signature from structure items still be useful ?
<hcarty> bluestorm: Yes, definitely
<bluestorm> hm
<bluestorm> given that you'd have to provide the signature and the structure, the syntaxic overhead of the non-camlp4 solution is the module + include, and eventually the sig/end struct/end
<bluestorm> that does not seems that much, but if it burdens you or you plan to use it a lot or whatever, and you've got an idea of local non-ambiguous replacement, i can try to do that :p
<hcarty> That seems accurate. And I am not sure of the best syntax or if it is worth it :-)
<bluestorm> hcarty: private type interface = ... with sig ... end : struct ... end ?
<hcarty> bluestorm: That looks good
jderque has joined #ocaml
munga has quit ["Leaving"]
postalchris has joined #ocaml
noob has quit []
ziph has quit []
Linktim has joined #ocaml
OChameau has quit [Read error: 113 (No route to host)]
Yoric[DT] has joined #ocaml
Linktim_ has joined #ocaml
<Yoric[DT]> hi
bongy has quit ["Leaving"]
<bluestorm> haha, interesting
<bluestorm> the code outputted by camlp4 after the transformation is syntaxically incorrect :)
<bluestorm> (but the "ocamlc -pp ..." works, as i guess it's an Ast-to-ast translation)
<bluestorm> i have one concern though
<bluestorm> in that case it seems it makes more sense to put the signature first
<bluestorm> but it's again the general convention of ocaml
<bluestorm> i'm not sure i should not use (module_expression : module_signature) instead
<letrec> Hi again.. I've got the error: This expression has type [> `Seq of int * int] but is here used with type [> `Seq of 'a * 'a] as 'a.
<bluestorm> actually hcarty you could do the change yourself, by just exchanging position at line 72 : "with"; mt = module_type; ":"; me = module_expr -> ... (but still i'd be interested in your opinion)
<letrec> Why `Seq (1,2) doesn't match [> `Seq of 'a * 'a] as 'a ? I guess that's because the "as 'a" is there?
<bluestorm> it would be as 'b
<bluestorm> as the 'a should be the same as the ones in the tuple, wich is obviously not the case
Linktim- has joined #ocaml
<bluestorm> hm
<bluestorm> during the impl. of that extension, i ran into something that looks like a camlp4 bug
<bluestorm> i'll upgrade to 10.2 before any complains, though :p
Linktim has quit [Read error: 110 (Connection timed out)]
<bluestorm> letrec: does ocaml inferred something like ... of 'a * 'a ] as 'a itself ?
<bluestorm> arg.
<bluestorm> -red
<flux> letrec, do you have an actual example? maybe ocaml is expecting a more general type than what you provide..
<letrec> bluestorm: yes, and I don't see why..
<letrec> I'll try to paste the code snippet here. Very short
<bluestorm> letrec: to you have hairy recursive functions ?
<bluestorm> hm
<letrec> What does hairy recursive stand for?
<bluestorm> seems 3.10.2 isn't in godi right now
<bluestorm> have anyone an idea of the expected package arrival date ?
<bluestorm> *has
<flux> 3.10.2 is out? topic doesn't reflect that ;)
<bluestorm> hm
<bluestorm> actually the topic reflects that the (featuring ..) was not updated some time :p
<letrec> let rec isseq s = match s with `Seq (a,b) -> begin match a with `Seq (_,_) -> false | _ -> isseq a && isseq b end | _ -> true
<flux> the debian excercise about upgrading ocamlc does make one think if binary compatibility should be given more effort..
<letrec> Here is the code. And I'm trying to evaluate isseq (`Seq (1,2))
<flux> nice getting hundred(s?) packaged upgraded due to one dependency being upgraded
<bluestorm> letrec: the problem is that the inferred type for `Seq (a, b) and a are the same
<flux> and ocamlc is a dependency for everything
<bluestorm> flux: on the other hand
<bluestorm> new versions do not happen *so* often
<flux> bluestorm, and they really cannot happen :-)
ttamttam has joined #ocaml
<bluestorm> i mean, rebuilding the debian ocaml packages is probably around tenth of the work that _every_ gentoo user do at each upgrade
<bluestorm> hm
<flux> I'd be pretty unpleased if libc upgrades meant I'd need to upgrade everything. fortunately (?) not everything is written in ocaml yet.
<bluestorm> you must have said that the actual debian package names of the other packages changed as well ?
<flux> hm, s/un/dis/
<bluestorm> hm
<bluestorm> i overlooked that point :p
<flux> of course, binaries don't need to upgraded, as ocaml-stuff is statically linked in, so it's not really that bad
<flux> so it's mostly a developer issue
<flux> and the wasted disk space is reduced by the fact that, well, not everything is written in ocaml.. yet! ;-)
Linktim_ has quit [Read error: 110 (Connection timed out)]
evn has joined #ocaml
<letrec> bluestorm: I don't really understand. Why does the following not compile: let rec isseq s = match s with (i : int) -> true | `Seq (a,b) -> begin match a with `Seq (_,_) -> false | _ -> isseq a && isseq b end | _ -> true
<letrec> Thanks!
TheLittlePrince has joined #ocaml
<bluestorm> hhm
<bluestorm> letrec: there is a contradiction
<bluestorm> for that to compile, s would have to type both int and [> `Seq ... ]
<bluestorm> (i : int) is not a type-level pattern
<letrec> Oh, ok, so I should use a constructor for i ?
<bluestorm> i mean, you can't have matching cases matching on _different_ types
<bluestorm> letrec: i think that you would have to make the recursion at the type level explicit
Linktim- has quit [Read error: 110 (Connection timed out)]
<bluestorm> | `Seq (a, b) -> .. | `Value i -> ...
<bluestorm> (are polymorphic variants necessary for your tak ?)
<bluestorm> *task
<letrec> bluestorm: yes, of course, I'm stupid, I need the `Value ctor. Thanks a lot.
<letrec> PS: polymorphic variants are not necessary but I'm lazy, and I don't want to maintain big type hierachies.
<bluestorm> hmm
<bluestorm> i'd strongly advise you to use regular sum types instead
<bluestorm> polymorphic variants can be *very* tricky
<bluestorm> and the big hierarchies are *generally* a good thing on the long run
<bluestorm> polymorphic were intended for very specific uses, "lazyness" not being one of them
<letrec> Right, but updating all pattern matching stuff when one adds a element in the type sum is a killer.
<letrec> I understand :)
<bluestorm> hm
<bluestorm> don't you have to update them with polymorphic variants too ?
<bluestorm> (orelse you'd have a match failure at runtime, wich is not that great)
<bluestorm> (but i don't think the variants type system would allow that)
<letrec> No need, because some part of my graphs will only use a part of the type (say, expressions). I don't want to update these functions when I add a statement type for instance. But I'll consider you advice. I may be indeed wrong here.
<bluestorm> hm
<bluestorm> you may want to do
<bluestorm> type program = Expr of expr | Stat of statement;;
<bluestorm> and then handle both separately
<letrec> Yes, I could also do that.. I'll think about it. Thanks.
delamarche has joined #ocaml
postalchris has quit [Connection timed out]
TheLittlePrince has quit [Remote closed the connection]
<RobertFischer> Anyone know if JoCaml is being maintained anymore, or was it just a flash in the pan?
<RobertFischer> (Again.)
<evn> isn't it an inria project?
<hcarty> bluestorm: Thanks, I will give the extension a try soon
<hcarty> RobertFischer: There is occasional noise on the list, but it is hard to tell which, if any, of JoCaml, CamlP3l, coThreads or OCamlMPI are worth following
<hcarty> "the list" being the JoCaml mailing list
<RobertFischer> I just posted out to the JoCaml mailing list, but haven't gotten a response.
<RobertFischer> Do any of those four offer "code mobility" like we were talking about yesterday?
<Yoric[DT]> None, I believe.
<RobertFischer> Damn.
<RobertFischer> I've been looking into other languages, and they've promised some stuff, but it tends to boil down to "If you have the same codebase in two places, and you do a bunch of work to register calls, then you can pass non-functional data around and make calls and it's almost like you're passing functions."
<RobertFischer> But, from a system administration standpoint, that way leads to madness.
ofaurax has joined #ocaml
<RobertFischer> The closest I've seen to what I'm looking for is Factor.
<RobertFischer> What's the big hurdle to implementing code mobility on a language with a VM?
<bluestorm> hm
<RobertFischer> bluestorm: My position exactly.
<bluestorm> i was thinking of MetaOCaml
<RobertFischer> MetaOCaml?
<bluestorm> i don't know meta-programming actually, so i must be wrong
ttamttam has left #ocaml []
<bluestorm> but i thought they were able to represent "pieces of code" at the value level
<bluestorm> would that not make something like "code mobility" possible ?
<RobertFischer> You'd think.
<RobertFischer> I'm assuming there's something I'm missing.
<RobertFischer> It's apparently a hard problem.
<bluestorm> (however, the representation is certainly quite low-level, and may not be happy with another computer)
<RobertFischer> But it seems like all you're doing is a stunt similar to Java's remote classloading -- you're basically sending the application image across the wire. That should be fine, assuming you have the same architecture -- and running on the same version of the VM counts as having the same architecture.
<RobertFischer> So I'm really curious why this is so hard. And if it's just a matter of putting in the elbow grease, I'm volunteering to do it.
<bluestorm> hm
<hcarty> RobertFischer: I have not seen your post to the JoCaml list yet - perhaps the list is moderated?
<bluestorm> a friend of mine would say "just use list : code is data"
<bluestorm> ...
<bluestorm> *lisp
<RobertFischer> Oh, wait.
<RobertFischer> I did get a resonse.
<RobertFischer> From Luc Maranget.
<RobertFischer> "It would take important implementation work. This would also almost certainly distroy binary compatibility with OCaml.
<RobertFischer> You should also consider that OCaml has no Just In Time compilation, as a result code mobility would probably be restricted to bytecode."
<RobertFischer> "However, it is possible (bytecode only) to perform some restricted
<RobertFischer> code mobility by using the Dynlink module. Basically, jocaml runtime can
<RobertFischer> receive a .cmo or a .cma as an ordinary message, save it to a file,
<RobertFischer> and then dynamically link with it."
<RobertFischer> Which is actually an A+ solution for what I'm trying to do.
<hcarty> Hopefully JoCaml will have/gain enough momentum to keep going
<bluestorm> were they not hiring lately ?
<Yoric[DT]> Yeah, a post-doc.
<RobertFischer> I'd really like to see it gain a full head of steam.
postalchris has joined #ocaml
<Yoric[DT]> RobertFischer: have you looked at Acute ?
<Yoric[DT]> I haven't tried it yet, but it might help you.
jderque has quit ["leaving"]
<RobertFischer> Yoric[DT]: No, I haven't heard of it, but I'll check it out. What makes you think it might help me?
ita has joined #ocaml
<RobertFischer> Anything which advertises "thread thunkification" as part of its features is fine by me.
Walee has joined #ocaml
dwmw2 is now known as dwmw2_gone
|Catch22| has joined #ocaml
Demitar has joined #ocaml
Waleee has quit [Read error: 110 (Connection timed out)]
thermoplyae has joined #ocaml
middayc has joined #ocaml
bluestorm_ has joined #ocaml
bluestorm has quit [Read error: 104 (Connection reset by peer)]
RobertFischer has left #ocaml []
<jlouis> Why this sudden interest in multi-threading all of a sudden?
goalieca has joined #ocaml
<bluestorm_> jlouis: because the crappy computers are sold with multicores all of a sudden ?
seafood_ has joined #ocaml
lordmetroid_ has joined #ocaml
<hcarty> Does anyone here know of a nice, clean method of splitting a list (or array) of integers to consecutive runs? Taking [1;2;3;8;9;10;15;16] and returning [1;2;3] [8;9;10] [15;16]
<hcarty> The code I have now is http://ocaml.pastewith.us/37 but it seems like there should be a cleaner way
<hcarty> Google has not provided much help, though I may be searching for the wrong thing(s)
<thelema> hcarty: do you want [1;2;3;2;1] to come out as one run?
<hcarty> thelema: That would be ok, but in this case it is safe to assume the list is pre-sorted from smallest to largest
<hcarty> The numbers I am splitting are array indices
<hcarty> thelema: I take that back
<hcarty> A given run will be sorted from smallest to largest
<hcarty> But the entire input list may not be
<hcarty> So [15;16;1;2;3] is a possible input
<thelema> small lists? i.e. < 1000 elements?
<hcarty> But each element should be unique
<hcarty> On the order of 10000
<hcarty> I do not get any stack overflows with the code I have, and I don't think it is tail recursive
<thelema> hmm... small runs? <1000 elements in a run?
<hcarty> The list will be split in to 2 or 3 runs, of approximately equal size
LordMetroid has quit [Nick collision from services.]
lordmetroid_ is now known as LordMetroid
<thelema> ok
* jonafan ice beam
pango has quit [Excess Flood]
<flux> does the adjacency test need to be in a function?
<bluestorm_> hcarty: first try : http://ocaml.pastewith.us/38
<hcarty> flux: No
pango has joined #ocaml
<flux> now, let's compare!
<thelema> my solution seems isomorphic to bluestorms (modulo accumulator on inside loop
<thelema> flux: I don't believe your solution solves the same problem as ours
ita has quit ["Hasta luego!"]
<flux> oh
<flux> how so?
* thelema tries it...
<thelema> it does seem to work. Now I still need to figure out how...
* thelema doesn't like the combine function
<flux> it has two accumulator buffers, so perhaps it's too much complexity for one function
marmottine has quit ["Quitte"]
<thelema> too much complexity for my little brain.
<flux> seq collects integers on a run and result collects whole sequences
<thelema> why "combine seq result
<thelema> "? Why not seq :: result?
<flux> you don't want empty lists put into the result list
<thelema> that could happen?
<bluestorm_> hm
<flux> well, actually, maybe that's not a good way to ensure it, because it can only happen in the beginning
<thelema> I guess your initial seq comes in empty...
<bluestorm_> i've done a intermediate try : http://ocaml.pastewith.us/41
<bluestorm_> more tail-rec that the last one, by a bit less cluttered than thelema's :-'
<bluestorm_> let's look at flux mind-blobbing code
<flux> that paste 41 is quite short and simple
* thelema typed his code into the pastewith box -- will not do so again...
<hcarty> Thank you all - this is both helpful and interesting on its own
<flux> I've got firefox extension "It's All Text" - it adds an "edit" button below text edit boxes, which opens your favorite editor
<flux> in this case, XEmacs
<bluestorm_> i've got Xorg extension "mouse3-to-paste-text-from-emacs" :-'
<thelema> bluestorm_: nice use of neighborhood to get rid of the double accumulator for the current list
<hcarty> Each of them seems to work. 41 is particularly short and sweet, while avoiding the warnings of the "Highly naive" solution
<bluestorm_> hcarty: ... but you can use one of my syntax extension to make the warning go away :-'
<bluestorm_> (or a match ... | [] -> assert false of course)
StoneNote has joined #ocaml
<bluestorm_> let refutable hd::tl = ... in
<hcarty> bluestorm_: Oh, very nice
<bluestorm_> (camlp4 extensions deserve self-promotion :-')
<hcarty> Do you have a list of your extensions somewhere?
RobertFischer has joined #ocaml
<bluestorm_> hm
<bluestorm_> but i could get a decent page someday
<flux> yeah. like list.somethingwritteninocaml, for instance!
<bluestorm_> something on the new caml site, with Yoric[DT]'s extension too and what not, and a big "OSR" banner, and people arguing on the mailing list
<bluestorm_> would be greate
<bluestorm_> -e
<Yoric[DT]> er....
<flux> off to sleep. good night/morning.
* Yoric[DT] could create an camlp4 extension for auto-arguing on the mailing-list.
<Yoric[DT]> night
<hcarty> Yoric[DT]: I think putting OSR in a subject line does that already...
<Yoric[DT]> That was my hidden optimization.
<hcarty> flux: Good night
<bluestorm_> Yoric[DT]: actually i do think that one utility of the forge would be to get a list of decent (or not) camlp4 extension in a common gircs/dat repository, and ensuring they approximately follow the same conventions, and can be used together
<bluestorm_> because promoting my own extensions is fun indeed, but criticizing the other ones would be much better
<RobertFischer> It'd be nice if we could start having projects/p4 extensions with non-negligable mindshare out there, too.
<RobertFischer> With the exception of extlib and ocamlnet, it seems like it's hard for projects to get traction in Ocaml.
<RobertFischer> Particularly compared to something like Java or Perl.
postalchris has quit [Read error: 110 (Connection timed out)]
<bluestorm_> the last Ocaml Summer Project being a particularily representative example
<hcarty> A CPAN-like tool would likely help somewhat, but community feelings seem mixed
<evn> is GODI not enough?
<hcarty> bluestorm_: Thank you, paste 41 is now in place and attributed
<hcarty> evn: GODI is in the right direction
<RobertFischer> Is there a nice web index for GODI?
<hcarty> But CPAN working regardless of initial installation method
<hcarty> I can install a Perl package from CPAN in (almost) the same way, regardless of if I installed from a binary package or source
<evn> well that's cause all perl is source :p
<RobertFischer> I've found that GODI works great as long as you already know what you want to access. But if you're trying to find a library to solve a particular problem, or if you're just curious to see what peoples' code look like, it's not so hot.
<evn> yeah its difficult to browse
<hcarty> evn: True, but that holds for libs which use C as well
<evn> yeah cause of the static linking issue :/
<evn> er however you describe it
* RobertFischer is CHIA on CPAN (in the interests of full disclosure).
<hcarty> "that holds" meaning that CPAN can install packages which require compiled code as well
<bluestorm_> hm
<bluestorm_> i'm not sure of what ocamlfind actual "installation/removal" capabilities are
<hcarty> I am not on CPAN, but I'm a heavy user. Less so since I found OCaml, but CPAN is still a wonderful resource
<bluestorm_> but as a compilation/use tool, it's quite great
<hcarty> ocamlfind would fit nicely as part of an OCaml CPAN
<hcarty> It can install and uninstall packages by name, and handle loading dependencies
<hcarty> It may work well as a base for downloading and building unmet dependencies, though I don't know how the internals work
<RobertFischer> hcarty: Why wouldn't we use godi for that?
Quaver has joined #ocaml
<RobertFischer> The way I see it, a "COAN" would require about four distinct parts.
<RobertFischer> 1) An ability to store and search ocamldoc for various libraries.
<RobertFischer> 2) An easy way to build the libraries given the results from COAN.
<hcarty> RobertFischer: Because GODI does not (currently) work with non-GODI OCaml installs
<RobertFischer> 3) A way to browse source code for a given library.
<RobertFischer> 4) Some system to audit libraries.
<bluestorm_> audit ?
<RobertFischer> Yeah. You may not realize it, but CPAN requires you to have unit tests for your packages, and it will go through and build your package and run your tests on a variety of different architectures.
<RobertFischer> And if your code doesn't compile or your tests pass, you'll actually drop to the bottom of their search rankings and have all kinds of warnings kicking around.
<RobertFischer> It's part of the reason CPAN is successful -- when you search CPAN, chances are that the code you're going to pull down isn't going to suck.
<hcarty> RobertFischer: 2 and 4 could be met with a standard build wrapper (make or otherwise)
<hcarty> and standard build targets for those points
<RobertFischer> I think that auditting is very important, because it's the difference between a CPAN and a SourceForge.
<RobertFischer> CPAN is authoritative -- canonical, in some kind of sense.
<bluestorm_> because of the integrated quality control
<RobertFischer> SourceForge is a place where people sling code. It may be good, it may be bad, but it's just there.
<bluestorm_> hm
<RobertFischer> And that's got to do with culture and credibility.
<RobertFischer> But, if you start with 1 through 3, we can build 4 in. It's just important to build it in soon. :)
ygrek has quit [Remote closed the connection]
<hcarty> Sylvain Le Gall's server may be able to handle 4 if someone writes the infrastructure
<hcarty> 1 through 3 should require much less server-side infrastructure, at least for a CPAN-like system (if I understand correctly)
<RobertFischer> Some way to register projects, upload the source code, and then generate and index the Ocamldocs.
<RobertFischer> Although, if you want to be cheap, you could always use Google for searching and just dynamically generate a sitemap. :)
<RobertFischer> Then you don't have to think about the problem of searching or indexing.
<RobertFischer> You just tell Google, "Hey, I generated this HTML document over here. Could you index that for me? KTHXBAI"
<RobertFischer> Plus it gets the projects onto Google. :)
<RobertFischer> Looks like you generate URLs like this for your queries: http://www.google.com/search?as_q=ocaml&as_sitesearch=enfranchisedmind.com
<RobertFischer> That gets you all the results for "ocaml" on "enfranchisedmind.com" (my blog's domain).
postalchris has joined #ocaml
<RobertFischer> So, the problems remaining are: 1) creating projects; 2) uploading projects; 3) generating Ocamldoc; 4) generating a sitemap for the projects; 5) providing some easy way for a user to build the libraries they found.
<RobertFischer> And a small website to glue it all together.
<hcarty> I would be happy to work on this as I am able
<RobertFischer> I've got other stuff on my plate, but I'll be happy to act as a test user.
<hcarty> I have no idea how much I'll actually be able to accomplish ... I need to do my prospectus defense this semester. But a side project can be useful.
<Yoric[DT]> Well, goodwill is always welcome.
<Yoric[DT]> I personally would very much like to see this ocamlbuild-meets-wget, it would help us immensely.
<hcarty> I think that, at the start, ocamlfind + make + a META file + a standard naming convention will get things moving
<bluestorm_> i'm impressed by the ease of use of ocamlfind, with already installed projects
<hcarty> + wget
<hcarty> ocamlfind is a very nice tool
<bluestorm_> so i think that any "super-package-manager" should put META files in the end, so that we can use them with ocamlfind no matters where it comes from
<bluestorm_> (GODI, a package, a makefile or whatever)
<hcarty> bluestorm_: I agree. And I think the META files may provide enough information to resolve dependencies as well
ofaurax has quit ["Leaving"]
<hcarty> That is where the naming convention would help
bluestorm_ has quit ["Konversation terminated!"]
Walee has quit []