<orbitz>
Alpounet: so i could do type x = `One | `Two;; type y = `One | `Two | `Three?
<Alpounet>
Nearly. Rather :
<Alpounet>
type x = [`One | `Two];;
<Alpounet>
type y = [`One | `Two | `Three];;
<Alpounet>
and then playing with > and < as indicated in the manual
<Alpounet>
it's a bit hard to get at the beginning
<Alpounet>
but think of it as an ability to add alternatives to an ADT
<Alpounet>
sort of it, for the beginning, should be of help.
<Alpounet>
You'll get a better idea when playing with them.
<orbitz>
ok thanks
<Alpounet>
#let f = function `On -> 1 | `Off -> 0 | `Number n -> n;;
<Alpounet>
val f : [< `Number of int | `Off | `On ] -> int = <fun>
<Alpounet>
e.g, here, the type of f's argument isn't determined nominally ( ;-) )
<orbitz>
so that says f can take a type that can define only less tags than those 3
<Alpounet>
Yeah.
<Alpounet>
> means that we have at least these "tags", < the converse.
<orbitz>
so adding | _ -> -1
<Alpounet>
will put an ">" here ;-)
<Alpounet>
'cause the function may receive other things than `On and `Off and `Number of int
<Alpounet>
the resulting type for the argument would be [> `Number of int | `On | `Off ], i.e either `Number <an integer>, `On, `Off or <something else>
rcloud has joined #ocaml
<Alpounet>
I'm off. Let's chat about that tomorrow (3 AM in France right now) if you want.
<orbitz>
Alpounet: i'll be in and out, we'llc atch up!
<orbitz>
thanks for that apper, it's making sense
<Alpounet>
Great ! See ya.
rcloud has quit [Remote closed the connection]
travisbrady has quit ["Computer has gone to sleep"]
slash_ has quit [Client Quit]
espresso has joined #ocaml
M| has quit [Remote closed the connection]
espresso has quit ["Leaving"]
espresso has joined #ocaml
ztfw has quit [Read error: 110 (Connection timed out)]
mjs22 has joined #ocaml
mjs22 has quit []
thrasibule has quit [Read error: 110 (Connection timed out)]
Summermute has joined #ocaml
<Summermute>
Howdy
<Summermute>
If anyone's here, i have just a few late night questions
<orbitz>
hey
<orbitz>
i'm about to jump in the shower so bb in 5. will help if i can
<orbitz>
back
Snark has joined #ocaml
Summermute has quit []
julm has quit ["-> biblio"]
th5 has joined #ocaml
th5 has quit []
<Alpounet>
Hi back.
ulfdoz has joined #ocaml
<flux>
camarade_tux, I do it this way: make foo.cmo - and then copy'n paste the produced compilation line and stick -i into it :) might need to enable verbosity in the makefile, not sure
espresso has quit [Read error: 110 (Connection timed out)]
julm_ has joined #ocaml
julm_ is now known as julm
espresso has joined #ocaml
espressox has joined #ocaml
julm_ has joined #ocaml
julm_ has quit [Client Quit]
julm_ has joined #ocaml
julm_ has quit [Client Quit]
julm has quit [Read error: 110 (Connection timed out)]
_zack has joined #ocaml
espressox has quit [Read error: 110 (Connection timed out)]
espressox has joined #ocaml
espresso has quit [Read error: 110 (Connection timed out)]
f[x] has joined #ocaml
espressox has quit [Read error: 104 (Connection reset by peer)]
tmaeda has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
albacker has joined #ocaml
<Camarade_Tux>
flux: yeah but it's meant to be unattended ;p
tmaeda has joined #ocaml
tmaeda has quit [Read error: 54 (Connection reset by peer)]
tmaedaZ has joined #ocaml
julm has joined #ocaml
julm has quit [Client Quit]
julm has joined #ocaml
Ched has joined #ocaml
albacker has quit [Read error: 113 (No route to host)]
Ched has quit [Client Quit]
Yoric[DT] has joined #ocaml
<Camarade_Tux>
how does psilab compares to scilab? are scilab programs actually ocaml code?
julm_ has joined #ocaml
<Camarade_Tux>
and I guess that if scilab was really started in 1990, writing it in *o*caml would have been pretty hard ;p
<Alpounet>
indeed :-)
julm has quit [Read error: 113 (No route to host)]
<Camarade_Tux>
hcarty: I saw in irc log that you had probably used psilab, any comment about it?
julm has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
hyperboreean has joined #ocaml
_zack has quit ["Leaving."]
julm_ has quit [Read error: 110 (Connection timed out)]
julm_ has joined #ocaml
julm has quit [Nick collision from services.]
julm_ is now known as julm
komar__ has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
hkBst has quit [Remote closed the connection]
<Camarade_Tux>
\o/ I won the lottery again \o/
<Alpounet>
?
<Alpounet>
how much ? :-p
<Camarade_Tux>
1,350,000, probably pounds, from the irish lotto and the mail was sent by somebody with an @bellsouth.net email address (which means US afaik :) )
<Alpounet>
lucky you
<Camarade_Tux>
yeah, I'm currently winning the lottery about twice a week currently xD
julm_ has joined #ocaml
julm has quit [Nick collision from services.]
julm_ is now known as julm
thrasibule has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
komar_ has joined #ocaml
smimou has joined #ocaml
ztfw has joined #ocaml
thrasibule has quit [Read error: 145 (Connection timed out)]
<Camarade_Tux>
hmmm, godi updated a few days ago
ulfdoz has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
:me trying to find the changelog
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
albacker has joined #ocaml
Associat0r has quit []
jeddhaberstro has joined #ocaml
<albacker>
there's this script that works with ocaml interpreter and doesn't work if i compile with ocamlc.
<albacker>
any idea>
<albacker>
ok i see..
<albacker>
stupid me
<Camarade_Tux>
:)
jeddhaberstro has quit [Client Quit]
derdon has joined #ocaml
<derdon>
let a = 5 and b = 10
<derdon>
let a = b and b = a;;
<derdon>
this is really nice :)
Summermute has joined #ocaml
ofaurax has joined #ocaml
ttamttam has joined #ocaml
thrasibule has joined #ocaml
slash_ has joined #ocaml
thrasibule has quit [Read error: 145 (Connection timed out)]
ttamttam has quit ["Leaving."]
Ched has joined #ocaml
Ched has quit [Client Quit]
rcloud has joined #ocaml
rcloud has quit [Remote closed the connection]
rcloud has joined #ocaml
komar_ has quit [Read error: 60 (Operation timed out)]
komar_ has joined #ocaml
rcloud has quit [Remote closed the connection]
julm has quit [Remote closed the connection]
julm has joined #ocaml
Snark has quit ["Ex-Chat"]
Jedai has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090115, built on: 2009/03/07 00:45:02 UTC http://www.kvirc.net/"]
_JusSx_ has joined #ocaml
Yoric[DT] has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
<whale>
is there a nicer way to write this? : (fun {attribute=x} -> x)
<Yoric[DT]>
possibly [(fun x -> x.attribute)]
<whale>
yeah, I wasn't sure which of those is cleaner, or if there was an even better way
<whale>
without using a lambda
<Yoric[DT]>
There may be a way to have that function generated automatically.
<Yoric[DT]>
bluestorm (who's often on this channel) has developed an extension for this kind of things
<whale>
thanks :)
tvn2009 has joined #ocaml
<tvn2009>
is there any predefine function such as standard deviation etc in ocaml ?
<Yoric[DT]>
Well, there are plenty of predefined functions but no, no statistics.
<Yoric[DT]>
There may be packages to provide these functions.
<Yoric[DT]>
I'm not aware of any, but since statistics are not my field of interest, that doesn't mean much.
<tvn2009>
ic
<tvn2009>
I can write my own but just want to check first -
* Camarade_Tux
know of none either
<Camarade_Tux>
or
<Camarade_Tux>
"OCaml-R provides bindings to the R math library and the R library usable to embed R in your application." ?
<Yoric[DT]>
Sounds like a solution.
<Camarade_Tux>
I was wondering how it could appear on the hump without appearing on the mailing-list, found out: "Author:Maxence Guesdon." ;p
<Camarade_Tux>
the library/binding is 0.1 alpha but looks nice :)
<Yoric[DT]>
:)
<Camarade_Tux>
plus I've been thinking about learning R for some time now, guess I won't have to :D
komar__ has joined #ocaml
komar_ has quit [Read error: 104 (Connection reset by peer)]
* Yoric[DT]
will return.
Yoric[DT] has quit ["Ex-Chat"]
<Camarade_Tux>
for my comment about Maxence Guesdon, the thing is he's managing the caml hump (I didn't mean anything else, just in case)
Yoric[DT] has joined #ocaml
<whale>
is there a way to make compose infix?
<flux>
what?
<whale>
so I can do: f `compose` g `compose` h
<flux>
let (@.) f a b = a b
<flux>
8'm not sure about precedence, though :)
<flux>
(somebody's sure to fix if it isn't, I hope)
ulfdoz has joined #ocaml
<flux>
<flux>
whops
komar__ has quit [Read error: 60 (Operation timed out)]
etoxam has joined #ocaml
etoxam has quit [Remote closed the connection]
ofaurax has quit ["Leaving"]
etoxam has joined #ocaml
etoxam has quit [Remote closed the connection]
f[x] has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
M| has joined #ocaml
Smerdyakov has quit ["Leaving"]
<derdon>
what is ``Nil``? in the openbook I read to learn OCaml, it is used in pattern matching