flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
_zack has quit ["Leaving."]
ggole has left #ocaml []
chickenzilla has quit ["J'y trouve un goût d'pomme."]
|jedai| has joined #ocaml
xah_lee has joined #ocaml
<xah_lee> does anyone use hol here?
<xah_lee> seems to have a build problem with ocaml 3.11.x
<xah_lee> but works with 3.08
Alpounet has quit ["Ex-Chat"]
ched_ has quit [Remote closed the connection]
Ched has joined #ocaml
_dartelin has joined #ocaml
_dartelin has quit [Client Quit]
rwmjones_lptp has quit ["This computer has gone to sleep"]
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
dartelin has quit [Read error: 110 (Connection timed out)]
seafood has quit []
xah_lee has quit ["banned in #emacs by johnsu01 (john sullivan)"]
<Camarade_Tux> can anyone guess why this doesn't work ? (I finally found out)
<Camarade_Tux> let genome_pid = create_process_env "flam3-genome" [||] base_env stdin genome_file genome_err_file in
<Camarade_Tux> that's something that always catchs me
vuln has joined #ocaml
slash_ has quit ["Lost terminal"]
Demitar has joined #ocaml
verte has joined #ocaml
Camarade_Tux has quit ["Leaving"]
angerman has joined #ocaml
kaustuv has joined #ocaml
<thelema> drat. if camarade_tux comes back, let him know that he has to pass the name of the program again as the first entry in the argv array.
angerman has quit []
angerman has joined #ocaml
alexyk has joined #ocaml
vuln has quit ["leaving"]
wsmith84 has joined #ocaml
ched_ has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
wsmith84 has quit ["Leaving"]
wsmith84 has joined #ocaml
<wsmith84> quick question
<wsmith84> newbie question
<m3ga> wsmith84: don't ask to ask, just ask
<wsmith84> If you create an array of floats, will they be allocated as a single contiguous array in memory, or will you obtain an array of 3 pointers, pointing to new float objects?
<wsmith84> (A comment about strings in the docs makes me think it might do an array of ptrs)
<m3ga> floats contained in arrays are unboxed
<wsmith84> Can I conclude arrays are always unboxed then?
<wsmith84> (or more precisely, that they always contain unboxed values)
<m3ga> actually what I said is only true of the native compiler
<m3ga> no, if you have an array of eg records, they will be unboxed
<wsmith84> (thx m3ga, that's the only one I'm interested in)
<wsmith84> is there any way to verify what the compiler did, apart from generating intermediate code?
<m3ga> sorry i meant boxed for records, unboxed fro float
<m3ga> not that i know of
<wsmith84> I got that.
<wsmith84> ... thought technically it wouldn't be hard to make the records unboxed (they woudl just contain ptrs though, I'm guessing)
<wsmith84> hmmm
<wsmith84> m3ga: How about a record? Is it really implemented like a C struct?
<wsmith84> Meaning, contiguous in one chunk of memory, or an array of ptrs?
<m3ga> the struct itself is, so floats and ints in the struct will be unboxed, but lists/arrays/records etc that are part of a struct will be boxed
jeddhaberstro has quit []
<wsmith84> thx m3ga
alexyk has quit []
gaze__ has quit []
<thelema> wsmith84: although everything not representable as an int is boxed, floats have two special exceptions: arrays of floats and records (not tuples) of only floats.
<wsmith84> Optimizations for common cases, ad-hoc I'm guessing.
<wsmith84> thelema: just wondering, what's your tool for looking up documentation on a specific function? do you use tags?
<wsmith84> or just source?
<wsmith84> For e-lisp, there is pretty nice Emacs integration, e.g. prints args def in minibuffer. Would it be doable to add somthing like that for Caml? There's no introspection, right?
<wsmith84> (sorry, was unclear, i meant the minibuffer shows help in the minibuffer when the cursor is over a lisp function)
love-pingoo has quit ["Connection reset by pear"]
<wsmith84> If I wanted to represent a number internally as a decimal number (with fractions), e.g. for accounting purposes, is there a type in the std lib you would recommend I use? (other than using a 10**8 multiple of int or something like that)
<wsmith84> e.g. something like Python's "decimal" module
<thelema> wsmith84: I just use the batteries docs - they're reasonably easy to find stuff in. Before that, the reference manual at http://caml.inria.fr/pub/docs/manual-ocaml/index.html 
<thelema> ocaml has no introspection, but the docs could be looked-up in.
<thelema> as to decimals, do you want fixed point or rationals?
<thelema> there's no fixed-point ocaml code, and there's the Num module for rationals and bigints
<thelema> nope, there's no decimal module like python - rationals are the closest we've got.
m3ga has quit ["disappearing into the sunset"]
<wsmith84> no, not rationals. Just a way precise representation of decimal numbers.
<wsmith84> I guess I'll write one.
<thelema> if it's any good, we'll include it in batteries.
<wsmith84> Ouf... my second Caml program in the stdlib? I'll need 3 code reviews ;-)
<wsmith84> Actually that would be a good exercise and one useful for others as well.
* wsmith84 is tempted.
<thelema> we'll test the hell out of it, of course.
<wsmith84> Oh, that brigns another question...
<wsmith84> unit tests.
<wsmith84> What do you guys usually do?
* wsmith84 feels a littlie less need for unit tests in caml than in other langs
<thelema> roll our own, but some people use OUnit
<wsmith84> Do you usually keep your unit tests in a separate file?
<thelema> OUnit will get integrated into (and used by) batteries sometime soon. Probably pre-1.0
<wsmith84> (this is more a style question)
<thelema> yes, often separate folder
<wsmith84> Another one: has anyone succesfully used scons for build? I've been using MMottl's OCamlMakefile so far.
<thelema> see bin-prot for one good example.
<wsmith84> Looking at switching to scons at some point.
<wsmith84> thanks, great ptr
<wsmith84> thelema: for batteries, the .mli / .ml don't get installed, is this correct?
<wsmith84> I suppose you just look in the source code for docs.
<wsmith84> I get only a few libs installed under /usr/local/lib/ocaml/..., in contrast to the "regular" lib which installs .mli files there.
<wsmith84> ohoh never mind I'll figure it out, I see additional instructions in the source.
angerman has quit []
angerman has joined #ocaml
Mr_Awesome has joined #ocaml
seafood has joined #ocaml
seafood has quit []
seafood has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
wsmith84 has quit [Read error: 110 (Connection timed out)]
ilor has quit [Read error: 110 (Connection timed out)]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
Alpounet has joined #ocaml
gaze__ has joined #ocaml
ttamttam has joined #ocaml
xevz has quit [Read error: 60 (Operation timed out)]
xevz has joined #ocaml
Stefan_vK has joined #ocaml
Stefan_vK1 has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has joined #ocaml
chickenzilla has joined #ocaml
_zack has joined #ocaml
m3ga has joined #ocaml
s4tan has joined #ocaml
tonyIII_ has joined #ocaml
tonyIII__ has quit [Connection reset by peer]
l_a_m has quit ["Lost terminal"]
l_a_m has joined #ocaml
chickenzilla has quit [Read error: 113 (No route to host)]
acatout has joined #ocaml
ilor has joined #ocaml
angerman has quit []
OChameau has joined #ocaml
flux has quit [Read error: 104 (Connection reset by peer)]
flux has joined #ocaml
th5 has joined #ocaml
angerman has joined #ocaml
gaze__ has quit []
hkBst has joined #ocaml
angerman has quit []
pixel_ has quit ["leaving"]
kaustuv has quit [Read error: 113 (No route to host)]
chickenzilla has joined #ocaml
pixel_ has joined #ocaml
_zack has quit [Remote closed the connection]
_zack has joined #ocaml
angerman has joined #ocaml
bla has quit [Read error: 113 (No route to host)]
verte has quit ["http://coyotos.org/"]
<Alpounet> hi
<Alpounet> Is there a way to tell ocamlc (installed with godi) where he should look for .cma's e.g ?
seafood has quit []
<flux> -I ?
<Alpounet> Am I obliged to copy them in $GODI/lib/ocaml/ ?
<flux> you can use any paths with -I?
<flux> I've just installed my own libraries with ocamlfind too, and let it handle the issue
<Alpounet> -I add also the given directories for looking for CMAs ?
<flux> well, the manual page doesn't say that, but I'm in the belief that it does, yes
<Alpounet> ok
<Alpounet> it seems to be okay
<Alpounet> another error to fix now :p
<th5> Does anyone else use ocamlspotter?
<th5> I started using it this week and its great (well, great as in kind of thing java guys have had in eclipse for ages). One thing I don't like is that it has to patch the compiler. Doesn't seem to be packaged for any distributions.
<flux> I haven't used - possibly for the reason you just said..
<flux> iirc there are plans to enhance the builtin capabilities of the ocamlc to produce information in a level required by ocamlspotter
<flux> but I'm not sure if the plans go far enough
<th5> hmm
<th5> yeah - right now i have a separate "sandbox" folder which the patched compiler and a few different libraries
<th5> but its great for jumping into the source of a big project
<th5> i think i remember xavier leroy commenting about extending .annot files but havent heard anything since
<th5> (on the caml list)
willb has quit [Read error: 110 (Connection timed out)]
<Alpounet> When installing lablgtk with godi, I get : > ===> Configuring for conf-gtk1-1
<Alpounet> > Exception: Failure "Script gtk-config not found".
<Alpounet>
<Alpounet> any solution ?
<flux> install gtk1 -related development packages to your operating system?
<Alpounet> I think they are
<Alpounet> :/
<Alpounet> now I get (for lablgl) : > configure: error: gl enforced but no support found
<flux> well, gtk-config should come with it.. unless they also switched to pkg-config, I don't remember. (gtk2 uses pkg-config)
<flux> install gl and glu-related development libraries
<Alpounet> that's weird... I should have them.
<Alpounet> I've installed them and still get this error.
<Alpounet> Oh, fixed now. Great !
willb has joined #ocaml
kaustuv has joined #ocaml
sporkmonger has joined #ocaml
kaustuv has quit ["ERC Version 5.3 (IRC client for Emacs)"]
love-pingoo has joined #ocaml
wsmith84 has joined #ocaml
oriba has joined #ocaml
itewsh has joined #ocaml
ttamttam has left #ocaml []
Stefan_vK has quit [Read error: 104 (Connection reset by peer)]
Stefan_vK has joined #ocaml
slash_ has joined #ocaml
kaustuv has joined #ocaml
s4tan has quit []
Yoric[DT] has joined #ocaml
gaze__ has joined #ocaml
th5 has quit []
<Yoric[DT]> hi
Snark has joined #ocaml
<Alpounet> hi
infoe|wk has joined #ocaml
angerman has quit []
Asmadeus_ has joined #ocaml
wsmith84 has quit [Read error: 110 (Connection timed out)]
Asmadeus has quit [Read error: 104 (Connection reset by peer)]
Asmadeus has joined #ocaml
Asmadeus_ has quit [Nick collision from services.]
<kaustuv> In ocamlbuild, how do I get a .inferred.mli target to use the same tags as when byte compiling the equivalent .ml file?
kaustuv_ has joined #ocaml
kaustuv has left #ocaml []
kaustuv_ is now known as kaustuv
<svenl_> R/win 6
_zack has quit ["Leaving."]
jeddhaberstro has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
anryx has joined #ocaml
<kaustuv> I have some non-ocamlbuild-managed code in [../libs/stuff] and I want to add it to my search path. Apparently I can't say [ocamlbuild -I ../libs/stuff] because [-I] only takes implicit paths. How do I coax ocamlbuild to add [-I ../libs/suff] (or [-I ../../libs/stuff] as the case is) to commands?
<mrvn> What makes a path implicit?
<kaustuv> It must be relative and cannot begin with . or ..
<kaustuv> ./ or ../, rather
<mrvn> that makes no sense
<mrvn> why not -I /abs/path/libs/stuff ?
<kaustuv> For some reason ocamlbuild does not accept absolute paths for [-I].
<kaustuv> (I am sure there is a good reason, but it isn't documented anywhere, not even in the ocamlbuild source.)
OChameau has quit [Read error: 113 (No route to host)]
<mrvn> can't be. How else do you include /usr/lib/ocaml/3.11?
<flux> mrvn, what do you mean 'how else'? that's the root for -I +foo-stuff?
<kaustuv> Yes, +whatever is considered to be an "implicit path" according the rules.
<mrvn> ok, bad example.
<flux> but indeed, there must be some mechanism, unless that's the part godi's patched
<flux> because ocamlfind query str -> /opt/stow/godi/lib/ocaml/std-lib and ocamlfind query extlib -> /opt/stow/godi/lib/ocaml/pkg-lib/extlib
<kaustuv> I think if I were to use ocamlbuild with ocamlfind I wouldn't have this problem because ocamlfind would take care of the magic. Unfortunately, I cannot depend on ocamlfind.
ttamttam has joined #ocaml
<flux> why not?
<kaustuv> Instructions from higher ups, out of my control.
<flux> well, ocamlfind can tell its incantations
<flux> with some verbosity flag
<flux> if ocamlfind can do you, ocamlc can too :)
<flux> ops, do IT :-)
<kaustuv> I can run [ocamlbuild -ocamlc "ocamlc -I ../../libs/stuff"], of course, but that's so far been too ugly to seriously entertain. But if that's what's needed, that's what I'll end up doing.
<flux> perhaps the mailing list can give you advice
<flux> or possibly encourage you to submit a bug report :)
<mrvn> ln -s ../../lib/stuff mystuff; ocamlc -I mystuff
<kaustuv> Won't work. Any .cm* found under current directory, even under symlinks, trips ocamlbuild's hygiene traps.
<kaustuv> Which is the reason I had to move it to ../libs in the first place.
anryx has quit [Remote closed the connection]
<flux> didn't it have antihygiene declarations?
roliba has joined #ocaml
<Yoric[DT]> grmphhh
<Yoric[DT]> git pull ===> "Already up-to-date"
<Yoric[DT]> git push ==> To git+ssh://git.ocamlcore.org/gitroot/batteries/batteries.git
<Yoric[DT]> ! [rejected] master -> master (non-fast forward)
<Yoric[DT]> error: failed to push some refs to 'git+ssh://git.ocamlcore.org/gitroot/batteries/batteries.git'
* Yoric[DT] is tired of fighting git.
oriba has quit [Read error: 110 (Connection timed out)]
roliba is now known as oriba
<mfp_> Yoric[DT]: are you back to implicit merging with pull?
<Yoric[DT]> I've tried with fetch, pull --rebase and regular pull.
<mfp_> you can try git rebase origin/master
<mfp_> fetch alone doesn't merge/rebase
<Yoric[DT]> git rebase origin/master
<Yoric[DT]> Current branch HEAD is up to date.
mfp_ is now known as mfp
<mfp> are you working in a branch?
<Yoric[DT]> Not that I know of.
<mfp> git branch will tell you
<Yoric[DT]> I haven't done anything to work on a branch
<Yoric[DT]> no branch
<mfp> this means you're in a "detached branch"
<mfp> hmm
<mfp> 1 sec
<mfp> do git log and get the id of the last commit
<Yoric[DT]> ff3c8d121e76cb74649d9a442d93ad72bc5760b9
<mfp> then git checkout master git merge <THE ID HERE>
<Yoric[DT]> Ok, conflicts.
<mfp> this will merge the commits from your detached branch into master
<mfp> once resolved, git push should work
<Yoric[DT]> Well, things have just gotten worse.
<Yoric[DT]> git commit
<Yoric[DT]> myocamlbuild.ml: needs merge
<Yoric[DT]> myocamlbuild.ml: unmerged (dc4aaf8cfab25ce5712980a53de4cd63a8201d08)
<Yoric[DT]> myocamlbuild.ml: unmerged (b6d3e11ed02de2590cca3ab07ed2af7a7220de47)
<Yoric[DT]> myocamlbuild.ml: unmerged (302c864bda19163416421b9c0a6b23273e01e666)
kaustuv has left #ocaml []
<Yoric[DT]> git merge dc4aaf8cfab25ce5712980a53de4cd63a8201d08
<Yoric[DT]> You are in the middle of a conflicted merge.
<mrvn> Isn't git fun? So much easier than say svn. :)
<Yoric[DT]> Ok, resolved.
<Yoric[DT]> :)
<gildor> s/svn/darcs/
* mfp much prefers git's UI to darcs' nowadays, in fact (and he used darcs for a couple years before using git)
<mfp> Yoric[DT]: what did you have to do, just resolve manually, git add & commit, or something else?
<Yoric[DT]> A moment, I'm not out of trouble yet.
* gildor use git and darcs and for day-to-day dev, on a single project (no branch) prefer darcs over git
<gildor> mfp: but this is just a matter of taste
<mrvn> I always run into problems with git.
<Yoric[DT]> thelema: ping
<mrvn> I had enough cases where I had to clone a new git repository, diff the 2 working dirs and import the patch in the new one.
<mfp> gildor: well, there's a part that belongs to taste, and then there are objective problems. I ran into the exponential merge issue even for small repositories (good thing it's mostly fixed now). I still have problems with darcs when sending patches (encoding and stuff). I recently had to get a repository a couple times and reapply patches manually.
<mfp> regarding taste & UI, I prefer git's pager + colorization, and abhor the way to refer to patches in darcs
_zack has joined #ocaml
<gildor> mfp: never ran into this problem for now, maybe because I never tried the case you have encountered. git is a good tool but a little bit cryptic to beginner
<gildor> mfp: that is my principal concern. For people coming from svn background, git is hard to understand, whereas darcs is a little less cryptic
* Yoric[DT] will take a break.
* Alpounet is compiling LLVM and HLVM... which we can call a break
<gildor> mfp: with time, I have no doubt that git is superior in every aspect
<mfp> gildor: I wasn't doing anything special at all, just sending a few patches from my local ocsigen branch. I was told the patches generated by darcs were corrupted :|
<mfp> gildor: yes, darcs is probably easier to learn, and still easier to use than git in some ways, but the UI has remained relatively stale for too long, and I feel it gets in the way sometimes
<mfp> this is getting offtopic though
<gildor> indeed
* gildor go back to work on oasis.ml and ocaml-autobuild
<Yoric[DT]> How do I switch branch?
<Yoric[DT]> Ok, found out.
* Yoric[DT] has no clue what's going on with the git.
<Yoric[DT]> Ok, everything seems fixed.
m3ga has quit [Read error: 113 (No route to host)]
kaustuv has joined #ocaml
jeddhaberstro has quit []
<mrvn> What git needs is a nice frontend. :)
sporkmonger has quit []
<kaustuv> It has one. It's called hg convert.
sporkmonger has joined #ocaml
m3ga has joined #ocaml
ttamttam has left #ocaml []
sporkmonger has quit [Client Quit]
thermoplyae has joined #ocaml
<kmkaplan> Hello, anybody know how to easily use caml4p?
<kmkaplan> I would like to evaluate an expression if and only if it’s compiling on ocaml 3.11 or later.
m3ga_ has joined #ocaml
<kaustuv> Haha! Love the new batteries banner.
<kaustuv> Though one of them should surely point the other way?
<Camarade_Tux> kmkaplan, optcomp : http://gpl.internetconnection.net/vi/
<Camarade_Tux> oops, bad link : http://forge.ocamlcore.org/projects/optcomp/
<kmkaplan> Camarade_Tux: is it possible to do it easily without requiring a separate package?
m3ga_ has quit [Remote closed the connection]
<Camarade_Tux> kmkaplan, of course, I just don't know how :D
<kmkaplan> $OK. I’ll have a look at the sources. Thanks for the pointe.
<kmkaplan> Oops, no $ for you thoug :-)
<Camarade_Tux> I prefer € anyway ;p
<kmkaplan> Oh, France ? Here too.
<mrvn> kaustuv: I like mercurial
thermoplyae has left #ocaml []
_zack has quit [Read error: 104 (Connection reset by peer)]
_zack has joined #ocaml
<mrvn> Hi zack
_zack has quit [Client Quit]
<Yoric[DT]> kaustuv: good idea :)
sporkmonger has joined #ocaml
_zack has joined #ocaml
<Alpounet> good night
Alpounet has left #ocaml []
seafood has joined #ocaml
gaze__ has quit []
sbok_ is now known as sbok
sporkmonger has quit []
Snark has quit ["Ex-Chat"]
rjones has joined #ocaml
rjones has quit [Client Quit]
sporkmonger has joined #ocaml
willb has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has quit ["Leaving"]
sporkmonger has quit []
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]