vect changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn, ICFP'03 http://www.icfpcontest.org/, A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/, A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
<codeburnt> what's ocamlfind
Kinners has joined #ocaml
Kinners has left #ocaml []
Nomme has joined #ocaml
codeburnt has quit [Read error: 110 (Connection timed out)]
dax has quit [Read error: 110 (Connection timed out)]
mattam_ is now known as mattam
tomasso has joined #ocaml
<tomasso> aaaahh ocaml
det has quit [Read error: 110 (Connection timed out)]
det has joined #ocaml
<tomasso> better than haskell, as fast as c++ or c, with pattern matching lazy evaluation, OOP, type inference
<tomasso> what else do we need?
<phubuh> type classes
<tomasso> hmmh
<tomasso> and more libraries and better ides
<tomasso> more publicity
lms has quit ["brb"]
lms has joined #ocaml
wazze has quit ["If we don't believe in freedom of expression for people we despise, we don't believe in it at all -- Noam Chomsky"]
tomasso has quit ["Leaving"]
voltron has joined #ocaml
<voltron> is there a way to have a file with some ocaml statements, then start ocaml(1), have it read the statements, then drop into interactive mode?
<voltron> or do i need to be a module?
<phubuh> you can use #use "foo.ml";; in the toplevel to read and evaluate a file verbatim
<voltron> ah, great
<voltron> thanks
<voltron> a bit new to this, yet excited
<voltron> Unbound value use
<phubuh> did you forget the #?
<voltron> i'm in the interactive shell
<voltron> ah but i have to type another one
<voltron> i have much to learn
<phubuh> :)
_JusSx_i has joined #ocaml
wuuru has joined #ocaml
codeburnt has joined #ocaml
<codeburnt> I'm having a problem with camlp4
<codeburnt> let f = fun x -> match x with (c, 0) -> c;;
<codeburnt> that works, but if I do
<codeburnt> let f = fun x -> match x with (c, 0) when c > 0 -> c;;
<codeburnt> it doesn't work with camlp4 loaded. It works with straight ocaml
cjohnson has left #ocaml []
<codeburnt> patten guards seem to be the prob with camlp4
phubuh has quit [Remote closed the connection]
lms has quit []
ayrnieu has joined #ocaml
mattam has quit [Remote closed the connection]
mattam has joined #ocaml
avn has quit [Remote closed the connection]
avn has joined #ocaml
codeburnt has quit [Read error: 110 (Connection timed out)]
avn has quit [Read error: 60 (Operation timed out)]
dax has joined #ocaml
_JusSx_i has quit [Read error: 60 (Operation timed out)]
<Nomme> djadzia ? erzi ?
_JusSx_i has joined #ocaml
<_JusSx_i> wuuru : heya
<wuuru> _JusSx_i: :-)
<_JusSx_i> wuuru : how are you?
<wuuru> well... playing with my new Zaurus C-760 :-)
<_JusSx_i> $799.00 C760 (Dynamism, converted to English)
<_JusSx_i> $699.00 C750 (Dynamism, converted to English)
<_JusSx_i> $599.00 C700 (Dynamism, converted to English)
<wuuru> _JusSx_i: how is your ocaml? :-)
<wuuru> _JusSx_i: It is $649 in Japan :-)
<_JusSx_i> wuuru : Zaurus seems great
<_JusSx_i> wuuru : are u in japan?
<wuuru> _JusSx_i: no, but one ave brought it to me :-)
<wuuru> have
<wuuru> has
<wuuru> :-)
<_JusSx_i> wuuru : ocaml is great. I bought an italian book too
<wuuru> I have not installed ocaml onto my zaurus yet...
<_JusSx_i> wuuru :lol
<wuuru> I have to buy more flash memory for it
<_JusSx_i> wuuru : i think you have time
<wuuru> So far I have installed gcc :-)
<wuuru> time for installing ocaml? before my death? yes, I think so
<_JusSx_i> i need a function that i can't code it
<wuuru> which? :-)
<_JusSx_i> well i don't know if it's the right word : Conbination
<wuuru> so what should it do?
<_JusSx_i> well i have n elements to group them in m plase
<_JusSx_i> well i have n elements to group them in m place
<wuuru> ah
<_JusSx_i> the function isn't linear
<_JusSx_i> for example {10;20;30;40} to group them in 2 place
<_JusSx_i> {(10,20);(10,30);(10,40);(20;30);(20,40);(30;40)}
<wuuru> _JusSx_i: do you want to create the combinations or only count them?
_JusSx_i is now known as _JusSx-
<_JusSx-> wuuru : i need to create a combination
<_JusSx-> n elements in m places
<_JusSx-> i don't wonna u make the function
<drWorm> looks like you mean the cartesian product or something
<_JusSx-> i would like u help me
<wuuru> no, it is really called combination I think
* Nomme search
<_JusSx-> yeah in italian it's "Conbinazione"
<_JusSx-> Dispozione or Combinazione
<Nomme> un french "combinaison" :)
<Nomme> *and
<_JusSx-> ok
<_JusSx-> could u help me?
<Nomme> i'll try
<wuuru> I think I did it...
<_JusSx-> really
<_JusSx-> ?
<drWorm> how do i use ocamlcp? i compile with it and it produces ocamlprof.dump, which i try to open with ocamlprof but it just dumpts it to stdout, it seems (it's non-ascii)
<wuuru> I have lost the source code, however :-)
<_JusSx-> lol
<wuuru> but it was easy
<_JusSx-> wuuru : i will try again
_JusSx- is now known as _JusSx_
<_JusSx_> nothing is impossible
<Nomme> wait :)
<wuuru> _JusSx_: I think I did it as follows... I used {10;20;30;40} as 'digits' in a numeric system with radix 4
<wuuru> _JusSx_: i.e. I generated {10,10}, {10,20}, {20, 10}, {20,20} etc.
<wuuru> _JusSx_: and that I trew out the combinationes with repeated items such as {10,10}
<_JusSx_> i need to group them in 3 or 4 or 5
<_JusSx_> not only 2
<_JusSx_> i can group them in 2
<wuuru> _JusSx_: of course, then you will have to call this_function with argument 2, 3, 4 :-, 5
<_JusSx_> lol yeah i know
<Nomme> i think i have it, let me test :)
<_JusSx_> well i will try to code it
<_JusSx_> don't worry
<_JusSx_> :)
<Nomme> if you the answer shut up :)
<wuuru> _JusSx_: generating something like {10,10}, {10,20}, {20,10}, {20,20} is easy, it is just like generating fixed length binary numbers 000, 001, 011, 110, 111, but with radix 4 rathen than 2
<Nomme> *if you have the answer shut up :)
<Nomme> ledit ocaml
<Nomme> oups
<Nomme> :)
<_JusSx_> i don't have the answer. maybe i will have it i hope
lypanov has joined #ocaml
<wuuru> NetBSD won't support any bluetooth device and I want to communicate with my zaurus wireless
<wuuru> I think I must replace NetBSD with Linux :-)
wuuru has quit ["leaving"]
wuuru has joined #ocaml
<Nomme> fuck
<Nomme> <--- stupid
<lypanov> hehe
* Nomme shut the music down
<Nomme> let rec append e (elmt_list:'a list list) = match elmt_list with
<Nomme> [] -> [[e]]
<Nomme> | [ s ] -> [e::s]
<Nomme> | hd::tl -> (e::hd)::(append e tl)
<Nomme> ;;
<Nomme> let rec comb elmt p = let n = List.length elmt in
<Nomme> match (elmt,p) with
<Nomme> (_, 0) -> []
<Nomme> | (_,_) when n = p -> [ elmt ]
<Nomme> | (hd::tl, n) -> (append hd (comb tl (p-1)))@(comb tl p)
<Nomme> | ([],_) -> failwith "i'm so stupid"
<Nomme> ;;
<Nomme> sorry, for flood
<Nomme> i don't think it's a good solution
<Nomme> this algorithm use : "comb of p elements in n are equal to comb of p-1 elements in n-1 plus comb of p elements in n-i elements."
<Nomme> *n-1 and not n-i
<_JusSx_> well it works ;) great
<Nomme> why do you need to code this function ?
<_JusSx_> it can be used to find out a solution
<_JusSx_> great work
wazze has joined #ocaml
<Nomme> You can dcc me 2$
<Nomme> :)
<_JusSx_> lol
<_JusSx_> thanx u very much
<_JusSx_> now i have the result code but i think i will try to code it
<lypanov> win 5
<Nomme> to code it think about : C(n, p) = C(n-1,p-1) + C(n-1,p)
<Nomme> win 6
<Nomme> # comb (mklist 100) 50;;
<Nomme> Stack overflow during evaluation (looping recursion?).
owll has joined #ocaml
owll has quit [Client Quit]
<wuuru> Nomme: so what one should think about? :-)
<wuuru> Nomme: C(100, 50) = 1.00891344545564e+29
<wuuru> Nomme: RAM will not get all this combinations anyway :-)
mattam_ has joined #ocaml
dax has quit [Read error: 60 (Operation timed out)]
mattam has quit [Read error: 60 (Operation timed out)]
dax has joined #ocaml
<Nomme> Wuru :)
Nomme has quit ["Leaving"]
Nomme has joined #ocaml
lypanov has left #ocaml []
Nomme has quit ["Leaving"]
dax has quit [Read error: 110 (Connection timed out)]
emu has joined #ocaml
<emu> i am using ocaml 3.04. i know it's old, but does it not have Int32.compare?
maihem has joined #ocaml
mattam_ is now known as mattam
<emu> is anyone familiar with the debian packages? apparently to compile ffi c files you need to get at the header files for ocaml but these are stored in a versioned directory.. is there some proper way of getting their path?
codeburnt has joined #ocaml
gim has quit [Read error: 60 (Operation timed out)]
_JusSx_ has quit ["BitchX: the un-Cola"]
malc has joined #ocaml
gim has joined #ocaml
clog_ has joined #ocaml
clog has quit [Read error: 110 (Connection timed out)]
clog_ is now known as clog
<codeburnt> No implementations provided for the following modules:
<codeburnt> Unix referenced from init.cmx
<malc> ocamlopt unix.cmxa ....
<codeburnt> ahh thanks
maihem has quit ["Client exiting"]
ayrnieu has quit ["system"]
malc has quit [Read error: 110 (Connection timed out)]