mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
Drk-Sd has joined #ocaml
Associat0r has joined #ocaml
_unK has quit [Remote closed the connection]
joewilliams_away is now known as joewilliams
tmaedaZ is now known as tmaeda
pimmhogeling has quit [Read error: 110 (Connection timed out)]
avsm has quit [Client Quit]
Associat0r has quit []
Drk-Sd has quit [Client Quit]
travisbrady has joined #ocaml
tmaeda is now known as tmaedaZ
<travisbrady> anyone know of any simple camlp4 examples out there? I'd just like to learn so I was going to try to parse something very simple like kv pairs like so "ID: 4 Time:12344 Name:Bob"
<mfp> hah jdh30's proggit submissions being treated as spam
toots has joined #ocaml
<toots> lo all !
<toots> I'm trying to port my application on win32
<toots> we use Thread.wait_signal to signal to the main thread that shutdown has started
<toots> unfortunately there is no Thread.wait_signal in the win32 port of ocaml
<toots> do you know any alternative way for doing this under win32 ?
<travisbrady> can anyone tell me why I'm getting this error? http://hpaste.org/fastcgi/hpaste.fcgi/view?id=16615#a16615
maskd- has joined #ocaml
maskd-_ has joined #ocaml
maskd has quit [Nick collision from services.]
maskd-_ has left #ocaml []
maskd has joined #ocaml
maskd- has quit [Read error: 110 (Connection timed out)]
M| has quit [Read error: 113 (No route to host)]
tmaedaZ is now known as tmaeda
jeddhaberstro has joined #ocaml
thrasibule_ has joined #ocaml
thrasibule has quit [Read error: 104 (Connection reset by peer)]
tmaeda is now known as tmaedaZ
rhar has quit [Read error: 110 (Connection timed out)]
toots has left #ocaml []
tensorpudding has quit [Read error: 104 (Connection reset by peer)]
tensorpudding has joined #ocaml
travisbrady has quit []
<det> mfp, I notice his comments are being deleted very often too
pad has quit [Read error: 104 (Connection reset by peer)]
maskd has quit ["leaving"]
jeddhaberstro has quit [Client Quit]
djanderson has quit []
zhijie has joined #ocaml
prince has quit [Client Quit]
thrasibule_ has quit [Client Quit]
thrasibule has joined #ocaml
Modius has quit ["I'm big in Japan"]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
adaraza has joined #ocaml
rhar has joined #ocaml
rhar has quit ["Leaving"]
Mr_Awesome has quit [Read error: 113 (No route to host)]
<flux> possibly many people report the messages regardless of the content, thus the automatic system picks them up :)
joewilliams is now known as joewilliams_away
thrasibule has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
<det> Yes, I think many people downvote jdh30 on sight, regardless of the content
ttamttam has joined #ocaml
_zack has joined #ocaml
_zack has quit ["Leaving."]
yakischloba1 has joined #ocaml
fx_ has joined #ocaml
yakischloba has quit [Read error: 110 (Connection timed out)]
adaraza has left #ocaml []
Yoric has joined #ocaml
yakischloba1 has quit [Client Quit]
avsm1 has joined #ocaml
_zack has joined #ocaml
ikaros has joined #ocaml
Yoric has quit []
ikaros has quit ["Leave the magic to Houdini"]
avsm1 has quit [kubrick.freenode.net irc.freenode.net]
zhijie has quit [kubrick.freenode.net irc.freenode.net]
emias has quit [kubrick.freenode.net irc.freenode.net]
noj has quit [kubrick.freenode.net irc.freenode.net]
prigaux has quit [kubrick.freenode.net irc.freenode.net]
jlouis has quit [Read error: 60 (Operation timed out)]
flux has quit [Success]
flx_ has joined #ocaml
msteele_ has joined #ocaml
avsm1 has joined #ocaml
zhijie has joined #ocaml
emias has joined #ocaml
noj has joined #ocaml
prigaux has joined #ocaml
msteele has quit [Read error: 60 (Operation timed out)]
jlouis has joined #ocaml
npouillard has quit ["leaving"]
npouillard has joined #ocaml
tmaedaZ is now known as tmaeda
npouillard has quit [Client Quit]
npouillard has joined #ocaml
npouillard has quit [Client Quit]
npouillard has joined #ocaml
Yoric has joined #ocaml
avsm1 has quit [Client Quit]
munga has joined #ocaml
Yoric has quit [Read error: 110 (Connection timed out)]
pimmhogeling has joined #ocaml
maskd has joined #ocaml
alp has quit [Client Quit]
alp__ has joined #ocaml
avsm has joined #ocaml
alp__ has quit [Read error: 104 (Connection reset by peer)]
Alpounet has joined #ocaml
flx_ is now known as flux
_zack has quit [Read error: 104 (Connection reset by peer)]
_zack has joined #ocaml
_unK has joined #ocaml
zhijie has quit [Read error: 104 (Connection reset by peer)]
_andre has joined #ocaml
zhijie has joined #ocaml
Yoric has joined #ocaml
TaXules has joined #ocaml
_unK has quit [Remote closed the connection]
avsm has quit [kubrick.freenode.net irc.freenode.net]
munga has quit [kubrick.freenode.net irc.freenode.net]
noj has quit [kubrick.freenode.net irc.freenode.net]
prigaux has quit [kubrick.freenode.net irc.freenode.net]
emias has quit [kubrick.freenode.net irc.freenode.net]
avsm has joined #ocaml
munga has joined #ocaml
emias has joined #ocaml
noj has joined #ocaml
prigaux has joined #ocaml
thelema_ has joined #ocaml
thelema has quit [Read error: 104 (Connection reset by peer)]
munga has quit [Read error: 110 (Connection timed out)]
boscop has joined #ocaml
zhijie has quit ["Leaving."]
boscop_ has joined #ocaml
boscop has quit [Nick collision from services.]
boscop_ has quit [Client Quit]
tmaeda is now known as tmaedaZ
boscop has joined #ocaml
Alpounet has quit [Read error: 60 (Operation timed out)]
_zack has quit ["Leaving."]
_zack has joined #ocaml
_zack has quit [Client Quit]
_zack has joined #ocaml
tmaedaZ is now known as tmaeda
Alpounet has joined #ocaml
derdon has joined #ocaml
flux has quit [kubrick.freenode.net irc.freenode.net]
tmaeda has quit [kubrick.freenode.net irc.freenode.net]
deavid has quit [kubrick.freenode.net irc.freenode.net]
fremo_ has quit [kubrick.freenode.net irc.freenode.net]
srcerer has quit [kubrick.freenode.net irc.freenode.net]
deavidsedice has joined #ocaml
flux has joined #ocaml
fremo_ has joined #ocaml
srcerer has joined #ocaml
tmaeda has joined #ocaml
Axioplase has joined #ocaml
sgnb has quit [Read error: 54 (Connection reset by peer)]
sgnb has joined #ocaml
tmaeda is now known as tmaedaZ
chicco has quit [Read error: 113 (No route to host)]
pimmhogeling has quit [Read error: 110 (Connection timed out)]
Axioplase has quit ["bbl"]
_zack has quit ["Leaving."]
zhijie has joined #ocaml
rwmjones has quit ["This computer has gone to sleep"]
rwmjones has joined #ocaml
ulfdoz_ has joined #ocaml
ikaros has joined #ocaml
wzp has quit ["leaving"]
ulfdoz has quit [Read error: 110 (Connection timed out)]
pimmhogeling has joined #ocaml
joewilliams_away is now known as joewilliams
pimmhogeling has quit [Read error: 110 (Connection timed out)]
chicco has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
pimmhogeling has joined #ocaml
djanderson has joined #ocaml
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
yakischloba has joined #ocaml
_unK has joined #ocaml
pimmhogeling has quit [Read error: 113 (No route to host)]
fx_ has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
pimmhogeling has joined #ocaml
Yoric has quit []
avsm1 has joined #ocaml
avsm has quit [Read error: 104 (Connection reset by peer)]
yziquel has joined #ocaml
<yziquel> is there a performance penalty for using recursive module instead of plain modules.
<yziquel> ?
thelema_ has left #ocaml []
thelema has joined #ocaml
<thelema> I think no - it's implemented the same, just the typechecker has to do more work.
<mrvn> No reason there should be.
<yziquel> and can you do a module rec A .... and B for two modules? or must you include both into a recursive module C and do an include C (with a performance penalty for the include?)
<yziquel> or can a file be considered as a recursive module?
seanmcl has joined #ocaml
<mrvn> files can not be mutualy recursive
<yziquel> argh...
<mrvn> You need to write ab.ml and then you can create a.ml that includes Ab.A and b.ml that includes Ab.b
<yziquel> for files: i do not want mutually recursive. simply recursive.
<mrvn> simple recursive you just do.
<mrvn> When you link the files at the end each can only depend on files before it.
<yziquel> mrvn: i do not see how to make a recursive module out of a file. a.ml: let b = A.a + 1 let a = 2 and a.mli: val a: int val b: int. doesn't compile.
<thelema> yziquel: let b = a + 1 and a = 2
<yziquel> thelema: yes, that's easy. i want a recursive module. not a plain module.
<yziquel> hmmm....
<flux> yziquel, should be easy to benchmark, no?-)
<mrvn> a file can not be recursive with itself
<thelema> What's the difference between A.a and a (within module a)?
<mrvn> thelema: That A.a doesn't work
<mrvn> yziquel: The a.mli is totaly irelevant inside a.ml by the way.
<thelema> mrvn: I don't see why yziquel wants A.a
<mrvn> thelema: I think he wants the a.mli to be a forward declaration of a so b can already use it. Doesn't work that way.
<thelema> yes, you can't do forward declarations.
<yziquel> thelema: when you write a recursive module, you write module rec A : sig val a: int val b: int = struct let b = A.a + 1 let a = 2 end. The A.a allows to refer to the a value declared in the signature, but that is not yet defined.
<flux> hey, there _is_ a performance hit for recursiv emodules?-o
<yziquel> mrvn: yes. that's what i'd like.
<mrvn> yziquel: Which I would say is bad code
<yziquel> mrvn: would be worse without. depends if you're writing code, or wrapping a C library while wanting to stay close to the API.
<mrvn> Error: Cannot safely evaluate the definition of the recursively-defined module A
<mrvn> yziquel: What should this do? module rec A : sig val a: int val b: int end = struct let a = 1 let b = A.a + 1 let a = 2 end;;?
<flux> replace call to Foo.f with FooRec.f at the bottom to get the other test case
<flux> it's twice as slow for me when I use the (equivalent) recursive module
<thelema> yziquel: sorry, no forward declarations. References between recursive modules are simultaneous, not sequential - to get simultaneous inside a single module, use let ... and ...
<yziquel> thelema: i want simultaneous between two modules...
<thelema> yziquel: then you want recursive modules.
<mrvn> yziquel: then you put them in the same file
<thelema> flux: interesting. I wonder what the difference is...
<yziquel> thelema, mrvn: yes, but i want them on the top level. I do not want MyFile.MyRecModule.A and MyFile.MyRecModule.B. i want MyFile.A... This is becoming annoying...
<yziquel> (and no include.... unfortunately)
<mrvn> yziquel: no way around include then
<mrvn> ./foo 8.86s user 0.01s system 99% cpu 8.879 total
<thelema> yziquel: then the only way to do what you want is to construct MyFile.A and MyFile.B from the RecModules
<mrvn> ./foorec 22.16s user 0.01s system 99% cpu 22.205 total
<yziquel> thelema: how do you do that?
<jonafan> you could do module M = MyFile.MyRecModule or something
<mrvn> Why MyRecModule?
<thelema> yziquel: using [include]s is the easiest way
<yziquel> jonafan: you do not have the include performance penalty?
<jonafan> there's an include performance penalty?
<mrvn> module rec A : sig .. end = struct ... end and B : sig .. end = struct .. end
<flux> btw, if you're going to pack the results anyway (you might, if it's a reusable package), you could use the trick of providing your own mli-file
<yziquel> jonafan: i believe so.
<mrvn> flux: WTF is fooRec slower?
<flux> mrvn, indede!
<jonafan> i am feeling skeptical
Drk-Sd has joined #ocaml
<flux> atleast there is no penaly for simply providing the signature :)
Submarine has joined #ocaml
<flux> also no penalty for include in my limited test case
<flux> I updated the foo.ml to cover the other cases
<flux> heh, funny how much faster it goes if I move v inside the main code
<flux> of course, it only widens the gap for FooRec
<mrvn> Somehow calculting the addree for f becomes a lot more difficult in FooRec
<mrvn> address even
<mrvn> ocamlopt really needs to learn to optimize constant expressions out of loops.
<mrvn> It looks up the address of f 1000000000 times in the loop.
<mrvn> flux: let f = FooRec.f in for c = 0 to .... helps a bit
<thelema> mrvn: funny. I wonder if this might be sufficient to get constant sub expression elimination...
<mrvn> thelema: binding them with a let outside the loop?
<thelema> in other cases, it's the programmer's job to lift subexpressions
<thelema> But in this case, there's no obvious expression being evaluated
<mrvn> Yeah. I just find it odd that A.b is an expensive expression
<mrvn> It also only helps like 10%
<thelema> really? where's all the work being done, if it's not even in looking up A.b?
<mrvn> It still does some extra indirections
<mrvn> might be that both f and v are still indirect
ulfdoz has joined #ocaml
Yoric has joined #ocaml
ikaros has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
_andre has quit ["leaving"]
ulfdoz has joined #ocaml
pad has joined #ocaml
mutew has joined #ocaml
mutew has quit ["leaving"]
ttamttam has joined #ocaml
avsm1 has quit [Client Quit]
Modius has joined #ocaml
avsm has joined #ocaml
yziquel has quit [Ping timeout: 180 seconds]
mutewit has joined #ocaml
mutewit has quit [Client Quit]
ulfdoz has quit [Read error: 110 (Connection timed out)]
avsm has quit [Client Quit]
ttamttam has quit ["Leaving."]
ikaros has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
cygnus_ has joined #ocaml
pimmhogeling has quit [Read error: 113 (No route to host)]
rwmjones_lptp_ has joined #ocaml
rwmjones has quit [Read error: 101 (Network is unreachable)]
derdon has quit []
kt21312 has joined #ocaml
Pepe__ has joined #ocaml
Pepe_ has quit [Read error: 113 (No route to host)]
Associat0r has joined #ocaml
Pepe__ is now known as Pepe_
ulfdoz has joined #ocaml
kt21312 has quit [Read error: 110 (Connection timed out)]
Submarine has quit ["Leaving"]
jao has joined #ocaml
valross has joined #ocaml
valross has quit [Remote closed the connection]
mutew has joined #ocaml
M| has joined #ocaml
hcarty has joined #ocaml
Drk-Sd has quit [Client Quit]
valross has joined #ocaml
mutew has quit [Read error: 110 (Connection timed out)]
Yoric has quit []
Associat0r has quit []
seanmcl has quit []
ikaros has quit ["Leave the magic to Houdini"]
tmaedaZ is now known as tmaeda
rwmjones_lptp_ has quit [Client Quit]
rwmjones_lptp_ has joined #ocaml
tmaeda is now known as tmaedaZ
Drk-Sd has joined #ocaml
sgnb has quit [Read error: 54 (Connection reset by peer)]
sgnb has joined #ocaml
ned- has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml