<mfp>
would need to find some function in Toploop(?) to eval a file
<mfp>
this one looks good > value use_file : Format.formatter -> string -> bool
<mfp>
better yet use_silently
<mfp>
so Toploop.use_silently Format.err_formatter (Filename.concat (Findlib.package_directory "aaa") "aaa.ml");;
<mfp>
doesn't break on OCaml upgrade, doesn't break on AAA update, allows automatic updates
<mfp>
I think we have a keeper
Smerdyakov has joined #ocaml
Smerdyakov has quit ["Leaving"]
<Alpounet>
mfp, agreed
<Alpounet>
I used use_silently at the time I was working on mlbot
<Alpounet>
works fine :-)
lutter has quit ["Leaving."]
rwmjones_lptp has joined #ocaml
rwmjones_lptp has quit [Client Quit]
rwmjones_ has joined #ocaml
ikaros has joined #ocaml
rwmjones has quit [Read error: 113 (No route to host)]
dmentre has quit ["Leaving."]
_unK has joined #ocaml
hcarty has quit [Read error: 110 (Connection timed out)]
<thelema>
mfp: I like that. I'll revise the install
ertai has quit [verne.freenode.net irc.freenode.net]
Pepe_ has quit [verne.freenode.net irc.freenode.net]
mehdid has quit [verne.freenode.net irc.freenode.net]
jlouis has quit [verne.freenode.net irc.freenode.net]
bind_return has quit [verne.freenode.net irc.freenode.net]
det has quit [verne.freenode.net irc.freenode.net]
eldragon has quit [verne.freenode.net irc.freenode.net]
mal`` has quit [verne.freenode.net irc.freenode.net]
BigJ has quit [verne.freenode.net irc.freenode.net]
mehdid has joined #ocaml
ertai has joined #ocaml
Pepe_ has joined #ocaml
<Leonidas>
thelema: hmm, batteries look great.
jlouis has joined #ocaml
BigJ has joined #ocaml
det has joined #ocaml
eldragon has joined #ocaml
mal`` has joined #ocaml
bind_return has joined #ocaml
thelema_ has joined #ocaml
jlouis_ has joined #ocaml
r0bby_ has joined #ocaml
schmx has joined #ocaml
ikaros has quit [verne.freenode.net irc.freenode.net]
rwmjones_ has quit [verne.freenode.net irc.freenode.net]
thelema has quit [verne.freenode.net irc.freenode.net]
zhijie has quit [verne.freenode.net irc.freenode.net]
Amorphous has quit [verne.freenode.net irc.freenode.net]
mfp has quit [verne.freenode.net irc.freenode.net]
infoe has quit [verne.freenode.net irc.freenode.net]
r0bby has quit [verne.freenode.net irc.freenode.net]
schme has quit [verne.freenode.net irc.freenode.net]
bind_return has quit [verne.freenode.net irc.freenode.net]
det has quit [verne.freenode.net irc.freenode.net]
eldragon has quit [verne.freenode.net irc.freenode.net]
mal`` has quit [verne.freenode.net irc.freenode.net]
BigJ has quit [verne.freenode.net irc.freenode.net]
jlouis has quit [verne.freenode.net irc.freenode.net]
mal`` has joined #ocaml
ikaros has joined #ocaml
rwmjones_ has joined #ocaml
zhijie has joined #ocaml
Amorphous has joined #ocaml
mfp has joined #ocaml
infoe has joined #ocaml
BigJ has joined #ocaml
det has joined #ocaml
eldragon has joined #ocaml
bind_return has joined #ocaml
bind_return has quit [verne.freenode.net irc.freenode.net]
det has quit [verne.freenode.net irc.freenode.net]
eldragon has quit [verne.freenode.net irc.freenode.net]
BigJ has quit [verne.freenode.net irc.freenode.net]
_zack has quit ["Leaving."]
ikaros has quit [verne.freenode.net irc.freenode.net]
zhijie has quit [verne.freenode.net irc.freenode.net]
mal`` has quit [verne.freenode.net irc.freenode.net]
rwmjones_ has quit [verne.freenode.net irc.freenode.net]
infoe has quit [verne.freenode.net irc.freenode.net]
mfp has quit [verne.freenode.net irc.freenode.net]
Amorphous has quit [verne.freenode.net irc.freenode.net]
mal`` has joined #ocaml
ikaros has joined #ocaml
rwmjones_ has joined #ocaml
zhijie has joined #ocaml
Amorphous has joined #ocaml
mfp has joined #ocaml
infoe has joined #ocaml
BigJ has joined #ocaml
det has joined #ocaml
eldragon has joined #ocaml
bind_return has joined #ocaml
ttamttam has quit ["Leaving."]
bind_return has quit [verne.freenode.net irc.freenode.net]
det has quit [verne.freenode.net irc.freenode.net]
eldragon has quit [verne.freenode.net irc.freenode.net]
BigJ has quit [verne.freenode.net irc.freenode.net]
rwmjones_ is now known as rwmjones
det has joined #ocaml
bind_return has joined #ocaml
BigJ has joined #ocaml
jonafan_ is now known as jonafan
ikaros has quit [verne.freenode.net irc.freenode.net]
zhijie has quit [verne.freenode.net irc.freenode.net]
mal`` has quit [verne.freenode.net irc.freenode.net]
rwmjones has quit [verne.freenode.net irc.freenode.net]
infoe has quit [verne.freenode.net irc.freenode.net]
mfp has quit [verne.freenode.net irc.freenode.net]
Amorphous has quit [verne.freenode.net irc.freenode.net]
mal`` has joined #ocaml
ikaros has joined #ocaml
rwmjones has joined #ocaml
zhijie has joined #ocaml
Amorphous has joined #ocaml
mfp has joined #ocaml
infoe has joined #ocaml
hto has quit [Read error: 110 (Connection timed out)]
thelema_ is now known as thelema
orbitz_ has joined #ocaml
schmx has quit [verne.freenode.net irc.freenode.net]
srcerer has quit [verne.freenode.net irc.freenode.net]
rbancroft has quit [verne.freenode.net irc.freenode.net]
julm has quit [verne.freenode.net irc.freenode.net]
orbitz has quit [verne.freenode.net irc.freenode.net]
patronus has quit [verne.freenode.net irc.freenode.net]
Alpounet has quit [verne.freenode.net irc.freenode.net]
srcerer has joined #ocaml
orbitz_ has quit [Client Quit]
orbitz has joined #ocaml
ski_ has quit ["Lost terminal"]
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
Submarine has joined #ocaml
patronus_ has joined #ocaml
schmx has joined #ocaml
julm has joined #ocaml
Alpounet has joined #ocaml
rbancroft has joined #ocaml
<Leonidas>
is there a simple-to-use List in/contains function or do I have to build it myself?
tmaeda is now known as tmaedaZ
<Leonidas>
nevermind, I didn't need it after all.
tensorpudding has quit [Connection timed out]
Amorphous has quit [Read error: 110 (Connection timed out)]
<Alpounet>
IIRC, there is a 'member' function
<mfp>
List.mem
Amorphous has joined #ocaml
<mfp>
and then ç
<mfp>
oops
<mfp>
let contains l1 l2 = List.for_all (fun x -> List.mem x l1) l2
<mfp>
O(n^2), but you could easily make it O(n log n) in 3.12 by using Set (or some PSet implementation with any other OCaml version)
<Leonidas>
3.12 will have sets? Nice.
<Leonidas>
But it turned out that the list I was checking against was already ordered, so I only had to compare it to the head, which is O(1).
_andre has quit ["*puff*"]
<flx_>
leonidas, ocaml has had sets for a long time, but 3.12 brings a nice polymorphic capability to those functor-based modules
* Leonidas
needs to look up functors.
<Leonidas>
We had them in our lecture, but I was busy.
<Alpounet>
functors are an excellent and useful feature :)
<Leonidas>
I'm pretty sure they are. I have found many ocaml-features that are really fun to use.
<mfp>
Leonidas: OCaml 3.12 allows to name generic types explicitly, so you can instantiate the Set functor locally for a generic type t
<mfp>
let contains (type a) l1 l2 = let module S = Set.Make(struct type t = a let compare = compare end) in let s = List.fold_left (fun s x -> S.add x s) S.empty l1 in List.for_all (fun x -> S.mem x s) l2;;
Pimm has joined #ocaml
albacker has joined #ocaml
tensorpudding has joined #ocaml
<Leonidas>
mfp: is there some user-readable changelog for ocaml 3.12?
<Leonidas>
something like 'What's new in Python x.y'?
<mfp>
Leonidas: see Changes in the source tree
<mfp>
the "Changes" file, if that wasn't clear
<Camarade_Tux>
communication is really something the ocaml team does poorly imho