flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
Philonous has joined #ocaml
Philonous has left #ocaml []
Philonous has joined #ocaml
mtrimpe has left #ocaml []
redocdam has quit []
Morphous has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<ozzloy> wc
<ozzloy> er...
ozzloy has left #ocaml []
Amorphous has quit [Read error: 110 (Connection timed out)]
dafra has quit [Read error: 110 (Connection timed out)]
zhoupp has joined #ocaml
Philonous has quit [Remote closed the connection]
<landonf> PG'OCaml looks very nice, I just wish it used the native libraries. I need kerberos and TLS support.
<Chile`> write a wrapper?
Associat0r has quit []
pec1 has joined #ocaml
pec1 has quit ["Leaving."]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
zhoupp has quit []
vixey has quit []
nuncanada has quit ["Leaving"]
pec1 has joined #ocaml
coucou747 has joined #ocaml
pec1 has left #ocaml []
Snark has joined #ocaml
ygrek has joined #ocaml
szell has quit [Client Quit]
GustNG has joined #ocaml
landonf has quit []
asmanur has joined #ocaml
<coucou747> * ygrek (i=user@gateway/tor/x-5d6c276a2afb8bea)
<coucou747> ygrek> jkiff ta vhost
<coucou747> ca fait tres : mec mal dans sa peau qui a du mal a assumer sa vraie ip
<ygrek> I don't understand french
<coucou747> ygrek> your host is nice
<coucou747> thx
szell has joined #ocaml
Proteus_ has joined #ocaml
strangy has joined #ocaml
strangy has left #ocaml []
Proteus has quit [clarke.freenode.net irc.freenode.net]
haelix has quit [clarke.freenode.net irc.freenode.net]
jynxzero has quit [clarke.freenode.net irc.freenode.net]
Mr_Awesome has quit [clarke.freenode.net irc.freenode.net]
authentic has quit [clarke.freenode.net irc.freenode.net]
r0bby has quit [clarke.freenode.net irc.freenode.net]
haelix has joined #ocaml
Mr_Awesome has joined #ocaml
jynxzero has joined #ocaml
authentic has joined #ocaml
r0bby has joined #ocaml
coucou747 has quit ["bye ca veut dire tchao en anglais"]
mtrimpe has joined #ocaml
mtrimpe has quit []
dafra has joined #ocaml
guillem has joined #ocaml
Yoric[DT] has joined #ocaml
tomh has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
Linktim has joined #ocaml
Linktim_ has joined #ocaml
Associat0r has joined #ocaml
love-pingoo has joined #ocaml
Linktim has quit [Read error: 113 (No route to host)]
seafood has joined #ocaml
thelema has quit [Read error: 104 (Connection reset by peer)]
seafood has quit []
vbmithr has left #ocaml []
asmanur has quit [Read error: 60 (Operation timed out)]
asmanur has joined #ocaml
asmanur has quit [Remote closed the connection]
asmanur has joined #ocaml
vixey has joined #ocaml
redocdam has joined #ocaml
asmanur has quit ["make && ./tremulog --pattern "nomdunjoueur" --file path_to_games.log --filter "tk""]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<flux> ah, once again ocaml compiler found a non-terminating function while developing (with a type signature 'a) \o/
pango_ has quit [Remote closed the connection]
ygrek has quit [Remote closed the connection]
pango_ has joined #ocaml
ygrek has joined #ocaml
Morphous has quit ["shutdown"]
munga_ has joined #ocaml
coucou747 has joined #ocaml
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
jeddhaberstro has joined #ocaml
<jeddhaberstro> Hi, I'm just starting Ocaml, and I've run into a snag. What is wrong with line 3 of this? http://pasteall.org/1746/ocaml
<jeddhaberstro> This expression has type 'a list but is here used with type int
<vixey> this line | [] -> 0
<vixey> is a number
<vixey> 1 + x :: incrementList xs;; is a list
<jeddhaberstro> oh, I see
<vixey> they should be the same thing
<vixey> so make | [] -> []
<jeddhaberstro> | [] -> []
<jeddhaberstro> gotcha :)
<jeddhaberstro> Thanks
<jeddhaberstro> Does the ocaml interpreter and compiler care about line endings? Is that why it told me the error was on line 3?
landonf has joined #ocaml
<mfp> jeddhaberstro: neither the toplevel nor the compilers care about line endings (or extra whitespaces in general); the type error _was_ on line 3
<jeddhaberstro> k
<mfp> jeddhaberstro: btw. just only use ;; in the toplevel typically
<mfp> s/just/you/
<jeddhaberstro> ok. I haven't really gotten to the point to knowing what ;; does.
asmanur has joined #ocaml
<mfp> it's mainly used in the toplevel to indicate the end of a "phrase"
<mfp> i.e. ;; signals the end of the expression to be evaluated, allowing you to enter several lines at once (unlike, say, ghci, IIRC)
<mfp> you can also use ;; in .ml files to delimit a phrase, as in let foo () = print_endline "foo";; foo ()
<jeddhaberstro> ok
<mfp> but normally, you'd do let foo () = print_endline "foo" let () = foo ()
<jeddhaberstro> not that that makes much sense right now :)
<mfp> -> the compiler knows the prev phrase is finished when it sees the second let () = ...
<jeddhaberstro> ah
<asmanur> mfp: in the toplevel you can't evaluate several instruction by seperating them by a ";;" (just the first gets evaluated)
<jeddhaberstro> ok
<jeddhaberstro> making more sense :)
<mfp> asmanur: did I say so? :)
<asmanur> not exactly :)
<mfp> for the sake of clarity, "several lines at once" referred to a phrase with several lines, not several phrases
<asmanur> oh, yes I read "several phrases at once"
<mfp> jeddhaberstro: there's another advantage of doing let () = <expr>; the compiler will verify that <expr> evaluates to (), so it will help you catch partial applications
<jeddhaberstro> what does () mean?
<mfp> jeddhaberstro: let foo a b = a + b;; foo 1 -> silent error let foo a b = a + b let () = foo 1 -> error
<mfp> jeddhaberstro: () is the only value of type "unit"
<mfp> think of it as "void"
<jeddhaberstro> yeah, ok :)
<vixey> why are you learning ocaml?
<jeddhaberstro> To learn a functional language
<jeddhaberstro> for fun mainly
<vixey> ok great
<jeddhaberstro> why?
_THEGOD has joined #ocaml
<_THEGOD> lols camels .
<_THEGOD> what the hell is camel ?
<vixey> lol
<vixey> _THEGOD: As is no doubt already displayed on your screen, ocaml is a programming language
<_THEGOD> does it hawe a compiler ?
<_THEGOD> or where it works?
<vixey> _THEGOD: You should read the channel topic when you enter a channel on IRC
<vixey> both your questions are answered by it
<_THEGOD> ok .
<_THEGOD> thanks anyway.
<_THEGOD> one last question .
<_THEGOD> on which platform it created ?
<_THEGOD> i mean source of camel .
<_THEGOD> asm / c/ c++ /perl ?
<vixey> ocaml
<_THEGOD> you mean ocaml created using ocaml ?
<mfp> _THEGOD: the compiler and the stdlib are written in OCaml; parts of the runtime are written in C and assembly
_THEGOD has left #ocaml []
jeddhaberstro has quit []
landonf has quit []
jeddhaberstro has joined #ocaml
msandin has joined #ocaml
asmanur has quit [Remote closed the connection]
^authentic has joined #ocaml
tomh has joined #ocaml
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
ecc_ has joined #ocaml
ecc has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit ["Quitte"]
filp has joined #ocaml
ygrek has quit [Remote closed the connection]
filp has quit ["Bye"]
szell` has joined #ocaml
r0bby has quit [Read error: 104 (Connection reset by peer)]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
szell has quit [Connection timed out]
<jeddhaberstro> why the heck does this not work?
<jeddhaberstro> let rec pow x n =
<jeddhaberstro> if n = 0 then 1 else (x * (pow x n-1));;
<jeddhaberstro> the recursion never stops, but I have a base condition there..
<flux> precedency
<flux> applications binds more tightly than operators
<jeddhaberstro> so, reverse the x * pow?
<flux> x * (pow x (n - 1))
<jeddhaberstro> ah, thanks :)
<vixey> oh that means you can drop another pair
<vixey> x * pow x (n - 1)
r0bby has joined #ocaml
<flux> and even further, the parenthesis after else
<flux> unless that's what you meant :)
<jeddhaberstro> Eh, i wasn't sure how Ocaml would handle, so I thought it would be safer to use them :P
GustNG has quit [Read error: 104 (Connection reset by peer)]
<flux> yoric[dt], how would one type a function similar to List.map with the catch-library?
<Yoric[DT]> flux: not tonight, too tired :)
<Yoric[DT]> But tomorrow, I'll discuss that with pleasure.
<flux> I just remembered that I hadn't read the ml2008.pdf, so maybe I'll just do that now :)
<flux> good night
<Yoric[DT]> :)
<flux> after a brief look, though, it doesn't appear to touch that particular issue
<flux> (maybe I actually need to _read_ it :-))
crawfordcomeaux has quit []
landonf has joined #ocaml
<landonf> If I have method M, which accepts a single function argument F, and returns the value of that function, is there any way to allow M to be polymorphic rather than monomorphic? (eg, accept different return types for parameter F)
<flux> object method foo : 'a.'a -> 'a = fun a -> a end
<flux> however those types are never automatically inferred, which can be a pain
<flux> well, it's not a direct answer to your questoin, but as I understand it, it can be easily modified to match it
<Smerdyakov> landonf, also, both method names and arguments must begin with lowercase letters, so "M" and "F" were bad examples.
<landonf> flux: Thanks, I'll play with it.
<landonf> Smerdyakov: Just trying to be concise =)
thelema has joined #ocaml
Snark has quit ["Ex-Chat"]
<landonf> method private tx : 'a . (Postgresql.connection -> 'a) -> 'a = fun f -> ...
<landonf> Cool, works. Thanks!
Yoric[DT] has quit ["Ex-Chat"]
msandin has quit ["Leaving."]
coucou747 has quit [Read error: 104 (Connection reset by peer)]
Axioplase_ has quit [Read error: 104 (Connection reset by peer)]
guillem has quit [Client Quit]
Amorphous has joined #ocaml
guillem has joined #ocaml
tomh has joined #ocaml
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
Morphous has joined #ocaml
Morphous has quit [Read error: 104 (Connection reset by peer)]
Morphous has joined #ocaml
Amorphous has quit [Nick collision from services.]
Morphous is now known as Amorphous
love-pingoo has quit ["Connection reset by pear"]
munga_ has quit [Read error: 113 (No route to host)]
guillem has quit [Remote closed the connection]
dafra has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
seafood has quit []
Proteus_ has quit [Read error: 104 (Connection reset by peer)]
Proteus_ has joined #ocaml
<landonf> Anyone tried http://ocamljava.x9c.fr/ ?
netx has quit [Connection timed out]
Mr_Awesome has joined #ocaml
redocdam has quit []