flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
guillem has quit [Remote closed the connection]
netx has quit [Connection timed out]
Philonous has joined #ocaml
netx has joined #ocaml
Philonous has quit [Read error: 110 (Connection timed out)]
coucou747 has joined #ocaml
coucou747 has quit [Read error: 113 (No route to host)]
Philonous has joined #ocaml
seafood has joined #ocaml
netx has quit [Remote closed the connection]
asmanur has quit [Remote closed the connection]
netx has joined #ocaml
GustNG has joined #ocaml
Yoric[DT] has joined #ocaml
mishok13 has quit [Read error: 110 (Connection timed out)]
Asmadeus has joined #ocaml
Associat0r has quit []
cpape has joined #ocaml
mishok13 has joined #ocaml
seafood has quit []
Linktim has joined #ocaml
seafood has joined #ocaml
seafood has quit [Client Quit]
gdmfsob has joined #ocaml
rwmjones has joined #ocaml
mishok13 has quit [Read error: 110 (Connection timed out)]
guillem has joined #ocaml
cpape has quit ["ERC Version 5.2 (IRC client for Emacs)"]
cpape has joined #ocaml
Oatschool has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> Does anyone know if there's a nice UI for darcs?
Oatschool has joined #ocaml
PearlJammer has joined #ocaml
<flux> haven't heard of
seafood has joined #ocaml
<rwmjones> nDuff ping
PearlJammer has quit []
cpape has left #ocaml []
vixey has quit []
Ched- has joined #ocaml
coucou747 has joined #ocaml
call has joined #ocaml
seafood has quit [Connection reset by peer]
seafood has joined #ocaml
seafood has quit []
Ched- has quit [Remote closed the connection]
Ched- has joined #ocaml
Ched- has quit [Read error: 104 (Connection reset by peer)]
GustNG1 has joined #ocaml
GustNG has quit [Connection timed out]
Associat0r has joined #ocaml
marmotine has joined #ocaml
Jedai has joined #ocaml
palomer has quit [Read error: 110 (Connection timed out)]
palomer has joined #ocaml
gdmfsob has quit [Read error: 131 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
det has quit [Remote closed the connection]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
Associ8or has joined #ocaml
Associat0r has quit [Read error: 104 (Connection reset by peer)]
Associat0r has joined #ocaml
Associ8or has quit [Read error: 104 (Connection reset by peer)]
rwmjones has quit ["Closed connection"]
Associat0r has quit [Connection timed out]
tomh has joined #ocaml
Linktim_ has joined #ocaml
Linktim has quit [Read error: 113 (No route to host)]
Kopophex has joined #ocaml
jlouis has joined #ocaml
functional_nerd_ has joined #ocaml
call has quit [Read error: 60 (Operation timed out)]
Linktim has joined #ocaml
Associat0r has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
functional_nerd_ has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
asmanur has joined #ocaml
Associat0r has quit [Connection timed out]
call has joined #ocaml
jlouis has quit [Read error: 104 (Connection reset by peer)]
marmotine has quit ["mv marmotine Laurie"]
call has quit [Read error: 110 (Connection timed out)]
GustNG1 has quit [Read error: 54 (Connection reset by peer)]
mishok13 has joined #ocaml
redocdam has joined #ocaml
Linktim has joined #ocaml
_JusSx_ has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
call has joined #ocaml
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
noohgodno has joined #ocaml
vixey has joined #ocaml
asmanur has quit [Remote closed the connection]
_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)]
<palomer> ok
<palomer> lemme write up an example
Morphous has joined #ocaml
<palomer> so that opens ls and pastes its output in a window
<palomer> pressing any key in that window will send it to ls
<palomer> but ls is dead
<palomer> so the program crashes
<palomer> no exception to catch
<Asmadeus> Are you sure it's actually writing in the channel ? I think it just doesn't do anything
<Asmadeus> (just tried in a toplevel to do an open_process_full ls [||] and write in the out_c
<Asmadeus> And it didn't do anything)
<Asmadeus> Might be that typing a key exits your gtk ui
<palomer> typing it in the view?
<palomer> Asmadeus, if, instead of ls, I pick a process that expects an input, it works fine
<palomer> here, lemme write one
<Asmadeus> No need to write a new one, I can change just two letters
<palomer> err
<palomer> well you need a program that expects input
<Asmadeus> cat ? ;)
<palomer> compile this: "let _ = ignore (read_int ())"
<palomer> oh, righto
<palomer> cat
<palomer> change ls to cat
<palomer> whoa
<palomer> a window doesn't even appera
<palomer> apear
<palomer> appear
<Asmadeus> Yeah
<palomer> I tried it on a process that prints stuff then waits for input
<Asmadeus> That's what I was struggling with, I don't see why, it should at least show an empty window at the end
<palomer> hrmphrmph
<palomer> strange stuff
<Asmadeus> Doesn't even work with a random program with print_endline "whatever" then ignore (read_line()) :P
<palomer> yeah
<palomer> oh, probably blocks
<palomer> I got a fix for that
<palomer> set_nonblock out_c_descr;
<palomer> set_nonblock err_c_descr;
<palomer> set_nonblock in_c_descr;
<palomer> the problem with cat is that it never dies
<palomer> read_line doesn't work
<palomer> nor read_int
<palomer> since it expects a newline
<palomer> which I haven't figured out how to pass on to the process
<palomer> we need a process that takes a single character and then returns
<palomer> main = getChar <--this would be the program in haskell
<palomer> compile that to haskell and then run it with my little program
<kig> input_char / input_byte
<palomer> ahh
<kig> there's probably a matching Unix-y function, check with ocamlbrowser?
<palomer> input_char stdin is fine
<palomer> wait
<palomer> input_char seems to wait until you press enter
<Asmadeus> Well, if you're using a tty yes
<Asmadeus> Look at Unix.tcio
<Asmadeus> (no such function, but look for tcio in the man)
<palomer> errr
<palomer> right
<palomer> so we have our process that expects one char and then returns
<palomer> running it with my program crashes it as soon as you enter a second char
<Smerdyakov> palomer, do you realize how many of the lines you send to this channel are one-word and convey no information?
<palomer> Smerdyakov, do you realize how rude you can be sometimes?