companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
<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> CAP is a two-out-of-three statement about service availability: https://en.wikipedia.org/wiki/CAP_theorem FLP is the formal version of the Two Generals problem: https://www.the-paper-trail.org/post/2008-08-13-a-brief-tour-of-flp-impossibility/
<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 😛
<neiluj> is it possible to chop some prefix modules?
nd__ has quit [Ping timeout: 268 seconds]
abrenon has joined #ocaml
<abrenon> hello
<neiluj> o/
<abrenon> I just tried to send a mail to platform@lists.ocaml.org as advised by https://opam.ocaml.org/doc/FAQ.html and got a permanent error
<abrenon> has the list recently moved ?
Haudegen has quit [Quit: Bin weg.]
mattil has quit [Read error: Connection reset by peer]
<abrenon> or are special permissions required to be able to post maybe ?
nd__ has joined #ocaml
mattil has joined #ocaml
<abrenon> could anyone suggest another way to discuss a general query about opam ?
<companion_cube> on discuss I imagine
<abrenon> ok thanks, I'll create an account then
<hannes> on discuss, or in the github.com/ocaml/opam issue tracker
<abrenon> but does this mean the mailing list has been abandoned ? I didn't receive any message since I signed up last week
<abrenon> github won't do, sorry
<hannes> you may as well ask that on discuss or on the issue tracker -- i guess opam development team does not read irc (or is on vacation)
Anarchos has joined #ocaml
<abrenon> thank you for your answers !
<abrenon> I'll try discuss
<Anarchos> what is the status of dypgen ?
<companion_cube> same as last time, Anarchos
<companion_cube> you're the only one to care
<Anarchos> companion_cube what a shame, it is a wonderful tool !
<Anarchos> landmarks seems abandoned too
abrenon has left #ocaml [WeeChat 3.2]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
kakadu has quit [Quit: Konversation terminated!]
<neiluj> companion_cube, hi, trying to understand how you generate the index page for the containers library: https://github.com/c-cube/ocaml-containers/tree/master/doc
<neiluj> do you call build-deps.ml to copy the txt file in the final generated documentation?
<companion_cube> this is dead code I think 😅
<companion_cube> the list of modules is done by odoc
<neiluj> ah right
malc has joined #ocaml
<neiluj> trying to figure out how to add some .mld files in the generated odoc docs
<neiluj> any tip welcome :)
<companion_cube> not sure I ever got that to work :s
<neiluj> seems like odoc uses this: https://github.com/ocaml/odoc/blob/master/doc/dune
<neiluj> not sure if it's relevant though
<companion_cube> wonder what version of dune this requires
<neiluj> oh yeah, it doesn't work, with dune 2.9.0, at least
Haudegen has joined #ocaml
olle has joined #ocaml
<neiluj> huh my bad, it works!
<neiluj> damn it's soo cool
<malc> dune - Timeo Danaos et dona ferentes
<companion_cube> ah cool neiluj
<companion_cube> the problem is how to link to it, now :D
<neiluj> oh it works out of the box
<companion_cube> I mean, if you add pages
<companion_cube> you need to link to them somehow
<companion_cube> and I don't want to destroy the automatically generated intro.html :/
<neiluj> the mld are automatically translated to html
<neiluj> I just need to upload these html files to gitlab pages
<neiluj> heck, even index.ml replaces the index.html
<neiluj> *.mld
<companion_cube> yes but then you can't generte the list of modules
<companion_cube> because there is no odoc command for it..
<neiluj> indeed...
malc has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
olle has quit [Ping timeout: 258 seconds]
gravicappa has quit [Ping timeout: 245 seconds]
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
Anarchos has joined #ocaml
neiluj has quit [Read error: Connection reset by peer]
neiluj has joined #ocaml
mattil has quit [Quit: Leaving]
yoctocell has quit [Ping timeout: 248 seconds]
average has quit [Quit: Connection closed for inactivity]
zebrag has joined #ocaml
zebrag has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
neiluj has quit [Quit: Leaving]
olle has joined #ocaml
olle has quit [Ping timeout: 248 seconds]
Tuplanolla has quit [Quit: Leaving.]
zebrag has joined #ocaml
wingsorc__ has joined #ocaml
wingsorc has quit [Read error: Connection reset by peer]
bartholin has quit [Quit: Leaving]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
Haudegen has quit [Ping timeout: 258 seconds]
average has joined #ocaml