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
Kinners has joined #ocaml
merriam has quit [hogan.freenode.net irc.freenode.net]
mrvn_ has quit [hogan.freenode.net irc.freenode.net]
rox has quit [hogan.freenode.net irc.freenode.net]
smkl has quit [hogan.freenode.net irc.freenode.net]
polin8 has quit [hogan.freenode.net irc.freenode.net]
whee has quit [hogan.freenode.net irc.freenode.net]
skylan has quit [hogan.freenode.net irc.freenode.net]
lindril has quit [hogan.freenode.net irc.freenode.net]
lam has quit [hogan.freenode.net irc.freenode.net]
Zadeh has quit [hogan.freenode.net irc.freenode.net]
Segora has quit [hogan.freenode.net irc.freenode.net]
xkb has quit [hogan.freenode.net irc.freenode.net]
Torquema1a has quit [hogan.freenode.net irc.freenode.net]
emu has quit [hogan.freenode.net irc.freenode.net]
nkoza has quit [hogan.freenode.net irc.freenode.net]
Kinners has quit [hogan.freenode.net irc.freenode.net]
lament has quit [hogan.freenode.net irc.freenode.net]
docelic|away has quit [hogan.freenode.net irc.freenode.net]
foxen5 has quit [hogan.freenode.net irc.freenode.net]
merriam has joined #ocaml
mrvn_ has joined #ocaml
rox has joined #ocaml
Zadeh has joined #ocaml
emu has joined #ocaml
Torquema1a has joined #ocaml
xkb has joined #ocaml
nkoza has joined #ocaml
Segora has joined #ocaml
smkl has joined #ocaml
polin8 has joined #ocaml
whee has joined #ocaml
skylan has joined #ocaml
lindril has joined #ocaml
lam has joined #ocaml
lament has joined #ocaml
Kinners has joined #ocaml
docelic|away has joined #ocaml
foxen5 has joined #ocaml
asqui has quit [Excess Flood]
asqui has joined #ocaml
skylan has quit [Remote closed the connection]
skylan has joined #ocaml
Kinners has quit [Read error: 104 (Connection reset by peer)]
lament has quit ["<Liam> cocks || <Liam> gigantic cocks || <Liam> slapping me in the face"]
iusris has joined #ocaml
<iusris> hello.
polin8 has quit ["Lost terminal"]
polin8 has joined #ocaml
asqui has quit [Connection timed out]
iusris is now known as iusris|away
docelic|away has quit [Read error: 110 (Connection timed out)]
mattam has joined #ocaml
rox has quit [hogan.freenode.net irc.freenode.net]
mrvn_ has quit [hogan.freenode.net irc.freenode.net]
iusris|away has quit [hogan.freenode.net irc.freenode.net]
iusris|away has joined #ocaml
mrvn_ has joined #ocaml
rox has joined #ocaml
jemfinch has joined #ocaml
<jemfinch> is there anyone here who does SML?
lament has joined #ocaml
jemfinch has quit ["Client Exiting"]
Yurik has joined #ocaml
<Yurik> re
systems has joined #ocaml
Yurik has quit [Read error: 104 (Connection reset by peer)]
mrvn_ has quit [hogan.freenode.net irc.freenode.net]
rox has quit [hogan.freenode.net irc.freenode.net]
iusris|away has quit [hogan.freenode.net irc.freenode.net]
lindril has quit [hogan.freenode.net irc.freenode.net]
whee has quit [hogan.freenode.net irc.freenode.net]
lam has quit [hogan.freenode.net irc.freenode.net]
smkl has quit [hogan.freenode.net irc.freenode.net]
xkb has quit [hogan.freenode.net irc.freenode.net]
Torquema1a has quit [hogan.freenode.net irc.freenode.net]
Zadeh has quit [hogan.freenode.net irc.freenode.net]
Segora has quit [hogan.freenode.net irc.freenode.net]
nkoza has quit [hogan.freenode.net irc.freenode.net]
emu has quit [hogan.freenode.net irc.freenode.net]
merriam has quit [hogan.freenode.net irc.freenode.net]
rox has joined #ocaml
mrvn_ has joined #ocaml
iusris|away has joined #ocaml
lam has joined #ocaml
lindril has joined #ocaml
whee has joined #ocaml
smkl has joined #ocaml
Segora has joined #ocaml
nkoza has joined #ocaml
xkb has joined #ocaml
Torquema1a has joined #ocaml
emu has joined #ocaml
Zadeh has joined #ocaml
merriam has joined #ocaml
systems has quit [hogan.freenode.net irc.freenode.net]
lament has quit [hogan.freenode.net irc.freenode.net]
polin8 has quit [hogan.freenode.net irc.freenode.net]
skylan has quit [hogan.freenode.net irc.freenode.net]
systems has joined #ocaml
lament has joined #ocaml
polin8 has joined #ocaml
skylan has joined #ocaml
<systems> :)
systems has left #ocaml []
asqui has joined #ocaml
karryall has joined #ocaml
mattam_ has joined #ocaml
mrvn has joined #ocaml
mrvn_ has quit [Read error: 60 (Operation timed out)]
mattam has quit [Read error: 110 (Connection timed out)]
lindril has quit [Read error: 104 (Connection reset by peer)]
lindril has joined #ocaml
lindril has quit [hogan.freenode.net irc.freenode.net]
mattam_ has quit [hogan.freenode.net irc.freenode.net]
asqui has quit [hogan.freenode.net irc.freenode.net]
rox has quit [hogan.freenode.net irc.freenode.net]
iusris|away has quit [hogan.freenode.net irc.freenode.net]
whee has quit [hogan.freenode.net irc.freenode.net]
smkl has quit [hogan.freenode.net irc.freenode.net]
lam has quit [hogan.freenode.net irc.freenode.net]
Zadeh has quit [hogan.freenode.net irc.freenode.net]
Segora has quit [hogan.freenode.net irc.freenode.net]
Torquema1a has quit [hogan.freenode.net irc.freenode.net]
nkoza has quit [hogan.freenode.net irc.freenode.net]
emu has quit [hogan.freenode.net irc.freenode.net]
xkb has quit [hogan.freenode.net irc.freenode.net]
merriam has quit [hogan.freenode.net irc.freenode.net]
lindril has joined #ocaml
mattam_ has joined #ocaml
asqui has joined #ocaml
rox has joined #ocaml
iusris|away has joined #ocaml
lam has joined #ocaml
whee has joined #ocaml
smkl has joined #ocaml
Segora has joined #ocaml
nkoza has joined #ocaml
xkb has joined #ocaml
Torquema1a has joined #ocaml
emu has joined #ocaml
Zadeh has joined #ocaml
merriam has joined #ocaml
asqui has quit [Excess Flood]
asqui has joined #ocaml
Yurik has joined #ocaml
<Yurik> re
Yurik has quit ["÷ÙÛÅÌ ÉÚ XChat"]
systems has joined #ocaml
esabb has joined #ocaml
systems has quit [Read error: 110 (Connection timed out)]
lament has quit ["<Liam> cocks || <Liam> gigantic cocks || <Liam> slapping me in the face"]
docelic has joined #ocaml
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
rox has quit [hogan.freenode.net irc.freenode.net]
mattam_ has quit [hogan.freenode.net irc.freenode.net]
lindril has quit [hogan.freenode.net irc.freenode.net]
iusris|away has quit [hogan.freenode.net irc.freenode.net]
whee has quit [hogan.freenode.net irc.freenode.net]
smkl has quit [hogan.freenode.net irc.freenode.net]
lam has quit [hogan.freenode.net irc.freenode.net]
skylan has quit [hogan.freenode.net irc.freenode.net]
esabb has quit [hogan.freenode.net irc.freenode.net]
Zadeh has quit [hogan.freenode.net irc.freenode.net]
Segora has quit [hogan.freenode.net irc.freenode.net]
Torquema1a has quit [hogan.freenode.net irc.freenode.net]
nkoza has quit [hogan.freenode.net irc.freenode.net]
emu has quit [hogan.freenode.net irc.freenode.net]
xkb has quit [hogan.freenode.net irc.freenode.net]
merriam has quit [hogan.freenode.net irc.freenode.net]
skylan has joined #ocaml
esabb has joined #ocaml
lindril has joined #ocaml
mattam_ has joined #ocaml
rox has joined #ocaml
iusris|away has joined #ocaml
lam has joined #ocaml
whee has joined #ocaml
smkl has joined #ocaml
Segora has joined #ocaml
nkoza has joined #ocaml
xkb has joined #ocaml
Torquema1a has joined #ocaml
emu has joined #ocaml
Zadeh has joined #ocaml
merriam has joined #ocaml
iusris|away is now known as iusris
rox has quit [hogan.freenode.net irc.freenode.net]
mattam_ has quit [hogan.freenode.net irc.freenode.net]
lindril has quit [hogan.freenode.net irc.freenode.net]
iusris has quit [hogan.freenode.net irc.freenode.net]
whee has quit [hogan.freenode.net irc.freenode.net]
smkl has quit [hogan.freenode.net irc.freenode.net]
lam has quit [hogan.freenode.net irc.freenode.net]
esabb has quit [hogan.freenode.net irc.freenode.net]
Zadeh has quit [hogan.freenode.net irc.freenode.net]
Segora has quit [hogan.freenode.net irc.freenode.net]
Torquema1a has quit [hogan.freenode.net irc.freenode.net]
nkoza has quit [hogan.freenode.net irc.freenode.net]
emu has quit [hogan.freenode.net irc.freenode.net]
xkb has quit [hogan.freenode.net irc.freenode.net]
skylan has quit [hogan.freenode.net irc.freenode.net]
merriam has quit [hogan.freenode.net irc.freenode.net]
merriam has joined #ocaml
Zadeh has joined #ocaml
emu has joined #ocaml
Torquema1a has joined #ocaml
xkb has joined #ocaml
nkoza has joined #ocaml
Segora has joined #ocaml
smkl has joined #ocaml
whee has joined #ocaml
lam has joined #ocaml
iusris has joined #ocaml
rox has joined #ocaml
mattam_ has joined #ocaml
lindril has joined #ocaml
esabb has joined #ocaml
skylan has joined #ocaml
listener has joined #ocaml
mattam_ has quit [hogan.freenode.net irc.freenode.net]
rox has quit [hogan.freenode.net irc.freenode.net]
lindril has quit [hogan.freenode.net irc.freenode.net]
iusris has quit [hogan.freenode.net irc.freenode.net]
smkl has quit [hogan.freenode.net irc.freenode.net]
whee has quit [hogan.freenode.net irc.freenode.net]
lam has quit [hogan.freenode.net irc.freenode.net]
esabb has quit [hogan.freenode.net irc.freenode.net]
nkoza has quit [hogan.freenode.net irc.freenode.net]
xkb has quit [hogan.freenode.net irc.freenode.net]
emu has quit [hogan.freenode.net irc.freenode.net]
Torquema1a has quit [hogan.freenode.net irc.freenode.net]
Zadeh has quit [hogan.freenode.net irc.freenode.net]
Segora has quit [hogan.freenode.net irc.freenode.net]
skylan has quit [hogan.freenode.net irc.freenode.net]
merriam has quit [hogan.freenode.net irc.freenode.net]
skylan has joined #ocaml
esabb has joined #ocaml
lindril has joined #ocaml
mattam_ has joined #ocaml
rox has joined #ocaml
iusris has joined #ocaml
lam has joined #ocaml
whee has joined #ocaml
smkl has joined #ocaml
Segora has joined #ocaml
nkoza has joined #ocaml
xkb has joined #ocaml
Torquema1a has joined #ocaml
emu has joined #ocaml
Zadeh has joined #ocaml
merriam has joined #ocaml
<listener> How do I make this work?
<listener> let fac n=
<listener> let rec int_fac n h=
<listener> if(n<2) then 1
<listener> else n * ( h (n-1) h) in
<listener> int_fac int_fac n;;
<mrvn> You can't. Thats not typeable.
<mrvn> let fac n=
<mrvn> let rec int_fac n =
<mrvn> if(n<2) then 1
<mrvn> else n * ( int_fac (n-1)) in
<mrvn> int_fac n;;
<mrvn> let rec fac = function 0 -> 1 | n -> n * (fac (n-1));;
<listener> 1) rec should not be there.
<mrvn> It must
<listener> 2) It should read int_fac n int_fac.
<mrvn> You can't type a function that gets itself as argument.
<listener> This is very close to an example in the ORA book.
<listener> Not even with a recursive data type?
<mrvn> int_fac would have type val int_fac : int -> (int -> (int -> (int -> ...)))) -> int
<listener> a recursive data type.
<mrvn> listener: of cause you can use a recursive datatype or use looser typing.
<mrvn> But the let rec is exactly invented for this problem.
<listener> Except "I'm not allowed to use recursion." ( the person not allowing it is me ). I'm studying the Y combinator.
<mrvn> Y combnaors don't work in plain ocaml
<listener> Any work arounds? Looking at the fuctions defined it would "look" better written in ml.
<mrvn> You can specify a flag that loosens the type checking to allow Y combinators.
<smkl> listener: that would work if you used -rectypes (and fixed the order of arguments)
karryall has quit [Remote closed the connection]
<listener> OK. Couldn't I define a data type like ( for this small example ):
<listener> type composed_function 'a = int-> 'a | int->(conposed_function) 'a
<listener> I've tried all sorts of variants. but haven't got ocaml to accept them.
<smkl> you can define a datatype ... not exactly like that one though
<listener> BTW is this true of ml in general?
<mrvn> type rectype = Fun of type rectype = Fun of (int -> rectype -> int);;int -> rectype -> int;;
<mrvn> ups
<mrvn> type rectype = Fun of (int -> rectype -> int);;
<mrvn> let fac n = let int_fac n (Fun f) = if (n < 2) then 1 else n * (f (n-1) (Fun f)) in int_fac n (Fun int_fac);;
<mrvn> That would do.
<listener> I was looking at an article "That About Wraps it up" by Bruce McAdam. Which requres you to use Y combinators in ML.
<smkl> you could just define the Y combinator using recursion ...
<mrvn> smkl: not a general one
<listener> Where's the fish?
<mrvn> fish?
<listener> TO slap smkl with.
<mrvn> You can allway enclose the recursion into a type as above to prevent the recursive arguments.
<listener> I believe he was makeing a bad joke using recusrsion to define Y combinators.
<smkl> no, i was just pointing out that if you actually wanted to use y combinators for something, the easiest way would be to define them using recursion
<listener> Oh. I though you were being smart.
graydon has joined #ocaml
<listener> It does not make sense to define Y-combinators using recursion, because you want to avoid recursion by using Y combinators.
<smkl> listener: well, in that article, he first defines the y combinator using recursion and then starts using it
<listener> Hmmm. Could be. I was just beinging the article, had never heard of the Y combinator so decided to really learn it first.
vect has joined #ocaml
vect is now known as gehel
docelic is now known as docelic|sleepo
<listener> Thanks. You've been very helpfull. Got to go now.
<listener> Bye.
<smkl> bye
listener has quit [Read error: 113 (No route to host)]
mattam_ is now known as mattam
NiCad has joined #ocaml
<NiCad> let a_file = open_in("a/text/file");; This gives a_file type in_channel. How do I apply string and character operations to it?
foxen5 has quit [Read error: 104 (Connection reset by peer)]
graydon has quit []
<mattam> NiCad: it's in the Pervasives module. search read_int and read_string
matkor has joined #ocaml
<NiCad> mattam: Got it.
intero has joined #ocaml
<intero> hi ppl
<mattam> hi
<intero> hi mattam
<NiCad> mattam: Is it just me, or does everybody usually find the Index to be more useful than the table of contents? ;->
<mattam> well, the standard library doc is the only thing i look at these days
<NiCad> brb
NiCad has left #ocaml []
foxen5 has joined #ocaml
matkor has quit [Remote closed the connection]
<mrvn> Why don#t the modules have a node saying what needs to be linked for them to work in the docs? Like the Graphics module needing graphics.cma or Genlex needing ocamlp4?
<mrvn> s/node/note/
two-face has joined #ocaml
two-face has left #ocaml []
foxen5 has quit [Read error: 104 (Connection reset by peer)]
foxen5 has joined #ocaml
<intero> nite ppl
intero has left #ocaml []
esabb has left #ocaml []
iusris has quit [Read error: 54 (Connection reset by peer)]
iusris has joined #ocaml
graydon has joined #ocaml
kev has joined #ocaml
<kev> anyone here know what the datatype for a socket is that I can use in my signature?
<mrvn> module Unix?
<kev> Socket
<whee> there's no Socket module
<whee> with Unix you end up with a file_descr which you can convert into channels
<kev> there is a socket module, I'm using it ;)
<kev> oh, wait
<kev> this is mosml
<mrvn> val socket : socket_domain -> socket_type -> int -> file_descr
<whee> you'd be better off checking mosml's docs then
<kev> I've looked, all I can seem to find is a datatype of (a',b') sock
<whee> that's probably what you use then
<mrvn> true
<mrvn> ups
<whee> with 'a and 'b being replaced with the actual type the function uses
<whee> if you want to make it specific
<kev> I tried that, but it complained about 'unbound specifiers at the top level'
<kev> ! Unguarded type variables at the top-level
<kev> even
<mrvn> you might have to specify the type.
<mrvn> let foo (a:[int, int]sock) = or something
<kev> hmmm... I'll play around with it some more
<kev> I'm sure some library out there has to have a socket in the signature
<mrvn> A socket is the same as an file descriptor under unix.
<kev> yeah, I know
<kev> just seems that it's not under mosml
<kev> which seems a bit weird, following posix if possible would have made more sense
<mrvn> except that posix doesn't use exceptions, which realy sucks if you can.
matkor has joined #ocaml