companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
ziyourenxiang has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
stux|RC has quit [Ping timeout: 248 seconds]
john51 has quit [Remote host closed the connection]
john51 has joined #ocaml
mengu has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
zolk3ri has quit [Quit: Lost terminal]
mfp has quit [Ping timeout: 240 seconds]
wtetzner has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
ousado_ has joined #ocaml
ousado has quit [Ping timeout: 248 seconds]
govg has quit [Ping timeout: 240 seconds]
cbot has joined #ocaml
jbrown has quit [Ping timeout: 258 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
Algebr has joined #ocaml
keep_learning has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 255 seconds]
wtetzner has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
jao has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
beauzeaux has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ocaml
stux|RC has joined #ocaml
stux|RC has quit [Ping timeout: 240 seconds]
dratini0 has quit [Ping timeout: 240 seconds]
stux|RC has joined #ocaml
keep_learning has joined #ocaml
nomicflux has joined #ocaml
enterprisey has joined #ocaml
govg has joined #ocaml
nomicflux has quit [Quit: nomicflux]
mengu has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
beauzeaux has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 258 seconds]
kerrhau has quit [Ping timeout: 255 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
philtor has quit [Remote host closed the connection]
cbot has quit [Quit: Leaving]
mbuf has joined #ocaml
MercurialAlchemi has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
mengu has joined #ocaml
samrat has quit [Ping timeout: 258 seconds]
mengu has quit [Ping timeout: 264 seconds]
keep_learning has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
samrat has joined #ocaml
mengu has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Killed (verne.freenode.net (Nickname regained by services))]
mengu has quit [Ping timeout: 246 seconds]
jonasen has joined #ocaml
sz0 has joined #ocaml
zmt00 has quit [Quit: Leaving]
mengu has joined #ocaml
mengu has quit [Ping timeout: 258 seconds]
enterprisey has quit [Ping timeout: 248 seconds]
frefity has joined #ocaml
andreas__ has joined #ocaml
enterprisey has joined #ocaml
Simn has joined #ocaml
argent_smith has joined #ocaml
Algebr has quit [Remote host closed the connection]
rossberg has quit [Ping timeout: 255 seconds]
TheLemonMan has joined #ocaml
rossberg has joined #ocaml
aphprentice has quit [Quit: Connection closed for inactivity]
mengu has joined #ocaml
dtornabene has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
shiyas has joined #ocaml
mengu has joined #ocaml
enterprisey has quit [Ping timeout: 248 seconds]
dtornabene has quit [Quit: Leaving]
mengu has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
mengu has quit [Ping timeout: 240 seconds]
mfp has joined #ocaml
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
mengu has quit [Ping timeout: 246 seconds]
jonasen has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
frefity has joined #ocaml
TarVanimelde has joined #ocaml
ziyourenxiang has joined #ocaml
TarVanimelde has quit [Client Quit]
mengu has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhil has joined #ocaml
lgd has quit [Remote host closed the connection]
Exagone313 has quit [Quit: see ya!]
Exagone313 has joined #ocaml
kakadu has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
lgd has joined #ocaml
zolk3ri has joined #ocaml
mengu has quit [Remote host closed the connection]
sepp2k has joined #ocaml
mengu has joined #ocaml
wtetzner has joined #ocaml
nicoo has quit [Write error: Connection reset by peer]
nicoo has joined #ocaml
nomicflux has joined #ocaml
dratini0 has joined #ocaml
j0sh_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
samrat has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
mengu has quit [Read error: Connection reset by peer]
mengu_ has joined #ocaml
mbuf has quit [Quit: Leaving]
wtetzner has quit [Ping timeout: 248 seconds]
Denommus has joined #ocaml
nomicflux has quit [Quit: nomicflux]
jonasen has joined #ocaml
jao has joined #ocaml
AltGr has joined #ocaml
jonasen_ has joined #ocaml
jonasen has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
sh0t has joined #ocaml
TheLemonMan has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
aciniglio has joined #ocaml
<Denommus> anyone here uses opam over eshell?
ox3ch0 has joined #ocaml
ox3ch0 has quit [Client Quit]
ox3ch0 has joined #ocaml
ox3ch0 has quit [Client Quit]
<AltGr> I don't, but there is an issue that might be related here: https://github.com/ocaml/opam/issues/2899
jonasen_ has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 240 seconds]
jonasen has joined #ocaml
dhil has joined #ocaml
<thizanne> http://paste.awesom.eu/thizanne/oYw3 does someone here have an explanation for the value of `b` ? (keywords: extensible variants, or-patterns)
<thizanne> (it works as intended if t is a usual sum type)
<Drup> thizanne: bug report
<Drup> that's just buggy
mengu_ has quit [Remote host closed the connection]
freusque has quit [Quit: WeeChat 1.7.1]
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
wtetzner has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
MercurialAlchemi has quit [Ping timeout: 246 seconds]
Guest64795 has joined #ocaml
Guest64795 has quit [Client Quit]
fraya has joined #ocaml
zmt00 has joined #ocaml
lostman has joined #ocaml
<lostman> how can I write a function that takes some Map module from int to string? I essentially want to abstract over the ordering I created the map with. Can't quite figure it out
mengu has joined #ocaml
dhil has joined #ocaml
mengu has quit [Ping timeout: 246 seconds]
shiyas has quit [Ping timeout: 246 seconds]
fraya has quit [Quit: Leaving]
AltGr has left #ocaml [#ocaml]
mengu has joined #ocaml
jbrown has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 248 seconds]
zolk3ri has quit [Ping timeout: 246 seconds]
<Denommus> lostman: do you know how functors work?
dhil has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lostman> Denommus: yeah
<lostman> should be something like let f (module M: Map.S with type key = float and type t = ???) = ..., right?
<lostman> what does type (+'a) t mean?
<lostman> saw that in definition of Map
<Drup> you don't have to add any typing equality of M.t, if you want to abstract over it, it should stay .. abstract
shinnya has joined #ocaml
<Denommus> lostman: no
<Denommus> lostman: it would be something like module Foo(M: SOME_SIGNATURE) = struct ... end
<Denommus> lostman: the SOME_SIGNATURE describes a module that contains the ordering function you want. Then, inside Foo, you'd have your function
<Denommus> that can use M.your_ordering_function
<octachron> lostman, +'a t means that t is covariant in its first parameter
<octachron> also another option may be to use first-class module "let f (type a) (module M: Map.S with type key = a) = … "
<Denommus> lostman: while passing a module to a function is possible (because OCaml is powerful af), it's usually not what you really want. What you usually want is a functor
<Denommus> octachron: no, that makes things overly complicated -.-
jnavila has joined #ocaml
<Drup> Denommus: It depends
FreeBirdLjj has joined #ocaml
jonasen has joined #ocaml
<Denommus> Drup: I think the case for first-class modules are for heterogeneous data structures, which is not the case
<Denommus> and even then you might model your problem in such a way that you don't need them
shinnya has quit [Ping timeout: 240 seconds]
<Drup> You always can
<Drup> it depends which kind of flexibility you want
tane has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
jonasen has quit [Client Quit]
<octachron> Denommus, functors are both more powerful and more syntactically clunky than first-class modules, so first-class modules may be a better fit than functors in specific context
FreeBirdLjj has joined #ocaml
jonasen has joined #ocaml
Anarchos has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
frefity has quit [Quit: Ex-Chat]
<lostman> but I already minted two different maps: M1 and M2 and now I just want to apply same functions to both of those. wouldn't first class modules be better here than functors? is something like this possible: let f (type a) (module M: Map.S with type key = int) k v x = M.add k v x;;
<lostman> this throws an error `The type constructor M.t would escape its scope`
<Drup> lostman: what do you want to implement ?
<Denommus> lostman: can you show us a snippet?
kakadu has quit [Quit: Konversation terminated!]
wtetzner has quit [Ping timeout: 248 seconds]
<lostman> Drup: I have two maps, `string IntMapAsc.t` and `string IntMapDesc.t` and want to write a function that iterates over them and produces a list
<Drup> lostman: write your iteration function over iterators like sequence and then just plugin in IntMapX.iter when you glue things together
<Drup> sometimes, good old high order functions are all that you need ;)
<lostman> Drup: I'm messing with React and Reason and the stdlib is rather thin. I don't see anything resembling iterators
jao has joined #ocaml
<Drup> Sure you do
<Drup> let me give you an example :)
<Drup> (you don't actually need the sequence library, but it makes things so much easier and it works everywhere, so no reason not to :)
jnavila has joined #ocaml
<Drup> The idea is just to abstract away the map, and just work on iterators
<lostman> Drup: ah, I see now how it works. Should do the trick. I'm just sad this didn't work: `let f (module M: Map.S with type key = int) m = M.map (fun k v -> string_of_int k ^ v) m |> M.bindings |> List.map snd;;`
mk9_ has joined #ocaml
<Drup> You can't really write that, yeah
<Drup> (try to write the type this would have, you will see why)
lgd_ has joined #ocaml
<Drup> btw, you shouldn't map on Maps like that, just write a fold, it's much more efficient
jnavila has quit [Ping timeout: 258 seconds]
lgd has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 240 seconds]
samrat has quit [Ping timeout: 258 seconds]
jnavila has joined #ocaml
kakadu has joined #ocaml
Algebr has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 240 seconds]
mk9_ has quit [Quit: mk9_]
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ocaml
ygrek_ has joined #ocaml
kerrhau has joined #ocaml
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
tane has quit [Quit: Leaving]
enterprisey has quit [Remote host closed the connection]
kerrhau has quit [Ping timeout: 248 seconds]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
_andre has quit [Quit: leaving]
enterprisey has joined #ocaml
shinnya has joined #ocaml
sepp2k has quit [Quit: Leaving.]
Algebr has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Guest12513 has joined #ocaml
Guest12513 has quit [Remote host closed the connection]
KongWubba has joined #ocaml
<orbifx[m]> Is the a library for writing system related programs (making directories, calling other programs etc), in a function way?
<hannes> orbifx[m]: you may want to look into bos http://erratique.ch/software/bos/doc/Bos.html
<hannes> this uses blocking calls..
kerrhau has quit [Ping timeout: 246 seconds]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
kerrhau_ has joined #ocaml
kerrhau_ has quit [Changing host]
kerrhau_ has joined #ocaml
<orbifx[m]> Thanks hannes
zolk3ri has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]
jnavila has quit [Remote host closed the connection]
aciniglio has quit [Ping timeout: 260 seconds]
zozozo_ has joined #ocaml
zozozo has quit [Read error: Connection reset by peer]
zozozo_ has quit [Client Quit]
zozozo has joined #ocaml
_whitelogger has joined #ocaml
KongWubba has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
enterprisey has quit [Ping timeout: 240 seconds]
mk9_ has joined #ocaml
mk9_ has quit [Quit: mk9_]
andreas__ has quit [Quit: Connection closed for inactivity]
sh0t has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
ziyourenxiang has quit [Quit: Leaving]
mengu has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 260 seconds]
kakadu_ has quit [Remote host closed the connection]
enterprisey has joined #ocaml
vtcoo has joined #ocaml