flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
Neros has quit [Remote host closed the connection]
csakatoku has quit [Remote host closed the connection]
walter has quit [Ping timeout: 264 seconds]
arquebus has joined #ocaml
darkf has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
arquebus has quit [Quit: Konversation terminated!]
rwmjones has joined #ocaml
csakatoku has joined #ocaml
ollehar has joined #ocaml
ben_zen has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
mfp has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 245 seconds]
pkrnj has joined #ocaml
oriba has quit [Quit: oriba]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
<whitequark> what do you use to feed include directories into ocamldebug ?
<whitequark> also how much do you have to drink to forget how horrible it is
<whitequark> but mainly I'm interested in the -I switches, yes.
breakds has joined #ocaml
<whitequark> gasche: I'm strongly convinced that native binaries compiled by 4.00.1 tend to seemingly arbitrarily drop stack frames.
<whitequark> well, they miss from exception backtraces.
<whitequark> why can this happen? some kind of inlining? ocaml's version of -fomit-frame-pointer ?
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
void64 has quit [Read error: Operation timed out]
lifeng has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
breakds has quit [Quit: Konversation terminated!]
breakds has joined #ocaml
csakatoku has joined #ocaml
Drup has quit [Quit: Leaving.]
ousado has quit [Remote host closed the connection]
ousado has joined #ocaml
n06rin has quit [Read error: Connection reset by peer]
n06rin1 has joined #ocaml
nlucaroni has joined #ocaml
<whitequark> to answer both of my questions: ocamlfind query -recursive -i-format, and `true: debug' is not enough: you have to compile foo.d.byte/native in order to get full stacktraces.
csakatoku has quit [Remote host closed the connection]
Xom has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
n06rin1 has quit [Quit: Leaving.]
Xom has joined #ocaml
gnuvince- has joined #ocaml
<whitequark> hm, I observe some extremely erratic Hashtbl behavior which I don't understand.
<whitequark> I have a Hashtbl with string keys. in very rare, but always reproducible (with same input data) case I can iterate over the hash table and it will return false on Hashtbl.mem table key, with its own key.
<whitequark> not only the strings aren't mutated, but I have also tried explicitly copying them before storing.
breakds has quit [Remote host closed the connection]
<whitequark> if I do OCAMLRUNPARAM=R, then another hashtable with string keys breaks in an even stranger way
<whitequark> it cannot find elements, but only if I use ExtHashtbl.Hashtbl.find_option. if I just use Hashtbl.find and handle the exception myself, then everything works.
<whitequark> I can reproduce this on my CI. All of this makes zero sense. :/
<whitequark> I'm now completely sure I found a bug in ocaml. Steps to reproduce: 1. opam init --comp=4.00.1; export OCAMLRUNPARAM=Rb; opam install sexplib.
<whitequark> and it explodes with:
<whitequark> Error: The files lib/pre_sexp.cmi and lib/sexp.cmi make inconsistent assumptions over interface Pre_sexp
<whitequark> export OCAMLRUNPARAM=; opam install sexplib: successful.
<whitequark> verified that 4.02.0dev+fp behaves exactly same.
<whitequark> tried 4.00.1 in a 32-bit Ubuntu chroot; all bugs present are exactly same
csakatoku has joined #ocaml
<whitequark> there's also no GC cycles happening in either case
csakatoku has quit [Ping timeout: 245 seconds]
carleastlund has quit [Quit: carleastlund]
<whitequark> so it turns out that the problem was ExtHashtbl.Hashtbl.find_option. once I've eliminated this and other usage of ExtHashtbl, weird bugs stopped.
<whitequark> which is not surprising, given its implementation: https://code.google.com/p/ocaml-extlib/source/browse/trunk/extlib/extHashtbl.ml
<whitequark> and the fact that representation has changed in 4.00 :/
Simn has joined #ocaml
Snark has joined #ocaml
yacks has quit [Ping timeout: 246 seconds]
yacks has joined #ocaml
n06rin has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
zpe has joined #ocaml
ben_zen has quit [Ping timeout: 240 seconds]
caligula has quit [Ping timeout: 240 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
<gasche> whitequark: Batteries had to go through hoops to support compiling from both OCaml 4.x and 3.x, given that Hashtbl representation change
<gasche> sorry I didn't see your question earlier, I could have cut you some search
<gasche> note that this is entirely ExtHashtbl (and consequently BatHashtbl, as Batteries extends Extlib and reuses its implementation) fault for unsafely breaking type abstraction
<gasche> re. your "dropping stack frames" question, I'm interested
<gasche> did you observe a change in behavior compared to 3.12?
<gasche> note that tail calls will not appear in the stack trace
Kakadu has joined #ocaml
ulfdoz has joined #ocaml
cdidd has joined #ocaml
mcclurmc has joined #ocaml
ollehar has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
talzeus has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
shinnya has quit [Quit: ZNC - http://znc.in]
ollehar has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
void64 has joined #ocaml
ollehar has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 245 seconds]
beginner42 has joined #ocaml
talzeus has joined #ocaml
<beginner42> dsheets: hi, are you online?
talzeus has quit [Read error: Connection reset by peer]
talzeus_ has joined #ocaml
<n06rin> i'm online. But i'm noob at ocaml world
<beginner42> i have a project on github, but i have trouble with the DLLs i am using
tane has joined #ocaml
csakatoku has joined #ocaml
introom has joined #ocaml
n06rin has quit [Quit: Leaving.]
csakatoku has quit [Remote host closed the connection]
ygrek has joined #ocaml
ttamttam has joined #ocaml
Drup has joined #ocaml
introom has quit [Read error: Connection reset by peer]
introom has joined #ocaml
tane has quit [Quit: Verlassend]
shinnya has joined #ocaml
ggole has joined #ocaml
introom has quit [Read error: Connection reset by peer]
introom has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
ttamttam has quit [Quit: ttamttam]
void64 has quit [Read error: Operation timed out]
Xom has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0.1/20130814063812]]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
Xom has joined #ocaml
Xom has quit [Client Quit]
csakatoku has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
contempt has quit [Read error: Operation timed out]
breakds has joined #ocaml
introom has quit [Remote host closed the connection]
walter has joined #ocaml
chambart has joined #ocaml
contempt has joined #ocaml
Drup has quit [Ping timeout: 245 seconds]
walter has quit [Read error: Connection reset by peer]
walter has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
n06rin has joined #ocaml
<gasche> nlucaroni: I wanted to have a look at your SO question but I miss a reproducible code example
<gasche> I tried to compile phylocaml from github but the current state of the repo seems utterly broken
<gasche> (after a bunch of changes I made, which I'd be happy to send to you if that can help, I got stopped by the missing dgemm_ function that doesn't seem to be implemented anywhere)
void64 has joined #ocaml
introom has joined #ocaml
<whitequark> gasche: I know about tail calls; the skipped frames were intermediate. I don't think my code compiles on 3.12, but I'll check.
introom has quit [Ping timeout: 264 seconds]
ben_zen has joined #ocaml
csakatoku has quit [Remote host closed the connection]
introom has joined #ocaml
introom has quit [Read error: Connection reset by peer]
<gasche> whitequark: can't do much without a reproducible test cases
<gasche> *case
introom has joined #ocaml
<whitequark> gasche: sure; I'll try to make one.
<whitequark> thanks
q66 has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
introom has quit [Read error: Connection reset by peer]
introom has joined #ocaml
ben_zen has quit [Quit: whee]
csakatoku has joined #ocaml
introom has quit [Read error: Connection reset by peer]
introom has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
yacks has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
caligula has joined #ocaml
introom has quit [Remote host closed the connection]
void64 has quit [Read error: Connection reset by peer]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 245 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
hyperboreean has quit [Quit: leaving]
Kakadu has quit [Ping timeout: 245 seconds]
hyperboreean has joined #ocaml
n06rin has quit [Quit: Leaving.]
<beginner42> i get this warning, why is opam installing the dlls in a directory unknown to ld.conf
<beginner42> ocamlfind: [WARNING] You have installed DLLs but the directory /home/me/.opam/4.00.1/lib/stublibs is not mentioned in ld.conf
<gasche> beginner42: it may be a path problem, with ocamlfind comin from your system packager instead of the same opam switch
<gasche> does `which ocamlfind` confirms that it is from opam?
<beginner42> the output from `which ocamlfind`
<beginner42> /home/me/.opam/4.00.1/bin/ocamlfind
<gasche> ok, so you have the right ocamlfind
<gasche> in particular "ocamlfind printconf" should point to a ld.conf file in OPAM-land
<gasche> hm
<gasche> what is the relevant path in this ld.conf file?
tane has joined #ocaml
<gasche> beginner42: the last path is the ld.conf file used by ocamlfind
<gasche> can't you find ../4.00.1/lib/stublibs in it?
<beginner42> /home/me/.opam/4.00.1/lib/ocaml/stublibs /home/me/.opam/4.00.1/lib/ocaml
<gasche> so you have lib/ocaml/stublibs instead of lib/stublibs
<gasche> what's your `opam --version`?
<beginner42> 1.1.0
<gasche> I have no idea what the problem is, you should consider filing a bug report
tobiasBora has joined #ocaml
<beginner42> the ld.conf is not meant to be manipulated manually?
<gasche> you can do that to fix the report, but no, it's only a hack
<beginner42> how do i file a bug report for ocaml?
<beginner42> or opam in this case
ygrek has quit [Remote host closed the connection]
introom has joined #ocaml
<flux> this seems pretty active: https://github.com/OCamlPro/opam/issues
ygrek has joined #ocaml
introom has quit [Ping timeout: 245 seconds]
<gasche> beginner42: it's an opam bug report, on the adress provided by flux
<gasche> hm
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 241 seconds]
<beginner42> gasche: ok, i will try to report this issue
<beginner42> the problem is if i add the line mentioned in the warning to the ld.conf file, i still get the runtime error that the function name is not known
vpit3833 has quit [Remote host closed the connection]
<gasche> kerneis, rks`: I see two other choices to solve the regression introduced by the modular-ocamlbuild feature
<gasche> the first is to get the tags passed to myocamlbuild.ml from a new command-line option -plugin-tag(s) only
<gasche> the second is to have -plugin-pkg(s) only, which means that plugin compilation can (for now) only be tweaked by using ocamlfind packages
<gasche> they both solve the "true:" interference problem, are less convenient for users than the _tags file (but this doesn't work), yet are applicable in the OASIS setting and for all people scripting the ocamlbuild invocation under a makefile
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
void64 has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
tobiasBora has quit [Read error: Connection reset by peer]
tobiasBora has joined #ocaml
zpe has quit [Remote host closed the connection]
<nlucaroni> Is it possible to build a cma with cstubs in custom mode?
Neros has joined #ocaml
<gasche> nlucaroni: I pinged you earlier about your StackOveflow question: could you provide a reproducible example with source code?
<gasche> I tried to use the git master HEAD of your phylocaml project, but it's broken (does not compile for multiple reasons)
<gasche> nlucaroni: to answer your question, by guess would be that yes, -custom is possible, but only when doing static linking
<gasche> never tried mysefl though
<nlucaroni> Thanks. I missed that message. I'll push my configuration to github and that will do.
<nlucaroni> it's a mess right now since I decided to attempt oasis again, but I cannot seem to produce a custom static library. (THe Custom option is only available under the executable block).
<gasche> I don't know how to do that with oasis; do you still have your barely-working pure-ocamlbuild version?
<nlucaroni> yeah, but i've been messing with it. It'll take a minute for me to get back to that previous position.
<gasche> well if your oasis version works better, you shouldn't mind :p
<nlucaroni> well, i have some scripted C files, I didn't see anywhere to have oasis import custom myocamlbuild code. I may have missed it though, considering it has similar features for the _tags file.
<gasche> I have a question about your scripted file
<gasche> the bit64.c version uses a Val_int64 macro, where does it come from? I don't have one on my OCaml system
<gasche> to answer your question nlucaroni, there should be (* OASIS_START *) (* OASIS_STOP *) comment in the oasis-generated myocamlbuild.ml file
<gasche> you should be able to edit everywhere outside those comments
<nlucaroni> it should be apart of the byterun/ints.c.
<nlucaroni> okay, maybe I will stick with oasis
<nlucaroni> I'm sorry, Int64_val is defined in myvalues.h
<nlucaroni> mlvalues.h*
tobiasBora has quit [Read error: Connection reset by peer]
<gasche> nlucaroni: yes, but not Val_int64 which you also use
<nlucaroni> right, i see. I've got that in another file locally that was not in the last commit. thanks.
<nlucaroni> I'm going to try this thing with oasis. I'll touch base later --and update the repo-- if I have issues. Thanks
<gasche> you should close the SO question if it's baseless now
<gasche> (I would have guessed the problem was that the .cma didn't have the right dynamic linking options)
<gasche> nlucaroni: when trying to compile your project I think I also encountered an issue with the -use-ocamlfind mode not overloading ocamlmklib; did you see something similar?
<nlucaroni> Yes I did.
<gasche> how did you work around that?
<gasche> I looked in the ocamlbuild sources and it indeed seems to be a bug (or rather a questionable design choice based on the fact that someone some years ago said that mklib should be deprecated because it's not nice)
<nlucaroni> I went into the _build directory an executed the ocamlfind ocamlmklib directly. It was something I would deal with once the compile/link options were taken care of.
<gasche> ok
<gasche> I think I'll add a fix for that upstream
<gasche> in the meantime, a workaround is to modify Options.ocamlmklib from your myocamlbuild.ml
asmanur_ has quit [Ping timeout: 264 seconds]
<gasche> Options.ocamlmklib := S[A"ocamlfind"; A"ocamlmklib"]; in After_options
<nlucaroni> in after options? Those compiler assignments (in oasis setup) are in the Before_options
<gasche> hm
<gasche> anywhere you like, in fact
<gasche> if it is in Before_options, -use-ocamlfind will overwrite them, but the bug is precisely that use_ocamlfind doesn't set the ocamlmklib variable, so you're safe
<nlucaroni> ahh, that makes sense.
talzeus_ has quit [Ping timeout: 245 seconds]
gnuvince- has quit [Ping timeout: 245 seconds]
osa1 has joined #ocaml
darkf has quit [Quit: Leaving]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
yacks has quit [Ping timeout: 260 seconds]
yacks has joined #ocaml
osa1 has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 245 seconds]
ousado has quit [Read error: Operation timed out]
ousado has joined #ocaml
<nlucaroni> Gasche, I commited changes to phylocaml so it compiles with the issue i mentioned on SO if you'd like to attempt diagnosing the issue.
<gasche> thanks
hinayana has joined #ocaml
<gasche> nlucaroni: I can use the produced phylocaml.cma with ocamlc, but not ocaml
<gasche> so I think the issue is only with dynamic linking
<nlucaroni> Okay, i didn't try it with ocamlc.
osa1 has joined #ocaml
osa1 has quit [Client Quit]
<nlucaroni> so i'd have to create a dependency for the .so file?
tani has joined #ocaml
tane has quit [Disconnected by services]
ggole has quit []
tani is now known as tane
shinnya has joined #ocaml
<gasche> nlucaroni: I still couldn't find a definition for Val_int64
<gasche> but otherwise "ocamlbuild phylocaml.top" works fine
Neros has quit [Remote host closed the connection]
<gasche> (ie. I defined Val_int64 to something dummy, compiled, and then with "./phylocaml.top -I _build/lib" I can ask "Sequence.create 10;;")
<nlucaroni> again, didn't include that file. I thought I had, anyway, I did get the cma to work with ocaml. It was just including the dynamic linking part. I thought I had tried that, but I ugess not in the correct combination of other things.
<nlucaroni> thanks for you help, again. I'll close the SO question.
<nlucaroni> so, the -custom expands all the command line options when linking against the generated library, but when passing to ocaml there only exists static linking? And, that's why -dllib and -cclib are required when including the custom option?
<nlucaroni> excuse me, when pasing to ocaml there only exists dynamic inclusion of the library*
<gasche> "ocamlc" is the compiler that can statically link archives to produce executables
<gasche> but "ocaml" is a toplevel that will, indeed, load stuff dynamically
Snark has quit [Quit: leaving]
<gasche> note nlucaroni that I don't think the -custom part of your myocamlbuild.ml modification is necessary; you can just add the "custom" tag when you want to compile with -custom
<gasche> (and I think in the byte case you can pass both -dllib and -clib at once; not in the native case as ocamlopt doesn't support -dllib)
<nlucaroni> I understand. I was under the impression that ocaml could deal with a static library. Thanks again. That was really helpful.
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
<nlucaroni> I understand. I was under the impression that ocaml could deal with a static library. Thanks again. That was really helpful.
<nlucaroni> opps, wrong window.
Simn has quit [Quit: Leaving]
beginner42 has quit [Quit: Leaving]
hinayana has quit [Quit: Quitte]
gnuvince- has joined #ocaml
Drup has joined #ocaml
gnuvince- has quit [Changing host]
gnuvince- has joined #ocaml
gnuvince- has quit [Remote host closed the connection]
gnuvince- has joined #ocaml
<pippijn> # BatList.unique ~cmp:(fun a b -> fst a = fst b) [(1, 1); (1, 2)];;
<pippijn> - : (int * int) list = [(1, 2)]
<pippijn> unique takes the *last* element
<pippijn> I think the documentation should mention this counter-intuitive fact
<whitequark> gasche: btw, is it normal that opam and ocamlbuild misbehave with OCAMLRUNPARAM=R ?
<whitequark> opam (or something it invokes, I think it's the compiler) fails to e.g. build sexplib, and ocamlbuild cannot properly track modification anymore (rebuilds all the time)
pkrnj has joined #ocaml
<whitequark> the sexplib thingy is easily reproduced, not sure about ocamlbuild one
tane has quit [Quit: Verlassend]
pkrnj has quit [Quit: Computer has gone to sleep.]
ulfdoz has quit [Ping timeout: 248 seconds]
gnuvince- has quit [Changing host]
gnuvince- has joined #ocaml
mcclurmc has joined #ocaml
Anarchos has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]