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)
<love-pingoo> ArtMoonik: t'es sous win ou unix ?
<ArtMoonik> unix
<love-pingoo> jette un oeil à man Str
<love-pingoo> c'est le module caml de regexp
<love-pingoo> t'as split dedans
<love-pingoo> $ ocaml str.cma
<love-pingoo> # Str.split ;;
<love-pingoo> - : Str.regexp -> string -> string list = <fun>
<love-pingoo> je connais pas d'equivalent sans regexp, ce qui serait pourtant bien utile
<ArtMoonik> ah oui
<ArtMoonik> merci :)
<ArtMoonik> autrement, il n'existe pas de salon francophone sur caml?
<love-pingoo> apres tu map un int_of_string sur la liste résultante et hop
<love-pingoo> pas que je sache nan
<malc_> salon francophone.. wow
<ArtMoonik> que je sache, ocaml est un langage francais ? :-"
<love-pingoo> les devs sont français oui, ms bon...
<love-pingoo> je developpe un logiciel ms je fais tte la doc et le support en anglais
<love-pingoo> pcq c'est plus utile comme ça
<love-pingoo> ArtMoonik: t'es au lycée ? fac ? tu dois bien baragouiner un peu...
<ArtMoonik> j'entend bien, mais il doit exister des communautés d'utilisateurs, non ?
<ArtMoonik> lycée, et effectivemment il faudrait que je m'entraine à baragouiner un peu
Vanax has joined #ocaml
<Vanax> Re ArtMoonik
<Vanax> Je suis curieux.
<ArtMoonik> Vanax: try to speal english please
<Vanax> Ok, ok.
<Vanax> Are we only two ArtMoonik ?
<ArtMoonik> Vanax: no but I think that if you ask an interessant question it could be less quite
LenaR has joined #ocaml
<Vanax> (interesting)
<Vanax> What does the keyword stands for ?
<Vanax> in
<Vanax> Sorry
<Vanax> I'm learning OCaml and I don't understand what the keyword 'in' stands for.
<pango> 'in' doesn't really have a meaning on its own, only in syntax like 'let identifier = expr in expr
<pango> that creates a local binding, like
<pango> # let x = 3 in x * x ;;
<pango> - : int = 9
<pango> # x ;;
<pango> Unbound value x
<Vanax> Thank you !
<pango> np
Vanax has quit [Read error: 54 (Connection reset by peer)]