ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
exa has joined #ocaml
dylan has joined #ocaml
<dylan> I'm wondering, why do some modules have put the data parameter first (Like Hashtbl.add : t -> 'key -> 'value -> unit) and others last (Like Map's add : 'key -> 'val -> t -> t)?
<dylan> s/have//
<dylan> At first, I thought "Ah, functional modules do this." But Queue is imperative and has the same convention.
<Smerdyakov> I don't know of any rhyme or reason behind it.
<dylan> Although, I have noticed you can do this...
<dylan> let seq l g = List.fold_left (fun g f -> f g) g l
* ski_ guesses "add : 'key -> 'val -> t -> t" can be useful to partially apply to get "t -> t" ..
<dylan> seq [add_vertex "foo"; add_vertex "bar"; add_edge "foo" "bar"] empty
<dylan> in a Graph module. :)
<ski_> :)
kryptt has joined #ocaml
<dylan> Of course, with it as the first param: List.fold_left add_vertex graph list ....
sabetts2 has left #ocaml []
mrsolo has quit [Read error: 104 (Connection reset by peer)]
pango_ has joined #ocaml
Aradorn has quit [Read error: 104 (Connection reset by peer)]
pango has quit [Read error: 60 (Operation timed out)]
Oatmeat has joined #ocaml
m3ga has joined #ocaml
vezenchio has quit [calvino.freenode.net irc.freenode.net]
Oatly has quit [calvino.freenode.net irc.freenode.net]
Oatmeat|umn has quit [calvino.freenode.net irc.freenode.net]
lispy has quit [calvino.freenode.net irc.freenode.net]
KrispyKringle has quit [calvino.freenode.net irc.freenode.net]
Demitar has quit [calvino.freenode.net irc.freenode.net]
bacam has quit [calvino.freenode.net irc.freenode.net]
TaXules has quit [calvino.freenode.net irc.freenode.net]
Amorphous has quit [calvino.freenode.net irc.freenode.net]
Hipo has quit [calvino.freenode.net irc.freenode.net]
haelix has quit [calvino.freenode.net irc.freenode.net]
bacam has joined #ocaml
bacam has quit [Killed by ballard.freenode.net (Nick collision)]
vezenchio has joined #ocaml
Oatly has joined #ocaml
Oatmeat|umn has joined #ocaml
lispy has joined #ocaml
KrispyKringle has joined #ocaml
Demitar has joined #ocaml
bacam has joined #ocaml
TaXules has joined #ocaml
haelix has joined #ocaml
Amorphous has joined #ocaml
Hipo has joined #ocaml
bacam_ has joined #ocaml
TaXules has quit [Remote closed the connection]
Hipo_ has joined #ocaml
bacam has quit [Connection reset by peer]
KrispyKringle has quit [Connection reset by peer]
Hipo has quit [Read error: 104 (Connection reset by peer)]
KrispyKringle has joined #ocaml
haelix_ has joined #ocaml
TaXules has joined #ocaml
m3ga has quit ["Client exiting"]
teiax has joined #ocaml
haelix has quit [Read error: 110 (Connection timed out)]
Oatly has quit [Connection timed out]
vezenchio has quit ["I could see how [James Randi] comes off as a bit abrasive, as he uses terms like "gobbledigook" and "woo-woo" when referring ]
mlh has quit [Read error: 110 (Connection timed out)]
krypt1 has joined #ocaml
krypt1 has left #ocaml []
kryptt has left #ocaml []
Submarine has joined #ocaml
teiax has quit [Read error: 110 (Connection timed out)]
flux__ has joined #ocaml
flux__ has quit [Client Quit]
Skal has joined #ocaml
MisterC has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
vodka-goo has joined #ocaml
Snark has joined #ocaml
mlh has joined #ocaml
tom_p has quit [Read error: 110 (Connection timed out)]
m3ga has joined #ocaml
vodka-goo has quit []
m3ga has quit [Read error: 104 (Connection reset by peer)]
Submarine has quit ["Leaving"]
tom_p has joined #ocaml
Chipster has joined #ocaml
Chipster has quit []
Chipster has joined #ocaml
<Chipster> salut tout le monde
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
haelix_ is now known as haelix
mlh has quit [Client Quit]
Submarine has joined #ocaml
ppsmimou has joined #ocaml
Banana has quit [Read error: 104 (Connection reset by peer)]
Banana has joined #ocaml
ramkrsna has joined #ocaml
revision17_ has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
tom_p has quit [Read error: 110 (Connection timed out)]
exa has quit [Remote closed the connection]
mush has joined #ocaml
<mush> hi all
<mush> i got a problem there : http://rafb.net/paste/results/pi6kmh54.html
<mush> File "server.ml", line 3, characters 12-165:
<mush> This expression has type string list but is here used with type string
<mush> i don't understand why ... ?
<mush> soeey it's : File "server.ml", line 6, characters 12-165:
<mush> s/ee/rr/
<Snark> mush: the message looks explicit...
<Snark> accu looks like a string list
<mellum> is there some clever way to enumerate all partitions of a set, represented as list?
<Snark> mellum: looks awful
<mellum> Snark: huh?
<Snark> mellum: can probably be done recursively
<Snark> but will be slow like hell
<mellum> Snark: well, I'd only use it for tiny sets.
<mush> Snark, but in the code it is used as a list :p
<Snark> mush: line 8 looks strange
<Snark> I would have expected getIp0 res.(0)::accu
<mush> so :
<mush> File "server.ml", line 8 , characters 32-36:
<mush> This expression has type string but is here used with type 'a list
ramkrsna has quit [No route to host]
<Snark> what is the type of res.(0) ?
<pango> missing parenthesis ?
<pango> # let succ x = x+1 in succ 0 :: [1] ;;
<pango> - : int list = [1; 1]
<pango> try getIp0 (res.(0) :: accu)
<mush> Snark, a string
<mush> but i don't know if i can go out of the recursion with the exception
<mush> Snark, it ok
<mush> pango thx
<mush> pango, <pango> try getIp0 (res.(0) :: accu)
<pango> mellum: http://www.rafb.net/paste/results/WmRCej68.html (probably improvable)
<pango> # partitions [1;2;3;4] ;;
<pango> - : int list list list =
<pango> [[[1]; [2]; [3]; [4]]; [[1; 2]; [3]; [4]]; [[1; 3]; [4]; [2]];
<pango> [[1; 4]; [3]; [2]]; [[1]; [2; 3]; [4]]; [[1; 2; 3]; [4]]; [[1; 4]; [2; 3]];
<pango> [[1]; [2; 4]; [3]]; [[1; 2; 4]; [3]]; [[1; 3]; [2; 4]]; [[1]; [2]; [3; 4]];
<pango> [[1; 2]; [3; 4]]; [[1; 3; 4]; [2]]; [[1]; [2; 3; 4]]; [[1; 2; 3; 4]]]
<mellum> pango: great, thanks.
<mellum> My goal is to filter out certain partitions, count how many there are, look up the recurrence in the On-Line Encyclopedia of Integer Sequences, and then prove it :)
<Snark> pango: shouldn't it be of type int list list ?
<mellum> int list is a set; int list list is a partition; int list list list is a set of partitions. So it's fine
<pango> a partition is an int list list, so the list of all partitions is an int list list list
<Snark> oh, partitions
<Snark> I had understood subsets
<mellum> Actually, I want to know how many ways there are to partition a multiset where each element occurs twice, such that no element of the partition contains both identical elements. Maybe somebody knows the answer? ;-)
<pango> it's probably a bit easier to count how many will have identical element(s)
<pango> mmmh not even sure
<Snark> mellum: I don't understand... an element can only appear once in a partition
<Snark> (it is the difference between a covering and a partition)
<pango> Snark: he probably means, identical considering elements value
<pango> # partitions [1;1;2;2] ;;
<pango> - : int list list list =
<pango> [[[1]; [1]; [2]; [2]]; [[1; 1]; [2]; [2]]; [[1; 2]; [2]; [1]];
<pango> [[1; 2]; [2]; [1]]; [[1]; [1; 2]; [2]]; [[1; 1; 2]; [2]]; [[1; 2]; [1; 2]];
<pango> [[1]; [1; 2]; [2]]; [[1; 1; 2]; [2]]; [[1; 2]; [1; 2]]; [[1]; [1]; [2; 2]];
<pango> [[1; 1]; [2; 2]]; [[1; 2; 2]; [1]]; [[1]; [1; 2; 2]]; [[1; 1; 2; 2]]]
<pango> #
<pango> in this case [[1;2];[1;2]] is a partition with equal elements
<Snark> gasp
<pango> same goes for [[1];[1];[2;2]], etc.
mattam has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
<mellum> Okay, that was maybe a bit unclear... I have the set {x_1, y_1, x_2, y_2, ...} and I want all partitions where for no i do x_i and y_i occur together in a set
threeve has joined #ocaml
Oatmeat|umn has quit ["Leaving"]
Oatmeat|umn has joined #ocaml
Oatmeat|umn has left #ocaml []
Oatmeat|umn has joined #ocaml
Oatmeat|umn has quit [Client Quit]
Oatmeat|umn has joined #ocaml
mush has quit ["Leaving"]
bacam_ is now known as bacam
Chipster has quit []
brx_ has joined #ocaml
brx has quit [Nick collision from services.]
brx_ is now known as brx
ramkrsna has joined #ocaml
* dylan ponders how to lex "Hello, $name" as "Hello, " & name
__DL__ has joined #ocaml
vezenchio has joined #ocaml
exa has joined #ocaml
Submarine has left #ocaml []
ramkrsna has quit ["printk("Rusty's brain broke \n");"]
vodka-goo has joined #ocaml
vodka-goo has left #ocaml []
ppsmimou has quit ["Leaving"]
ppsmimou has joined #ocaml
ppsmimou has quit ["Leaving"]
edesarna has joined #ocaml
edesarna has left #ocaml []
pango has quit ["Leaving"]
pango has joined #ocaml
mrsolo has joined #ocaml
pango has quit [Read error: 113 (No route to host)]
pango_ has joined #ocaml
chs_ has joined #ocaml
<chs_> Anybody knows of example code of pretty printers usable in the debugger?
exa has quit [Remote closed the connection]
exa has joined #ocaml
<pango_> chs_: there's one somewhere in http://sardes.inrialpes.fr/~aschmitt/cwn/2003.09.23.html
<chs_> pango_: Thanks.
mrsolo has quit [Read error: 104 (Connection reset by peer)]
__DL__ has quit ["Bye Bye"]
Schmurtz has quit [Read error: 104 (Connection reset by peer)]
Schmurtz has joined #ocaml
ptolomy2 has quit [Read error: 110 (Connection timed out)]
mrsolo has joined #ocaml
m3ga has joined #ocaml
m3ga has quit ["Client exiting"]
Snark has quit ["Leaving"]
Godeke has quit ["Leaving"]
exa has quit [Read error: 104 (Connection reset by peer)]
zigong has joined #ocaml
m3ga has joined #ocaml
m3ga has quit [Client Quit]
zigong has quit [Remote closed the connection]
aegray has joined #ocaml
Schmurtz has quit [Read error: 104 (Connection reset by peer)]
khaladan has quit []
mrsolo has quit [Remote closed the connection]
MisterC has quit [Remote closed the connection]
threeve has quit []
aegray has quit [Read error: 110 (Connection timed out)]
aegray has joined #ocaml
mrsolo has joined #ocaml
Submarine has joined #ocaml
smimou has joined #ocaml
demitar_ has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Aradorn has joined #ocaml
mlh_ has joined #ocaml
smimou has quit [Remote closed the connection]