gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
bbc has quit [Quit: Lost terminal]
kmicinski has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
kmicinski has quit [Quit: leaving]
ftrvxmtrx has quit [Ping timeout: 250 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz
alexyk has quit [Quit: alexyk]
ftrvxmtrx has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
tony_ has quit [Ping timeout: 240 seconds]
seafood has quit [Ping timeout: 240 seconds]
alexyk has quit [Quit: alexyk]
philtor has quit [Ping timeout: 240 seconds]
mal`` has quit [Quit: Coyote finally caught me]
mal`` has joined #ocaml
joewilliams_away is now known as joewilliams
groovy2shoes has joined #ocaml
philtor has joined #ocaml
<philtor> going through the lwt docs...
<philtor> says to use the toplevel.
alexyk has joined #ocaml
joewilliams is now known as joewilliams_away
<philtor> so this works:
<philtor> # #use "topfind";;
<philtor> # #require "lwt";;
<philtor> But then I try to do this and it doesn't:
<philtor> # Lwt_io.read_char;;
<philtor> # Error: Reference to undefined global `Lwt_io'
<philtor> so the require of "lwt" worked, but couldn't find the Lwt_io module, it seems.
alexyk has quit [Read error: Connection reset by peer]
<philtor> I'm running 3.12 and according to godi_console I've got the 2.2.1 version of lwt installed.
<thelema> philtor: hmm... maybe that's in a different findlib module
<thelema> at the command line, try ocamlfind list | grep lwt
<thelema> is there a lwt_io (or lwt.io) package?
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
philtor has quit [Ping timeout: 240 seconds]
coucou747 has quit [Ping timeout: 255 seconds]
alexyk has joined #ocaml
AxleLonghorn has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
lopex has quit [Ping timeout: 240 seconds]
lopex has joined #ocaml
fraggle_ has quit [Ping timeout: 276 seconds]
alexyk has quit [Quit: alexyk]
groovy2shoes has left #ocaml []
fraggle_ has joined #ocaml
lopex has quit []
Amorphous has quit [Ping timeout: 272 seconds]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
philtor has joined #ocaml
AxleLonghorn has left #ocaml []
Amorphous has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
eye-scuzzy has quit [Remote host closed the connection]
eye-scuzzy has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
ModusPwnens has joined #ocaml
<ModusPwnens> Hello. Can someone help me with...well I don't really know what it's called
<ModusPwnens> I'm working with .mly and .mll files
arubin has quit [Quit: arubin]
<ModusPwnens> it's for an assignment, but it wasn't really explained at all and I don't understand the syntax
<ModusPwnens> I've googled and found some documents but I am still confusewd.
<ModusPwnens> I'm creating my own lexicon and parser I think..
<ModusPwnens> Anyways, I've defined some tokens like <int> Num, and <string> Id
<ModusPwnens> and then the start variable is of type <Nano.exp> exp
<ModusPwnens> and when I try to define the rules for Id, it yells at me because it's not of type Nano.exp
<ModusPwnens> Anyways, I don't really understand this and I was hoping someone could explain it to me..
<mrvn> you need to ask your TA. Those types are something they defined.
ModusPwnens has quit [Ping timeout: 276 seconds]
ikaros has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
ttamttam has joined #ocaml
tnguyen has joined #ocaml
ttamttam has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 240 seconds]
edwin has joined #ocaml
ygrek has joined #ocaml
edwin has quit [Quit: Leaving.]
edwin has joined #ocaml
edwin has quit [Remote host closed the connection]
edwin has joined #ocaml
drunK has quit [Remote host closed the connection]
bacam has quit [Ping timeout: 276 seconds]
Snark has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Yoric has joined #ocaml
tony_ has joined #ocaml
myu2 has joined #ocaml
bacam has joined #ocaml
Yoric has quit [Quit: Yoric]
cyanure has joined #ocaml
avsm1 has joined #ocaml
avsm3 has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
boscop has joined #ocaml
Obfuscate has quit [Ping timeout: 276 seconds]
Obfuscate has joined #ocaml
coucou747 has joined #ocaml
lopex has joined #ocaml
tony_ has quit [Ping timeout: 240 seconds]
RyanRN has joined #ocaml
avsm3 has quit [Quit: Leaving.]
Edward has joined #ocaml
tony_ has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
harrisonpartch has joined #ocaml
avsm has joined #ocaml
alexyk has joined #ocaml
sepp2k has quit [Quit: Leaving.]
RyanRN has quit [Quit: Leaving.]
ulfdoz has quit [Quit: deprecated]
alexyk has quit [Read error: Connection reset by peer]
ulfdoz has joined #ocaml
tnguyen has quit [Remote host closed the connection]
alexyk has joined #ocaml
RyanRN has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
orbitz has quit [Ping timeout: 240 seconds]
alexyk has quit [Read error: Connection reset by peer]
orbitz has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
Edward has quit [Ping timeout: 240 seconds]
alexyk has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
alexyk has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
alexyk has joined #ocaml
krktz has joined #ocaml
<krktz> hi
<krktz> i'm looking for a way to know if, during an integer addition/multiplication/division etc., a bit overflow happened
<krktz> I first thought I could check the sign of the result, but it doesn't work in all cases (in max_int * 3, both sides are positive and the result is too, but it's still wrong)
<flux> there are bit tricks for that
<flux> or, rather, good recipes for detecting such situations
<flux> I don't have a pointer, though, but perhaps google is your friend :)
<krktz> :)
<thelema> krktz: batteries has some code for doing this, iirc.
* thelema checks
<thelema> BatInt.Safe_int
op414 has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
<thelema> We could definitely use a better check for multiplication overflow - division is expensive
<thelema> that code only works for 32-bit ints
<ygrek> yup
<thelema> I don't think we can promote 63-bit ints to 128=bit for the multiply
<ygrek> :)
avsm has quit [Quit: Leaving.]
<flux> the last recipe from: http://www.fefe.de/intof.html
<flux> the principle should be portable
alexyk has joined #ocaml
<thelema> flux: yes, I guess that's a reasonable way to do it, except 63-bit ints add lots of annoying corner cases, I expect
alexyk has quit [Read error: Connection reset by peer]
tony_ has quit [Ping timeout: 276 seconds]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
arubin has joined #ocaml
rien has joined #ocaml
ymasory has joined #ocaml
Snark has quit [Quit: Ex-Chat]
alexyk has joined #ocaml
RyanRN has quit [Quit: Leaving.]
RyanRN has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
ttamttam has joined #ocaml
ttamttam has left #ocaml []
tony_ has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
haelix_ is now known as haelix
harrisonpartch has quit [Ping timeout: 246 seconds]
alexyk has quit [Read error: Connection reset by peer]
hyperbor1ean has quit [Quit: leaving]
harrisonpartch has joined #ocaml
alexyk has joined #ocaml
harrisonpartch has quit [Client Quit]
alexyk has quit [Read error: Connection reset by peer]
philtor has joined #ocaml
<thelema> hmm, how to randomly generate two numbers that sum to more than max_int?
<thelema> (other than let a = rand in let b = max_int - a + 1)
alexyk has joined #ocaml
hyperboreean has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
<mrvn> something like let t = max_int + rand in let a = rand in (a, t - a)
enthymeme has joined #ocaml
<thelema> well, I guess a = rand in b = max_int - a + rand works
ikaros_ has joined #ocaml
<mrvn> that could overfow leaving you with something which sum is quite small.
<thelema> isn't it identical to yours?
<mrvn> t is ment to be int64
<flux> making even a random integer that is 0..max_int is quite difficult..
<thelema> my native ints are int64
<thelema> well, .int63
<mrvn> thelema: that extra bit is important :)
<thelema> flux: huh? no it's not - the code is in batteries
<flux> or atleast non-obvious. I think I should file a bug at some day :)
<flux> (or find an existing one)
<thelema> I wrote it, it took me 5 minutes
<mrvn> flux: huh? Make a int64 one can call to_int
<mrvn> s/can/and/
<thelema> mrvn: heh, that's even easier than what I wrote
<thelema> although mine can algo generate random numbers
<thelema> s/random/negative/
ikaros has quit [Ping timeout: 272 seconds]
<flux> so Int64.to_int (Random.int64 (Int64.of_int max_int)) it is, great..
<mrvn> + abs() if you want positive
alexyk has joined #ocaml
<flux> but, off to sleep
* thelema is just loring and shifting
philtor has quit [Ping timeout: 240 seconds]
alexyk has quit [Client Quit]
avsm has joined #ocaml
myu2 has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 276 seconds]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
tony_ has quit [Quit: Ex-Chat]
munga has joined #ocaml
myu2 has joined #ocaml
alexyk has joined #ocaml
edwin has quit [Remote host closed the connection]
alexyk has quit [Client Quit]
fraggle_ has quit [Quit: -ENOBRAIN]
mnabil has joined #ocaml
avsm has quit [Quit: Leaving.]
ikaros_ has quit [Quit: Leave the magic to Houdini]
fraggle_ has joined #ocaml
tony_ has joined #ocaml
munga has quit [Ping timeout: 276 seconds]
cyanure has quit [Ping timeout: 250 seconds]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 240 seconds]
philtor has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
boscop has quit [Ping timeout: 240 seconds]
kig has quit [Read error: Operation timed out]
Tobu has joined #ocaml
Fullma has quit [Quit: Fullma]
kig has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
enthymeme has quit [Ping timeout: 260 seconds]