Yurik changed the topic of #ocaml to: http://icfpcontest.cse.ogi.edu/ -- OCaml wins | http://www.ocaml.org/ | http://caml.inria.fr/oreilly-book/ | http://icfp2002.cs.brown.edu/ | SWIG now supports OCaml| Early releases of OCamlBDB and OCamlGettext are available
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.
<taw> does ocaml has uniq ?
<karryall> no
TachYon25 has joined #ocaml
<taw> hi TachYon25
systems has joined #ocaml
<TachYon25> Hellou Taw :)
nkoza has joined #ocaml
Zavie[Caml] has quit []
systems has quit [Read error: 110 (Connection timed out)]
Yurik has joined #ocaml
<Yurik> re
<Yurik> hi all!
<taw> dzien dobry Yurik
<Yurik> taw: dzien dobry
<taw> Yurik: what are you doing right now ?
Yurik has quit [Read error: 54 (Connection reset by peer)]
flar_ has joined #ocaml
flar has quit [Read error: 60 (Operation timed out)]
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
lam_ has joined #ocaml
Dalroth has joined #ocaml
BeJiTo has joined #ocaml
systems has joined #ocaml
graydon has joined #ocaml
systems has quit ["Client Exiting"]
owll has joined #ocaml
_bejito_ has joined #ocaml
BeJiTo has quit [Read error: 104 (Connection reset by peer)]
karryall has quit []
gl has quit [Read error: 110 (Connection timed out)]
owll has quit ["Client Exiting"]
^AndyA^ has joined #ocaml
^AndyA^ has quit [Client Quit]
^AndyA^ has joined #ocaml
MegaWatS has joined #ocaml
^AndyA^ has left #ocaml []
taw has left #ocaml []
zack has joined #ocaml
Miwong has joined #ocaml
<Miwong> hello
<whee> any idea how hard a funge interpreter/compiler would be to write in ocaml?
<MegaWatS> you mean befunge?
<whee> no, funge (which includes befunge)
<whee> befunge is the 2d variant of funge
<MegaWatS> ic
<whee> there's trefunge and unefunge for 3d and 1d respectively
<whee> I don't see a trefunge compiler anywhere though :(
ayrnieu has quit ["ERC v2.93 $Revision: 1.308 $ (IRC client for Emacs)"]
<whee> bahhahahah
* whee drops ocaml for zt
zack has left #ocaml []
systems has joined #ocaml
gl has joined #ocaml
Dalroth has quit []
Miwong has quit ["Miwong has no reason"]
graydon has quit []
whee has quit [Killed (NickServ (Ghost: smaerty!~smaerty@roc-24-59-186-55.rochester.rr.com))]
whee has joined #ocaml
RichiH has joined #ocaml
systems has left #ocaml []
<RichiH> i got this type definition:
<RichiH> type 'm lisp = Atom of 'm | Node of 'm lisp * 'm lisp;;
<RichiH> now i would need to go down into my lisp tree and look up how deep )that right?) it is
<whee> yeah you'd have to traverse it and check
<RichiH> i know. i know that i have to do it with a recursive fuction, too
<RichiH> at this point i leave knowing and start guessing
<RichiH> some way down the road i am cussing
<whee> heh
<RichiH> at the end, you will see me sobbing
<RichiH> whee: so, how could i check whether my current position in the tree is an Atom or a Node?
<whee> pattern matching
<RichiH> heh
<RichiH> i know that much
<RichiH> but i can't figure out how to tell it "if you get an Atom, do..."
<whee> well, what's your algorithm
<RichiH> let rec isBalanced 'm lisp = match 'm with
<RichiH> |if
<RichiH> that's it, as of now :/
<whee> eeh
<RichiH> ph34r my 1337 ocaml s1llz ;)
<RichiH> +k
<whee> let me find you an example of pattern matching :D
<whee> http://caml.inria.fr/ocaml/htmlman/manual003.html section 1.4, the end of that section
<RichiH> i know about patern matching
<whee> you don't put if statements where the patterns should be :D
<RichiH> well, i can, if i want
<RichiH> |if type arg = Atom then n <- n+1
<RichiH> works
<RichiH> (i did it :)
<whee> weird way of doing it. heh
<RichiH> if you show me a better way of comparing the highest and the deepest level of an Atom, i will be more than glad :)
<RichiH> oh, wait...
<RichiH> |Atom (x) ->
<whee> well, each atom counts as 1
<whee> err each node/atom
<whee> with an atom just counting as 1 with no recursion