companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
szkl has joined #ocaml
trillion_exabyte has quit [Ping timeout: 246 seconds]
trillion_exabyte has joined #ocaml
spip has quit [Quit: Konversation terminated!]
rf has quit [Ping timeout: 248 seconds]
xd1le has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
chrisz has quit [Ping timeout: 240 seconds]
chrisz has joined #ocaml
azimut_ has quit [Remote host closed the connection]
azimut has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
ansiwen has quit [Quit: ZNC 1.7.1 - https://znc.in]
ansiwen has joined #ocaml
mbuf has joined #ocaml
bgs has joined #ocaml
bgs has quit [Remote host closed the connection]
bartholin has joined #ocaml
bartholin has quit [Quit: Leaving]
Putonlalla has quit [Ping timeout: 248 seconds]
Serpent7776 has joined #ocaml
rak has quit [Ping timeout: 248 seconds]
dinosaure has quit [Ping timeout: 248 seconds]
greenbagels has quit [Ping timeout: 265 seconds]
rak has joined #ocaml
Putonlalla has joined #ocaml
dinosaure has joined #ocaml
greenbagels has joined #ocaml
landonf has quit [Ping timeout: 246 seconds]
landonf has joined #ocaml
tjnhxmzhmqgytuwt has quit [Remote host closed the connection]
spip has joined #ocaml
<Leonidas> I'm trying to keep the module that was passed as argument to the functor but unfortunately, it doesn't seem like the type equality of 'a t = 'a R.t works: https://gist.github.com/Leonidas-from-XIV/fc41fe5ee3d1f0bead7948953565906b
<Leonidas> I must be missing something. I can of course expose everything from R in Apply like val return = R.return but I would prefer not to pollute the entire module with the R module contents
<Leonidas> I'm getting "Error: This expression has type unit Applied.R.t but an expression was expected of type unit Applied.t"
xgqt has quit [Quit: WeeChat 3.8]
wingsorc has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <Kali> change `module R : Runner` to `module R : Runner with type 'a t = 'a t` and module Unit : Runner` to `module Unit : Runner with type 'a t = unit`
<discocaml> <Kali> change `module R : Runner` to `module R : Runner with type 'a t = 'a t` and `module Unit : Runner` to `module Unit : Runner with type 'a t = unit`
<discocaml> <Kali> this is necessary because the signature uses the abstract type `'a t`, the definition of which is obscured outside the module
<discocaml> <Kali> adding those annotations allows knowledge of equality outside of the module
<discocaml> <Kali> which then allows it to typecheck
xd1le has quit [Quit: xd1le]
alexherbo2 has quit [Remote host closed the connection]
<octachron> Leonidas, as a general rule, you should avoid storing arguments of functor inside the body of the functor to avoid losing type and module equations.
Haudegen has quit [Quit: Bin weg.]
kakadu has quit [Quit: Konversation terminated!]
trillion_exabyte has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
trillion_exabyte has joined #ocaml
darchitect1 has joined #ocaml
<darchitect1> hey guys
<darchitect1> is this chat active usually ?
<darchitect1> (during Greenwich time)
<Leonidas> octachron: The reason I do this is because I use the functor argument in other modules using the applied/generated functor and want to retain access to the base operators (map/bind/return etc). I'd gladly change the design to something smarter because I do feel like the whole API is a bit of a mess but don't really know how to make it nicer
<Leonidas> darchitect1: Yes.
<Leonidas> But more in Paris time :P
<octachron> Extension functors (that only adds functions or types) often work better (in the absence of transparent module ascription) since you keep explicitly the link between the extended modules and the original ones.
darchitect1 has quit [Ping timeout: 265 seconds]
<Leonidas> octachron: What are extension functors? You mean a functor that uses `include` on its argument?
<Leonidas> This could be a nicer API
<octachron> Rather functors that only define new functions or types, and let the user of the functor which has more information at end compose the final module.
<octachron> The issue is that inside the functor, you only have a limited view of the functor arguments.
<octachron> And you often don't want to capture this limited view.
<Leonidas> Kali: thanks. Seems like it was enough to add that to module R, if I attempt to substitute the type in `module Unit : Runner` it seems to be a syntax error
<Leonidas> octachron: how would the user compose the final module?
<octachron> `module Final = struct include R include Add_more(R) end`
darchitect1 has joined #ocaml
oriba has joined #ocaml
darchitect1 has quit [Ping timeout: 264 seconds]
waleee has joined #ocaml
elmklod has joined #ocaml
elmklod has quit [Quit: Leaving]
<companion_cube> https://github.com/dbuenzli/typegist oh my :D
waleee has quit [Ping timeout: 240 seconds]
Haudegen has quit [Quit: Bin weg.]
darchitect1 has joined #ocaml
<adrien> that was probably bound to happen
<octachron> And yet another incomplete type representation
darchitect1 has quit [Ping timeout: 264 seconds]
<companion_cube> is it bad to be incomplete? :)
<companion_cube> after all, most ppxes are extremely incomplete too
<octachron> For a solution which is sold as a panacea, incompleteness is a bad sign. But well, experimenting is fun at least when people are not eager to integrate a doomed experience into the stdlib.
<adrien> and isn't the incompleteness of all other attempts the reason they didn't succeed?
<octachron> My personal feeling is more that none of those attempt worked well and thus it made no sense to try to reach completeness.
<octachron> (and good type system coverage like the one in `refl` is very expensive in term of complexity budget)
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
<companion_cube> my main worry would be runtime perf overhead
<companion_cube> but I wish we had *something*
<companion_cube> instead of handwaving and saying that stuff like serialization is niche, which is… really shortsighted
<octachron> Last I heard, performance was the reason janestreet did not commit to using `ppx_typerep_conv`
<octachron> Was there anyone that ever said that serialization is niche?
<companion_cube> yeah, gasche :p
<companion_cube> (let me check before I slander him tho)
<companion_cube> oh actually it's you, my bad. "very precise use cases" is the actual wording.
<companion_cube> "they don't really seem useful in general" I mean serialization is useful in general, it's not a precise use case
darchitect1 has joined #ocaml
pie_ has quit []
<octachron> I was speaking of type representation. And I still claim that there are a bad solution to the problem at hand.
pie_ has joined #ocaml
<octachron> (And I was thinking of serializing the type representation in order to have a potentially safe versionned serialization solution in ... some very precise use cases).
darchitect1 has quit [Ping timeout: 265 seconds]
<companion_cube> hu, that was really not clear.
<octachron> Yeah, the rest of the discussion made quite clear that my phrasing was very confusing.
Serpent7776 has quit [Quit: WeeChat 1.9.1]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<companion_cube> anyway, glad to be wrong on that one :)
<companion_cube> but it's really a pain that OCaml doesn't offer a good solution there
Tuplanolla has joined #ocaml
Anarchos has joined #ocaml
bartholin has joined #ocaml
darchitect1 has joined #ocaml
Anarchos has quit [Ping timeout: 250 seconds]
alexherbo2 has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
darchitect1 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
darchitect1 has quit [Ping timeout: 246 seconds]
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
mbuf has quit [Quit: Leaving]
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Ping timeout: 245 seconds]
richardhuxton has quit [Remote host closed the connection]
immutable has quit [Write error: Connection reset by peer]
b0o has quit [Remote host closed the connection]
whereiseveryone has quit [Remote host closed the connection]
pluviaq has quit [Read error: Connection reset by peer]
toastal has quit [Remote host closed the connection]
sleepydog has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
henrytill has quit [Remote host closed the connection]
ymherklotz has quit [Read error: Connection reset by peer]
ggb has quit [Remote host closed the connection]
seeg has quit [Remote host closed the connection]
jakzale has quit [Remote host closed the connection]
philipwhite has quit [Remote host closed the connection]
_alix has quit [Read error: Connection reset by peer]
patrick has quit [Remote host closed the connection]
ggb has joined #ocaml
seeg has joined #ocaml
whereiseveryone has joined #ocaml
b0o has joined #ocaml
toastal has joined #ocaml
ymherklotz has joined #ocaml
patrick has joined #ocaml
richardhuxton has joined #ocaml
alexherbo2 has joined #ocaml
jakzale has joined #ocaml
immutable has joined #ocaml
philipwhite has joined #ocaml
_alix has joined #ocaml
henrytill has joined #ocaml
sleepydog has joined #ocaml
pluviaq has joined #ocaml
Ankhers has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Ping timeout: 245 seconds]
alexherbo2 has joined #ocaml
darchitect1 has joined #ocaml
waleee has joined #ocaml
darchitect1 has quit [Ping timeout: 248 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
reynir has quit [Quit: WeeChat 3.0]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
reynir has joined #ocaml
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 248 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
wingsorc has joined #ocaml
bartholin has quit [Quit: Leaving]
alexherbo2 has quit [Remote host closed the connection]
odyssey_ has joined #ocaml
odyssey_ has quit [Quit: WeeChat 3.8]
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
szkl has quit [Quit: Connection closed for inactivity]
Tuplanolla has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 240 seconds]