<thelema>
dark: or something very similar - step 1: load ocamlfind, step 2: tell it you want camlp4, step3, load your packages
<dark>
can i load ocamlfind inside ocaml toplevel?
<thelema>
yes, #use "topfind";; does that
<dark>
how to activate batteries syntax extensions? ocamlfind batteries/ocaml does not work (it says ocamlfind: Cannot find command: /usr/lib/ocaml/batteries/ocaml)
<dark>
btw it works, i was trying #load "camlp4o.cma" instead..
<thelema>
that trick is gone, and a new trick exists - copy the ocamlinit from batteries into ~/.ocamlinit
<mfp>
dark: it's a bug in batteries/camlp4 that causes the toplevel's output to switch to the revised syntax
<dark>
yes, it does not accept ([] : list 'a), so it's confusing..
mjonsson has quit [Remote host closed the connection]
itewsh has quit [Ping timeout: 245 seconds]
albacker has joined #ocaml
sdschulze has joined #ocaml
albacker has quit [Disconnected by services]
<sdschulze>
I'm trying to learn to learn about the Hindley-Milner algorithm (reading Types and Programming Languages). It's pretty obvious that { X = Nat, Y = X -> X } is unifiable -- but what if I reversed it and wrote { Y = X -> X, X = Nat }?
<dark>
then Y = Nat -> Nat?
<sdschulze>
According to TaPL, what the algorithm does is: pick "X = Nat" and apply it to the rest, i.e. "Y = X -> X".
<sdschulze>
in the { X = Nat, Y = X -> X } case
<sdschulze>
So it replaces X with Nat in Y = X -> X.
<sdschulze>
But in the reversed case, there's no luck. "Y = X -> X" doesn't tell anything useful about X.
<dark>
it may pick the one with least arity
<sdschulze>
Does OCaml use standard Hindley-Milner at all?
sepp2k has joined #ocaml
<dark>
no idea at all :)
ygrek has quit [Ping timeout: 245 seconds]
<rwmjones>
sdschulze: the type unification is influenced by HM, if that's what you mean
ygrek has joined #ocaml
scriptdevil has joined #ocaml
<scriptdevil>
Is there a "write yourself a scheme in ocaml" book somewhere?
<scriptdevil>
Or some toy compiler/interpreter in ocaml to evaluate it for a bigger project?
cthuluh has quit [Quit: Changing server]
cthuluh has joined #ocaml
cthuluh has quit [Client Quit]
<sdschulze>
rwmjones: But stuff like mutually recursive functions might be a bit challenging for inference, right?
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
dark has quit [Ping timeout: 264 seconds]
dark has joined #ocaml
itewsh has joined #ocaml
scriptdevil has quit [Quit: leaving]
Amorphous has quit [Ping timeout: 272 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
Amorphous has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
ulfdoz_ is now known as ulfdoz
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz has joined #ocaml
Edward_ has joined #ocaml
boscop has quit [Ping timeout: 255 seconds]
boscop has joined #ocaml
Snark_ has quit [Quit: Ex-Chat]
cthuluh has joined #ocaml
iago has joined #ocaml
avsm has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 250 seconds]
ftrvxmtrx has joined #ocaml
<dark>
Hello, I'm getting Reference to undefined global `Batteries', compiling with ocamlfind ocamlc -package pgocaml,batteries -linkpkg -o test db.cmo test.cmo
<dark>
(it works on toplevel, after some ~/.ocamlinit thing..)
mjonsson has joined #ocaml
itewsh has quit [Quit: o/]
<mfp>
dark: try to build with -thread
<mfp>
IIRC if you don't use -thread the Batteries module is not available and you have to use Batteries_uni
yezariaely has joined #ocaml
yezariaely has left #ocaml []
ikaros has joined #ocaml
patronus has quit [Remote host closed the connection]
patronus has joined #ocaml
jakedouglas has joined #ocaml
fasta has joined #ocaml
<fasta>
I have an Ocaml program which refers to LIBPS (this is just a shell variable). Does this ring a bell for someone?
<fasta>
The PS refers to PostScript, but I don't know which lib he actually means.
<fasta>
orbitz, is that an actual OCaml library? It's not in Ubuntu apparently.
<orbitz>
no clue
avsm has quit [Quit: Leaving.]
<fasta>
Ok, it's not an OCaml library, just plain C.
<dark>
mfp, yes thank you =)
wuj has joined #ocaml
Edward_ has quit []
init1 has quit [Quit: Quitte]
mjonsson has quit [Ping timeout: 264 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
<dark>
I generated documentation with ocamldoc, but it references types from batteries, etc. which aren't available as a link. How to add "external" links?