<d_bot>
<EduardoRFS> Is it possible to include concrete module on OCaml interface?
<d_bot>
<EduardoRFS> ```ocaml
<d_bot>
<EduardoRFS> module M = struct type t end
<d_bot>
<EduardoRFS> module M': sig include M end = M
<d_bot>
<EduardoRFS> ```
<d_bot>
<EduardoRFS> In such a way that M.t and M.t' are equal?
<companion_cube>
`: module type of M` mayeb
<d_bot>
<EduardoRFS> nope tried that, it get's a copy
<d_bot>
<EduardoRFS> my problem is that on my ml I'm doing `include M`
<d_bot>
<EduardoRFS> and I need to reexport it
<companion_cube>
so `module M' : module type of M = M` doesn't work? hu
<d_bot>
<EduardoRFS> nope
<d_bot>
<EduardoRFS> ```ocaml
<d_bot>
<EduardoRFS> module M = struct type t end
<d_bot>
<EduardoRFS> module M' : module type of M = M
<d_bot>
<EduardoRFS>
<d_bot>
<EduardoRFS> let f (v : M.t) : M'.t = v
<d_bot>
<EduardoRFS> ```
<d_bot>
<EduardoRFS> because module type of get's an instance of the module type without pointing to the real type
<companion_cube>
hmm, on a recent OCaml?
<d_bot>
<EduardoRFS> 4.12
<d_bot>
<EduardoRFS> so the module type `t` is actually an abstract type
<companion_cube>
erf
<companion_cube>
`: sig include module type of M end` ? :p
<d_bot>
<EduardoRFS> nope UHSAHUUHO
<d_bot>
<EduardoRFS> will just do alias for now, as `module M = M` is a thing
<d_bot>
<EduardoRFS> but now everything looks ugly, sad
<d_bot>
<EduardoRFS> `Types_410.Types`
<d_bot>
<NULL> `module M' : module type of M with type t = M.t = M` seems to work
<d_bot>
<EduardoRFS> yes but then I would need to do this for every type and when it's a lot of types it get's really annoying, in my case I'm doing it with `types.mli` from OCaml
<companion_cube>
there's a point I start using explicit module types
<d_bot>
<NULL> [it's supposed to be "gets", I don't know why you add the apostrophe]
zebrag has joined #ocaml
brettgilio has joined #ocaml
zebrag has quit [Remote host closed the connection]
gravicappa has joined #ocaml
hackinghorn has quit [Ping timeout: 272 seconds]
infinity0 has quit [*.net *.split]
infinity0 has joined #ocaml
Absalom has joined #ocaml
marinelli[m] has joined #ocaml
nyuhu has joined #ocaml
dinosaure has joined #ocaml
asm has joined #ocaml
Techcable_ has joined #ocaml
lobo has joined #ocaml
SquidDev0 has joined #ocaml
lobo has quit [Signing in (lobo)]
lobo has joined #ocaml
reynir has joined #ocaml
marinelli[m] has quit [Ping timeout: 272 seconds]
micro_ has joined #ocaml
ralu has joined #ocaml
theglass has joined #ocaml
hannes has joined #ocaml
p4bl0 has joined #ocaml
eltonpinto has joined #ocaml
mosterdt has joined #ocaml
leah2 has joined #ocaml
theglass has joined #ocaml
theglass has quit [Changing host]
olle has joined #ocaml
Putonlalla has joined #ocaml
mosterdt has quit [Signing in (mosterdt)]
mosterdt has joined #ocaml
jsoo has joined #ocaml
st has joined #ocaml
motherfsck has joined #ocaml
bacam has joined #ocaml
labor[m] has joined #ocaml
krnkktz has joined #ocaml
elf_fortrez has joined #ocaml
Ekho has joined #ocaml
schube[m] has joined #ocaml
dwt_ has joined #ocaml
elf_fortrez has quit [Quit: Client closed]
marinelli[m] has joined #ocaml
mbuf has joined #ocaml
<d_bot>
<mnxn> ```ocaml
<d_bot>
<mnxn> module M = struct type t end
<d_bot>
<mnxn> module M' : module type of struct include M end = M
<d_bot>
<mnxn>
<d_bot>
<mnxn> let f (v : M.t) : M'.t = v
<d_bot>
<mnxn> ```
<d_bot>
<mnxn> this compiles for me
mewfree[m] has joined #ocaml
<d_bot>
<mnxn> can't remember what this is called exactly, but using the `include` inside of a `struct ... end` preserves the type equalities
smondet[m] has joined #ocaml
nd__ has joined #ocaml
<d_bot>
<mnxn> ```ocaml
<d_bot>
<mnxn> # module M = struct type t end ;;
<d_bot>
<mnxn> module M : sig type t end
<d_bot>
<mnxn>
<d_bot>
<mnxn> # module M1 : module type of M = M ;;
<d_bot>
<mnxn> module M1 : sig type t end
<d_bot>
<mnxn>
<d_bot>
<mnxn> # module M2 : module type of struct include M end = M ;;
<d_bot>
<mnxn> module M2 : sig type t = M.t end
<d_bot>
<mnxn> ```
<d_bot>
<EduardoRFS> Oh that makes sense
<d_bot>
<EduardoRFS> Thanks @mnxn
<d_bot>
<EduardoRFS> I hadn't noticed the change
fluxm has joined #ocaml
favonia has quit [Ping timeout: 240 seconds]
lobo has quit [Quit: WeeChat 2.3]
lobo has joined #ocaml
lobo has quit [Client Quit]
lobo has joined #ocaml
elf_fortrez has joined #ocaml
elf_fortrez has quit [Write error: Broken pipe]
elf_fortrez has joined #ocaml
mro has joined #ocaml
Haudegen has joined #ocaml
yoctocell has joined #ocaml
leah2 has quit [Quit: trotz alledem!]
leah2 has joined #ocaml
bartholin has joined #ocaml
nd__ has quit [Ping timeout: 248 seconds]
mosterdt has quit [Quit: A crash reduces my expensive computer to a simple stone.]
mosterdt has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
yoctocell has quit [Ping timeout: 272 seconds]
glassofethanol has joined #ocaml
olle_ has joined #ocaml
nd__ has joined #ocaml
SquidDev0 is now known as SquidDev
olle_ has quit [Ping timeout: 256 seconds]
elf_fortrez has quit [Ping timeout: 246 seconds]
mbuf has quit [Quit: Leaving]
asm has joined #ocaml
asm has quit [Changing host]
kakadu has joined #ocaml
<d_bot>
<octachron> For information, this is called type strengthening (in the compiler and articles on the OCaml's module system).
yoctocell has joined #ocaml
<olle>
0.0
Haudegen has quit [Quit: Bin weg.]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
mro has joined #ocaml
mbuf has joined #ocaml
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
<d_bot>
<carmysilna> Can sedlex be used with menhir instead of ocamllex?
theglass is now known as glass
glass is now known as theglass
Haudegen has joined #ocaml
<d_bot>
<octachron> Yes.
<d_bot>
<carmysilna> cool. unicode support is important imo
mbuf has quit [Quit: Leaving]
<olle>
About separation of concern
<olle>
How many grades of separation are there?
<olle>
Or, degrees.
<Corbin>
In Turing-complete languages, only two; either two chunks of code are isolated from each other, or they can possibly reach each other. Some formulations come with candidate metrics (Wang tiles have distance in the plane, for example) but I'm not sure that the triangle inequality is always satisfied.
<olle>
Corbin: You're assuming it's the same code base :) They can also communicate via HTTP or sockets.
<Corbin>
olle: That's not composition of programs; those concerns are *always* separated.
<olle>
I was thinking also sharing mutable or immutable state. Maybe I talked about this already.
<olle>
Corbin: Well, you can share mutable state by using the same database too.
<Corbin>
Sharing mutable state would be a violation of isolation, and so they would not be separated. Sharing immutable state is an optimization known as "work sharing" and can't be observed.
<olle>
Well, that's why I'm talking about *degrees* of separation. :)
<Corbin>
olle: No, operating across The Network is not composition of programs. Type systems cannot be extended across The Network, because everything is reduced to bytestrings. The CAP and FLP theorems prevent us from relying on messages to return from The Network.
<olle>
The what theorems?
<Corbin>
If this is the same concept that you were talking about in #proglangdesign, then no, there aren't degrees.
<olle>
You ever heard about microservice architecture? :)
<Corbin>
Yeah, I've professionally done k8s. Composition of objects within a k8s cluster is *declarative* and does not actually guarantee the instantiation of containerized processes; the processes themselves are not actually composed, just the k8s representations.
<olle>
For sure there are degrees.
<Corbin>
Chapter 10 of http://www.erights.org/talks/thesis/markm-thesis.pdf starts on p93 and defines isolation as a property of code which is loaded into a process so that it can be executed. The formal statement is daunting, but it's enough to know that the simply-typed lambda calculi are isolated by default.
<Corbin>
In those languages, there's only three ways for code to become connected to other code. We can create subordinate objects, we can be passed new objects as parameters during calls, and we can be born/created with object references already in hand. Those are the only ways.
<Corbin>
(Really all of this should be in #proglangdesign but you've split the conversation across multiple channels.)
<olle>
I like to see what different communities think. Not all OCaml users are there.
Tardigreat[m] has joined #ocaml
neiluj has joined #ocaml
<neiluj>
Hi! Do you know any ocaml project that has set up automatic documentation release with Gitlab CI?
<Fardale>
neiluj: containers does it
<Fardale>
sorry for github
<neiluj>
no problem, thanks, it may not be that much different after all
waleee has quit [Ping timeout: 245 seconds]
<neiluj>
how do you render .mld files with odoc?
<neiluj>
I'd also like to override the main index.html entry point with additional content from an .mld file
waleee has joined #ocaml
neiluj has quit [Ping timeout: 248 seconds]
neiluj has joined #ocaml
Tuplanolla has joined #ocaml
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mattilinnanvuori has joined #ocaml
mattilinnanvuori has quit [Remote host closed the connection]
mro has quit [Quit: Leaving...]
nd__ has quit [Ping timeout: 256 seconds]
<jsoo>
xxxccderrrffv vfffrrttggbyyyyyyyyyhhn
<companion_cube>
yes
<Corbin>
Aw! We love you too, jsoo's cat!
<d_bot>
<Kakadu> It looks like somebody implemented posting the (partial) output of js_of_ocaml compiler to IRC...
glassofethanol has quit [Quit: leaving]
<d_bot>
<Kakadu> Ah, wait, it is not a valid javascript...
olle has quit [Ping timeout: 240 seconds]
nd__ has joined #ocaml
<d_bot>
<Ulugbek> oh, it must be a js-jsoo source map 😛