gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz_ is now known as ulfdoz
mjonsson has quit [Ping timeout: 240 seconds]
mjonsson has joined #ocaml
lopex has quit []
tauntaun has joined #ocaml
tauntaun has left #ocaml []
impy has joined #ocaml
Ppjet6 has joined #ocaml
Ppjet6 has left #ocaml []
vivanov has joined #ocaml
wormphlegm has joined #ocaml
wormphlegm has quit [Quit: leaving]
ymasory has quit [Quit: Leaving]
mjonsson has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 258 seconds]
jderque has joined #ocaml
Yoric has joined #ocaml
cthuluh has quit [Ping timeout: 248 seconds]
BiDOrD_ has quit [Quit: No Ping reply in 180 seconds.]
BiDOrD has joined #ocaml
dnolen has quit [Quit: dnolen]
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
Derander has joined #ocaml
ikaros has joined #ocaml
vivanov has quit [Ping timeout: 260 seconds]
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
Yoric has quit [Quit: Leaving.]
Yoric has joined #ocaml
Yoric_ has joined #ocaml
Yoric_ has quit [Client Quit]
pdhborges has joined #ocaml
Associat0r has joined #ocaml
<iris1> Dear experts, I have run into what I hope is a minor problem. I am trying to use maps and have been successful in doing stuff like "module M = Map.Make (struct type t = ... let compare = ... end);;" However, when I try to use a previously existing module instead of the struct, I get a syntax error. Specifically, the String module defines a type t and a function compare, but when I do "module M = Map.Make String;;", I get "Error: Syntax err
<iris1> What am I doing wrong? Thank you!
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
<jderque> iris1: try "module M = Map.Make(String)"
<pdhborges> Map.Make(String)
edwin has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
eikke has joined #ocaml
ikaros has joined #ocaml
edwin has quit [Remote host closed the connection]
edwin has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
vivanov has joined #ocaml
ikaros has joined #ocaml
douknoukem has joined #ocaml
<douknoukem> hello
<douknoukem> how can i see if a function works on n^2 or n log n
<iris1> jderque, pdhborges: That works! Thank you very much!!
<pdhborges> douknoukem: show us the function
<douknoukem> well i thought there was some kind of operation to do
<douknoukem> something standardized
<pdhborges> the is no magic formula
<douknoukem> i'd like to talk about it in the report
<douknoukem> but i dont want to tlak about hthings i cant handle yet
<douknoukem> talk about things
<pdhborges> douknoukem: this is a tri pivot quicksort, right?
<douknoukem> yes
lopex has joined #ocaml
Pepe__ has joined #ocaml
DOUK has joined #ocaml
douknoukem has quit [Ping timeout: 276 seconds]
Snark has joined #ocaml
lopex has quit [Ping timeout: 240 seconds]
lopex has joined #ocaml
pdhborges has quit [Quit: Leaving.]
Yoric1 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
ikaros has quit [Quit: Leave the magic to Houdini]
oriba has joined #ocaml
Yoric1 has quit [Ping timeout: 260 seconds]
bzzbzz has joined #ocaml
pdhborges has joined #ocaml
pdhborges has quit [Quit: Leaving.]
Pepe__ is now known as Pepe_
pdhborges has joined #ocaml
DimitryKakadu has joined #ocaml
oriba has left #ocaml []
lamawithonel has joined #ocaml
RLa has joined #ocaml
<RLa> how one defines a variant type in ocaml?
<thelema_> RLa: type foo = A | B of int | Cat of float
<RLa> ah, type name starts with non-capital letter
<thelema_> yes, that's important
ftrvxmtrx has quit [Ping timeout: 246 seconds]
impy has quit [Quit: impy]
Anarchos has joined #ocaml
impy has joined #ocaml
impy has quit [Client Quit]
mjonsson has joined #ocaml
ftrvxmtrx has joined #ocaml
<flux> bluestorm seems to really be a driving force in batteries
<flux> makes me ashamed in not contributing more :)
<thelema_> flux: step up, then. :)
<Anarchos> adrien it seems that menhir allow to parametrize parsers with modules
<Anarchos> adrien but ocamlyacc no
jderque has quit [Quit: leaving]
Anarchos has quit [Quit: back to real life]
Yoric has joined #ocaml
pdhborges has quit [Quit: Leaving.]
dnolen has joined #ocaml
impy has joined #ocaml
lamawithonel has quit [Ping timeout: 276 seconds]
RLa has quit [Quit: Leaving]
sepp2k has joined #ocaml
pdhborges has joined #ocaml
avsm has joined #ocaml
DOUK has quit [Ping timeout: 240 seconds]
douknoukem has joined #ocaml
Yoric1 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
mjonsson has quit [Read error: Operation timed out]
lamawithonel has joined #ocaml
mjonsson has joined #ocaml
<edwin> hi
impy has quit [Quit: impy]
<edwin> I compared latency of zeromq and lwt, zeromq does ~40us/req best case, lwt does ~6us/req (over unix socket)
<edwin> so maybe the ocaml zeromq "binding" should actually implement it by using lwt...
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
pdhborges has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
impy has joined #ocaml
lamawithonel has quit [Ping timeout: 276 seconds]
rwmjones has quit [Read error: Operation timed out]
cthuluh has joined #ocaml
<rproust> edwin: you have/can share the code for your benchmark?
<rproust> I'd like to compare the two programming styles
impy has quit [Quit: impy]
<edwin> rproust: ocaml with lwt: http://paste.debian.net/116386/
<edwin> rproust: zeromq (in C): http://paste.debian.net/116387/
ikaros has joined #ocaml
<rproust> thx
<edwin> rproust: and raw socket I/O: http://paste.debian.net/116388/
<edwin> (C again)
douknoukem has quit [Read error: Connection reset by peer]
<edwin> the lwt one is something I just wrote after reading the manual today, so may not be the best example
douknoukem has joined #ocaml
<edwin> some advice on benchmarking: turn off CPU freq scaling, it is bad for latency measurement (like 150us instead of 40us)
<edwin> and well the lwt one is cheating a bit as it is actually sending data inside the same process
ymasory has joined #ocaml
<edwin> I should probably fork
<edwin> and run the s1 and s2 lines in separate processes
<rproust> forking with Lwt is tricky
<rproust> you have to fork before you actually start the scheduller
<rproust> and I'm not sure of the exact version the forking support was added to Lwt
<rproust> (IIRC, the problem is that Lwt uses a few pipes internally and forking messes it up…)
rwmjones has joined #ocaml
BiDOrD has quit [Quit: No Ping reply in 180 seconds.]
BiDOrD has joined #ocaml
ankit9 has joined #ocaml
zorun has quit [Ping timeout: 252 seconds]
bzzbzz has quit [Quit: leaving]
philtor has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
alpounet has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
philtor has quit [Ping timeout: 276 seconds]
zorun has joined #ocaml
Snark has quit [Quit: Ex-Chat]
Cyanure has joined #ocaml
jld has quit [Ping timeout: 260 seconds]
Tianon has quit [Ping timeout: 264 seconds]
impy has joined #ocaml
Associat0r has quit [Ping timeout: 240 seconds]
eikke has quit [Ping timeout: 276 seconds]
impy has quit [Quit: impy]
pdhborges has joined #ocaml
impy has joined #ocaml
yezariaely has joined #ocaml
<pdhborges> edwin: hi, I was away when you talked about zeromq could you elaborate your point?
yezariaely has left #ocaml []
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
Associat0r has joined #ocaml
<flux> rproust, I'd think such forking problems would be fixable, possibly with the assistance of close on exec -flag
<flux> hmm, actually, right, it's close on exec, not close on fork :)
<edwin> pdhborges: zeromq is great as a concept and API, and probably very good for throughput. Its not that good for low latency message passing (that is probably because it must use an I/O thread even for IPC over unix sockets). Therefore I think it might be an interesting project to write a zeromq-like ocaml module implemented using LWT, and not just direct binding to the C impl.of zeromq
<flux> but at least it could provide its own variety of fork, if it doesn't already
<edwin> pdhborges: best I could get from zeromq is 40us (by default it is ~45us, but I replaced the socketpair in its mailbox by ypipe + eventfd, but there's just a limit on the performance you can get when dealing with an I/O thread. it introduces additional latency).
jld has joined #ocaml
<pdhborges> edwin: but did you test the C api ?
<edwin> yes I tested the C api, see my pastebin above
<edwin> btw above testing is for REQ/REP sockets
<edwin> for PUB/SUB there are no problems with zeromq, you can get millions of messages/second ;)
<edwin> pdhborges: I think it should be possible to improve zeromq itself though, like use non-blocking send/recv directly on the unix socket for ipc://, instead of dispatching to I/O thread
ankit9 is now known as ankit9|zzz
<pdhborges> edwin: would that zero mq like module compatible with other zmq clients?
<edwin> if zeromq's wire proto on unix sockets is stable then yes
Associat0r has quit [Ping timeout: 240 seconds]
<pdhborges> :| it woulb be nicer if zmq was fixex
<pdhborges> fixed*
<pdhborges> meanwhile the bindings need serious fixing but I'm swamped in work
<edwin> oh I didn't try the zeromq ocaml bindings
<edwin> there are two of them, which one is yours?
<pdhborges> ocaml-zmq
<edwin> whats wrong with it?
<pdhborges> Exception info sucks
<pdhborges> zero mq creashes when closing a socket or a context twice
<pdhborges> (the crash comes from zeromq)
<pdhborges> poll only supports zmq sockets
<pdhborges> no zero copy api
<pdhborges> no low level optimizations
Associat0r has joined #ocaml
Associat0r has quit [Ping timeout: 276 seconds]
lamawithonel has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
zorun has quit [Ping timeout: 276 seconds]
zorun has joined #ocaml
zorun_ has joined #ocaml
zorun has quit [Read error: Connection reset by peer]
DOUK has joined #ocaml
douknoukem has quit [Ping timeout: 240 seconds]
edwin has quit [Remote host closed the connection]
alexgordon has left #ocaml []
DimitryKakadu has quit [Remote host closed the connection]
Cyanure has quit [Ping timeout: 248 seconds]
nantralien has joined #ocaml
<nantralien> how to save a toplevel session ?
ikaros has quit [Quit: Leave the magic to Houdini]
nantralien has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
zorun_ is now known as zorun
valross has joined #ocaml
<pdhborges> nantralien you can use screen
Yoric1 has quit [Quit: Leaving.]
pdhborges has quit [Quit: Leaving.]
<mbac> there's a linear correlation of -0.9613 between time and my weight
<mbac> by 2013-03-02 i'll weigh 0 pounds
<mbac> wait, wrong channe
<mbac> l
Amorphous has quit [Ping timeout: 263 seconds]
Amorphous has joined #ocaml
impy has quit [Read error: Connection reset by peer]
impy has joined #ocaml
mbac has left #ocaml []