gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml Meeting 2011 http://bit.ly/eaZi1C | OCaml 3.12.0 http://bit.ly/aNZBUp
boscop_ is now known as boscop
arubin has joined #ocaml
ymasory has joined #ocaml
SoftTimur1 has joined #ocaml
<SoftTimur1> Hello all, the type of Hashtbl is "('a, 'b) t" and the type of Map is "'a t", could somebody tell me what 't' here is short for?
ymasory has quit [Quit: Leaving]
ymasory has joined #ocaml
philtor has joined #ocaml
andreas has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
SoftTimur1 has quit [Quit: Leaving.]
boscop has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
lopex has quit []
boscop has quit [Ping timeout: 246 seconds]
andreas has joined #ocaml
smerz has quit [Quit: Ex-Chat]
boscop has joined #ocaml
joewilliams is now known as joewilliams_away
eelte has joined #ocaml
kusco has quit [Remote host closed the connection]
coucou747 has quit [Ping timeout: 246 seconds]
dnolen has quit [Quit: dnolen]
dnolen has joined #ocaml
arubin has quit [Quit: arubin]
Associ8or has quit [Quit: Associ8or]
vivanov has quit [Ping timeout: 246 seconds]
enthymeme has joined #ocaml
vivanov has joined #ocaml
bzzbzz has quit [Read error: Connection reset by peer]
ulfdoz has joined #ocaml
bzzbzz has joined #ocaml
ymasory_ has joined #ocaml
ymasory_ has quit [Client Quit]
Snark has joined #ocaml
rrenaud has quit [Ping timeout: 248 seconds]
dnolen has quit [Ping timeout: 264 seconds]
rrenaud has joined #ocaml
dnolen has joined #ocaml
lamawithonel_ has quit [Ping timeout: 246 seconds]
lamawithonel_ has joined #ocaml
dnolen has quit [Ping timeout: 240 seconds]
dnolen has joined #ocaml
Tobu has quit [Ping timeout: 264 seconds]
Tobu has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
dnolen has quit [Quit: dnolen]
tnguyen has joined #ocaml
Yoric has joined #ocaml
larhat has joined #ocaml
eye-scuzzy has quit [Quit: leaving]
enthymeme has quit [Ping timeout: 276 seconds]
boscop has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
ikaros has joined #ocaml
ttamttam has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
philtor has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Yoric]
tnguyen has quit [Remote host closed the connection]
boscop has quit [Ping timeout: 246 seconds]
<rproust> SoftTimur: t is a generic name for types. Almost each module has one
<rproust> module String has one that is equal to the type string
boscop has joined #ocaml
<rproust> ('a, 'b) Hashtbl.t is the type of hashtables
thomasga has joined #ocaml
Cyanure has joined #ocaml
ftrvxmtrx has joined #ocaml
Yoric has joined #ocaml
edwin has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
andreas has quit [Quit: Leaving.]
ikaros has quit [Quit: Leave the magic to Houdini]
jamii has joined #ocaml
lamawithonel_ has quit [Ping timeout: 246 seconds]
lamawithonel_ has joined #ocaml
noj has quit [Quit: Lost terminal]
lopex has joined #ocaml
noj has joined #ocaml
SoftTimur has quit [Quit: Leaving.]
boscop has quit [Ping timeout: 240 seconds]
Yoric has quit [Read error: No route to host]
Yoric has joined #ocaml
ikaros has joined #ocaml
boscop has joined #ocaml
yezariaely has joined #ocaml
dnolen has joined #ocaml
Znudzon has joined #ocaml
pdhborges has joined #ocaml
sepp2k has joined #ocaml
nejimban has quit [Changing host]
nejimban has joined #ocaml
jderque has joined #ocaml
pdhborges has quit [Quit: WeeChat 0.3.4]
lamawithonel__ has joined #ocaml
lamawithonel_ has quit [Ping timeout: 258 seconds]
barismetin has joined #ocaml
lamawithonel__ has quit [Read error: Operation timed out]
ikaros has quit [Quit: Leave the magic to Houdini]
lamawithonel__ has joined #ocaml
dnolen has quit [Quit: dnolen]
ikaros has joined #ocaml
lopex has quit []
machinebrain has joined #ocaml
avsm has joined #ocaml
machinebrain has left #ocaml []
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
ttamttam has left #ocaml []
ecc has joined #ocaml
joewilliams_away is now known as joewilliams
Cyanure has quit [Remote host closed the connection]
larhat has quit [Quit: Leaving.]
lopex has joined #ocaml
ymasory_ has joined #ocaml
ymasory has quit [Remote host closed the connection]
<vivanov> why does #type t = Pair of int * int let f = function Some x -> Pair x give "constructor Pair expects 2 argument(s)..." error?
ymasory_ is now known as ymasory
<vivanov> while #let f = function Some x -> x ;; f (Some (3,4)) doesnt
philtor has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml
boscop has joined #ocaml
<flux> vivanov, there's a sublety there, that type t = Pair of int * int has different memory layout than Pair of (int * int)
<flux> vivanov, perhaps you want to use the latter
jderque has left #ocaml []
<vivanov> flux: thanks :) ill check it out
<vivanov> flux: it worked thanks
boscop_ has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
eikke has quit [Ping timeout: 276 seconds]
yezariaely has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: Leaving]
lamawithonel__ has quit [Ping timeout: 246 seconds]
<vivanov> in pattern matching, how to use "when" for two different patterns leading to one result, for example #function x when x > 0 | y when y < 0 -> true ;; gives syntax error
lamawithonel__ has joined #ocaml
Associat0r has joined #ocaml
<thelema> yup, only one 'when' clause allowed per |
<thelema> err, per ->
<thelema> | x when x > 0 -> true | y when y < 0 -> true
<thelema> in general this is a limitation, but you can work around it in all the natural ways
<thelema> err, not a limitation - the pattern x and y must bind the same set of variables, so their predicates can be joined by '||'
<thelema> | x when x > 0 || x < 0 -> true
<vivanov> thelema: ok i see thanks
boscop__ has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
jderque has joined #ocaml
boscop__ has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
boscop_ has quit [Excess Flood]
boscop has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
boscop has joined #ocaml
boscop_ has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
f[x] has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
Yoric has quit [Quit: Yoric]
f[x] has joined #ocaml
thomasga has quit [Quit: Leaving.]
boscop has quit [Ping timeout: 246 seconds]
goodside has joined #ocaml
ftrvxmtrx has joined #ocaml
eikke has joined #ocaml
Znudzon has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 246 seconds]
Snark has quit [Quit: Ex-Chat]
boscop has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
fschwidom has joined #ocaml
fschwidom has quit [Remote host closed the connection]
ulfdoz has quit [Read error: Operation timed out]
lamawithonel__ has quit [Ping timeout: 240 seconds]
lamawithonel has joined #ocaml
DOUK has joined #ocaml
<DOUK> hello
<thelema> hi
<DOUK> can you help me with a problem please
<DOUK> i have to split a list in two
<DOUK> even numbers go in first list and odd goes in second
<DOUK> and each list should be of same size
<DOUK> but my function returns me this Error: This expression has type int list
<DOUK> but an expression was expected of type int list * 'a list
<thelema> okay, can you pastebin your code?
<DOUK> ok
<DOUK> by the way i am dok nokem from yesterday
DOUK is now known as doknokem
lamawithonel has quit [Ping timeout: 260 seconds]
<thelema> your last two cases don't return a pair of lists
<doknokem> oh my
lamawithonel has joined #ocaml
<doknokem> i should have written x::f,x::k but that wouldn't work
pdhborges has joined #ocaml
<thelema> k, x::f
<thelema> else x::k, f
<doknokem> i didnt know we could write like that
<doknokem> thanks
<doknokem> does that mean the k list remains as it is
<thelema> yes
<doknokem> ok
<doknokem> wait i misunderstood the problem
<doknokem> it's if the rank of the element is even
<doknokem> then it goes in the first list
<doknokem> if rank is odd then second
<thelema> i.e. split the list into the odd position and even position elements?
<thelema> That's even easier
<doknokem> yes
lamawithonel has quit [Ping timeout: 252 seconds]
<doknokem> i have seen an example of it online
thomasga has joined #ocaml
jamii has quit [Ping timeout: 276 seconds]
lamawithonel has joined #ocaml
thomasga has quit [Client Quit]
<doknokem> does the ranks start at 0
<thelema> up to you, I think
<thelema> usually things are indexed starting at 0 in ocaml
<doknokem> ill do it like that then
<doknokem> thanks
goodside has quit [Ping timeout: 260 seconds]
joelr has joined #ocaml
<joelr> good evening
<joelr> how do you invert compare?
<joelr> e.g. to sort an array in decreasing order
<adrien> "fun a b -> compare b a" ?
<joelr> darn :D
<joelr> thanks!
<adrien> ;-)
<adrien> off to bed, good night :P
joelr has quit [Client Quit]
ymasory has quit [Quit: Leaving]
jderque has quit [Quit: leaving]
Cyanure has joined #ocaml
edwin has quit [Remote host closed the connection]
ymasory has joined #ocaml
DOUK has joined #ocaml
doknokem has quit [Ping timeout: 258 seconds]
lamawithonel has quit [Ping timeout: 246 seconds]
jonrafkind has joined #ocaml
lamawithonel has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
<jonrafkind> what is the syntax for applying a constructor to multiple arguments? (Foo 1, 2, 3) doesnt work. I tried (Foo (1, 2, 3)) as well
<thelema> Foo (1,2,3) should work
<jonrafkind> ok that does work, i must have made a typo before
DOUK has quit [Read error: Connection reset by peer]
<ptrf> rwmjones: you never made a part 6 of your ocaml internals blog post series?
<pdhborges> part 6 is "reaed ocaml's source"
<ptrf> ahah
<pdhborges> ^^
barismetin has quit [Remote host closed the connection]
jonrafkind has left #ocaml []
Cyanure has quit [Ping timeout: 258 seconds]
sepp2k has quit [Quit: Leaving.]
Associat0r has quit [Quit: Associat0r]
Amorphous has quit [Ping timeout: 248 seconds]
goodside has joined #ocaml
Amorphous has joined #ocaml
dnolen has joined #ocaml
Julien_T has quit [Ping timeout: 276 seconds]
Julien_Tz has joined #ocaml
Julien_Tz is now known as Julien_T
eikke has quit [Read error: Operation timed out]
pdhborges has quit [Quit: WeeChat 0.3.4]