wtetzner has quit [Read error: Connection reset by peer]
RafeKettler has joined #ocaml
RafeKettler has quit [Client Quit]
abdallah has quit [Quit: Ex-Chat]
RafeKettler has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
oriba has quit [Quit: oriba]
joewilliams is now known as joewilliams_away
RafeKettler has quit [Quit: RafeKettler]
RafeKettler has joined #ocaml
RafeKettler has quit [Client Quit]
wtetzner has joined #ocaml
mjonsson has quit [Remote host closed the connection]
RafeKettler has joined #ocaml
RafeKettler has quit [Quit: RafeKettler]
lamawithonel has quit [Ping timeout: 240 seconds]
RafeKettler has joined #ocaml
lamawithonel has joined #ocaml
dnolen has quit [Quit: dnolen]
RafeKettler has quit [Quit: RafeKettler]
RafeKettler has joined #ocaml
RafeKettler has quit [Client Quit]
lamawithonel has quit [Ping timeout: 240 seconds]
RafeKettler has joined #ocaml
jimmyrcom has quit [Ping timeout: 245 seconds]
lamawithonel has joined #ocaml
khia0 has joined #ocaml
RafeKettler has quit [Quit: RafeKettler]
khia0 has left #ocaml []
joewilliams_away is now known as joewilliams
RafeKettler has joined #ocaml
RafeKettler has quit [Client Quit]
RafeKettler has joined #ocaml
The_third_man has quit [*.net *.split]
rwmjones has quit [*.net *.split]
The_third_man has joined #ocaml
rwmjones has joined #ocaml
hto has joined #ocaml
clog has joined #ocaml
<everyonemines>
interesting, Sys.argv doesn't give the executable path as the first element when you use Sys.create_process
<adrien>
it should; have you put the executable as the first element when calling Unix.create_process?
<everyonemines>
Well yeah, otherwise it wouldn't work.
<everyonemines>
i tested with print_endline on sys.argv
<adrien>
I mean: Unix.create_process "foo" [|"foo"; other; args |]
RafeKettler has quit [Quit: RafeKettler]
<everyonemines>
no, I didn't do that.
<everyonemines>
I guess you should.
<_habnabit>
you need to, ues
<_habnabit>
yes
<everyonemines>
You don't _need_ to actually, it still works.
<_habnabit>
fsvo 'works'
<adrien>
yeah, it works but the process is probably going to not be happy with its argv
RafeKettler has joined #ocaml
<everyonemines>
It's a fork on windows.
<everyonemines>
So the process doesn't care.
<adrien>
this one doesn't, but most others will
mnabil has joined #ocaml
<everyonemines>
right
RafeKettler has quit [Quit: RafeKettler]
RafeKettler has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
wagle has joined #ocaml
avsm has joined #ocaml
maufred has joined #ocaml
ikaros has joined #ocaml
ttamttam has joined #ocaml
avsm has quit [Quit: Leaving.]
RafeKettler has quit [Quit: RafeKettler]
<everyonemines>
What's the best way to wait until every child process is done?
<everyonemines>
I was trying wait() in a loop, catching the exception, but it's not working.
<zorun>
I think Lwt is able to do that easily
maufred has quit [Ping timeout: 265 seconds]
rixed has quit [Quit: Lost terminal]
RafeKettler has joined #ocaml
<everyonemines>
lwt?
<zorun>
a cool library for Lightweight threads ;)
everyonemines has quit [Quit: Leaving.]
superbobry has joined #ocaml
ttamttam has quit [Ping timeout: 244 seconds]
ttamttam has joined #ocaml
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
superbobry has left #ocaml []
larhat has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
mattam has quit [Ping timeout: 276 seconds]
ikaros has quit [Quit: Ex-Chat]
RafeKettler has quit [Quit: RafeKettler]
_andre has joined #ocaml
lopex has joined #ocaml
RafeKettler has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
RafeKettler has quit [Client Quit]
sebz has joined #ocaml
maufred has joined #ocaml
maufred has quit [Client Quit]
maufred has joined #ocaml
RafeKettler has joined #ocaml
maufred_ has joined #ocaml
maufred_ has quit [Client Quit]
The_third_man has quit [Ping timeout: 245 seconds]
newbie has joined #ocaml
newbie is now known as Guest8200
<Guest8200>
how can i get rid of all the ocaml files i compiled on my ubuntu, because i want to use the ubuntu package instead
<bnwr>
Guest8200: my guess: remove all ocaml related ubuntu packages, remove files /usr/lib/ocaml* /lib/ocaml* /usr/local/lib/ocaml* and such
<bnwr>
(but I'm not an ubuntu user so I'm not completely sure)
<bnwr>
(also, it depends on how you did the install in the first place)
Guest8200 has quit [Ping timeout: 240 seconds]
newbie2 has joined #ocaml
_sol has left #ocaml []
ygrek has joined #ocaml
avsm has joined #ocaml
RafeKettler has quit [Quit: RafeKettler]
<newbie2>
how can i uninstall an ocaml i compiled myself?
Cyanure has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
RafeKettler has joined #ocaml
Anarchos has joined #ocaml
avsm has quit [Quit: Leaving.]
newbie2 has quit [Ping timeout: 258 seconds]
ygrek has quit [Ping timeout: 248 seconds]
RafeKettler has quit [Quit: RafeKettler]
jimmyrcom has joined #ocaml
emmanuelux has joined #ocaml
RafeKettler has joined #ocaml
avsm has joined #ocaml
RafeKettler has quit [Quit: RafeKettler]
zorun is now known as cnddl
cnddl is now known as zorun
RafeKettler has joined #ocaml
surikator has joined #ocaml
Cyanure has quit [Remote host closed the connection]
dnolen has joined #ocaml
drake01 has joined #ocaml
drake01 has quit [Quit: Ex-Chat]
dnolen has quit [Quit: dnolen]
avsm has quit [Quit: Leaving.]
drake01 has joined #ocaml
drake01 has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
mattam has joined #ocaml
ygrek has joined #ocaml
avsm has joined #ocaml
oriba has joined #ocaml
lopex_ has joined #ocaml
fnltslpk has joined #ocaml
lopex has quit [Ping timeout: 265 seconds]
<fnltslpk>
Hello. I am trying to interface C++ with OCaml, but callbacks in the simlest code behaves very weird. Here is the code: http://pastebin.com/KWuLeviH. When I compile and run it, callback returns only one of its arguments instead of their sum. What am I doing wrong?
RafeKettler has quit [Quit: RafeKettler]
<thelema>
first observation: your type for my_hello is wrong
<thelema>
second, L15 - where's the second parameter?
<thelema>
you're only giving v_cb one argument
<Anarchos>
fnltslpk i did it :)
lopex_ is now known as lopex
<thelema>
caml_callback2 takes three parameters: (f, a, b)
<fnltslpk>
In L15 there is three parameters: v_cb is callback, 8 and 6 are arguments, but only 6 is returned.
<thelema>
oops, I misread that as 8.6
<thelema>
your function myplus returns a unit - nothing.
<thelema>
do you mean that only 6 is printed out?
<adrien>
caml_callback2_exn(v_cb,8,6);
<thelema>
oh yeah, 8 and 6 aren't proper int values
<adrien>
wouldn't you have to Int_val?
<thelema>
adrien is correct
<thelema>
8+6 = 4+2 = 6
<thelema>
and it should have been 9 + 7, but the 'non-pointer' bit was ignored
<thelema>
hmm, 8 -> 4, 6 -> 3...
ttamttam has quit [Quit: Leaving.]
<thelema>
minus one for the expected sum of the pointer bits.
ttamttam has joined #ocaml
<adrien>
I need to install that binding-checker stuff
<fnltslpk>
Wow, when I wrote "Int_val(8),Int_val(6)" it returned 3. :\
<thelema>
Val_int
<thelema>
int_val converts a val to an int
ttamttam has quit [Client Quit]
<thelema>
adrien was correct that conversion is needed, but you need to convert the other way
<thelema>
you need to convert C integers to ocaml values. ocaml represents the integer n as (2n+1)
<Anarchos>
thelema i think there is a Val_int for that
<Anarchos>
in mlvalues.h
<fnltslpk>
Thank you. Int_val helped. Sorry for that silly mistake.
<thelema>
fnltslpk: you mean Val_int?
<fnltslpk>
Yes.
<adrien>
I always get the Int_val vs. Val_int wrong :-)
<thelema>
no worries. please distinguish "return" and "print" in the future - that confused me in the asking of your question
<adrien>
also, compile with -Wall -Wextra and a bunch of others (it catches Int_val vs. Val_int iirc)
lopex has quit []
<fnltslpk>
Okay. One more question: I am not very experienced in C/C++; what should I do if "uint16" or something else is defined in both OCaml headers and other C++ libraries?
<Anarchos>
fnltslpk #undef uint16
RafeKettler has joined #ocaml
<adrien>
uint16 defined in ocaml headers?
<adrien>
I'm actually quite surprised; are you maybe #include'ing too many things?
RafeKettler has quit [Client Quit]
<fnltslpk>
I can't find the compilation log, but something like uint16, uint8 etc were defined in OCaml and Haiku headers. I have never had such problems in languages without #define :)
<adrien>
haiku :P
<adrien>
Anarchos: \o/
surikator has quit [Quit: Computer is sleeping. I'm probably not.]
RafeKettler has joined #ocaml
Cyanure has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
<Anarchos>
fnltslpk i already interfaced haiku and beos
<Anarchos>
fnltslpk and ocaml sorry
<Anarchos>
fnltslpk but i had troubles with concurrency.
<fnltslpk>
Anarchos, I googled, but found nothing. Can I see your repository? :)
* adrien
redirects Anarchos to forge.ocamlcore.org
<Anarchos>
fnltslpk there were no repo
* adrien
redirects Anarchos to forge.ocamlcore.org :P
<Anarchos>
fnltslpk
<Anarchos>
fnltslpk i have a 7Mb archive though
<adrien>
)"irejtgk
<adrien>
wut?
<adrien>
can I spank you repeatedly until you use a publicly accessible version control system?
<fnltslpk>
Unfortunately I can't accept file via irc-web-client. It is better to use bitbucket to share ;)
<Anarchos>
adrien why ? it was a secret personnal development :=)
<adrien>
ok, so I can start spanking you :P
<adrien>
forge.ocamlcore.org!
<Anarchos>
adrien i prefer forge.haiku.org :p
<adrien>
could work but somehow, I believe forge.ocamlcore.org is a better fit ;-)
<adrien>
and forge.ocaml.org soon I believe
<thelema>
I get an ad placeholder for *.haiku.org
emmanuelux has quit [Ping timeout: 240 seconds]
larhat has quit [Quit: Leaving.]
lopex has joined #ocaml
maufred has quit [Quit: leaving]
surikator has joined #ocaml
RafeKettler has quit [Quit: RafeKettler]
RafeKettler has joined #ocaml
RafeKettler has quit [Client Quit]
RafeKettler has joined #ocaml
surikator has quit [Ping timeout: 260 seconds]
RafeKettler has quit [Client Quit]
surikator has joined #ocaml
RafeKettler has joined #ocaml
ttamttam has joined #ocaml
RafeKettler has quit [Client Quit]
ztfw has joined #ocaml
RafeKettler has joined #ocaml
bobry has joined #ocaml
mnabil has quit [Remote host closed the connection]
joewilliams_away is now known as joewilliams
surikator has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
avsm has quit [Quit: Leaving.]
surikator has joined #ocaml
<_habnabit>
hmmm. does it not bode well if both the native and bytecode version of my program segfault?
rby has quit [Read error: Connection reset by peer]
<thelema>
_habnabit: yes, probably something bad happening
<thelema>
Obj.magic?
<zorun>
exactly what I was going to ask :)
<_habnabit>
not AFAIK
drake01 has joined #ocaml
* _habnabit
does a git grep
<thelema>
-unsafe?
<_habnabit>
there's /some/ Bigarray.unsafe_get usage, but that should be 1) bounded properly and 2) not being called at this part of the program anyway
<thelema>
_habnabit: gdb the native code to see where it fails?
drake01 has quit [Client Quit]
<_habnabit>
nope, no usage of Obj.magic
<_habnabit>
and yeah, I'm rerunning it with ulimit -c unlimited right now
<_habnabit>
it just takes a very long time to run
drake01 has joined #ocaml
<thelema>
I'm pretty sure the bytecode wouldn't segfault on a stack overflow
<_habnabit>
that's why I ran it with the bytecode version :(
<_habnabit>
and I didn't think it would segfault so I didn't set the ulimit last night. sigh.
drake01 has quit [Read error: Connection reset by peer]
<_habnabit>
there's some use of Marshal, but it's only between a process and another process forked from it
rby has joined #ocaml
<thelema>
marshal would cause a segfault in both
<_habnabit>
also Marshal again /shouldn't/ be getting called at this part of the program
<_habnabit>
oh well; still waiting for it to finish again so I can use gdb
ulfdoz has joined #ocaml
rntz is now known as rntz_
sebz has joined #ocaml
rntz_ is now known as watr
<_habnabit>
oh god I just remembered that this process uses about 17G of address space
<_habnabit>
writing the core dump is sure taking a while..
<thelema>
ick.
<_habnabit>
ah, okay, top of the stack: memmove, then caml_blit_string
<_habnabit>
and immediately below that camlXml__31. I hope this isn't a bug in the Xml library.
<thelema>
I'm guessing so.
<_habnabit>
:(
<thelema>
although the identifier is not pretty - some anonymous function.
<_habnabit>
and there's no easy way of figuring out which?
drake01 has quit [Read error: Connection reset by peer]
sebz has joined #ocaml
RafeKettler has quit [Quit: RafeKettler]
TheSeparateFirst has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
drake01 has joined #ocaml
drake01 has quit [Read error: Connection reset by peer]
albacker has joined #ocaml
RafeKettler has joined #ocaml
<albacker>
how to store 0xFF in a char (8byte (or better unsigned_int)) ?
<albacker>
can i do let x = 0xFF ?
<bitbckt>
yes.
<albacker>
bitbckt, what if i want to read a uint8 from a channel?
<albacker>
i'm not sure if input_char would do the trick in fact
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 248 seconds]
<Anarchos>
fnltslpk are you here ?
sebz has quit [Quit: Computer has gone to sleep.]
<fnltslpk>
yes
<fnltslpk>
Anarchos, I am here.
<Anarchos>
fnltslpk have you solved your problem ?
<fnltslpk>
Anarchos, my problem was solved instantly, but I still have to either write own bindings or to wait until someone makes them publicly available :)
ttamttam has quit [Quit: Leaving.]
RafeKettler has quit [Quit: RafeKettler]
<Anarchos>
let me fnltslpk = List.find binding fnltslpk :)
<_habnabit>
is there a way to turn a unit BatIO.output into a Pervasives.out_channel ?
<fnltslpk>
Opposite is moving pointers from OCaml to C. I have tried to pass special callback function into the BApplication-inherited constructor to apply object's functions. It worked, but I've broke own code ><
ulfdoz has quit [Ping timeout: 252 seconds]
maufred has joined #ocaml
maufred has quit [Client Quit]
albacker has quit [Quit: .]
hto has quit [Quit: Lost terminal]
edwin has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 248 seconds]
RafeKettler has quit [Quit: RafeKettler]
<thelema>
_habnabit: how would that work for a string IO.output? In general it's not possible.
<thelema>
IIRC, one of the batIO libraries keeps a weakhashtbl of channels for outputs that were created from them, but I don't see this exposed anywhere
<_habnabit>
thelema, yeah, but for just unit IO.output it seems like it would be fine
<thelema>
I think the hashtbl was used for making sure outputs were closed
<_habnabit>
I figured out the problem with xmlm anyway, though.
<thelema>
Even for `unit IO.output`, maybe the output isn't writing to a normal channel, but is having some wierd side effect elsewhere.
<thelema>
glad your problem is solved
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
RafeKettler has joined #ocaml
arubin has joined #ocaml
<_habnabit>
do you have to do something in particular in _oasis to get setup.ml to build/install .cmx/.cmo/.o files?
<thelema>
other than mentioning the module names in a library section, I don't think so
<thelema>
the .cmxa has the .cmx files in it, the .o has the .o
<thelema>
err, .a has the .o
<thelema>
or at least it should have
<_habnabit>
ah, well. #require "xmlm" at the toplevel complained about a missing .cmo, and ocamlbuild -tag pkg_xmlm $x.native complained about a missing .o
<thelema>
then the META file is broken
<_habnabit>
aha.
<_habnabit>
do I have to write a META file, or should that be generated?
<thelema>
although it's auto-generated by oasis, so hmmm
<thelema>
it should be generated properly
RafeKettler has quit [Quit: RafeKettler]
<_habnabit>
oh, haha. there's a META file that was hand-written by the original author of the package
<thelema>
well, worst case, you can go and run `ocamlfind remove xmlm` and then rerun the `ocamlfind install` command and list the additional files you want to install - they should be in the _build directory
<_habnabit>
he was using a hand-rolled build system instead of oasis
<thelema>
that would be the problem.
<_habnabit>
oh, now it says 'cannot find file "src/META"'
<_habnabit>
so maybe it isn't autogenerated
<thelema>
_habnabit: re-run setup configure
<_habnabit>
ahh, `oasis setup` does it
<thelema>
hmm, where did the _oasis file come from? There's no oasis file in xmlm git
<_habnabit>
I made it
<_habnabit>
21:38:01 < _habnabit> he was using a hand-rolled build system instead of oasis
<thelema>
and there is a bug that just got fixed 4 hours ago
<_habnabit>
yeah, haha, that was the bug I was encountering; for some reason, his git hosting doesn't have all those revisions
<thelema>
that's pretty quick response time.
<thelema>
you oasis-ified the installer?
RafeKettler has joined #ocaml
<_habnabit>
heh, the commit was pushed a few hours before I started using it
<_habnabit>
and yes
<thelema>
_habnabit: please upload that to oasis-db, if you have time