dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
dibblego has quit ["Leaving"]
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.
<dark_light> i am getting an odd behavior: http://nopaste.tshw.de/116417639313e48/
<dark_light> :(
Skal has quit [Read error: 110 (Connection timed out)]
<dark_light> i can't do a "closure call" to itself when using a rectype
<dark_light> like building the closure is a supertask because the type is recursive (it sounds simply weird)
<dark_light> (fun () -> machine (not flag) ()) being the same thing
johnnowak has joined #ocaml
<sponge45> Looks like a bug. Try this:
<sponge45> let rec f () = raise Exit; f
<sponge45> let _ = f ()
<sponge45> That loops forever (using ocaml -rectypes)
<sponge45> ocaml 3.09.2
<dark_light> here is 3.09.1
<dark_light> sponge45, but it says: Warning X: this statement never returns.
<dark_light> whatever it might mean
<dark_light> highlighting the raise
<sponge45> It's telling me that the function never returns since it always raises an exception before.
<dark_light> :)
<dark_light> nice
<sponge45> OK, it's a known bug.
<dark_light> nice!
<dark_light> better, will be corrected?
<sponge45> The type detection loops.
<sponge45> That's bug 3999 I suppose: http://caml.inria.fr/mantis/view.php?id=3999 (in French)
<sponge45> seems related at least
<sponge45> there are other bugs with -rectypes
<sponge45> Good night everyone
sponge45 has quit ["zzzzzzzzzz"]
dibblego has quit ["Leaving"]
_velco has joined #ocaml
velco has joined #ocaml
velco has quit [Remote closed the connection]
jacobian_ has joined #ocaml
llama32 has joined #ocaml
velco has joined #ocaml
pango has quit ["Client exiting"]
pango has joined #ocaml
jacobian has quit [Remote closed the connection]
Leonidas has joined #ocaml
johnnowak has quit []
<flux__> hmh, it appears that after making postgresql-ocamls exec non-blocking, it begun stalling periodically
<flux__> or maybe it is enitely coincidental..
love-pingoo has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
llama32 has quit [Read error: 110 (Connection timed out)]
llama32 has joined #ocaml
rashnu has joined #ocaml
khaladan_ has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
Leonidas has quit [Read error: 113 (No route to host)]
fremo has quit [Read error: 104 (Connection reset by peer)]
dark_light has quit [Read error: 113 (No route to host)]
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan has joined #ocaml
khaladan_ has joined #ocaml
_velco has quit [Read error: 110 (Connection timed out)]
llama32 has quit [Read error: 110 (Connection timed out)]
Leonidas has joined #ocaml
love-pingoo has quit ["Leaving"]
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
_velco has joined #ocaml
_velco has quit [Read error: 110 (Connection timed out)]
rashnu has quit [Read error: 104 (Connection reset by peer)]
_velco has joined #ocaml
khaladan_ has joined #ocaml
brian_ has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
velco has quit ["Ex-Chat"]
khaladan_ has joined #ocaml
CosmicRay has joined #ocaml
danly has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
bluestorm has joined #ocaml
cmeme has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
CosmicRay has quit ["Client exiting"]
love-pingoo has joined #ocaml
_velco has quit [Remote closed the connection]
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
smimou has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
rashnu has joined #ocaml
Smerdyakov has joined #ocaml
khaladan_ has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
khaladan_ has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
brian_ has quit [Read error: 110 (Connection timed out)]
<rashnu> is it possible to use List.map and have it return a list with only one element instead of a complete list?
<rashnu> say i have a function that multiplies 4 by this list [1;5;2;7] and i just want map to return the value where the multiplication was higher
<rashnu> in this case would be 4*7
<rashnu> i only manage to get it to return a full list with all the elements multiplied by 4 :\
<bluestorm> hm
<bluestorm> you should add another function to filter the elements
flux__ has quit [Remote closed the connection]
flux__ has joined #ocaml
<bluestorm> let list_max = List.fold_left max 0 in
<bluestorm> list_max (List.map (( * ) 4) list);;
<bluestorm> rashnu: actually you don't have to declare it before use
<bluestorm> List.fold_left max 0 (List.map (( * ) 4) list);;
flux__ has quit [Remote closed the connection]
flux__ has joined #ocaml
dark_light has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
khaladan has quit [Connection timed out]
khaladan has joined #ocaml
MisterC has quit [Remote closed the connection]
khaladan_ has joined #ocaml
ppsmimou has quit [orwell.freenode.net irc.freenode.net]
khaladan has quit [Connection timed out]
ppsmimou has joined #ocaml
khaladan_ has quit [Connection timed out]
khaladan_ has joined #ocaml
brian_ has joined #ocaml
khaladan_ has quit [Connection timed out]
bluestorm has quit [Read error: 110 (Connection timed out)]
pango has quit [Nick collision from Idoru.]
pango has joined #ocaml
khaladan has joined #ocaml
rashnu has quit []
Mr_Awesome has joined #ocaml
khaladan_ has joined #ocaml
khally has joined #ocaml
khaladan has quit [Connection timed out]
khally is now known as khaladan
khaladan_ has quit [Success]
bluestorm has joined #ocaml
khaladan_ has joined #ocaml
brian_ has quit [" "]
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan_ is now known as khaladan
Skal has joined #ocaml
khaladan_ has joined #ocaml
khaladan has quit [Read error: 60 (Operation timed out)]
khaladan_ is now known as khaladan
bluestorm has quit ["Konversation terminated!"]
smimou has quit ["bli"]
tsuyoshi is now known as damnit
damnit is now known as tsuyoshi
Leonidas has quit ["An ideal world is left as an exercise to the reader"]