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/
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 276 seconds]
<brettgilio> does anybody know if base and core from JStreet are compatible with multicore?
rgrinberg has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
<companion_cube> probably
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
wilfred has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
isekaijin has quit [Ping timeout: 255 seconds]
isekaijin has joined #ocaml
mbuf has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
gravicappa has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
wilfred has quit [Quit: Connection closed for inactivity]
shawn has quit [Ping timeout: 268 seconds]
favonia has quit [Ping timeout: 255 seconds]
berberman has joined #ocaml
berberman_ has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cedric has joined #ocaml
mro has joined #ocaml
Corbin has quit [Ping timeout: 255 seconds]
eight has joined #ocaml
bartholin has joined #ocaml
<sadiq> at present we test we can build them
<sadiq> but I don't think we're able to run the test suites yet (we don't fail them, I think there's a dependency issue)
Retropikzel has joined #ocaml
Haudegen has joined #ocaml
gravicappa has quit [Ping timeout: 255 seconds]
glassofethanol has joined #ocaml
waleee has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
<d_bot> <SieveR> is there a way to use ocaml-lsp with 4.02?
<d_bot> <SieveR> i mean like an older version of ocaml-lsp or a bit of hacking .
<d_bot> <SieveR> cc/ @rgrinberg (sorry for pinging)
bartholin has joined #ocaml
elf_fortrez has joined #ocaml
Retropikzel has quit [Quit: Leaving]
Retropikzel has joined #ocaml
<d_bot> <octachron> No, merlin and thus the langage server is strongly coupled to the compiler internals. Supporting older versions is not doable with the available workforce.
<d_bot> <octachron> In most cases, it is much simpler to upgrade to a recent version of OCaml.
<d_bot> <octachron> (The oldest version of ocaml-lsp only supports OCaml ≥ 4.06)
wingsorc has quit [Quit: Leaving]
bartholin has quit [Ping timeout: 252 seconds]
Retropikzel has quit [Quit: Leaving]
<d_bot> <mimoo> questions about inline tests. I'd like to separate them from the rest of the code, so what I did is to put any tests in a `module Tests = struct ... end`
<d_bot> <mimoo> I see that there's a `let test%module ...` (https://o1-labs.github.io/ocamlbyexample/build-inline-tests.html) but I'm not sure I understand the point of that?
<d_bot> <mimoo> like what's the difference?
bartholin has joined #ocaml
elf_fortrez has quit [Ping timeout: 246 seconds]
bartholin has quit [Ping timeout: 255 seconds]
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 258 seconds]
bartholin has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
mro has quit [Remote host closed the connection]
<d_bot> <Alistair> Is there a reason that OCaml lacks the ability for finer grained `open`s (imports)?
<d_bot> <anmonteiro> @TheBloodlessMan I don’t think it lacks that ability
<d_bot> <anmonteiro> `Module.(func call args)`
<d_bot> <anmonteiro> Or did you mean exposing just a few of the modules bindings?
<d_bot> <Alistair> Yes
<d_bot> <Alistair> I often find that I'd like to expose the constructors of a specific type in a module and keep most function calls qualified
<theblatt1> you can also define an Import module inside Module that re-exports whatever clients might want to bring in scope
<d_bot> <mimoo> I tried doing `let A = B.A` but I had some problems with that
<theblatt1> you want "module A = B.A"
<d_bot> <Alistair> Yeah, module aliases are useful
<d_bot> <mimoo> I think it doesn't quite work like a `use A::B;` in rust
<d_bot> <mimoo> but I can't remember what issues I was running into
bartholin has quit [Ping timeout: 255 seconds]
<d_bot> <mimoo> I think ocaml needs transparent ascription for this to really work?
<d_bot> <Alistair> But don't always give the desired effect, I was maybe thinking of writing a ppx to solve this (call it `ppx_open` or something) where you could do `[%%open Module.(val1, type1 [@open] , val2 [@as renamed1])]`
<d_bot> <Alistair> which would automatically create aliases for modules, values, types (and something similar to `ppx_import` for open types (types w/ constructors exposed))
mro has joined #ocaml
<theblatt1> the Import module trick is a nice low-tech way of achieving similar results in my opinion
<d_bot> <Alistair> True, but not really great of extensibility, since if the clients needs change then you have to change the import module manually
mro has quit [Ping timeout: 255 seconds]
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
<Armael> can't you do something along the lines of "include (struct let foo = M.foo ... end)"?
<Armael> admittedly that's a bit heavy syntactically
<d_bot> <EduardoRFS> `open type M` seems nice
eight has quit [Ping timeout: 245 seconds]
eight has joined #ocaml
<d_bot> <Alistair> Is that in OCaml? (or is that just a syntax suggestion?)
<Armael> what would `open type M` do
<d_bot> <Alistair> expose the constructors of the type? (although `M` isn't a type name??)
mro has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
mro has quit [Ping timeout: 246 seconds]
<d_bot> <EduardoRFS> Syntax suggestion based on the `open implicit M`
<d_bot> <EduardoRFS> Maybe plural would be better but yeah that's a suggestion only
rgrinberg has joined #ocaml
mro has joined #ocaml
<d_bot> <ggole> You can do this by opening a module that has been constrained with a signature
<d_bot> <ggole> But it is quite clumsy
<d_bot> <Alistair> Yeah, I think I'm going to just make the ppx since there doesn't seem to be an idiomatic solution
<d_bot> <ggole> `include` will actually include the definitions rather than just make them available unqualified, which probably isn't what you want
favonia has joined #ocaml
<d_bot> <Alistair> tbf you can do the same w/ `open`
<d_bot> <ggole> Yes, that's what I just suggested that you can do
<d_bot> <ggole> (Although `open` doesn't allow a constrained module expression or `struct .. end` in the way that `include` does, unless that was added recently)
<d_bot> <Alistair> ```─( 13:16:06 )─< command 6 >────────────────────────────────────────────────────────────────────{ counter: 0 }─
<d_bot> <Alistair> utop # open (struct let foo x = x end : sig val foo : 'a -> 'a end);;
<d_bot> <Alistair> ─( 13:16:09 )─< command 7 >────────────────────────────────────────────────────────────────────{ counter: 0 }─
<d_bot> <Alistair> utop # foo 1;;
<d_bot> <Alistair> - : int = 1```
<d_bot> <Alistair> works pretty nicely
<d_bot> <ggole> That's nice, it was a bit strange that it worked for one and not the other
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
mbuf has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 255 seconds]
gwizon has quit [Ping timeout: 258 seconds]
gwizon has joined #ocaml
mro has joined #ocaml
mro has quit [Client Quit]
gwizon has quit [Ping timeout: 268 seconds]
gwizon has joined #ocaml
gravicappa has joined #ocaml
gwizon has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
glassofethanol has quit [Quit: leaving]
elf_fortrez has joined #ocaml
mbuf has quit [Quit: Leaving]
<d_bot> <darrenldl> am i being silly or is adding `(library_flags src/foo.o)` along with `(foreign_stubs ...)` which produces foo.o the only way to make the symbol accessible for executables using the library?
<d_bot> <darrenldl> (without the library_flags stanza in dune file, executable stops with undefined symobol exception)
waleee has joined #ocaml
bartholin has quit [Quit: Leaving]
rgrinberg has joined #ocaml
gwizon has joined #ocaml
gwizon has quit [Ping timeout: 268 seconds]
Haudegen has quit [Quit: Bin weg.]
toppler has joined #ocaml
elf_fortrez has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheRuralJuror has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
Stumpfenstiel has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
gwizon has joined #ocaml
favonia has joined #ocaml
Stumpfenstiel has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
TheRuralJuror has quit [Ping timeout: 272 seconds]
Stumpfenstiel has joined #ocaml
eight has quit [Quit: leaving]
rgrinberg has joined #ocaml
gwizon has quit [Remote host closed the connection]
ccx has quit [Ping timeout: 272 seconds]
ccx has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
<d_bot> <rgrinberg> What octachron said. We don't have the resources to support more than one version of the compiler at the moment.
Serpent7776 has quit [Quit: leaving]
<dmbaturin> Is there a way to split a functor into multiple files, if function inside it depend on the modules passed as arguments?
<d_bot> <SieveR> thank you octachron & rgrinberg
oriba has joined #ocaml
zebrag has joined #ocaml
<d_bot> <Alistair> Does anyone know roughly how `ppx_import` works, looking at source code atm, but not really seeing how it fits together?
<companion_cube> does it read .cmi files?
zebrag has quit [Ping timeout: 255 seconds]
<d_bot> <EduardoRFS> @TheBloodlessMan looking at .cmi
<d_bot> <EduardoRFS> when you run a staged_pps you have access to the populated environment
zebrag has joined #ocaml
zebrag has quit [Client Quit]
zebrag has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
Stumpfenstiel has quit [Ping timeout: 245 seconds]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Haudegen has quit [Ping timeout: 245 seconds]
favonia has quit [Remote host closed the connection]
favonia has joined #ocaml
waleee has quit [Ping timeout: 246 seconds]
waleee has joined #ocaml