gl has quit ["remember the girl, abused with forks, knives and razor blades!"]
malc has joined #ocaml
mattam has quit [benford.freenode.net irc.freenode.net]
skylan has quit [benford.freenode.net irc.freenode.net]
mattam has joined #ocaml
skylan has joined #ocaml
mattam has quit [""May the source be with you ;)""]
__DL__ has quit ["Client Exiting"]
DL_home has quit ["Client Exiting"]
malc has quit [Read error: 110 (Connection timed out)]
MegaWatS has quit ["Oceania has ALWAYS been at war with Eastasia!"]
jao has joined #ocaml
jao has left #ocaml []
flar has joined #ocaml
flar has quit [Client Quit]
flar_ is now known as flar
<flar>
anyone awake?
<mrvn>
03:51 -!- There is no such nick anyone
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
gl has joined #ocaml
mattam has joined #ocaml
zack has joined #ocaml
<mrvn_>
Does ocaml have a module for good random numbers. One that uses /dev/random for entropy for example? The Random modul seems to be not that good.
karryall has joined #ocaml
TachYon25 has joined #ocaml
karryall has quit []
aps has joined #ocaml
<zack>
hi, I'm in trouble with Set functor
<zack>
module OrderedUri: Set.OrderedType =
<zack>
struct
<zack>
type t = string
<zack>
let compare = compare
<zack>
end
<zack>
module UriSet = Set.Make (OrderedUri)
<zack>
UriSet.add "foo";;
<zack>
This expression has type string but is here used with type
<zack>
UriSet.elt = OrderedUri.t
<zack>
which trick am I missing?
<zack>
Found!:
<zack>
module OrderedUri: Set.OrderedType with type t = string =
<zack>
thanks :)
karryall has joined #ocaml
zack has left #ocaml []
Yurik has joined #ocaml
<Yurik>
re
Yurik has quit [Remote closed the connection]
BeJiTo has quit [Read error: 54 (Connection reset by peer)]
Zavie[Caml] has joined #ocaml
<Zavie[Caml]>
Hello ^_^
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
ayrnieu has joined #ocaml
malc has joined #ocaml
smkl has quit [Read error: 104 (Connection reset by peer)]
smklsmkl has joined #ocaml
<Zavie[Caml]>
yop :)
smklsmkl is now known as smkl
malc has quit [Read error: 110 (Connection timed out)]
taw has joined #ocaml
<taw>
if I have a which is list of foo_t and b which is also list of foo_t, how can I find all elements of b which are not in a ?
<karryall>
taw: see List.filter and List.mem
<taw>
but that would be O(n2)
<taw>
while it should be O(n) if they are already sorted
<karryall>
you didn't say they were already sorted
<ayrnieu>
taw - but that would be O(n)
<ayrnieu>
while it should be O(0) if we don't want to do anything
<taw>
List.filter (fun m -> not (List.mem m a)) b
<taw>
?
<ayrnieu>
(taw - I was mocking you)
<karryall>
taw: yes, that should work
<taw>
well, but it's so awfully costy
<ayrnieu>
taw - no it isn't, but you're free to write a version optimal to your data.