adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
spew has quit [Quit: Connection closed for inactivity]
AnAverageHuman has quit [Ping timeout: 256 seconds]
ale64bit has joined #ocaml
ale64bit has quit [Ping timeout: 250 seconds]
xuib has quit [Quit: xuib]
ale64bit has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
jmagnusj__ has joined #ocaml
adrianbrink_ has joined #ocaml
lpil0 has joined #ocaml
adi________ has joined #ocaml
Xizor_ has joined #ocaml
rdivyanshu_ has joined #ocaml
jyc__ has joined #ocaml
kark_ has joined #ocaml
sim642_ has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lokydor[m] has quit [*.net *.split]
aecepoglu[m] has quit [*.net *.split]
isaachodes[m] has quit [*.net *.split]
smondet[m] has quit [*.net *.split]
cgenie[m] has quit [*.net *.split]
jmagnusj_ has quit [*.net *.split]
rdivyanshu has quit [*.net *.split]
jyc_ has quit [*.net *.split]
adrianbrink has quit [*.net *.split]
lpil has quit [*.net *.split]
adi_______ has quit [*.net *.split]
dmiles has quit [*.net *.split]
jack5638 has quit [*.net *.split]
sim642 has quit [*.net *.split]
Xizor has quit [*.net *.split]
kark has quit [*.net *.split]
groovy2shoes has quit [*.net *.split]
adrianbrink_ is now known as adrianbrink
rdivyanshu_ is now known as rdivyanshu
sim642_ is now known as sim642
jack5638 has joined #ocaml
ocabot has quit [Ping timeout: 255 seconds]
logicmoo has joined #ocaml
AtumT has quit [Quit: AtumT]
groovy2shoes has joined #ocaml
ocabot has joined #ocaml
lokydor[m] has joined #ocaml
smondet[m] has joined #ocaml
cgenie[m] has joined #ocaml
aecepoglu[m] has joined #ocaml
isaachodes[m] has joined #ocaml
kvda has joined #ocaml
kvda has quit [Client Quit]
ziyourenxiang__ has joined #ocaml
ale64bit has quit [Ping timeout: 268 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
ale64bit has joined #ocaml
<ale64bit> is there an existing tool (like ocamlformat) to format menhir and ocamllex files?
mfp has quit [Ping timeout: 268 seconds]
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
kvda has joined #ocaml
KeyJoo has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 246 seconds]
AnAverageHuman has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
gravicappa has joined #ocaml
ygrek has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
kvda has quit [Client Quit]
Jeanne-Kamikaze has quit [Quit: Leaving]
_whitelogger has joined #ocaml
ale64bit has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
sonologico has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 246 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
kvda has joined #ocaml
kvda has quit [Client Quit]
Birdface has joined #ocaml
jao has quit [Ping timeout: 268 seconds]
jmagnusj_ has joined #ocaml
jmagnusj__ has quit [Ping timeout: 250 seconds]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
barockobamo has joined #ocaml
silver has joined #ocaml
Birdface has quit [Ping timeout: 250 seconds]
jaar has joined #ocaml
<flux[m]> emacs maybe :)
Haudegen has joined #ocaml
freyr69 has joined #ocaml
Bahman has joined #ocaml
dhil has joined #ocaml
jaar has quit [Ping timeout: 258 seconds]
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
johnelse has quit [Read error: Connection reset by peer]
<adrien> dinosaure: thanks! :)
pierpal has quit [Ping timeout: 255 seconds]
johnelse has joined #ocaml
jaar has joined #ocaml
<hannes> I struggle a bit with the typer... getting the following error:
<hannes> Error: This expression has type $B_'a key
<hannes> but an expression was expected of type a key
<hannes> Type $B_'a is not compatible with type a
<def`> A bit difficult to say what is going on without more context, but it seems that $B_a is an existential coming from unpacking a constructor called B
<hannes> hmm, without type annotations I end up in "type constructor $B_'a would escape its scope"
<def`> And the 'a of B is known to be equal to `a` in that context?
<hannes> def`: yes, the line of code I wanted to add: let map f m = M.map (fun (B (k, v)) -> B (k, f k v)) m
<hannes> where type b = B : 'a key * 'a -> b
<hannes> (this is in https://github.com/hannesm/gmap FWIW)
<def`> Ah, the problem is that you would need first class polymorphism for f I think
<def`> (There is a universal quantification hidden somewhere in the type of f)
<hannes> how do i do that? ;) I tried to annotate the map with "type a . (a key -> a -> a) -> t -> t" (which result in the first error)
<def`> :), the problem is that the a has the wrong scope here: you would like (type a . a key -> a -> a) -> t -> t
<def`> which you can only express with records in OCaml, I am afraid :(
<def`> (or objects)
<hannes> :/
<def`> one way is with < f : 'a. 'a key -> 'a -> 'a > -> t -> t
<hannes> what's "<" ? ain't this object?
<def`> and in the lambda is now: (fun (B (k, v)) -> B (k, f#f k v))
<def`> Yes it is
<hannes> that'd mean f would need to be passed as object?
<def`> yes
<hannes> :/
<Drup> (I think using a record is a better idea, but it's true neither is really nice)
<hannes> a record for "f" this is?
<Drup> yeah
<hannes> ok, that also means quite some burden on the client
<hannes> def`: thanks!
<def`> hannes: using constructor disambiguation, the overhead for the client can reduce to calling map { f = ... }
<def`> can be reduced to*
<hannes> i'll wander off to the agda land, i heard they've more powerful types ;)
<hannes> def`: yes
<Drup> well, haskell can do that one too :)
<Drup> no need to spin up agda
<def`> :D... It is supposed to be a "nicer way" to get polymorphism than switching to a vastly more powerful type system.
<def`> I still don't buy this poly-ml / semi-explicit polymorphism argument ;P
<hannes> well, another (less safe, more pragmatic) would be (map : (b -> b) -> t -> t) -- i.e. not unpack the key/value, but then this would allow clients to modify the key in the binding.
<hannes> but I can (runtime :/)-check that k == k'..
<def`> When using such an heterogeneous map, having this record doesn't add much to the boilerplate involved in dealing with GADTs
mfp has joined #ocaml
<def`> (I implemented a similar structure where I had one record for polymorphic iter, one for map and one for fold... It wasn't that painful in the end)
sz0 has joined #ocaml
<hannes> thanks - I'll think about it
<hannes> maybe map isn't worth it in the end..
<Drup> hannes: I would recommend adding map with the record. It's inconvenient, but even if you don't need map often, when you do, it's important to have it
lpil0 is now known as lpil
johnelse has quit [Read error: No route to host]
kakadu has joined #ocaml
johnelse has joined #ocaml
pierpal has joined #ocaml
Haudegen has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 245 seconds]
keep_learning_M has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Remote host closed the connection]
Netsu has joined #ocaml
<Netsu> Hello. Did anybody have any experience with alcotest on gitlab? I have some issues with color output https://github.com/mirage/alcotest/issues/148
Haudegen has joined #ocaml
<Netsu> Actually not a big deal, but it wold be nice to reduce visual noise by enabling colors
dhil has joined #ocaml
jao has joined #ocaml
AnAverageHuman has joined #ocaml
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
dhil has quit [Ping timeout: 245 seconds]
al-damiri has joined #ocaml
freyr69 has left #ocaml [#ocaml]
dhil has joined #ocaml
freyr69 has joined #ocaml
<freyr69> Sup, I've installed conf-libev
<freyr69> successfully, tho lwt compiles with use_libev = false
<freyr69> why?
<freyr69> could it be
<freyr69> Is there any way to override?
tristero has quit [Quit: WeeChat 2.3]
<freyr69> Ah, it seems it doesn't work under root
AnAverageHuman has quit [Ping timeout: 256 seconds]
tane has joined #ocaml
ygrek has joined #ocaml
nullifidian__ has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 246 seconds]
nullifidian has joined #ocaml
barockobamo has quit [Remote host closed the connection]
Jesin has quit [Quit: Leaving]
ggole has joined #ocaml
Jesin has joined #ocaml
freyr69 has quit [Remote host closed the connection]
okuu has joined #ocaml
maarhart has joined #ocaml
dhil has joined #ocaml
maarhart has quit [Quit: Mutter: www.mutterirc.com]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
Cypi has quit [Quit: Lost terminal]
ziyourenxiang__ has quit [Ping timeout: 246 seconds]
Cypi has joined #ocaml
maarhart has quit [Remote host closed the connection]
powerbit has quit [Quit: Going offline, see ya! (www.adiirc.com)]
johnelse has quit [Quit: leaving]
Netsu has quit [Ping timeout: 256 seconds]
assemblyman has joined #ocaml
Serpent7776 has joined #ocaml
yomimono has joined #ocaml
Bahman has quit [Ping timeout: 244 seconds]
amiloradovsky has joined #ocaml
assemblyman has quit [Quit: ™]
Bahman has joined #ocaml
xuib has joined #ocaml
Haudegen has quit [Remote host closed the connection]
jaar has quit [Quit: Leaving]
powerbit has joined #ocaml
nahra has quit [Ping timeout: 264 seconds]
Jesin has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 246 seconds]
yomimono has joined #ocaml
amiloradovsky has quit [Ping timeout: 246 seconds]
dhil has quit [Ping timeout: 255 seconds]
AnAverageHuman has joined #ocaml
gravicappa has quit [Ping timeout: 245 seconds]
Jesin has joined #ocaml
themsay has joined #ocaml
kakadu_ has joined #ocaml
ggole has quit [Quit: Leaving]
rambocoder has joined #ocaml
Bahman has quit [Quit: Ave atque vale]
pierpal has quit [Ping timeout: 246 seconds]
sonologico has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
wilfredh has quit [Quit: Connection closed for inactivity]
Serpent7776 has quit [Quit: leaving]
sz0 has quit [Quit: Connection closed for inactivity]
AnAverageHuman has joined #ocaml
tane has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 244 seconds]
yomimono has joined #ocaml
pierpal has joined #ocaml
themsay has quit [Ping timeout: 245 seconds]
pierpal has quit [Ping timeout: 246 seconds]
kakadu_ has quit [Remote host closed the connection]
AnAverageHuman has quit [Ping timeout: 256 seconds]
themsay has joined #ocaml
ziyourenxiang__ has joined #ocaml
yomimono has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 255 seconds]
yomimono has joined #ocaml
okuu has quit [Read error: Connection reset by peer]
al-damiri has quit [Quit: Connection closed for inactivity]
xuib has quit [Quit: xuib]