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/
glassofethanol has quit [Ping timeout: 252 seconds]
vicfred has quit [Quit: Leaving]
waleee has quit [Ping timeout: 240 seconds]
Tuplanolla has quit [Quit: Leaving.]
zebrag has quit [Quit: Konversation terminated!]
wilfred has joined #ocaml
mbuf has joined #ocaml
aquijoule_ has joined #ocaml
aquijoule__ has quit [Ping timeout: 258 seconds]
gravicappa has joined #ocaml
mbuf has quit [Ping timeout: 246 seconds]
mbuf has joined #ocaml
wilfred has quit [Quit: Connection closed for inactivity]
mbuf has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
shawnw has joined #ocaml
mikess has left #ocaml [#ocaml]
mro has joined #ocaml
insep has joined #ocaml
<insep> hi, i have a question related to dune, is it possible to build just dune-configurator and install only it?
Serpent7776 has joined #ocaml
<d_bot> <rgrinberg> I don't see how that's possible. You need dune to build dune-configurator
domq has joined #ocaml
domq has quit [Client Quit]
<insep> i already have dune, i just want to build dune-configurator separately from anything else, currently i have `dune build @install -p dune-configurator; dune install --destdir="/"`, but that second command complains about missing <package>.install for everything
<d_bot> <rgrinberg> You can do `dune install dune-configurator --destdir="/"`
<insep> that worked, thx!!!!
olle has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Haudegen has joined #ocaml
olle has quit [Ping timeout: 258 seconds]
glassofethanol has joined #ocaml
glassofethanol has quit [Client Quit]
glassofethanol has joined #ocaml
unyu has joined #ocaml
glassofethanol has quit [Quit: leaving]
vizard has joined #ocaml
glassofethanol has joined #ocaml
dhil has joined #ocaml
aquijoule_ has quit [Quit: Leaving]
aquijoule_ has joined #ocaml
Tuplanolla has joined #ocaml
yoctocell has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bartholin has joined #ocaml
mro has quit [Ping timeout: 265 seconds]
mro has joined #ocaml
olle has joined #ocaml
waleee has joined #ocaml
marinelli[m] has quit [Quit: Bridge terminating on SIGTERM]
labor[m] has joined #ocaml
fluxm has joined #ocaml
krnkktz has joined #ocaml
inkbottle[m] has joined #ocaml
schube[m] has joined #ocaml
smondet[m] has joined #ocaml
radiopotin[m] has joined #ocaml
Sumera[m] has joined #ocaml
marinelli[m] has joined #ocaml
mro has quit [Remote host closed the connection]
mbuf has quit [Ping timeout: 244 seconds]
mbuf has joined #ocaml
mbuf has quit [Ping timeout: 250 seconds]
mbuf has joined #ocaml
gravicappa has quit [Ping timeout: 244 seconds]
mro has joined #ocaml
mro has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 265 seconds]
gravicappa has joined #ocaml
zebrag has joined #ocaml
mro has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
mro has quit [Ping timeout: 244 seconds]
mbuf has quit [Quit: Leaving]
minwuekim has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
mro has joined #ocaml
minwuekim has joined #ocaml
mbuf has joined #ocaml
jinsun has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jinsun has joined #ocaml
<d_bot> <Cyclomatic Complexity> because it is impossible to google for symbols, i have to ask here instead
<d_bot> <Cyclomatic Complexity> how do you redefine custom array operators? like, I'd like to define `[|| woo ||]`, or even just overload `[| |]`
<d_bot> <Cyclomatic Complexity> i have found custom indexing operators, but i'm interested in custom array constructors
<d_bot> <ggole> `[||]` is implemented directly afaik
<d_bot> <Cyclomatic Complexity> i think i saw custom constructors
<d_bot> <Cyclomatic Complexity> must have been ~~the wind~~ a ppx / just misremembering custom indexing ops
<d_bot> <ggole> The closest thing is redefining the constructors that list literals are desugared into
<d_bot> <ggole> But those are datatype constructors, which are quite different from the array literal
<d_bot> <ggole> There was a custom literal thing as well, but that isn't standard
<d_bot> <octachron> Another issue is that `[| |]` is not an ordinary function, contrarily to `Array.get` (`.()`) and `Array.set` (`.()<-`).
ralu has quit [Quit: The Lounge - https://thelounge.chat]
ralu has joined #ocaml
mro has quit [Remote host closed the connection]
dhil has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
yomimono has joined #ocaml
mro has quit [Remote host closed the connection]
yoctocell has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 244 seconds]
Haudegen has quit [Quit: Bin weg.]
waleee has joined #ocaml
glassofethanol has quit [Quit: leaving]
bartholin has quit [Quit: Leaving]
mro has joined #ocaml
mro has quit [Ping timeout: 268 seconds]
vicfred has joined #ocaml
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
<d_bot> <Alistair> Is it possible to have changes in the `.ml` file be automatically reflected in the `.mli` file. e.g. type definitions / module type definitions
<dmbaturin> Alistair: ocamlc -i prints module interface, though it can't merge and update.
<d_bot> <Alistair> Also is there a library function to map on `Result.t` errors? e.g. `emap : ('a, 'e) t -> f:('e -> 'f) -> ('a, 'f) t`?
<companion_cube> in which library? :p
<d_bot> <Alistair> Base
<companion_cube> oh, surely. idk base.
<dmbaturin> Result.map is in stdlib.
<companion_cube> but this is map_err
<d_bot> <Alistair> Found it, `Result.map_error`
<dmbaturin> Yes, sorry. map_error
<d_bot> <roddy> @TheBloodlessMan Unfortunately no, the standard way of dealing with painful amounts of duplication is the intf trick https://www.craigfe.io/posts/the-intf-trick
<dmbaturin> I arguably should be sleeping now, but I'm not.
<companion_cube> the intf trick ♥
<dmbaturin> GOod reminder, I need to do that in the TOML lib.
mro has joined #ocaml
<d_bot> <Alistair> Can you inherit type constructors in ocaml? I guess polymorphic variants sort of do this, but I was wondering if there are any other ways. Context: I have a `Solver.error` type, which my `Infer` module is currently wrapping around w/ `SolverError of Solver.error` constructor, but kinda adds another level of pattern matching, so I was wondering whether `Infer.error` could extend `Solver.error`?
mro has quit [Quit: Leaving...]
<dmbaturin> There are extensible (open) sum types, but there's no inheritance there. If you want inheritance, you may need to resort to... objects. :)
<d_bot> <Alistair> oh no, not objects 😟
<dmbaturin> Nothing wrong with objects.
<jyc> objects are kind of nifty in OCaml, row polymorphism is pretty useful
<dmbaturin> I'm sometimes seriously thinking of writing an parallel universe standard library with objects. ;)
<companion_cube> the biggest issue for me, with objects, is that merlin is not too good on them
<dmbaturin> Hhm, but it _can_ be made to be good with it?
<Fardale> merlin is not good with object because nobody use object, or nobody use object because merlin is not good with it?
<jyc> is merlin recommended over ocaml-lsp? I last used OCaml "seriously" before ocaml-lsp came out
<companion_cube> oh I mean, same thing
<companion_cube> ocamllsp is merlin + lsp more or less :D
<companion_cube> afaik
<jyc> oh haha
<jyc> thanks
<companion_cube> Fardale: no idea :p
Nahra` has quit [Remote host closed the connection]
<d_bot> <monk> are row types in ocaml predicated on using its class system or can you get away with just using ocaml objects for it
<d_bot> <monk> row polymorphism*
<companion_cube> it only works with objects I think
<companion_cube> (and poly variants)
<d_bot> <monk> coolio
olle has quit [Ping timeout: 265 seconds]
<d_bot> <monk> i have nothing against Objects generally, it's subtyping by way of class inheritance where i get angry
<d_bot> <Alistair> Is there a reason to the following? I understood that `private` just ensures that a value of the type couldn't be constructed outside the module? ```
<d_bot> <Alistair> utop # type basic = private [ `Black | `Red ];;
<d_bot> <Alistair> type basic = private [ `Black | `Red ]
<d_bot> <Alistair>
<d_bot> <Alistair> utop # type foo = private [ basic | `Green ];;
<d_bot> <Alistair> Line 1, characters 21-26:
<d_bot> <Alistair> Error: The type basic does not expand to a polymorphic variant type```
<companion_cube> @monk: subtyping is not correlated to inheritance in OCaml :)
<companion_cube> and you cn use `object … end` expressions without any class, if you so wish
<d_bot> <monk> terminology bites me once again
<companion_cube> @Alistair: not sure what `private` on poly variants is useful for
<d_bot> <Alistair> Excellent point 🤦‍♂️
<companion_cube> without `private` it works pretty well :p
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
gareppa has joined #ocaml
Haudegen has joined #ocaml
gareppa has quit [Remote host closed the connection]
<d_bot> <octachron> @TheBloodlessMan : a private abbreviation creates a new type that is a subtype of the abbreviated type. Thus the issue with inlining the type definition in a polymorphic type expression.
Stumpfenstiel has joined #ocaml
gravicappa has quit [Ping timeout: 250 seconds]
aquijoule_ has quit [Quit: Leaving]
aquijoule_ has joined #ocaml
aquijoule_ is now known as richbridger
bastienleonard has joined #ocaml
richbridger has quit [Remote host closed the connection]
richbridger has joined #ocaml
Chouhartem has quit [Quit: WeeChat 3.1]
Chouhartem has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
vizard has quit [Ping timeout: 252 seconds]
Serpent7776 has quit [Quit: leaving]
cedric has quit [Quit: Konversation terminated!]
insep has quit [Ping timeout: 244 seconds]
bastienleonard has quit [Quit: WeeChat 3.2]
zebrag_ has joined #ocaml
zebrag has quit [Ping timeout: 250 seconds]