Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html - Answer OCaml Meeting 2010 poll https://forge.ocamlcore.org/survey/survey.php?group_id=77&survey_id=1
<mrvn> what are they used for?
<mrvn> If they are used for exceptions then exceptions will do.
<mrvn> But you would have to write them out of the C code.
<mrvn> If they are used for multithreading then you can probably leave them or convert to ocaml threads
<yziquel> monothreading here.
tmaeda is now known as tmaedaZ
<yziquel> exceptions mostly. Cannot spot the siglongjmp though.
<mrvn> are you going to rewrite all the C code in ocaml?
<yziquel> mrvn: it scares me. It's the R source code. They implement looping with sigsetjmps and siglongjmps!
<yziquel> mrvn: i'm writing it to ocaml to inspect it, specify it, type-check it.
<yziquel> mrvn: it's a quite obscure piece of code.
<mrvn> sounds scary
<yziquel> mrvn: it was based on scheme, and they added some "break" "loop" "continue" statements. the way they solved the problem was to make environments for closures, put environments into contexts, and sigset/longjmp all over these contexts.
<yziquel> scary indeed.
Camarade_Tux has quit ["leaving"]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
Camarade_Tux has joined #ocaml
_unK has quit [Remote closed the connection]
ofaurax has quit ["Leaving"]
Walee has quit []
zhijie has quit [Read error: 110 (Connection timed out)]
middayc has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
sramsay has quit [Read error: 110 (Connection timed out)]
munga_ has quit [Read error: 60 (Operation timed out)]
zhijie has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
ulfdoz_ is now known as ulfdoz
Pimm has quit [Read error: 110 (Connection timed out)]
tmaedaZ is now known as tmaeda
caligula_ has quit [Read error: 104 (Connection reset by peer)]
caligula has joined #ocaml
caligula_ has joined #ocaml
caligula has quit [Read error: 60 (Operation timed out)]
ski_ has joined #ocaml
Associat0r has joined #ocaml
kksr has joined #ocaml
kksr has quit [Client Quit]
ccasin has quit ["Leaving"]
seanmcl has joined #ocaml
thrasibule has quit [Read error: 110 (Connection timed out)]
seanmcl has quit []
Alpounet has quit [Remote closed the connection]
Alpounet has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
albacker has joined #ocaml
ttamttam has joined #ocaml
jcaose has joined #ocaml
ttamttam has quit ["Leaving."]
ttamttam has joined #ocaml
dmentre has joined #ocaml
<flux> hm, someone mentioned the idae that laziness of a value could be encoded as a phantom type. is there a language that does this way?
<flux> perhaps, because it'd be so pervasive, it could be even more hidden than 'normal' phantom types
<flux> but this pseudocode would be interesting: val map : ('a -> 'b) -> ('is_lazy, 'a) list -> ('is_lazy, 'b) list
<flux> and it'd be lazy if the argument is lazy, strict otherwise
<flux> however I'm not sure if that could be efficiently implemented in pure ocaml
_zack has joined #ocaml
sporkmonger has quit []
jcaose has quit [Read error: 110 (Connection timed out)]
<flux> it'd be nice if a [>strict] has an efficient representation while [>lazy] had the default lazy ocaml repr..
Yoric has joined #ocaml
jcaose has joined #ocaml
ikaros has joined #ocaml
eni_ has joined #ocaml
albacker has quit [Read error: 110 (Connection timed out)]
valross has quit ["Ex-Chat"]
gildor_ has quit ["leaving"]
<rwmjones> harrop is on fine trolling form today
<Yoric> :)
gildor has joined #ocaml
ski_ has quit ["Lost terminal"]
_andre has joined #ocaml
ski_ has joined #ocaml
ttamttam1 has joined #ocaml
ttamttam has quit [Read error: 110 (Connection timed out)]
Pimm has joined #ocaml
middayc has joined #ocaml
Associat0r has quit []
tmaeda is now known as tmaedaZ
Alpounet has quit [Read error: 104 (Connection reset by peer)]
ikaros has quit [Remote closed the connection]
Pimm has quit [Read error: 110 (Connection timed out)]
seanmcl has joined #ocaml
fraggle_laptop has joined #ocaml
<Leonidas> hi, I tried omake for the first time today and ran into some kind of problem:
<Leonidas> http://paste.pocoo.org/show/153840/ - OMakefile for my program that consists of ha6.ml and test_ha6.ml
jonafan has joined #ocaml
<Leonidas> ha6.ml is a normal file and does not need any special flags, but to compile test_ha6.ml both ha6 as well as OUnit are neccessary. How can I specify that?
* Leonidas wants ha6 to be dependency-free and test depend on ha6, findlib and ounit.
thelema_ has joined #ocaml
thelema has quit [Read error: 104 (Connection reset by peer)]
stoff has quit ["Leaving"]
middayc has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
<Leonidas> I seem to have the same problem as in http://lists.metaprl.org/pipermail/omake/2007-February/001488.html but don't understand the solution.
tmaedaZ is now known as tmaeda
<thelema_> Leonidas: is the key "USE_OCAMLFIND = true"?
<mfp> Leonidas: let me guess; the pb is that the oUnit package is not used when compiling test_ha6, right?
<mfp> Leonidas: you need the targets to be defined in that section in order for the new flags/vars to apply
Alpounet has joined #ocaml
<mfp> Leonidas: I've solved that in the past with a CamlTargets function placed in OMakefile.functions -> http://ocaml.pastebin.com/m72709fab
<mfp> having read the msg you linked to, something like test: $(OCamlProgram(test, test_ha6)) in the section could do the trick
<mfp> +I guess that
<thelema_> planet.ocamlcore.org is down for me - anyone else?
<mfp> down for me too
willb has joined #ocaml
<thelema_> mfp: I got distracted in my ocnversion - iit's halfway done.
<thelema_> Should we wide-release after a couple days?
<mfp> gotta adapt the syntax extensions before
<thelema_> for the new module names?
<mfp> yep
<mfp> the generated code might have references to the old ones
<thelema_> yes, I finish the renaming today, we test for a few days (and anyone else on #ocaml that wants to test AAA, it's appreciated)
<thelema_> and then we wide release maybe thursday
<mfp> a few days to ponder won't hurt; we don't want another mass rename right after the release :)
<thelema_> Agreed.
<thelema_> If this weekend is better, no problem
dmentre has left #ocaml []
jimmyb2187 has left #ocaml []
jimmyb2187 has joined #ocaml
olegfink has quit [Read error: 110 (Connection timed out)]
yziquel has quit [Ping timeout: 180 seconds]
<gildor> thelema_: *.ocamlcore.org is down for everyone
<gildor> I am upgrading to lenny the whole system
<gildor> (and encounter some problems with postgresql upgrade)
<thelema_> gildor: ah. I hope it goes smoothly
<gildor> thelema_: planet seems back online, but it will be unstable until I really finished the migration
<Leonidas> thelema_: yes, it is USE_OCAMLFIND and when I define OCAMLPACKS "globally" it works. But I'd prefer to use findlib and ounit only for building the unittests.
<Leonidas> mfp: thanks, currently looking into it.
<Leonidas> mfp: well, simply adding $(...) didn't help: http://paste.pocoo.org/show/153860/
<thelema_> gildor: thank you.
<Leonidas> mfp: and you were right: it cand find OUnit during the compilation of test_ha6.ml
<Leonidas> *can't
<thelema_> Leonidas: can you enable ocamlfind globally, but the packs locally?
* Leonidas tries the CampTarget code
<mfp> Leonidas: the CamlTargets route should work --- that's what I'm doing all the time
<Leonidas> thelema_: I could do that, but then I would depend on ocamlfind to build ha6. and it still wouldn't work
<thelema_> ah, ok.
Narrenschiff has joined #ocaml
<Leonidas> mfp: where am I supposed to put CamlTargets? In the OMakefile?
<Leonidas> Sorry for asking dumb questions, the docs sound as if the OMakefile would be the proper place, but it doesn't pick it up
<mfp> Leonidas: I normally put the CamlTargets definition in a separate file an open it in the OMakefile (see the comments)
<mfp> then you have to add the $(CamlTargets foo): line in your OMakefile's section
<mfp> the definition must probably come before its use in the target
<Leonidas> mfp: yep, tried that, but I still get unbound variable: global.OCamlTargets
<mfp> typo? CamlTargets
<Leonidas> my stupidness knows no bounds. Right, a typo.
<Leonidas> command not found in PATH: test.cmi
sgnb has quit [Read error: 131 (Connection reset by peer)]
<Leonidas> and in fact, there is no test.cmi at all
sgnb has joined #ocaml
<Leonidas> forgot a :
<Leonidas> yay, works! \o/
<mfp> :)
<Leonidas> mfp: thank you! Could you explain to me *how* that works? I'm trying to understand it, but it looks like black magic to me.
<mfp> Leonidas: it expands to test.cmx test.cmi test.o test.cmo ... test_ha6.cmo:
<mfp> by placing the rule (even if "empty") in the section, OCamlProgram will see the new value of the OCAMLPACKS variable
<Leonidas> but OCamlProgram gets "called" earlier?
<mfp> without that rule, the global values (outside the section) are active
<mfp> the pb is that there's some kind of lazy evaluation going on
<Leonidas> Ah, I see.
<mfp> I'm not sure my approach is the best solution, but it works
<mfp> I've always found that confusing too
<Leonidas> make-like build systems always seemed like a mystery to me... maybe I should print out the whole documentation of omake.
<Leonidas> mfp: anyway, thanks for your help, works great now :)
* Leonidas needs to write a clean-target now :)
<mfp> OMake has got at least 2 strong points against ocamlbuild: it's documented, and it handles subprojects very well
<mfp> Leonidas: here's another function for you
<mfp> public.CamlCleanRecursive() =
<mfp> rm -f $(filter-proper-targets $(ls R, .)) *.annot *.s
<mfp> then you can do clean:\n CamlCleanRecursive()
<mfp> that'll delete all the (intermediate) targets automatically
<Leonidas> wow, nice!
<Leonidas> mfp: you you have some repositories online, so I could dig in your OMakefiles for even more treasures? :)
<mfp> hmm let me see
_unK has joined #ocaml
<mfp> this one has got a few tricks -> http://github.com/mfp/extprot/blob/master/OMakefile
<mfp> a %.sig: %.ml %.cmo rule that generates module signatures .sig (which can be renamed to .mli if wanted)
<mfp> and then a CamlSources(mods) function I use to enable syntax extensions on a file basis
<mfp> + declare some deps not caught by OMake (because I was using camlp4.macro's INCLUDE)
<Leonidas> mfp: syntax extensions in ocaml are currently way out of my league :)
<Leonidas> great, so now I got my build environment, I can start to write the actual code.
* Leonidas has a warm, fuzzy feeling about having stuff done the right way
<mfp> you can use omake -P to let omake poll the filesystem & recompile on changes
<mfp> also -j 2 (or higher) if you have more than one core, to parallelize the build
<Leonidas> mfp: yep, I saw that already. I hope this will make programming very python-like, with no explicit compile step, which is really nice.
<Leonidas> Failure: om_notify_open: (null)
<mfp> famd is not running
<mfp> for some reason famd keep segfaulting here :-(
<Leonidas> mfp: does it work with gamin too?
<mfp> so I have to restart it often
<mfp> no idea
sporkmonger has joined #ocaml
fraggle_laptop has quit [Read error: 104 (Connection reset by peer)]
Pimm has joined #ocaml
ikaros has joined #ocaml
Associat0r has joined #ocaml
eni_ is now known as albacker
lutter has joined #ocaml
<Leonidas> google translates it as: OMake great. OMake is amazing I'm serious.
<Leonidas> excite translates it as: It is ..OMake.. terrible. OMake is terrible in [maji].
<Leonidas> (I guess the author said awesome, otherwise this long article makes no sense)
<flux> hm, it'd be nice if ocambuild was that smart that if an .mli-file gets changed _but_ the resulting .cmi-file doesn't, it wouldn't recompile its dependencies
<flux> its already quite slow so it might even become faster for recompilations if it did that :)
Yoric has quit []
<Leonidas> mfp: btw, omake seems to work with gamin just as well. I replaced libfam by libgamin and ocaml -P worked.
jcaose_ has joined #ocaml
<Leonidas> except for omake: Symbol `FamErrlist' has different size in shared object, consider re-linking
<Leonidas> but this does not look promlematic
<Leonidas> at least it hasn't crashed yet :)
tensorpudding has joined #ocaml
jcaose has quit [Success]
<Camarade_Tux> hmmm, scary still
jcaose_ has quit [Read error: 104 (Connection reset by peer)]
<thelema_> Leonidas: "OMake is amazing. Omake is seriously amazing."
ttamttam1 has quit ["Leaving."]
Pimm has quit [Read error: 110 (Connection timed out)]
<Leonidas> thelema_: thanks, just like I expected.
middayc has joined #ocaml
tmaeda is now known as tmaedaZ
smimram has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
Pimm has joined #ocaml
Narrenschiff has quit []
excode has joined #ocaml
Snark has joined #ocaml
_zack has quit ["Leaving."]
excode has quit ["Leafing."]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
jcaose has joined #ocaml
ttamttam has joined #ocaml
ulfdoz has joined #ocaml
ttamttam has quit ["Leaving."]
_zack has joined #ocaml
_andre has quit ["leaving"]
TaXules has quit [Read error: 54 (Connection reset by peer)]
ski_ has quit ["Lost terminal"]
pad has joined #ocaml
pad has quit [Client Quit]
ski_ has joined #ocaml
ptmahent` has quit [Read error: 104 (Connection reset by peer)]
_zack has left #ocaml []
_zack has joined #ocaml
_zack has quit ["Leaving."]
slash_ has joined #ocaml
lutter has quit [Read error: 110 (Connection timed out)]
hcarty has quit [Read error: 104 (Connection reset by peer)]
hcarty has joined #ocaml
Snark has quit ["Ex-Chat"]
lutter has joined #ocaml
TaXules has joined #ocaml
Pimm has joined #ocaml
Waleee has joined #ocaml
ikaros has quit [Read error: 60 (Operation timed out)]
ikaros has joined #ocaml
jcaose has quit [Read error: 54 (Connection reset by peer)]
sramsay has joined #ocaml
lutter has quit ["Leaving."]
slash_ has quit [Client Quit]
Pimm has quit [Read error: 110 (Connection timed out)]
Pimm has joined #ocaml
middayc has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
lutter has joined #ocaml
Waleee has quit [Read error: 110 (Connection timed out)]
lutter has quit ["Leaving."]
munga_ has joined #ocaml
sramsay has quit [Read error: 110 (Connection timed out)]
albacker has quit [Read error: 113 (No route to host)]
tmaedaZ is now known as tmaeda
Pimm has quit [Read error: 110 (Connection timed out)]