Leonidas has quit [Read error: 113 (No route to host)]
shawn has quit [Read error: 60 (Operation timed out)]
pango_ has joined #ocaml
yondalf_ has joined #ocaml
shawn has joined #ocaml
pango has quit [Remote closed the connection]
Mr_Awesome has joined #ocaml
david_koontz has quit ["Leaving"]
yondalf_ has quit [Read error: 60 (Operation timed out)]
yondalf has joined #ocaml
smimou has quit ["bli"]
danly has quit ["Leaving"]
shawn has quit ["This computer has gone to sleep"]
brian_ has quit [" "]
shawn has joined #ocaml
<fremo>
I am try to implement somthing stupid
<fremo>
this is not easy
<yondalf>
what is that?
<fremo>
it is new lines in a javascript interpreter
<fremo>
just a seconde,
<fremo>
so, you can put white space in your code whereever you want, new lines etc
<fremo>
but when you forgot to put the statement terminator ';'
<fremo>
the new line character is replaced by the ';'
<yondalf>
sounds dangerous
<fremo>
so, I want to write a ECMAScript interpreter
<fremo>
and I slowly get mad about it :)
<fremo>
yes, dangerous, useless, and expensive
<Mr_Awesome>
i despise that sort of thing
<Mr_Awesome>
its the reason i use ocaml instead of haskell
<fremo>
:)
<fremo>
so I wonder how to manage that,
<fremo>
I wrote a almost complete parser,
<fremo>
I just realized this thing, whatever
<fremo>
I wonder how I could manage that
<fremo>
now, '\n' are just dropped by the lexer
<fremo>
I may record somewhere a state, kind of second dimention in my lexer,
<fremo>
and put an error token in the parser (for ocamlyacc),
<fremo>
ok, that's too blurry, I have to think about it again
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
sponge45 has joined #ocaml
_ita_ has joined #ocaml
ita has quit [Read error: 110 (Connection timed out)]
yondalf has quit ["leaving"]
iZZy`` has quit [Read error: 110 (Connection timed out)]
iZZy`` has joined #ocaml
dibblego has joined #ocaml
shans_ has quit ["Ex-Chat"]
sponge45 has quit ["zzzzzzzzzz"]
khaladan has joined #ocaml
pango_ has quit [Remote closed the connection]
khaladan_ has joined #ocaml
_ita_ has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
ramkrsna has joined #ocaml
gunark has quit [Remote closed the connection]
gunark has joined #ocaml
khaladan_ has joined #ocaml
<datrus>
\q
datrus has quit ["leaving"]
<Mr_Awesome>
lol well done
<Ugarte>
Slashies are confusing.
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
<Mr_Awesome>
/quit
<Mr_Awesome>
wha?
<Mr_Awesome>
\quit
<Mr_Awesome>
wtf?
<Ugarte>
hehe
Mr_Awesome has quit ["and the Awesome Level drops"]
dark_light has joined #ocaml
<dark_light>
why let rec exec f = exec (f ()) don't works? i expected that f returned a function that could be passed to exec.. ad infinitum
<dark_light>
This expression has type 'a but is here used with type unit -> 'a
<dark_light>
not very cool :-(
<dark_light>
any way to bypass this? i was trying to design a finite state machine with such design..
khaladan_ has joined #ocaml
<dark_light>
# let rec exec f = exec (fun () -> (f ()));;
Skal has joined #ocaml
<dark_light>
this way works, but i think it is not tail recursive
<dark_light>
... hmmm maybe it is
<dark_light>
but well so f() doesn't return the function passed to exec..
<dark_light>
:(
<dark_light>
let rec exec f a = exec f (f a) works, but with only one function..
<dark_light>
This expression has type 'a but is here used with type unit -> 'a // this polymorphism is logically valid but maybe leads to some undecidable state, what is bad
* dark_light
, the molonoguer
jacobian_ has quit [Connection timed out]
jacobian_ has joined #ocaml
sponge45 has joined #ocaml
pango has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
<dark_light>
pango, any idea how to setup something like let rec exec f = exec (f ()) ? a loop function that executes a side-effect function and receives the next function "ad infinitum"
<dark_light>
the interpreter says This expression has type 'a but is here used with type unit -> 'a, like as protecting itself from an infinite type definition (?)
<dark_light>
(a theorem: if a function returns a value with the same type of itself, the type of that function is infinite)
<sponge45>
Use the -rectypes option
<dark_light>
wow :)
MisterC has joined #ocaml
jacobian_ has quit [Connection timed out]
<jdev>
Alternately, the recursive type can have a record or variant interposed, like type 'a reader = { accept: 'a -> 'a reader }
<jdev>
There's some unfortunate theoretical property of -rectypes that I used to know at one point, like that it makes the type checking undecidable.