<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 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 ;)