mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
seafoodX has joined #ocaml
mvitale has joined #ocaml
smimou has quit ["bli"]
pantsd has quit ["Leaving."]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
inono has joined #ocaml
<inono> can anyone tell me why the "let" statement introduces ambiguity into the grammar?
<mbishop> probably because "let" can be a function definition, or bind a variable
<mbishop> although I believe it works like scheme, in that DEFINE and LET are both just sugar for lambda expressions
<inono> well if we just look at the context of variable binding only
yminsky has quit []
mvitale has quit [Read error: 113 (No route to host)]
Mr_Awesome has joined #ocaml
simon has quit [Remote closed the connection]
simon has joined #ocaml
fremo has quit [Remote closed the connection]
fremo has joined #ocaml
fremo has quit [Remote closed the connection]
fremo has joined #ocaml
schme has quit [Connection timed out]
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
seafoodX has quit []
pango has quit [Remote closed the connection]
ygrek has joined #ocaml
pango has joined #ocaml
<flux> just guessing: because there are top-level lets and non-top-level lets?
<flux> I had no idea they did that :)
seafoodX has joined #ocaml
pantsd has joined #ocaml
ygrek has quit [Remote closed the connection]
[azoic] has quit ["Leaving."]
<inono> 5*let x = 7 in x - 3
<inono> there is the ambiguity
<inono> (x*let x = 7 in x)- 3
<inono> 5*(let x = 7 in x - 3)
<flux> well, simply 5 + 3 * 5 has an ambiguity, which is handled by precedency rules?
<inono> yes, but thats more obvious
<inono> of course ocaml like most other languages picks the latter choice, where the let statement is right-associative and is very weakly bound
inono has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
screwt862 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan95 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan95 has joined #ocaml
screwt862 has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
Abo-Marwan95 has quit [Remote closed the connection]
screwt862 has quit [Remote closed the connection]
smimou has joined #ocaml
mr_hugo has joined #ocaml
<mr_hugo> hi there
<mr_hugo> hmm
<mr_hugo> i fixed the code i posted yesterday
<mr_hugo> here it is: http://pastebin.com/m5b4038c8
<mr_hugo> if anyone is interested
screwt862 has joined #ocaml
<mr_hugo> it locates a lib in linux
<mr_hugo> there are probably lots of bugs in it
<mr_hugo> i still have to test it
Abo-Marwan95 has joined #ocaml
<mr_hugo> where can i learn about hash tables in OCaml ?
<mr_hugo> is there any kind of data structure similar to a hash_table ?
piggybox_ has quit ["Leaving"]
<rwmjones> mr_hugo, Hashtbl, Map or Set
<mr_hugo> :) thanx
<mr_hugo> i just decided to use a list of tuples for the problem at hand
<mr_hugo> ill probably need some functions to fetch the data as required...
pantsd has quit ["Leaving."]
pierpa has joined #ocaml
rutlov has joined #ocaml
authentic has quit [Read error: 113 (No route to host)]
authentic has joined #ocaml
rutlov has left #ocaml []
<mr_hugo> hmm
<mr_hugo> is there a limit on the number of elements a list can carry ?
<flux> it's limited by your memory
<flux> I'm thinking it might be, on a 32-bit architecture, 8 bytes per list element + size of the actual data
<mr_hugo> im running a very big list of tuples in the toplevel, and in the end it prints like this: ('T', "SDL_JoystickClose"); ('T', ...); ...]
<flux> yes, it doesn't show large (or recursive) lists in full in the toplevel
<flux> I don't know if that behavior can be disabled
<mr_hugo> hmm okok
<mr_hugo> i have a question about recursive code and let bindings...
<mr_hugo> http://pastebin.com/m15f01144 here in line 84, if i use the let binding let path = locate_lib lib_name then whenever i use the path binding, it will call the funcion locate_lib lib
<mr_hugo> how to call only once ?
<mr_hugo> or doesn't work like this ?
<flux> hmm
<haelix> flux: you say 8 bytes/element, but isn't it likely that Ocaml List are only singly linked ones ?
<flux> it will call the lib only once
<flux> haelix, they are. I'm thinking pointer to the data, pointer to next element.
<haelix> ouh
<flux> pointer to the data may already be the data in simple cases
<flux> mr_hugo, it will call the locale_lib with argument lib_name only once when you use 'path'
<haelix> yes
<mr_hugo> hmm nice :D
<haelix> it depends where the polymorphism is put
<haelix> thx
<flux> mr_hugo, btw, I wonder why your return value is a string, when it really should be string option, because you have the magic return value "not found" to indicate the "None"-case
<mr_hugo> oh
<mr_hugo> i didn't know there was a thing like "string option" :)
<mr_hugo> where can i learn about it ?
<flux> hm, you are using the option type elsewhere in the code
<flux> like: try Some (Unix.readdir..) with End_of_file -> None
<flux> and with match foo with | Some xx -> .. | None -> ..
<mr_hugo> hmm yes
<mr_hugo> i did that
<mr_hugo> ah ok
<flux> I think the ocaml documentation would have information on that
<mr_hugo> yes yes
<mr_hugo> okok
<mr_hugo> yes i did that to work out some of these things
<mr_hugo> but i wanted the "locate_lib" to return the "not found"
<mr_hugo> i guess if i return None it will do fine...
<flux> well, it seems fragile to me, if its purpose is not to return the result displayed to the end user
<flux> you could have a valid path "not found" and it would be difficult to disambiguate
<mr_hugo> yes
<mr_hugo> :)
<mr_hugo> i will fix it, thanks :)
<mr_hugo> i'm leaving now, for a class...
<mr_hugo> thanx for your support
mr_hugo has left #ocaml []
schme has joined #ocaml
seafoodX has quit []
smimou has quit ["bli"]
mvitale has joined #ocaml
seafoodX has joined #ocaml
mvitale has quit ["Leaving"]
baruk has quit ["leaving"]
gim has quit []
mordaunt has quit [Read error: 104 (Connection reset by peer)]
Tetsuo has joined #ocaml
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
[azoic] has joined #ocaml
Tetsuo has quit [Remote closed the connection]
Mr_Awesome has joined #ocaml
pierpa has quit [Read error: 54 (Connection reset by peer)]
pango has quit [Remote closed the connection]
screwt862 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan95 has quit [Remote closed the connection]
pango has joined #ocaml
[azoic] has quit ["Leaving."]
gim has quit [Read error: 104 (Connection reset by peer)]
schme` has joined #ocaml
gim has joined #ocaml
Cygaal has joined #ocaml
Abo-Marwan95 has joined #ocaml
Tetsuo has joined #ocaml
screwt862 has joined #ocaml
schme has quit [Connection timed out]
crathman has joined #ocaml
ygrek has joined #ocaml
bluestorm_ has joined #ocaml
ita has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
postalchris has joined #ocaml
smimou has joined #ocaml
eck has joined #ocaml
pantsd has joined #ocaml
EliasAmaral has quit [Connection timed out]
Mr_Awesome has joined #ocaml
love-pingoo has joined #ocaml
Boojum has joined #ocaml
Boojum has quit [Client Quit]
bluestorm_ has quit ["Konversation terminated!"]
Boojum has joined #ocaml
Boojum is now known as Snark
seafoodX has quit [Read error: 110 (Connection timed out)]
ygrek has quit [Remote closed the connection]
Snark has left #ocaml []
Tetsuo has quit ["Leaving"]
pantsd has quit [Read error: 110 (Connection timed out)]
Cygaal has quit [Read error: 104 (Connection reset by peer)]
psnively has joined #ocaml
bengordon has joined #ocaml
flux has quit [Read error: 60 (Operation timed out)]
flux has joined #ocaml
love-pingoo is now known as nabla-pingoo
kelaouchi has quit ["leaving"]
crathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
dbueno has joined #ocaml
pantsd has joined #ocaml
pantsd has quit [Client Quit]
Jessehk has joined #ocaml
psnively has quit []
Jessehk has left #ocaml []
baruk has joined #ocaml