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/
kinners_ has joined #ocaml
kinners_ has quit ["leaving"]
threeve has joined #ocaml
mlh has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
kinners has quit [Read error: 110 (Connection timed out)]
Revision17 has quit [Remote closed the connection]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
pnou_ has quit ["zou"]
Revision17 has joined #ocaml
ptolomy has joined #ocaml
sethk has joined #ocaml
Demitar has quit [Connection timed out]
Demitar has joined #ocaml
ellism has joined #ocaml
<ellism> I have what I think is a very basic question. If a function has type (int -> int) -> int is that the same as just int -> int -> int? I don't understand what the parens mean here.
<Nutssh> ellism, they're different. a -> a -> a is a -> (a -> a)
<Nutssh> So its a -> (a -> a) VS (a -> a) -> a
<sethk> ok, but what is the semantic significance of that?
<ellism> Nutssh: How do I read (int -> int) -> int?
<Nutssh> It takes a function from ints to ints and returns an integer... Eg... let f fn = fn 0
<sethk> the other one takes an integer and returns a function int -> int?
<Nutssh> Versus a -> (a -> a) which is that, and one such function might be let f ii = (fun x -> ii*x)
<ellism> Nutssh: So let f fn = fn 0 is of type (int -> 'a) -> 'a. How would I force (int -> int) -> int ?
<Nutssh> Force the type with an explicit declaration. let f fn : int = fn 0 OR let f (fn:(int -> int)) = fn 0
<ellism> Ahh, allright. I could also say something like let f fn: = 0 + fn 0;; correct?
<Nutssh> That works too.
<ellism> so (int -> bool) -> (bool -> int) means the function takes one argument, which is a function from ints to bools and returns a function from bools to ints?
<Nutssh> Yes.
pango_ has joined #ocaml
<ellism> I'm confunsed on how I would return a function of the type (bool -> int). I'd have to build one, but when I try I the type usually looks like (bool -> int) -> int or something. I'm just trying to make some arbitrary function that has the type (int -> bool) -> (bool -> int) ...
ax has quit [Remote closed the connection]
<ellism> or is that the same as (int -> bool) -> bool -> int?
<sethk> fun f a b = f
pango has quit [Read error: 110 (Connection timed out)]
<ellism> What does the underscore in a type statement mean if there is a type like '_a?
<sethk> anything
<sethk> like .
<ellism> How does that differ from 'a ?
<sethk> 'a is a type variable
<sethk> means type a _ 'a is what you would see
<ellism> I don't quite understand that last line?
<mfurr> ellism: _'a is monomorphic(but not completely inferred), whereas 'a is polymorphic
<Smerdyakov> Those type variables with underscores don't really exist in the OCaml language.
<Smerdyakov> They are just used in internal algorithms, and may be printed to help you understand why those algorithms fail.
<ellism> So I have this function uncurry let uncurry f (x ,y) == f x y;; which is of type ('a -> 'b -> 'c) -> 'a * 'b -> 'c and then I have let compose f g = fun x -> f(g(x) which is of type ('a -> 'b) -> )'
<ellism> er... type ('a -> 'b) -> (' c -> a ) -> 'c -> 'b
<ellism> But if I do uncurry compose all the types are of the form '_a, '_b, etc. I don't really understand what this means.
<mfurr> search for "not polymorphic enough" on http://caml.inria.fr/resources/doc/faq/core.en.html
<mfurr> for an explanation and fix
threeve has quit []
bacam has quit [zelazny.freenode.net irc.freenode.net]
slashvar[lri] has quit [zelazny.freenode.net irc.freenode.net]
__DL__ has joined #ocaml
bacam has joined #ocaml
slashvar[lri] has joined #ocaml
smimou has joined #ocaml
ski has joined #ocaml
<twobitsprite> ack... I found stuff on reading files in the manual before, but now I can't find it again...
<twobitsprite> ahh, its in Pervasives which is hidden under "core library"
Submarine has joined #ocaml
Snark has joined #ocaml
ellisonch has quit ["Leaving"]
tom_p has quit [Read error: 113 (No route to host)]
aegray has quit [Read error: 110 (Connection timed out)]
ski_ has joined #ocaml
tom_p has joined #ocaml
ski__ has joined #ocaml
ski has quit [Nick collision from services.]
ski__ is now known as ski
ski_ has quit [Nick collision from services.]
<jynxzero> Madness init "Our website is so great, come and look at it"
<jynxzero> Oops, wrong win
<ulfdoz> jynxzero: That isn't "our", that's mine. :)
pango_ has quit [Remote closed the connection]
Tachyon76 has joined #ocaml
<jynxzero> ulfdoz: nah, talking about a site we made here at work. Apparently we are gonna adverise it
<jynxzero> It's a bit rubbish though, should have written in in ocaml.
<ulfdoz> In another channel someone just thought about whitespace-serverpages. :)
<haakonn> christ :)
pango has joined #ocaml
Tachyon76 has quit ["Leaving"]
haelix has joined #ocaml
mlh has quit [Client Quit]
revision17_ has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
ski_ has joined #ocaml
ski has quit [Nick collision from services.]
ski_ is now known as ski
ski_ has joined #ocaml
ski has quit [Nick collision from services.]
ski_ is now known as ski
Submarine_ has joined #ocaml
m3ga has joined #ocaml
Skal has joined #ocaml
sethk has quit ["Leaving"]
Herrchen has joined #ocaml
Submarine_ has quit [Remote closed the connection]
Submarine_ has joined #ocaml
Schmurtz has joined #ocaml
ski has quit ["Jams O'Donnel, is that you ?"]
Submarine_ has quit ["in Soviet Russia, Céline Dion owns you"]
m3ga has quit ["disappearing into the sunset"]
Schmurtz has quit ["Dodo !"]
Schmurtz has joined #ocaml
Herrchen has quit ["leaving"]
mikeX has joined #ocaml
<mikeX> what unicode library do you recommend?
threeve has joined #ocaml
<pango> camomile ?
<mikeX> hmm, can't seem to find a debian package for it :/
<pango> it seems that they're legal probs, unless they have been fixed since then
<mikeX> from what I read in the mailing list the problem appeared resolved...
<pango> 'k
mikeX has quit ["Leaving"]
Schmurtz has quit ["Plouf !"]
Nutssh has quit ["Client exiting"]
pango has quit ["Leaving"]
pango has joined #ocaml
mrsolo has joined #ocaml
lus|wats has joined #ocaml
vezenchio has quit [Read error: 110 (Connection timed out)]
Snark has left #ocaml []
__DL__ has quit [Remote closed the connection]
UziMonkey has joined #ocaml
lus|wats has quit [""The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and t]
zigong has joined #ocaml
zigong has left #ocaml []
Skal has quit ["Client exiting"]
threeve has quit []
gim has quit ["apff"]
smimou has quit ["?"]
Schmurtz has joined #ocaml
Submarine has quit ["Leaving"]
threeve has joined #ocaml
UziMonkey has quit [Read error: 104 (Connection reset by peer)]