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
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz_ is now known as ulfdoz
PascalHunger has left #ocaml []
jakedouglas has quit [Quit: Leaving.]
joewilliams is now known as joewilliams_away
orbitz has quit [Ping timeout: 240 seconds]
orbitz has joined #ocaml
ccasin has quit [Quit: Leaving]
<dark> there was a syntax extension i invoked with ocamlfind ocamlc -package pgocaml,pgocaml.syntax -syntax camlp4o
<dark> how to use it on top level interpreter?
nimred has quit [Quit: Lost terminal]
<thelema> #use "topfind";; #camlp4o;; #require "pgocaml";; #require "pgocaml.syntax";;
<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
<dark> my .ocamlinit has something to do with batteries http://paste.pocoo.org/show/273001/ , is this sufficient?
<thelema> almost - it won't load the batteries camlp4 extensions
Tobu has quit [Ping timeout: 272 seconds]
jakedouglas has joined #ocaml
mjonsson has joined #ocaml
bzzbzz_ has quit [Quit: leaving]
mjonsson has quit [Remote host closed the connection]
dark has quit [Ping timeout: 240 seconds]
Tobu has joined #ocaml
dark has joined #ocaml
schmrkc has quit [Ping timeout: 264 seconds]
jakedouglas has quit [Quit: Leaving.]
schme has joined #ocaml
Yoric has joined #ocaml
schme is now known as schmrkc
lpereira has joined #ocaml
itewsh has joined #ocaml
init1 has joined #ocaml
Snark_ has joined #ocaml
ygrek has joined #ocaml
mjonsson has joined #ocaml
ztfw has joined #ocaml
<dark> thelema, {%{int32}} at printf does not work here
<dark> ok, it works with the syntax extension, plus the p"" syntax..
init1 has quit [Read error: Connection reset by peer]
nimred has joined #ocaml
init1 has joined #ocaml
Axioplase is now known as Axioplase_
ikaros has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
<dark> hey, I have a haskell-like inversed type syntax, o.O like type t 'a = 'a, is this a batteries extension or something new to 3.12?
<dark> i see it only on my batteries-enabled setup, but it is not specified in http://batteries.forge.ocamlcore.org/doc.preview:batteries-beta1/html/extensions.html
<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?
<gildor> {{:"http://whatever/"}My link}
<gildor> (AFAIR)
iago has quit [Quit: Leaving]
rwmjones is now known as rwmjones_afk
Fullma has quit [Quit: Fullma]
jonafan_ has joined #ocaml
jonafan has quit [Ping timeout: 265 seconds]
lpereira has quit [Read error: Connection reset by peer]
sdschulze has quit [Quit: Ex-Chat]
strangy has joined #ocaml
mjonsson has joined #ocaml
Yoric has quit [Quit: Yoric]
strangy has quit [Quit: Leaving]
iago has joined #ocaml
wuj has quit [Ping timeout: 265 seconds]
dark has quit [Ping timeout: 240 seconds]
dark has joined #ocaml
ztfw has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 245 seconds]
Fullma has joined #ocaml
wormphlegm has joined #ocaml
sepp2k has quit [Quit: sepp2k]
Edward_ has joined #ocaml
dark has quit [Quit: Leaving]