flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
<jli> is it appropriate to have '#load "str.cma"' at the top of an OCaml program?
<mbishop> only if you're writing a script
<mbishop> a program you plan on compiling should just use "open Str"
<mbishop> and then the str module is included when you compile, with "str.cmxa" as one of the parameters (or cmx or whatever depending on how you are compiling)
<jli> oh, that'll work? hmm
sporkmonger has joined #ocaml
ikaros_ has quit ["Leave the magic to Houdini"]
<jli> has anyone done work with ncurses in ocaml?
Amorphous has quit [Read error: 110 (Connection timed out)]
Alpounet has quit [Remote closed the connection]
Amorphous has joined #ocaml
Associat0r has joined #ocaml
Ched has quit [Read error: 60 (Operation timed out)]
Ori_B_ has joined #ocaml
Ori_B_ has quit [Client Quit]
Ched has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
Associat0r has quit []
<palomer> weird, match expects a Camlp4.PreCast.Ast.match_case and not a Camlp4.PreCast.Ast.match_case list. how do I remedy this situation?
jamii has quit [Read error: 110 (Connection timed out)]
cjs has joined #ocaml
<cjs> Silly question: how does one pronounce, e.g., "'a list"?
<cjs> No help for the n00bie? :-)
<jli> cjs: I think I've heard "tick a list", "a list", and "alpha list"
<cjs> Ah. Someone on #haskell suggested "alpha list".
<jli> maybe "list of {a's, tick a's, alphas}"
<cjs> I'd heard that suggested, too, which sounds more comforable (me being a Haskell guy), but then I need to read it backwards to say it, which bugs me for some reason.
<cjs> I guess, thinking about it, which works better depending on the data type. "int list" sounds better than "list in", but "lazy int" sounds better than "int lazy".
<jli> that's because int is the adjective in the former case and the noun in the latter :)
<cjs> Well it has no business changing around that way. :-)
<cjs> So how much do people use lazy evaluation in Caml?
sporkmonger has quit []
tvn has quit [anthony.freenode.net irc.freenode.net]
tvn has joined #ocaml
vithos_ has joined #ocaml
<kaustuv_> cjs: I use it nearly everywhere. There is a lot of merit in having lazy data structures with eager evaluation (like in Clojure).
<kaustuv_> Or perhaps I misread your question. I almost never use lazy evaluation.
Associat0r has joined #ocaml
vithos has quit [Read error: 110 (Connection timed out)]
kaustuv_ has left #ocaml []
seafood has joined #ocaml
<jli> can someone help me compile ocaml-curses-1.0.3? there's no INSTALL or README
<jli> I can run autoconf, and then ./configure, but following it up with "make" results in errors from compiling functions.c
vithos has joined #ocaml
vithos_ has quit [Read error: 60 (Operation timed out)]
Nanette has joined #ocaml
Nanette is now known as Alex319
<Alex319> Hello. I am having a problem running ocam. When I start up a shell and run ocaml, it works fine, and my OCAMLLIB environment variable is empty. However, when I add directories to the OCAMLLIB, it then says " cannot open pervasives.cmi". What could be going on here?
Alexander319 has joined #ocaml
Alexander319 has quit [Client Quit]
<tsuyoshi> my first guess would be: you need to add the directory with pervasives.cmi to the beginning of OCAMLLIB
<Alex319> it works if the directory with pervasives.cmi is the only thing in the OCAMLLIB, but when I put in another ditectory on the end of the OCAMLLIB, like if I have OCAMLLIB="/usr/lib/ocaml:/home/alex" where /usr/lib/ocaml is the location of pervasives.cmi, then it still tells me cannot find pervasives.cmi
<kaustuv> Alex319: OCAMLLIB is the root of the standard library, not a library search path.
<kaustuv> For the latter, you need ocamlfind
<Alex319> i see
<tsuyoshi> oh.. yeah you need to use -I
<kaustuv> I would recommend just using ocaml findlib instead of fiddling with -I
<kaustuv> apt-get install ocaml-findlib, and then use the OCAMLPATH variable
<Alex319> do you have to install findlib, or can you just manually set the OCAMLPATH environment variable?
<kaustuv> findlib is a wrapper around the ocaml compilers, so yes you have to install findlib
<Alex319> I have another question about just using -I. What's the syntax if you want to use two or more directories? Do you just type "ocaml -I ./directory1 -I ./directory2 ..."?
<kaustuv> Yes, that's correct.
Mr_Awesome has joined #ocaml
Alex319 has quit ["ChatZilla 0.9.84 [Firefox 3.0.10/2009042316]"]
AxleLonghorn has joined #ocaml
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
AxleLonghorn has left #ocaml []
vithos has quit [Read error: 110 (Connection timed out)]
angerman has joined #ocaml
itewsh has joined #ocaml
naufraghi has joined #ocaml
<jli> what does this mean: "~-1"? some more context: "if key <> ~-1 then..."
<jli> ~-1 seems to just be -1
<mrvn> unary minus
<mrvn> # (~-);;
<mrvn> - : int -> int = <fun>
<mrvn> # (-);;
<mrvn> - : int -> int -> int = <fun>
monadic_kid has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
<jli> oh. huh.
monadic_kid has quit ["Leaving"]
<cjs> Can anybody here give me an explanation of the hash table implementation given in Bagwell's VList paper (http://lampwww.epfl.ch/papers/techlists.pdf)? I can't seem to get it, perhaps because there's no example. In the off-topic channel is ok, if someone reminds me what that is.
<cjs> Oops, wrong channel. :-)
monadic_kid has joined #ocaml
mbishop has quit [Read error: 113 (No route to host)]
mbishop has joined #ocaml
slash_ has quit [Client Quit]
verte has joined #ocaml
Kerris7 has joined #ocaml
hkBst has joined #ocaml
itewsh has quit [No route to host]
<Camarade_Tux> \o/ my gtk*-autobinder just got ten times more complex (I'm about to take into considerations several libs and the dependencies between them)
<Camarade_Tux> hum, actually I wonder if I can't get ocamlbuild to make all the work :)
<kaustuv> My deepest condolences.
monadic_kid has quit ["Leaving"]
rjack has joined #ocaml
Kerris7 has quit ["Don't even think about saying Candlejack or else you wi"]
Kerris7 has joined #ocaml
Kerris7 has quit [Client Quit]
Kerris7 has joined #ocaml
kobook has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
ikaros has joined #ocaml
Snark has joined #ocaml
nickgibbon has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
Ched has quit [Remote closed the connection]
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
_JFT_ has joined #ocaml
robocop has left #ocaml []
_JFT_ has quit []
Ched has joined #ocaml
jamii has joined #ocaml
nickgibbon has quit ["ecky-thump"]
Camarade_Tux has quit [Read error: 60 (Operation timed out)]
jeddhaberstro has joined #ocaml
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
Camarade_Tux has joined #ocaml
tsuyoshi has quit ["upgrading"]
tsuyoshi has joined #ocaml
verte_ has joined #ocaml
verte has quit [Read error: 104 (Connection reset by peer)]
verte_ is now known as verte
Yoric[DT] has quit [Read error: 113 (No route to host)]
itewsh has joined #ocaml
nickw has joined #ocaml
marmottine has joined #ocaml
kaustuv_ has joined #ocaml
<jli> is ocamlfind pretty popular/widespread?
<flux> yes
<tsuyoshi> compiling without ocamlfind is pretty annoying... not really any reason not to use it
<flux> ocamlfind is so great and easy that it's worth using it for your own projects also
<itewsh> is there any function within the pervasives module so as to transform a float value to int ? (4.4 -> 4 and 4.5 -> 5)
<flux> indeed, I can't spot one that rounds up when the digit after . is >= 5
<flux> a trick that works for positive numbers is: let round_positive v = truncate (v +. 0.5)
<itewsh> flux: hmm! good idea!
<flux> this is akin to the omission of constant 'pi'..
<flux> does Batteries fix both of these?-)
<Camarade_Tux> I'd really love a float -> int conversion function, a *fast* one ;)
<flux> so, something faster than truncate then?
<flux> what do you need truncate so much for?
<flux> itewsh, round? well, I can't see it, so apparently it doesn't have it then
<flux> but it does have pi, nice
<itewsh> anyway, I'm going to use your trick
<flux> you need to modify it to cover negative numbers also
<Camarade_Tux> flux, I meant one with rounding ;)
<flux> camarade_tux, I'm guessing the CPU would have a fast opcode for doing that
<Camarade_Tux> the function you gave if fast but I don't know how slower it would get for negatives too
<Camarade_Tux> flux, yeah, that's what I'd imagine too :)
jeddhaberstro has quit []
<thelema> x86 has rounding control bits - you'd have to set a rounding mode for float -> int conversion
<jli> search for "Function round is absent"
<flux> yeah, that looks better
<flux> likely faster than explicitly checking for negative numbers
<itewsh> hmm indeed
cjs has quit [Connection reset by peer]
cjs has joined #ocaml
marmottine has quit ["mv marmotine Laurie"]
cjs has quit [Read error: 104 (Connection reset by peer)]
cjs has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
sporkmonger has joined #ocaml
gl is now known as poz
poz is now known as gl
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Ariens_Hyperion has joined #ocaml
Camarade_Tux has quit ["Quitte"]
Ariens_Hyperion has left #ocaml []
Camarade_Tux has joined #ocaml
Ched has quit [Remote closed the connection]
<Camarade_Tux> I found an easy way to write 'þ' for syntax extensions : open a term, type 'cat /dev/input/mice' and now, have fun moving the mouse ><
Yoric[DT] has joined #ocaml
<itewsh> hm, btw, I've a question about these files inside "/dev/*" : are you able to open them without being a superuser?
<jli> depends on their permissions
<jli> and your user/groups
<Yoric[DT]> Some of them.
<Yoric[DT]> /dev/random, /dev/null ...
<jli> /dev/zero, can't forget /dev/zero
<Yoric[DT]> :)
<Camarade_Tux> another fun one for when you're short on music is 'cat /dev/urandom > /dev/dsp' ><
marmottine has joined #ocaml
marmottine is now known as marmotine
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Ched has joined #ocaml
jeddhaberstro has joined #ocaml
velco has joined #ocaml
velco has left #ocaml []
jlouis has quit [Remote closed the connection]
itewsh has quit [Success]
itewsh has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
BiDOrD has joined #ocaml
Yoric[DT] has quit [Read error: 113 (No route to host)]
itewsh has quit [Success]
itewsh has joined #ocaml
jlouis has joined #ocaml
monadic_kid has joined #ocaml
rjack has quit ["leaving"]
jeddhaberstro has quit []
Snark has quit ["Ex-Chat"]
slash_ has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
marmotine has quit [Remote closed the connection]
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
Ariens_Hyperion has joined #ocaml
Ariens_Hyperion has left #ocaml []
pants2 has quit [Read error: 113 (No route to host)]
pants1 has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
ikaros_ has joined #ocaml
pants1 has quit [Read error: 110 (Connection timed out)]
pants1 has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
itewsh has quit [Success]
itewsh has joined #ocaml
Ched has quit [Remote closed the connection]
<palomer> how do you express a rec_binding in camlp4?
<palomer> found it
<palomer> <:rec_binding
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
vithos has joined #ocaml
Associat0r has quit []
hkBst has quit [Read error: 104 (Connection reset by peer)]
Ched has joined #ocaml
nickw has quit [Read error: 54 (Connection reset by peer)]
Kerris7 has quit ["Don't even think about saying Candlejack or else you wi"]
Kerris7 has joined #ocaml
Kerris7 has quit [Remote closed the connection]
Kerris7 has joined #ocaml
monadic_kid has quit ["Leaving"]
vithos has quit []
angerman has quit []
naufraghi has quit []
Yoric[DT] has joined #ocaml
ikaros_ has quit ["Leave the magic to Houdini"]
alexyk has joined #ocaml