sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
JeffSmac has joined #ocaml
bzzbzz has joined #ocaml
ikaros has joined #ocaml
cjeris has quit [Read error: 104 (Connection reset by peer)]
pants1 has joined #ocaml
pants2 has joined #ocaml
pants2 has quit [Remote closed the connection]
pants1 has quit ["Leaving."]
pants1 has joined #ocaml
smimram has quit ["bli"]
mnemonic has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
gim_ has quit ["bla"]
JeffSmac has quit []
<cmvjk>
hey, if i have a function like "let rec foo num = blah blah blah; foo (num - 1)", that's tail-recursive, right?
mnemonic has quit ["leaving"]
<hcarty>
cmvjk: I think it is
<cmvjk>
hmm.
pango has quit [Remote closed the connection]
<cmvjk>
my program, when I run it in the interpreter, runs fine, but if I try to create a native compilation of it, it throws a "stack overflow" exception.
<cmvjk>
and the bytecode version of the same program segfaults.
pango has joined #ocaml
Smerdyakov has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
trisiak has quit [Read error: 110 (Connection timed out)]
joshcryer has joined #ocaml
johnnowak has joined #ocaml
pants1 has quit [Read error: 110 (Connection timed out)]
mbishop has joined #ocaml
Mr_Awesome has quit ["...and the Awesome level drops"]
jeberle has joined #ocaml
jeberle has left #ocaml []
trisiak has joined #ocaml
Smerdyakov has quit ["Leaving"]
mbishop has quit ["Leaving"]
<flux->
cmvjk, do you catch exceptions in that function?
<flux->
segmentation fault with the bytecode version sounds like a bug; maybe you should report it
<cmvjk>
flux-: do you think so? hmm. When I ran gdb on the native code version (not that I claim to know how to use that), what seemed to be filling up the stack was calls to map and a few other things it didn't say the name of
<cmvjk>
there's tail-recursive loop in there, but it only starts filling up the stack after it's been run like 114 times...
<flux->
maybe some simplified version of the problem code would reveal the problem
malc_ has joined #ocaml
<cmvjk>
thanks, i tried editing out some of the parts of the program to simplify it, and i actually did figure out something.
<cmvjk>
i have this function: let tone myfun = let x = ref 0 in (function () -> x := !x + 1; myfun !x)
<cmvjk>
i replaced the normal function this function takes with one that just prints !x
<cmvjk>
and it unexpectedly jumps from 540 to 67279105 between two subsequent calls...
<malc_>
x := !x + 1 === incr x
<malc_>
not that it matters much for your problem
<cmvjk>
it might. usually the arbitrary change that i expect to have the least impact on the program is the change that ends up fixing it.
<malc_>
show the whole snippet that exhibits the problem
<cmvjk>
is there a place I can paste to? There isn't much code left that I haven't commented out, actually.
<malc_>
some pastebin site
<cmvjk>
heh, i'll find one
<cmvjk>
haha, nevermind, it turns out that i am an idiot after all. But thanks for all your help, you guys.
malc__ has joined #ocaml
malc___ has joined #ocaml
malc_ has quit [Read error: 110 (Connection timed out)]
johnnowak has quit []
malc__ has quit [Read error: 110 (Connection timed out)]
joshcryer has quit [Client Quit]
ikaros has quit ["segfault"]
malc_ has joined #ocaml
diffbavis has quit [Read error: 131 (Connection reset by peer)]
malc___ has quit [Read error: 110 (Connection timed out)]
ikaros_ has joined #ocaml
ikaros_ has quit ["Leaving"]
ikaros has joined #ocaml
malc__ has joined #ocaml
diffbavis has joined #ocaml
malc_ has quit [Read error: 110 (Connection timed out)]
ikaros_ has joined #ocaml
ikaros has quit ["segfault"]
malc_ has joined #ocaml
malc__ has quit [Read error: 110 (Connection timed out)]
malc_ has quit [Read error: 110 (Connection timed out)]
dark_light has joined #ocaml
cjeris has joined #ocaml
pango- has joined #ocaml
pango has quit [Remote closed the connection]
pango- is now known as pango
bzzbzz has quit ["Lost terminal"]
love-pingoo has joined #ocaml
jlouis has joined #ocaml
Lectus has joined #ocaml
love-pingoo has quit ["Leaving"]
Lectus has left #ocaml []
Oatmeat|umn has quit ["Leaving"]
Oatmeat|umn has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 60 (Operation timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
slipstream-- has quit [Read error: 54 (Connection reset by peer)]
slipstream has joined #ocaml
Oatmeat|umn has quit ["Leaving"]
Oatmeat|umn has joined #ocaml
Smerdyakov has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
benny has joined #ocaml
dark_light has quit [Remote closed the connection]
benny_ has quit [Read error: 60 (Operation timed out)]
dark_light has joined #ocaml
dark_light has quit [Remote closed the connection]
dark_light has joined #ocaml
dark_light has quit [Read error: 104 (Connection reset by peer)]
dark_light has joined #ocaml
dark_light has quit [Remote closed the connection]
er has joined #ocaml
<er>
does anyone know of a way to check if an [in,out]_channel is valid?
<Smerdyakov>
What does it mean?
<er>
eg. if the process it is attached to through open_process hasn't died
<Smerdyakov>
Mmm... linear types. ;)
niklal has joined #ocaml
<er>
nice try, so i guess for the moment i just figure out a way to get a SIGCHLD?
<Smerdyakov>
I don't know.
niklal has left #ocaml []
_JusSx_ has joined #ocaml
ikaros_ has quit [Remote closed the connection]
dark_light has joined #ocaml
<pango>
looks like a system programming question
<tsuyoshi>
if you try to read and get eof, the process died
<tsuyoshi>
if you try to write and get sigpipe, the process died
<tsuyoshi>
I guess you could check for sigchild but what's the point?
CosmicRay_ has joined #ocaml
CosmicRay_ has quit ["Client exiting"]
vorago has left #ocaml []
malc_ has joined #ocaml
Foxyloxy has joined #ocaml
Mr_Awesome has joined #ocaml
love-pingoo has joined #ocaml
cjeris has quit [Read error: 104 (Connection reset by peer)]
JeffSmac has joined #ocaml
pants1 has joined #ocaml
mnemonic has joined #ocaml
<mnemonic>
hi
<JeffSmac>
hi
JeffSmac has quit []
trisiak has quit [Read error: 110 (Connection timed out)]
mnemonic has quit [Read error: 104 (Connection reset by peer)]
mnemonic has joined #ocaml
ArtMoonik has joined #ocaml
<ArtMoonik>
Bonsoir, vous faites du support pour absolute-beginners ? :-"
<ArtMoonik>
La question est: comment exploiter une chaine de la forme "2 4 56 6756" ?
<love-pingoo>
ArtMoonik: essaie l'anglais si possible
<love-pingoo>
tu veux la découper sur les espaces et convertir les entiers ?
<ArtMoonik>
love-pingoo: pardon mais ca va pas vraiment être possible
<love-pingoo>
on va faire comme ça alors :)
<ArtMoonik>
oui (qui correspondrait à split de String en ruby)