<ikatz>
so the moral of this story is that ocaml doesn't require parens for tuples (like sml)?
<Smerdyakov>
Right.
<ikatz>
wow i got really worked up about that... but it seemed so miraculous :)
<mbishop>
Why does ocaml keep Str seperate from String?
<pango>
so you can use better regexp engines ;)
LordMetroid has joined #ocaml
julm has joined #ocaml
goalieca has joined #ocaml
l_a_m has quit [Remote closed the connection]
thelema has joined #ocaml
Snrrrub has quit [Read error: 104 (Connection reset by peer)]
Snrrrub has joined #ocaml
middayc has quit []
LordMetroid has quit ["FUCK LIFE!"]
Jedai has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
Jedai has joined #ocaml
jlouis__ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
evn has quit [Remote closed the connection]
evn has joined #ocaml
evn has quit [Remote closed the connection]
evn has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
maayhem has joined #ocaml
<maayhem>
oi
<maayhem>
can someone indicate me a small ocaml code that would print a different result if compiled tail-recursively or not ?
<maayhem>
(provided the code can be compiled tail-recursive)
<thermoplyae>
let rec f x = f x will overflow if not compiled tail recursively
<maayhem>
this will not compile at all because an occur check happens at type checking.
<thermoplyae>
and loop infinitely otherwise, neither of which is printing anything
<thermoplyae>
sure it will, its type is 'a -> 'b
<thelema>
well, for bytecode, you can catch the stack overflow, so you could print different results, but why do you pose the problem, maayhem?
<maayhem>
thelema, Im just trying to do some unit tests for a compiler that is supposed to do tail recursive
<maayhem>
so Id like to check that it can indeed compile tail-recursive by using this kind of trick test
<thelema>
maayhem: an ocaml compiler?
<maayhem>
sort of mini-ml compiler
<maayhem>
with polymorphic data structures and filtering .. so an interesting subset
<thelema>
well, other than this kind of code, I can't think of any way (within a language) to check for TCO - it's only the difference between jsr + rts -> jmp
<maayhem>
yea, it sounds difficult to exhibit such test without having to check the compiled code
<maayhem>
cause say, if you add a printf after the supposed tail-recursion to check if its indeed tail recursive, it will make the function not compiled tail recursive
<thelema>
If you could measure stack usage, a heavily recursive function would exhibit a difference if TCO-able
<maayhem>
sounds a bit hackish
<maayhem>
I think Ill keep on looking at the compiled code
<maayhem>
:P
AxleLonghorn has joined #ocaml
seafood__ has joined #ocaml
seafood___ has joined #ocaml
seafood___ has quit [Read error: 104 (Connection reset by peer)]
seafood___ has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
seafood__ has quit [Read error: 110 (Connection timed out)]
julm has quit [Read error: 110 (Connection timed out)]
Julm has joined #ocaml
Iv^a_na has joined #ocaml
jderque has joined #ocaml
Iv^a_na has left #ocaml []
Snrrrub has quit [Read error: 110 (Connection timed out)]