_JusSx_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
Associat0r has joined #ocaml
Anarchos has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
<Anarchos>
how can i print in ocaml the address of a value ?
<fremo>
Have you looked at Obj module ? I dont know if it make it
<Smerdyakov>
Anarchos, why do you want to do that?
<fremo>
yes, why ? :) I bet you can do it with C code
<Anarchos>
i want to trace a segfault due to my interfacing OCAML <-> C++
<Smerdyakov>
Guys, there are no spaces before question marks in English, OK?
<fremo>
sorry ?
<Smerdyakov>
Anarchos, you can do it with Obj.magic.
<Anarchos>
Smerdyakov just a conversion (Obj.magic x : int32) ?
<Smerdyakov>
I don't expect that would work.
<Smerdyakov>
You need to coerce to an unboxed int type to get what you expect.
<Anarchos>
Smerdyakov so i do 'Obj.magic x : int , and i get the pointer address of the value ?
<Smerdyakov>
Probably.
<Smerdyakov>
I certainly wouldn't blame the OCaml development team for not promising you any way to do what you're asking.
<Smerdyakov>
Just try things and see what seems to work.
<Smerdyakov>
You might have better luck debug-printing from the C code, BTW. There you have stronger guarantees about what is a pointer, and about how to cast pointers to ints.
Yoric[DT] has joined #ocaml
<palomer>
hello!
<Anarchos>
Smerdyakov i know , but my very problem is to compare the value stored in my C struct with the *actual* pointer adress, if moved by the gc
<palomer>
I'm thinking (Obj.magic x : int) would simply return the first few bytes of the object
seafood has joined #ocaml
ygrek has quit [Remote closed the connection]
call has quit [Read error: 110 (Connection timed out)]
call has joined #ocaml
palomer is now known as temptemp
temptemp is now known as palomer
functional_nerd_ has joined #ocaml
postalchris has joined #ocaml
functional_nerd_ has quit [Client Quit]
seafood has quit []
seafood has joined #ocaml
call has quit [Read error: 110 (Connection timed out)]
seafood has quit []
<Anarchos>
how to create an object in ocaml and be sure that it won't be moved by the GC ?
<Smerdyakov>
I wouldn't assume that it's possible.
<Anarchos>
i need to have a C++ and an ocaml object which keep mutual references on each other
jlouis has joined #ocaml
<Smerdyakov>
I wouldn't assume that it's possible. :P
tomh has joined #ocaml
postalchris has left #ocaml []
<Anarchos>
i know how to pass the C++ pointer as an int32 to the ocaml side
<vixey>
Anarchos: Why are you asking the same question over and over and over again?
<Anarchos>
vixey because i am really interested in finding a way to do it.
Yoric[DT] has quit ["Ex-Chat"]
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
* palomer
is going mad with unix IO
<palomer>
I just want to open a command in a GText.view
<palomer>
send the output of the command to the view
<palomer>
and send any input into the view back to the command
<palomer>
(command = process)
<palomer>
is it that tough??!?
mfp_ is now known as mfp
<palomer>
ok, here's the deal
<Asmadeus>
palomer The problem is that you'll have to differenciate what you are adding and what the user inputs; that appart if you use a button or something to send the view's text to the process I see no problem using Unix.open_process
<palomer>
well, err, I'm running into a few problems:
<palomer>
if the process finishes and I try to send more input, it crashes
<palomer>
the whole program
<palomer>
(that's right, no exception thrown)
vixey has quit []
<palomer>
and there's no way to ask the process if it's finished
<kig>
check if the channel is open?
<palomer>
how?
<palomer>
supper time
<palomer>
we'll continue this conversation in a bit!
<kig>
... that's a good question, i don't see a function to do that
<Smerdyakov>
You know the channel is not open when you get EOF from it.
<kig>
is the problem that the whole program crashes if you try to write to the subprocesses stdin?
<kig>
because that sound pretty weird.
tomh has quit [clarke.freenode.net irc.freenode.net]
mbishop has quit [clarke.freenode.net irc.freenode.net]
Proteus has quit [clarke.freenode.net irc.freenode.net]
ppsmimou has quit [clarke.freenode.net irc.freenode.net]
sbok has quit [clarke.freenode.net irc.freenode.net]
mattam has quit [clarke.freenode.net irc.freenode.net]
Ugarte has quit [clarke.freenode.net irc.freenode.net]
bla has quit [clarke.freenode.net irc.freenode.net]
gim_ has quit [clarke.freenode.net irc.freenode.net]
toxygen has quit [clarke.freenode.net irc.freenode.net]
r0bby has quit [clarke.freenode.net irc.freenode.net]
Associat0r has quit [clarke.freenode.net irc.freenode.net]
palomer has quit [clarke.freenode.net irc.freenode.net]
TaXules has quit [clarke.freenode.net irc.freenode.net]
ertai has quit [clarke.freenode.net irc.freenode.net]
coucou747 has quit [clarke.freenode.net irc.freenode.net]
Asmadeus has quit [clarke.freenode.net irc.freenode.net]
mfp has quit [clarke.freenode.net irc.freenode.net]
haelix has quit [clarke.freenode.net irc.freenode.net]
jynxzero has quit [clarke.freenode.net irc.freenode.net]
cmeme has quit [clarke.freenode.net irc.freenode.net]
bohanlon has quit [clarke.freenode.net irc.freenode.net]
tab has quit [clarke.freenode.net irc.freenode.net]
wlmttobks has quit [clarke.freenode.net irc.freenode.net]
svenl has quit [clarke.freenode.net irc.freenode.net]
Oatschool has quit [clarke.freenode.net irc.freenode.net]
netx has quit [clarke.freenode.net irc.freenode.net]
Toonto_del_alma has quit [clarke.freenode.net irc.freenode.net]
rogo has quit [clarke.freenode.net irc.freenode.net]
petchema has quit [clarke.freenode.net irc.freenode.net]
Demitar has quit [clarke.freenode.net irc.freenode.net]
jlouis has quit [clarke.freenode.net irc.freenode.net]
Linktim_ has quit [clarke.freenode.net irc.freenode.net]
Jedai has quit [clarke.freenode.net irc.freenode.net]
Philonous has quit [clarke.freenode.net irc.freenode.net]
xevz has quit [clarke.freenode.net irc.freenode.net]
ikatz has quit [clarke.freenode.net irc.freenode.net]
nDuff has quit [clarke.freenode.net irc.freenode.net]
Sparkles has quit [clarke.freenode.net irc.freenode.net]
pattern has quit [clarke.freenode.net irc.freenode.net]
jeremiah has quit [clarke.freenode.net irc.freenode.net]
Mr_Awesome has quit [clarke.freenode.net irc.freenode.net]
ulfdoz has quit [clarke.freenode.net irc.freenode.net]
Kopophex has quit [clarke.freenode.net irc.freenode.net]
Morphous has quit [clarke.freenode.net irc.freenode.net]
rog1 has quit [clarke.freenode.net irc.freenode.net]
Jeff_123 has quit [clarke.freenode.net irc.freenode.net]
hcarty has quit [clarke.freenode.net irc.freenode.net]
jdev has quit [clarke.freenode.net irc.freenode.net]
mishok13 has quit [clarke.freenode.net irc.freenode.net]
szell has quit [clarke.freenode.net irc.freenode.net]
fremo has quit [clarke.freenode.net irc.freenode.net]
jonafan has quit [clarke.freenode.net irc.freenode.net]
shortc|desk has quit [clarke.freenode.net irc.freenode.net]
flux has quit [clarke.freenode.net irc.freenode.net]
Hadaka has quit [clarke.freenode.net irc.freenode.net]
munga has quit [clarke.freenode.net irc.freenode.net]
acatout has quit [clarke.freenode.net irc.freenode.net]
tsuyoshi has quit [clarke.freenode.net irc.freenode.net]
l_a_m has quit [clarke.freenode.net irc.freenode.net]
ido has quit [clarke.freenode.net irc.freenode.net]
pango_ has quit [clarke.freenode.net irc.freenode.net]
guillem has quit [clarke.freenode.net irc.freenode.net]
smimou has quit [clarke.freenode.net irc.freenode.net]
Lalu has quit [clarke.freenode.net irc.freenode.net]
redocdam has quit [clarke.freenode.net irc.freenode.net]
dibblego has quit [clarke.freenode.net irc.freenode.net]
Smerdyakov has quit [clarke.freenode.net irc.freenode.net]
Linktim_ has joined #ocaml
jlouis has joined #ocaml
tomh has joined #ocaml
Associat0r has joined #ocaml
redocdam has joined #ocaml
mishok13 has joined #ocaml
Kopophex has joined #ocaml
pango_ has joined #ocaml
palomer has joined #ocaml
Jedai has joined #ocaml
coucou747 has joined #ocaml
Oatschool has joined #ocaml
guillem has joined #ocaml
Asmadeus has joined #ocaml
netx has joined #ocaml
Philonous has joined #ocaml
Morphous has joined #ocaml
dibblego has joined #ocaml
mbishop has joined #ocaml
szell has joined #ocaml
nDuff has joined #ocaml
bohanlon has joined #ocaml
munga has joined #ocaml
Proteus has joined #ocaml
Toonto_del_alma has joined #ocaml
ppsmimou has joined #ocaml
mfp has joined #ocaml
rog1 has joined #ocaml
fremo has joined #ocaml
hcarty has joined #ocaml
jdev has joined #ocaml
ulfdoz has joined #ocaml
Jeff_123 has joined #ocaml
jonafan has joined #ocaml
xevz has joined #ocaml
acatout has joined #ocaml
tsuyoshi has joined #ocaml
l_a_m has joined #ocaml
flux has joined #ocaml
Hadaka has joined #ocaml
ido has joined #ocaml
shortc|desk has joined #ocaml
bla has joined #ocaml
toxygen has joined #ocaml
r0bby has joined #ocaml
gim_ has joined #ocaml
sbok has joined #ocaml
mattam has joined #ocaml
Ugarte has joined #ocaml
Smerdyakov has joined #ocaml
smimou has joined #ocaml
Lalu has joined #ocaml
Sparkles has joined #ocaml
ikatz has joined #ocaml
jeremiah has joined #ocaml
Mr_Awesome has joined #ocaml
pattern has joined #ocaml
rogo has joined #ocaml
Demitar has joined #ocaml
petchema has joined #ocaml
cmeme has joined #ocaml
tab has joined #ocaml
TaXules has joined #ocaml
ertai has joined #ocaml
haelix has joined #ocaml
jynxzero has joined #ocaml
wlmttobks has joined #ocaml
svenl has joined #ocaml
Philonous has quit [Read error: 104 (Connection reset by peer)]
Philonous has joined #ocaml
Linktim_ has quit ["Quitte"]
jlouis has quit [Remote closed the connection]
redocdam has quit [Read error: 110 (Connection timed out)]
ikatz has quit [Read error: 110 (Connection timed out)]
redocdam has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
Philonous has quit ["Leaving."]
Philonous has joined #ocaml
Morphous has quit [Read error: 110 (Connection timed out)]