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
joewilliams_away is now known as joewilliams
lopex has quit [Ping timeout: 258 seconds]
KDr2 has joined #ocaml
<thelema_> sheets: what do you mean by ocamldep calling referenced external functions?
<thelema_> external foo : type of foo = "caml_foo"
<sheets> yup
<thelema_> what are you doing replacing your C stubs?
<sheets> compile to bytecode
<sheets> then compile bytecode to js with js_of_ocaml
<thelema_> oh... hmm
<sheets> the C stubs print an error and exit
<thelema_> when you run ocamldep?
<sheets> they are built into a lib with ocamlmklib
<thelema_> sure.
<sheets> then when i run ocamldep on the application that uses this lib
<thelema_> so you have code with C stubs that just report that they're not implemented
<sheets> it prints the stub error message and kills the ocamldep
<sheets> yes
<sheets> to placate the ocaml compiler
<thelema_> sure, that makes sense. I can't see why ocamldep would run the code it's depping
<thelema_> it should just parse the file, extract any referenced external modules and print a line indicating the dependencies
<thelema_> jsnoj is your stubs?
<sheets> js_of_ocaml actually has the stubs in it for the caml_ builtins
<thelema_> is it possible the camlp4 you're using is calling the stubs?
<sheets> jsonoj is json-static/json-wheel for js_of_ocaml
<thelema_> ok.
<sheets> i dunno why the camlp4 would call the stubs… maybe
<thelema_> how are the stubs constructed?
<thelema_> let stub_function = failwith ..."?
<thelema_> kinda sloppy regex use in the sed line, but I assume it's producing the intended output
<sheets> yes
<thelema_> can you pastebin stubs.c?
<sheets> and the library makes fine
<thelema_> ok, can you pastebin `grep external *.ml`?
<thelema_> if one of your externals is not a function
<sheets> line 26
<thelema_> ... it might get evaluated on module load
<sheets> the code that's being built makes no calls to Unsafe.constant and the db_array.mli module makes no javascript specific calls at all
<thelema_> well, you might be able to get a backtrace with the backtrace
<sheets> by building the lib with debugging and using ocamlparam=b?
<sheets> does ocamlparam=b work for build commands?
<thelema_> well, you'd have to raise a real exception instead of printing
<thelema_> and exiting
<Xaseron> thelema_: do you know a faster way to get a list of random values than using Random.int?
<thelema_> faster as in less CPU cycles?
<Xaseron> the most of the time my benchmark spends on creating a random list
<thelema_> ok, what kind of random list do you need?
<Xaseron> >1 million values would be nice in a short time
<thelema_> uniform distribution 0-2^30?
<Xaseron> would be nice but not nescessery
<thelema_> what's necessary?
<Xaseron> necessary
<Xaseron> im sorry its late
<thelema_> you say it'd be nice to have integers uniformly in that range, what's necessary?
<thelema_> If you do bit twiddling, you can probably save time on random number generation (which is moderately expensive)
<Xaseron> they dont have to be uniform but not many duplicates
<thelema_> i.e. generate 3 20-bit numbers from two random.int calls
<thelema_> If you're using really big lists, maybe an array would be more efficient (it's not a trivial amount of work to create 1M+ cons cells
fraggle_ has quit [Quit: -ENOBRAIN]
alexyk has quit [Quit: alexyk]
<Xaseron> is there no trick to get an uninitlised array?
<thelema_> Xaseron: only for strings.
<thelema_> the other solution is to use a different random number generator. This was recently changed to give better randomness, but is (maybe a bit) more expensive than it was before
<thelema_> I've not benchmarked the two.
<thelema_> There's a MT implementation here: http://raevnos.pennmush.org/code/mathlib/
<thelema_> mmm, I think batteries is going to adopt some of that library - I've been looking for functions to generate random numbers in different distributions
fraggle_ has joined #ocaml
Boscop has quit [Ping timeout: 255 seconds]
<Xaseron> i go to bed and let it bench during that time
<Xaseron> gn8
<thelema_> Xaseron: 'nite
joewilliams is now known as joewilliams_away
nannto_ has joined #ocaml
Modius_ has joined #ocaml
Modius has quit [Ping timeout: 240 seconds]
Modius_ has quit [Quit: "Object-oriented design" is an oxymoron]
Modius has joined #ocaml
impy has quit [Ping timeout: 255 seconds]
impy has joined #ocaml
george_z0rwell has quit [Remote host closed the connection]
dnolen has quit [Quit: dnolen]
Reaganomicon has joined #ocaml
ulfdoz has joined #ocaml
vivanov has joined #ocaml
alexyk has joined #ocaml
wolverian has quit [Read error: Operation timed out]
vivanov has quit [Read error: No route to host]
wolverian has joined #ocaml
vivanov has joined #ocaml
ftrvxmtrx has joined #ocaml
alexyk has quit [Quit: alexyk]
nannto_ has quit [Quit: Leaving...]
Snark has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
alexyk has joined #ocaml
mjonsson has quit [Read error: Operation timed out]
philtor has quit [Ping timeout: 276 seconds]
ankit9 has quit [Quit: Leaving]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
ikaros has joined #ocaml
ygrek has joined #ocaml
larhat has joined #ocaml
alexyk has quit [Ping timeout: 252 seconds]
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
vivanov has quit [Ping timeout: 258 seconds]
vivanov has joined #ocaml
ankit9 has joined #ocaml
edwin has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
ftrvxmtrx has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
avsm has joined #ocaml
Amorphous has quit [Ping timeout: 264 seconds]
Xaseron has quit [Ping timeout: 258 seconds]
Xaseron has joined #ocaml
Amorphous has joined #ocaml
KDr2 has quit [Quit: Leaving.]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
eb4890 has joined #ocaml
jonafan has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
_andre has joined #ocaml
jonafan has joined #ocaml
lopex has joined #ocaml
jonafan has quit [Ping timeout: 250 seconds]
lamawithonel has quit [Ping timeout: 276 seconds]
digimmortal has joined #ocaml
munga has joined #ocaml
KDr21 has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
jonafan has joined #ocaml
<hcarty> thelema_: It's not pure OCaml, but GSL (via ocamlgsl) provides OCaml with large number of random number distributions
jonafan has quit [Read error: Operation timed out]
jonafan has joined #ocaml
axiles has joined #ocaml
iratsu has joined #ocaml
lamawithonel has joined #ocaml
Tobu has quit [Ping timeout: 258 seconds]
Tobu has joined #ocaml
Associat0r has joined #ocaml
eb4890 has quit [Ping timeout: 240 seconds]
mjonsson has joined #ocaml
mjonsson has quit [Remote host closed the connection]
Goncalo has joined #ocaml
dnolen has joined #ocaml
ygrek has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
iratsu has quit [Quit: Leaving.]
iratsu1 has joined #ocaml
iratsu1 has quit [Ping timeout: 250 seconds]
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
KDr21 has quit [Quit: Leaving.]
dnolen has quit [Quit: dnolen]
iratsu has joined #ocaml
joewilliams_away is now known as joewilliams
lopex has quit []
wtetzner has quit [Read error: Connection reset by peer]
wm5 has joined #ocaml
ankit9 has quit [Quit: Leaving]
digimmortal has quit [Ping timeout: 246 seconds]
lopex has joined #ocaml
rwmjones has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
mnabil has joined #ocaml
jamii_ has joined #ocaml
ikaros has joined #ocaml
chambart has quit [Ping timeout: 276 seconds]
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
sepp2k has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
chambart has joined #ocaml
ankit9 has joined #ocaml
ulfdoz has joined #ocaml
sepp2k has quit [Ping timeout: 255 seconds]
lamawithonel has quit [Read error: Connection reset by peer]
BiDOrD has quit [Read error: Connection reset by peer]
BiDOrD_ has joined #ocaml
sepp2k has joined #ocaml
mnabil has quit [Read error: Operation timed out]
mnabil has joined #ocaml
zorun has quit [Quit: leaving]
zorun has joined #ocaml
larhat has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
mnabil has quit [Ping timeout: 276 seconds]
jamii_ has quit [Ping timeout: 260 seconds]
vivanov has quit [Ping timeout: 240 seconds]
zorun has quit [Quit: leaving]
zorun has joined #ocaml
zorun has quit [Client Quit]
zorun has joined #ocaml
zorun has quit [Ping timeout: 244 seconds]
zorun has joined #ocaml
jamii has joined #ocaml
mnabil has joined #ocaml
ygrek has joined #ocaml
Snark has quit [Quit: Ex-Chat]
lamawithonel has joined #ocaml
mnabil has quit [Ping timeout: 240 seconds]
wm5 has quit [Ping timeout: 240 seconds]
axiles has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
munga has quit [Read error: Operation timed out]
iratsu has quit [Ping timeout: 276 seconds]
iris1 has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
edwin has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 250 seconds]
avsm has quit [Ping timeout: 255 seconds]
othiym23 has joined #ocaml
Anarchos has joined #ocaml
avsm has joined #ocaml
mnabil has joined #ocaml
iratsu has joined #ocaml
BiDOrD_ has quit [Read error: Operation timed out]
BiDOrD has joined #ocaml
willb has quit [Ping timeout: 255 seconds]
ikaros has quit [Quit: Ex-Chat]
KDr2 has joined #ocaml
mnabil has quit [Ping timeout: 240 seconds]
KDr2 has quit [Quit: Leaving.]
mnabil has joined #ocaml
<sheets> How do I make ocamlbuild only include syntax extension modules in camlp4 calls?
<sheets> the answer: write your ocamlfind META files correctly
willb has joined #ocaml
Associat0r has quit [Ping timeout: 255 seconds]
dnolen has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 258 seconds]
ulfdoz_ is now known as ulfdoz