adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
simn__ has quit [Read error: Connection reset by peer]
petroav has joined #ocaml
petroav has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
cthuluh has quit [Ping timeout: 268 seconds]
cthuluh has joined #ocaml
silver has quit [Read error: Connection reset by peer]
nomicflux has joined #ocaml
d0nn1e has quit [Ping timeout: 268 seconds]
d0nn1e has joined #ocaml
mfp has quit [Ping timeout: 250 seconds]
TarVanimelde has joined #ocaml
timclassic has quit [Remote host closed the connection]
diamaths[m] has quit [Read error: Connection reset by peer]
regnt[m] has quit [Read error: Connection reset by peer]
Guest23668[m] has quit [Read error: Connection reset by peer]
M-ErkkiSeppl has quit [Read error: Connection reset by peer]
M-jimt has quit [Write error: Connection reset by peer]
XC[m] has quit [Read error: Connection reset by peer]
barkmadley[m] has quit [Read error: Connection reset by peer]
M-Illandan has quit [Write error: Connection reset by peer]
aspiwack[m] has quit [Read error: Connection reset by peer]
srenatus[m] has quit [Read error: Connection reset by peer]
na9da[m] has quit [Read error: Connection reset by peer]
dfeldman[m] has quit [Write error: Connection reset by peer]
M-pesterhazy has quit [Write error: Connection reset by peer]
M-martinklepsch has quit [Write error: Connection reset by peer]
lpw25[m] has quit [Remote host closed the connection]
Bluddy[m] has quit [Read error: Connection reset by peer]
regnat[m] has quit [Write error: Connection reset by peer]
matth[m] has quit [Write error: Connection reset by peer]
michbad has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
wu_ng has joined #ocaml
michbad has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 244 seconds]
lpw25[m] has joined #ocaml
nomicflux has quit [Quit: nomicflux]
dmbaturin has quit [Ping timeout: 240 seconds]
dmbaturin has joined #ocaml
diamaths[m] has joined #ocaml
M-jimt has joined #ocaml
regnat[m] has joined #ocaml
M-martinklepsch has joined #ocaml
timclassic has joined #ocaml
na9da[m] has joined #ocaml
XC[m] has joined #ocaml
aspiwack[m] has joined #ocaml
Bluddy[m] has joined #ocaml
regnt[m] has joined #ocaml
dfeldman[m] has joined #ocaml
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
srenatus[m] has joined #ocaml
matth[m] has joined #ocaml
Guest23668[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
barkmadley[m] has joined #ocaml
zpe has joined #ocaml
fraggle_ has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 258 seconds]
tmtwd has joined #ocaml
troydm has quit [Ping timeout: 250 seconds]
fraggle_ has joined #ocaml
trepta has joined #ocaml
nomicflux has joined #ocaml
tmtwd has quit [Quit: Leaving]
atsampson has quit [Ping timeout: 240 seconds]
pierpa has quit [Ping timeout: 260 seconds]
atsampson has joined #ocaml
axiles_ has quit [Ping timeout: 268 seconds]
axiles_ has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
trepta7 has joined #ocaml
trepta7 has quit [Read error: Connection reset by peer]
fraggle_ has quit [Ping timeout: 246 seconds]
larhat has quit [Quit: Leaving.]
trepta7 has joined #ocaml
trepta7 has quit [Remote host closed the connection]
trepta7 has joined #ocaml
average has quit [Ping timeout: 260 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 260 seconds]
average has joined #ocaml
fraggle_ has joined #ocaml
pyon has joined #ocaml
nomicflux has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
fraggle_ has quit [Ping timeout: 250 seconds]
groovy2shoes has quit [Quit: Leaving]
lukky513 has quit [Ping timeout: 248 seconds]
lyxia has quit [Ping timeout: 248 seconds]
companion_cube has quit [Ping timeout: 248 seconds]
Nazral has quit [Ping timeout: 248 seconds]
lyxia has joined #ocaml
companion_cube has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
Nazral has joined #ocaml
lukky513 has joined #ocaml
fraggle_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
barkmadley[m] has quit [Ping timeout: 240 seconds]
regnat[m] has quit [Ping timeout: 245 seconds]
lpw25[m] has quit [Ping timeout: 245 seconds]
srenatus[m] has quit [Ping timeout: 245 seconds]
M-ErkkiSeppl has quit [Ping timeout: 260 seconds]
aspiwack[m] has quit [Ping timeout: 260 seconds]
M-martinklepsch has quit [Ping timeout: 246 seconds]
Bluddy[m] has quit [Ping timeout: 240 seconds]
timclassic has quit [Ping timeout: 240 seconds]
diamaths[m] has quit [Ping timeout: 260 seconds]
matth[m] has quit [Ping timeout: 250 seconds]
M-Illandan has quit [Ping timeout: 250 seconds]
XC[m] has quit [Ping timeout: 260 seconds]
regnt[m] has quit [Ping timeout: 260 seconds]
dfeldman[m] has quit [Ping timeout: 260 seconds]
M-pesterhazy has quit [Ping timeout: 260 seconds]
na9da[m] has quit [Ping timeout: 260 seconds]
M-jimt has quit [Ping timeout: 260 seconds]
Guest23668[m] has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has joined #ocaml
libertas has quit [Ping timeout: 248 seconds]
tormen_ has joined #ocaml
libertas has joined #ocaml
freusque has joined #ocaml
rwmjones has joined #ocaml
ra4king1 has joined #ocaml
tormen has quit [Ping timeout: 260 seconds]
rwmjones|afk has quit [Ping timeout: 244 seconds]
ra4king has quit [Ping timeout: 244 seconds]
ra4king1 is now known as ra4king
trepta has quit [Ping timeout: 246 seconds]
trepta7 has quit [Ping timeout: 265 seconds]
freusque has quit [Ping timeout: 250 seconds]
alfredo has joined #ocaml
djellemah_ has joined #ocaml
malc_ has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ocaml595 has joined #ocaml
<ocaml595> Can anyone help me find out how to end this function when the full string is processed ? http://pastebin.com/R4J4tQ48
djellemah has quit [Ping timeout: 240 seconds]
djellemah_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
michbad has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
<ocaml595> How is the recursion stopped when the string processing has ended ?
<ocaml595> and the list returned
aspiwack[m] has joined #ocaml
timclassic has joined #ocaml
regnt[m] has joined #ocaml
Bluddy[m] has joined #ocaml
larhat has joined #ocaml
timclassic has quit [Ping timeout: 240 seconds]
Bluddy[m] has quit [Ping timeout: 258 seconds]
regnt[m] has quit [Ping timeout: 258 seconds]
aspiwack[m] has quit [Ping timeout: 258 seconds]
djellemah has joined #ocaml
djellemah_ has joined #ocaml
mloy has quit [Ping timeout: 260 seconds]
Simn has joined #ocaml
tizoc has quit [Ping timeout: 250 seconds]
ygrek has joined #ocaml
michbad_ has joined #ocaml
ohama has quit [Ping timeout: 244 seconds]
michbad has quit [Ping timeout: 250 seconds]
mloy has joined #ocaml
tizoc has joined #ocaml
ohama has joined #ocaml
freusque has joined #ocaml
mloy has quit [Ping timeout: 260 seconds]
mloy has joined #ocaml
axiles_ has quit [Ping timeout: 246 seconds]
michbad_ has quit [Remote host closed the connection]
maattdd has joined #ocaml
AlexDenisov has joined #ocaml
axiles_ has joined #ocaml
AltGr has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
mfp has joined #ocaml
malc_ has quit [Ping timeout: 256 seconds]
Mercuria1Alchemi has joined #ocaml
cthuluh has quit [Ping timeout: 256 seconds]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
<freehck> ocaml595: what is "insert"?
<freehck> This function is not defined.
<freehck> Maybe it would be more useful if you write what this function's supposed to do.
cthuluh has joined #ocaml
lpw25[m] has joined #ocaml
djellemah_ has quit [Ping timeout: 250 seconds]
noddy has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
<flux> he actually defined it a while back
<flux> let insert l a = if List.mem_assoc a l then let n = List.assoc a l in (a, n+1)::(List.remove_assoc a l) else (a, 1)::l
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
<companion_cube> o/
<zozozo> the insert_at_end seems to only take into account chars with even positions in the opriginal string (because i is incremented, and c is subbed, strangely)
noddy has joined #ocaml
<zozozo> ocaml595: what should the semantics of your function be ?
jnavila has quit [Ping timeout: 246 seconds]
<freehck> ocaml595: http://pastebin.com/zF2J0xjZ
drvink has quit [Quit: leaving]
zpe has joined #ocaml
diamaths[m] has joined #ocaml
na9da[m] has joined #ocaml
M-martinklepsch has joined #ocaml
timclassic has joined #ocaml
regnat[m] has joined #ocaml
M-jimt has joined #ocaml
XC[m] has joined #ocaml
aspiwack[m] has joined #ocaml
regnt[m] has joined #ocaml
matth[m] has joined #ocaml
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
srenatus[m] has joined #ocaml
dfeldman[m] has joined #ocaml
Bluddy[m] has joined #ocaml
Guest23668[m] has joined #ocaml
barkmadley[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
_andre has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
jwatzman|work has joined #ocaml
zpe has joined #ocaml
jnavila has joined #ocaml
ocaml595 has quit [Ping timeout: 260 seconds]
malc_ has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
zpe has quit [Remote host closed the connection]
TarVanimelde has quit [Read error: Connection reset by peer]
TarVanim_ has joined #ocaml
wu_ng has quit [Ping timeout: 265 seconds]
pyon has quit [Ping timeout: 244 seconds]
AlexDenisov has quit [Quit: Textual IRC Client: www.textualapp.com]
AlexDenisov has joined #ocaml
govg has quit [Ping timeout: 265 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
govg has joined #ocaml
jnavila has quit [Quit: It was time]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
average has quit [Ping timeout: 260 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
average has joined #ocaml
silver has joined #ocaml
kakadu has joined #ocaml
jwatzman|work has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mercuria1Alchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
vramana has quit [Remote host closed the connection]
govg has quit [Ping timeout: 260 seconds]
nightmared has joined #ocaml
malc_ has quit [Remote host closed the connection]
jita has joined #ocaml
<jita> what would be the best place to start ocaml coming from python background ?
<Drup> I think the MOOC currently running is best, but you have to hurry a bit
jnavila has joined #ocaml
zpe has joined #ocaml
jbrown has quit [Remote host closed the connection]
zpe has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
zpe has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
MercurialAlchemi has joined #ocaml
jbrown has joined #ocaml
zpe has quit [Remote host closed the connection]
freusque has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
malina has joined #ocaml
zirman has joined #ocaml
<jita> ty
jita has quit [Ping timeout: 260 seconds]
zirman has quit [Remote host closed the connection]
sepp2k has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
FreeBirdLjj has joined #ocaml
pierpa has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
zirman has quit [Remote host closed the connection]
sh0t has joined #ocaml
AlexDenisov has joined #ocaml
rgrinberg has joined #ocaml
pyon has joined #ocaml
al-damiri has joined #ocaml
FreeBirdLjj has joined #ocaml
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
govg has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
manizzle has quit [Quit: Leaving]
trix has joined #ocaml
t4nk634 has joined #ocaml
nullx002 has joined #ocaml
<nullx002> hi
<nullx002> i am new to ocmal... is there a good book for beginners?
<nullx002> i have some experince in haskell and commonlisp
silver has quit [Read error: Connection reset by peer]
<companion_cube> real world ocaml
<companion_cube> !rwo
<nullx002> companion_cube: is it free to download?
ocabot has quit [Remote host closed the connection]
ocabot has joined #ocaml
<nullx002> jmiven: in pdf or epub? it is easy to convert that way... or else i have to wget it first and than have to convert it to local copy
yomimono has joined #ocaml
th5 has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryanartecona has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
marsam has joined #ocaml
t4nk634 has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
Mercuria1Alchemi has joined #ocaml
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
malc_ has joined #ocaml
copy` has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
larhat has quit [Quit: Leaving.]
orbifx-m has joined #ocaml
<orbifx-m> Is is possible to declare a nested record without having first declare a type?
<flux> you mean type foo = { foo : foo option } ?
<flux> oh, I misunderstood
<zozozo> there's the recent inline record type
<flux> can you use it within records?
<zozozo> don't think so
<orbifx-m> type t = { a = { b = float } }
<flux> right, so the answer is: you can use nested records with sum types, but not otherwise
<zozozo> orbifx-m: afail, you cannot do that, you have to give a name to the internal type
<flux> type foo = Foo of { a : int }
<zozozo> *afaik
<flux> if you have recent enough ocaml
<flux> but note that this is not the same as defining the type
<flux> basically it's a performance optimization
<orbifx-m> ?
<flux> type r = { a : int } type foo = Foo of r is less memory-efficient than type foo = Foo of { a : int }, but the latter prohibits you from. ie pattern matching the record only and then returning it
<flux> so this works only for the first: let take_r foo = match foo with Foo x -> x
<flux> you can read all about the design choices and stuff at: https://caml.inria.fr/mantis/view.php?id=5528
shinnya has joined #ocaml
zpe has joined #ocaml
FreeBirdLjj has joined #ocaml
<orbifx-m> Thanks
<orbifx-m> Btw this is about declarations, not use afterwards
ciniglio` has quit [Ping timeout: 258 seconds]
ciniglio has quit [Ping timeout: 265 seconds]
ciniglio has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
ciniglio` has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
ryanartecona has quit [Quit: ryanartecona]
TarVanim_ has quit [Quit: TarVanim_]
jnavila has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
tristero has joined #ocaml
FreeBirdLjj has joined #ocaml
zpe has joined #ocaml
jnavila has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
ciniglio has quit [Ping timeout: 250 seconds]
jnavila_ has joined #ocaml
ciniglio has joined #ocaml
zirman has quit [Remote host closed the connection]
slash^ has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
orbifx-m has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
freusque has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
freusque has quit [Ping timeout: 260 seconds]
axiles_ has quit [Ping timeout: 258 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trepta7 has joined #ocaml
jnavila_ has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
axiles_ has joined #ocaml
theolaurent is now known as TheAuGingembre
rgrinberg has joined #ocaml
malina has quit [Ping timeout: 248 seconds]
ciniglio has quit [Ping timeout: 250 seconds]
ciniglio` has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jnavila_ has joined #ocaml
maattdd has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
pyon has quit [Remote host closed the connection]
jnavila_ has quit [Ping timeout: 260 seconds]
pyon has joined #ocaml
trepta7 has quit [Remote host closed the connection]
trepta7 has joined #ocaml
AlexDenisov has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
malina has joined #ocaml
rpip has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
FreeBirdLjj has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 250 seconds]
Simn has quit [Quit: Leaving]
iZsh has quit [Quit: ZNC - http://znc.in]
iZsh has joined #ocaml
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agarwal1975 has joined #ocaml
ygrek has joined #ocaml
AlexDenisov has joined #ocaml
silver has joined #ocaml
AlexDeni_ has quit [Ping timeout: 260 seconds]
larhat has joined #ocaml
adi_____ has joined #ocaml
dave_tucker_ has joined #ocaml
parataxis_ has joined #ocaml
menasw_ has joined #ocaml
ewanas has joined #ocaml
dch_ has joined #ocaml
igitoor_ has joined #ocaml
jstolare1 has joined #ocaml
cyraxjoe has joined #ocaml
andreypopp_ has joined #ocaml
aggelos__ has joined #ocaml
rks`_ has joined #ocaml
rfv_ has joined #ocaml
kakadu has joined #ocaml
henrytill_ has joined #ocaml
jyc_ has joined #ocaml
wolfcore has joined #ocaml
mcspud- has joined #ocaml
ocabot has quit [*.net *.split]
trix has quit [*.net *.split]
regnat[m] has quit [*.net *.split]
lpw25[m] has quit [*.net *.split]
mfp has quit [*.net *.split]
MightyJoe has quit [*.net *.split]
rfv has quit [*.net *.split]
nightmared has quit [*.net *.split]
adi____ has quit [*.net *.split]
jstolarek has quit [*.net *.split]
asm89 has quit [*.net *.split]
jyc has quit [*.net *.split]
blackfry has quit [*.net *.split]
mcspud has quit [*.net *.split]
ewanas_ has quit [*.net *.split]
andreypopp has quit [*.net *.split]
igitoor has quit [*.net *.split]
averell has quit [*.net *.split]
cantstanya has quit [*.net *.split]
rks` has quit [*.net *.split]
aggelos_ has quit [*.net *.split]
dch has quit [*.net *.split]
parataxis has quit [*.net *.split]
henrytill has quit [*.net *.split]
menasw has quit [*.net *.split]
dave_tucker has quit [*.net *.split]
jyc_ is now known as jyc
mcspud- is now known as mcspud
blackfry_ghost has joined #ocaml
adi_____ is now known as adi____
dave_tucker_ is now known as dave_tucker
menasw_ is now known as menasw
alfredo has joined #ocaml
igitoor_ has joined #ocaml
igitoor_ has quit [Changing host]
igitoor_ is now known as igitoor
parataxis_ is now known as parataxis
andreypopp_ is now known as andreypopp
dch_ is now known as dch
rfv_ is now known as rfv
mfp has joined #ocaml
regnat[m] has joined #ocaml
lpw25[m] has joined #ocaml
cantstanya has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
nightmared has joined #ocaml
asm89 has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
shinnya has quit [Ping timeout: 244 seconds]
marsam has quit [Read error: Connection reset by peer]
zpe has quit [Remote host closed the connection]
agarwal1975 has quit [Ping timeout: 246 seconds]
_andre has quit [Quit: leaving]
agarwal1975 has joined #ocaml
malc_ has quit [Remote host closed the connection]
Madars has quit [Quit: Leaving.]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 247 seconds]
Madars has joined #ocaml
malina has quit [Ping timeout: 250 seconds]
AlexDenisov has joined #ocaml
AlexDeni_ has quit [Ping timeout: 250 seconds]
freusque has joined #ocaml
digiorgi has joined #ocaml
digiorgi has left #ocaml [#ocaml]
jnavila_ has joined #ocaml
FreeBirdLjj has joined #ocaml
jnavila_ is now known as jnavila
FreeBirdLjj has quit [Ping timeout: 244 seconds]
<zozozo> is any gadt wizard around ? I have a slight problem
agarwal1975 has quit [Quit: agarwal1975]
<zozozo> in the following code, the mk_aux function should have a polymorphic type, but because of an earlier call to it, it ends up with a weaker type than I need: https://github.com/Gbury/ocaml-memgraph/blob/master/repr.ml#L117
smondet has joined #ocaml
<zozozo> it seems to me like it could be solved using a type annotation on mk_aux, but I can't seem to find the right syntax
slash^ has quit [Read error: Connection reset by peer]
<flux> yeah, functions taking gadt parameters must always be annotated
<zozozo> right, but I don't knwo how to write the correct annotation
<flux> let foo : type x. x typ -> x = fun gadt -> blabla
<zozozo> problem is that it's the other way around
<zozozo> I'd like : let foo : type x. int -> x foobar (with x = [< `A | `B ])
<flux> isn't that pretty normal return value
<flux> let foo : int -> [<`A | `B] = fun i -> return Foo
<flux> s/return // :)
<flux> so perhaps the problem is rather that the type of mk_aux gets bound by previous uses of it
<flux> as you mention ;)
<zozozo> indeed, if I remove the earlier call, the right type is inferred
ryanartecona has joined #ocaml
<flux> maybe you can break the loop by definin mk_aux beforehand, and passing mk_val as a parameter to it
<flux> not sure if there's another solution that doesn't involve recursive modules
<flux> do you know the recursive modules solution?
<zozozo> I'd like to avoid it if possible
<zozozo> in the worst case, I can always define the function twice, :/
<flux> then I suggest you try the mk_aux mk_val -trick
<zozozo> alright, that worked
AlexRussia has quit [Ping timeout: 258 seconds]
<zozozo> still a bit sad that a call to the function trumps the rightly inferred type
<companion_cube> I still think you can annotate
<flux> I understand recursive bindings can be tricky to type-infer, that's why it's limited
<zozozo> companion_cube: if you have a solution, I'm all ears, ^^
<companion_cube> have you tried with `type a. …` ?
<flux> I don't think type a. is applicaple as it's one exact type
<flux> zozozo, so you're writing some ocaml datastructure walker?
<zozozo> well, kinda yup
<zozozo> the goal is to output the actual memory representation to some kind of graph
<zozozo> in order to show easily how things are represented in ocaml
<zozozo> and since I was at it, I found it fun to use gadts to express some of the invariants on the representation
<flux> and not regretting it too much yet?-)
agarwal1975 has joined #ocaml
<zozozo> nope
Mercuria1Alchemi has quit [Ping timeout: 265 seconds]
<zozozo> companion_cube: I tried with the type a, but 1) without constraint it obviously fails (because it'd be wrong) 2) with constraint I get syntax errors
<companion_cube> interesting
malina has joined #ocaml
<zozozo> hm.. maybe I could write some small self-contained example to reproduce and ask for advice on the mailing list ? to see if someone can come up with a working annotation ?
<companion_cube> yes
rossberg has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ocaml
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
srenatus[m] has quit [Ping timeout: 250 seconds]
lpw25[m] has quit [Ping timeout: 246 seconds]
XC[m] has quit [Ping timeout: 246 seconds]
barkmadley[m] has quit [Ping timeout: 245 seconds]
M-ErkkiSeppl has quit [Ping timeout: 245 seconds]
M-pesterhazy has quit [Ping timeout: 245 seconds]
matth[m] has quit [Ping timeout: 260 seconds]
aspiwack[m] has quit [Ping timeout: 260 seconds]
Bluddy[m] has quit [Ping timeout: 260 seconds]
na9da[m] has quit [Ping timeout: 258 seconds]
M-martinklepsch has quit [Ping timeout: 258 seconds]
Guest23668[m] has quit [Ping timeout: 260 seconds]
michbad has joined #ocaml
marsam has joined #ocaml
M-jimt has quit [Ping timeout: 245 seconds]
agarwal1975 has quit [Quit: agarwal1975]
<zozozo> do you think this example is sufficiently simple ? https://gist.github.com/Gbury/fbeee432179113b05b078d01bd47d511
<zozozo> arg, I made a typo
rossberg has joined #ocaml
<companion_cube> yes, it is simple indeed
diamaths[m] has quit [Read error: Connection reset by peer]
regnat[m] has quit [Read error: Connection reset by peer]
timclassic has quit [Read error: Connection reset by peer]
dfeldman[m] has quit [Read error: Connection reset by peer]
regnt[m] has quit [Write error: Connection reset by peer]
M-Illandan has quit [Write error: Connection reset by peer]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<flux> pretty sure it's not doable.. :)
agarwal1975 has joined #ocaml
<companion_cube> it means some types are inferrable but not annotable?
<zozozo> that would strike me as odd
<flux> they are not inferrable nor annotable in case of recursive definitions.
<zozozo> or even a bug or missing feature
octachron has joined #ocaml
<companion_cube> flux: this is weird, though
yomimono has quit [Ping timeout: 248 seconds]
<octachron> zozozo, I got an "this expression is not allowed in let rec" error with your example
<flux> I wonder though if there was some way to express type constraints in function definitions, though
<zozozo> octachron: weird.. I tested on ocaml 4.02.3, 4.03.0 and 4.04.0 and got the wrong inferred type error
<zozozo> what version did you try with ?
<octachron> 4.04?
<octachron> but anyway after adding an argument to to bar, the right problem is triggered
<zozozo> I'm on 4.04.0+flambda and I dont get that error
<zozozo> well I'll adapt my example then
<octachron> and I think that the right type annotation is : "let rec foo: 'a. int -> ([< `A | ` B ] as 'a) foo = Foo i … "
<zozozo> octachron: it works ! thanks a lot
isd has quit [Ping timeout: 256 seconds]
jnavila has quit [Ping timeout: 256 seconds]
rossberg has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
isd has joined #ocaml
pierpa has quit [Remote host closed the connection]
pierpa has joined #ocaml
<octachron> (At the same time, I am not completely convinced that this annotation should work since 'a is not completely polymorphic in this context)
<zozozo> seems like in my example it's enough
yomimono has joined #ocaml
<flux> octachron, my fault was trying to use type x . .. as x, it seems my internal model on these types does not yet match ocaml's :)
marsam has quit [Remote host closed the connection]
rossberg has joined #ocaml
lpw25[m] has joined #ocaml
<zozozo> is there any reference out there about the memory representation of advanced structures (such as closures, lazy values, etc..) ?
<zozozo> nevermind, I found something
<octachron> flux, it is one of the (very) few cases where one cannot replace "'a." by "type a."
<octachron> I probably should check if I can find other cases, otherwise the example would be a worthwile addition to the manual
maurer has quit [Ping timeout: 248 seconds]
tristero has quit [Quit: WeeChat 1.6]
tristero has joined #ocaml
freusque has quit [Ping timeout: 248 seconds]
<zozozo> does physical equality not work on values outside the heap ? or rather on ocaml blocks with tag 1001 ?
<companion_cube> it works on anything, afaik
<companion_cube> it translated as pointer equality
<companion_cube> well, word equality
<zozozo> hu.. I have strange results when trying to analyze closures
<companion_cube> how do you mean?
<zozozo> in my case, two partial applications g1 and g2 of a function f have pointers to outside_the_heap blocks (which should be the function code if I'm not mistaken) that are not equal...
<zozozo> I'm reading http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora115.html to guide me, do you think it's still valid, or maybe representation of closures have changed ?
yomimono has quit [Quit: Leaving]
<companion_cube> if you use flambda, some stuff might have changed, I don't know
<companion_cube> did you apply to the same number of arguments?
<zozozo> yup
<companion_cube> interesting :D
<companion_cube> you can write a mail to the ML anyway
<companion_cube> it's not too active
na9da[m] has joined #ocaml
diamaths[m] has joined #ocaml
regnat[m] has joined #ocaml
timclassic has joined #ocaml
M-martinklepsch has joined #ocaml
M-jimt has joined #ocaml
XC[m] has joined #ocaml
regnt[m] has joined #ocaml
aspiwack[m] has joined #ocaml
Bluddy[m] has joined #ocaml
srenatus[m] has joined #ocaml
matth[m] has joined #ocaml
dfeldman[m] has joined #ocaml
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
Guest23668[m] has joined #ocaml
barkmadley[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
<companion_cube> how surprising, graphviz :p
<zozozo> ^^
<zozozo> anyway, you can see that all blocks with tag 1001 are different, which is what surprises me...
<zozozo> and I'm testing with ocaml 4.02.3 so no flambda black magic
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<companion_cube> you might try to get the address of closures and compare with memory map of the binary
<companion_cube> (forgot the name of the tool doing that)
zirman has quit [Ping timeout: 258 seconds]
kakadu has quit [Remote host closed the connection]
rossberg has quit [Ping timeout: 246 seconds]
th5 has quit [Remote host closed the connection]
<zozozo> companion_cube: do you know how to compile and call C code functions (as external) in utop ? (I'm trying to follow the examples of the oreilly book linked above that defines an inspect function in C)
rossberg has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
thizanne has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 260 seconds]
zirman has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has quit [Ping timeout: 250 seconds]
octachron has quit [Quit: Leaving]
michbad has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]