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
_unK has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
grettke has joined #ocaml
grettke has quit []
mjonsson has quit [Remote host closed the connection]
mjonsson has joined #ocaml
mjonsson has quit [Client Quit]
jpd has quit [Quit: This computer has gone to sleep]
jpd has joined #ocaml
Modius has quit [Quit: I'm big in Japan]
jpd has quit [Quit: Leaving]
jakedouglas has quit [Remote host closed the connection]
<Axsuul> how do I clear the toplevel (instead of quiting and running ocaml again)?
<junis> i don't think that's possible in a normal toplevel
<junis> see... http://caml.inria.fr/pub/docs/manual-ocaml/manual023.html#toc90 here is a list of all the directives ... and there is no clear
ygrek has joined #ocaml
<junis> ygrek
* junis laughs
<gildor> adrien: the -j flags should not have particular prerequesites, except that ocamlbuild rules should be written to allow parallelism
<gildor> adrien: but npouillard tell me that they are some case where it is not optimal
ygrek has quit [Ping timeout: 245 seconds]
yezariaely has joined #ocaml
Snark_ has joined #ocaml
lpereira has joined #ocaml
yezariaely has left #ocaml []
junis has quit [Ping timeout: 260 seconds]
junis has joined #ocaml
Zordon has joined #ocaml
Zordon has left #ocaml []
ulfdoz has joined #ocaml
ygrek has joined #ocaml
init1 has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
diml has quit [Remote host closed the connection]
diml has joined #ocaml
Amorphous has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
ikaros has joined #ocaml
Amorphous has joined #ocaml
Edward has joined #ocaml
_unK has joined #ocaml
ztfw has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
dark has joined #ocaml
<dark> I see XenSource has some OCamlDocProgram directive at omake, but my omake does not have it
<dark> do someone here have some access to this code?
iago has joined #ocaml
<dark> or, else, how to make documentation depend on generation of .cmis? or something like that
<dark> (I have no .mli)
<dark> i mean ocamldoc documentation
<dark> I generate it with a regular makefile.. with commands that get expanded into things like ocamlfind ocamlc -I src -package pgocaml,batteries,pgocaml.syntax -syntax camlp4o -c src/db.ml
<dark> but it is dumb, so i make it depend on the binary. well i could make omake depend on the binary, but
<dark> ops, not that
<dark> ocamlfind ocamldoc -I src -package pgocaml,batteries,pgocaml.syntax -syntax camlp4o -stars -sort -html -d html src/db.ml src/tagsystem.ml
<dark> actually
<dark> fact is, without the .cmis it does not work
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
boscop_ is now known as boscop
Edward has quit []
stdDoubt has joined #ocaml
<stdDoubt> how to load syntactic support for stream parsers? I tried #load "camlp4o.cma";; but I get Error: Reference to undefined global `Dynlink'
lpereira has quit [Quit: Leaving.]
<dark> stdDoubt, on toplevel? try #use "topfind";; then Topfind.load_deeply ["dynlink"; camlp4"];; or hmm
<dark> #camlp4o;;
ftrvxmtrx has quit [Quit: Leaving]
<adrien> no need to start using Topfind.load_deeeply, #camlp4o will do as you said ;-)
<dark> anyway on ocamlc i use ocamlfind ocamlc -syntax camlp4o -linkpkg -o prog prog.ml ..
<dark> i am not sure for what -linkpkg stands
<dark> it is not necessary, in fact, ocamlfind itself idn't..
<dark> so maybe ocamlc -syntax camlp4o -o prog prog.ml is enough
<stdDoubt> gonna try it out
<stdDoubt> I get unknown option `-syntax'
<dark> ocamlc, not ocaml
<dark> but you can put #camlp4o;; at ~/.ocamlinit for auto-loading on toplevel (ocaml)
<dark> err
<dark> ok, -syntax is something from ocamlfind..
<dark> ok, ocamlfind -syntax camlp4o prog.ml -o prog seems nice
<dark> my ~/.ocamlinit has #camlp4o;; commented out
<stdDoubt> now I get "ocamlfind: When using -syntax, the META variable 'preprocessor' must be set"
ftrvxmtrx has joined #ocaml
<dark> ok, ocamlfind ocamlc -package camlp4 -syntax camlp4o test.ml
<dark> u.u
<dark> do someone here want to talk about omake, ocamldoc, and the like?
<dark> or how to make omake understand ocamldoc
<dark> there is a product called xenserver by a company called citrix that uses ocaml, omake, and ocamldoc
<dark> i'm actually amazed that they use ocaml, o.o
<adrien> it fails when you try to build it?
<dark> it says there is no such thing called OCamlDocProgram
<dark> hm
<adrien> isn't it packaged in some distributions? maybe they have patches for that, or it's something at configure-time
<dark> yes, I was looking for this patch. (In fact omake is supposed to make this kind of extensibility "easy", but I don't know how to do it proper, despite looking at the documentation..)
<stdDoubt> dark:thanks
<dark> I think I'm supposed to put such extensions on OMakeroot
dark has quit [Ping timeout: 252 seconds]
dark has joined #ocaml
<dark> i lost my connection
<adrien> in an object, I need to access a value that is not exported through a method, is there any way which does not involve recompiling?
<adrien> I don't care if it's dirty
<adrien> (it'll be solved in the "right" way later on)
dark has quit [Ping timeout: 265 seconds]
dark has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
jakedouglas has joined #ocaml
<ygrek> adrien, Obj
<adrien> ygrek: but what after that? =/
<adrien> I ended up creating a new class that inherits the old one
<adrien> works, was quite annoying to dig up the required bits from lablgtk however
stdDoubt has quit [Quit: Leaving]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
<adrien> ygrek: ok, thanks, I had never used Obj.field
<ygrek> and better continue that way :)
<adrien> well, I intend to get a branch on lablgtk so I can contribute so the Obj-based solution is not a problem here, it's really temporary
<adrien> I had to write 13 lines of code instead...
<dark> I have some discrepancies between batteries' Digest and md5sums [maybe also present with standard ocaml?)
<dark> let md5 file = File.with_file_in file (fun x -> Digest.to_hex (Digest.input x))
<dark> md5 "Makefile";; : string = "232d2d2d2d2d2d2d2d2d2d2d2d2d2d2d"
<dark> 61dbe07a7f656af15172df91e9a9dce5 Makefile
<dark> (from md5sum)
<adrien> the ocaml output is ... weird
<adrien> what about: Digest.to_hex (Digest.input (open_in_bin file))
<adrien> (I doubt it's because of batteries but who knows?)
<dark> still string = "232d2d2d2d2d2d2d2d2d2d2d2d2d2d2d".. and it is also without batteries..
<dark> with wget http://paste.pocoo.org/raw/276616/ then md5sum index.html then ocaml, Digest.to_hex (Digest.input (open_in_bin "index.html"));;, i get the same results o.o
<flux> anything with 2d2d2d doesn't look like a md5sum to me. possible, of course, but not likely :).
<dark> yes, I was "yay i'm lucky"
<dark> but this deviation from my system's md5sum happens with other files too
<dark> i thought about byte order, but this should be apparent in hex..
<adrien> ok
<adrien> well, first, your "md5" function could be "Digest.file"
<adrien> then,
<adrien> # Digest.to_hex (Digest.input (open_in_bin "Makefile"));;
<adrien> - : string = "232d2d2d2d2d2d2d2d2d2d2d2d2d2d2d"
<adrien> argh
<adrien> # Digest.input (open_in_bin "Makefile");;
<adrien> - : Digest.t = "#---------------"
<adrien> which is the beginning of the file...
<adrien> input does: Read a digest from the given input channel.
<adrien> it reads a digest, it doesn't compute one =)
<dark> ah
<dark> =)
gildor has quit [Ping timeout: 252 seconds]
<npouillard> gildor: ocamlbuild -j does a good job on use cases like byte-code compilation: all the cmos can be built in parallel
<adrien> heh, bad timing ;-)
<dark> ocamlbuild..? mm..
<dark> maybe I should give up with omake?
<adrien> well, if Xen is using omake you probably don't want to
<adrien> (change their build system)
mjonsson has joined #ocaml
gildor has joined #ocaml
<npouillard> hi gildor
<npouillard> gildor: ocamlbuild -j does a good job on use cases like byte-code compilation: all the cmos can be built in parallel
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
easy4 has joined #ocaml
easy4 has quit [Quit: easy4]
ikaros has quit [Quit: Leave the magic to Houdini]
ygrek has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
Snark_ is now known as Snark
Snark has quit [Quit: Ex-Chat]
joewilliams_away is now known as joewilliams
init1 has quit [Quit: Quitte]
avsm has quit [Quit: Leaving.]
<orbitz> anyone using Core here?
<hcarty> orbitz: I've toyed with it a bit, but I use Batteries primarily
<orbitz> looks like core's shell module isn't a big fan of os x
gildor has quit [Ping timeout: 240 seconds]
<hcarty> IIRC, somewhere in their blog posts/documentation/source comments, the authors mention that Core is only heavily tested on Linux
CoryDambach has joined #ocaml
gildor has joined #ocaml
<orbitz> yeah i believe that
<orbitz> hcarty: how is batteries for other OS's?
strangy has joined #ocaml
joewilliams is now known as joewilliams_away
ulfdoz has joined #ocaml
<hcarty> orbitz: I'm not sure - I spend all of my time on Linux. I think that some of the developers use other OSs.
gildor has quit [Ping timeout: 252 seconds]
<hcarty> orbitz: I don't think that there is any C in Batteries, so it should be fairly portable.
<hcarty> As far as I know, Batteries does not have an equivalent to Core's Shell module
psnively has joined #ocaml
<orbitz> ok
<orbitz> the shell module seems pretty iffy too
Edward has joined #ocaml
<orbitz> interesting, i'm getting SIGBUS when trying to run a process on mac via os x
<orbitz> err via shell
psnively has quit [Quit: psnively]
Edward has quit [Ping timeout: 265 seconds]
gildor has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
wuj has joined #ocaml
<orbitz> hrm
<orbitz> should I not be able to open Unix ?
<orbitz> ohh durh
heller_ has joined #ocaml
heller has quit [Read error: Connection reset by peer]
lpereira has joined #ocaml
cthuluh has quit [Quit: .]
strangy has quit [Ping timeout: 276 seconds]
strangy has joined #ocaml
strangy has quit [Ping timeout: 250 seconds]
ztfw has quit [Remote host closed the connection]
cthuluh has joined #ocaml
lpereira has quit [Quit: Leaving.]
avsm has joined #ocaml
Cybersoft has joined #ocaml
<Cybersoft> Hi. I'm getting an arbitrary list of pairs like this [(a,1);(b,2);(c,3);...] out of filter and I would like to know how to access x2 in each of those element within those pairs (ie: filter produce me a list of pair but I only need a list of the x2 in those pairs)
<Cybersoft> *arbitratry length
<Cybersoft> ie: instead of getting [(a,1);(b,2);(c,3);...] out of the filter I'd like to get [1;2;3;...]
<Cybersoft> I know it must be something like let x (_,x2) = filter (whatever) but I can't get it right
<Cybersoft> should I be using fold_right on the result of filter instead and build the list on the fly?
avsm has quit [Quit: Leaving.]
<adrien> Cybersoft: in this case, you can use the 'snd' function
<adrien> like, List.(rev_)map snd your_list
<adrien> more generally: List.(rev_)map (fun (_, _, z) -> z) your_list (* to get the third element *)
<adrien> and going to bed, good night
<Cybersoft> thanks
<adrien> and unrelated: frp is fun but can be hard at time
<adrien> s
<Cybersoft> frp? what's that?
Edward has joined #ocaml
Cybersoft has quit [Ping timeout: 264 seconds]
eelte has joined #ocaml
coucou747 has quit [Ping timeout: 240 seconds]
joewilliams_away is now known as joewilliams
iago has quit [Quit: Leaving]
<hcarty> adrien: Agreed re: FRP
<hcarty> FRP seems like it could be interesting as a way to express message passing.