aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
aljazmc has quit [Quit: Leaving]
waleee has quit [Ping timeout: 260 seconds]
aljazmc has joined #ocaml
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
aljazmc has quit [Remote host closed the connection]
_whitelogger has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ocaml
cbarrett has quit [Ping timeout: 245 seconds]
cbarrett has joined #ocaml
<discocaml>
<chrisarmstrong> I was wondering about the ml file generation and how taxing that might be on the compiler:
<discocaml>
<chrisarmstrong>
<discocaml>
<chrisarmstrong> * the code is split up into one module per type (and there can be hundreds of types for just one service e.g. EC2)
<discocaml>
<chrisarmstrong> * serialiser/deserialisers are generated for each AWS protocol type (awsjson, awsquery, etc) even though each service typically only uses one
<discocaml>
<chrisarmstrong> I was thinking about the ml file generation and how taxing that might be on the compiler:
<discocaml>
<chrisarmstrong>
<discocaml>
<chrisarmstrong> * the code is split up into one module per type (and there can be hundreds of types for just one service e.g. EC2)
<discocaml>
<chrisarmstrong> * serialiser/deserialisers are generated for each AWS protocol type (awsjson, awsquery, etc) even though each service typically only uses one
<discocaml>
<chrisarmstrong> * sexp deriving is added to all the main types (with ocaml-cfgen i found it was better to just generate the code for them for json serialisation instead of a ppx)
szkl has quit [Quit: Connection closed for inactivity]
chrisz has quit [Ping timeout: 245 seconds]
chrisz has joined #ocaml
spip has quit [Ping timeout: 244 seconds]
azimut has quit [Ping timeout: 240 seconds]
count3rmeasure has joined #ocaml
gwizon has joined #ocaml
aljazmc has joined #ocaml
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
bartholin has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
aljazmc has quit [Changing host]
aljazmc has joined #ocaml
alexherbo2 has joined #ocaml
Tuplanolla has joined #ocaml
aljazmc has quit [Quit: Leaving]
aljazmc has joined #ocaml
MarvelousWololo has quit [Read error: Connection reset by peer]
aljazmc has quit [Quit: Leaving]
aljazmc has joined #ocaml
bartholin has quit [Quit: Leaving]
gareppa has joined #ocaml
azimut has joined #ocaml
aljazmc has quit [Quit: Leaving]
aljazmc has joined #ocaml
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
aljazmc has quit [Remote host closed the connection]
gareppa has quit [Quit: WeeChat 3.8]
<discocaml>
<Et7f3 (@me on reply)> Have you explored using option (like ocaml compiler: flambda, ...) to enable various libraries.
count3rmeasure has quit [Ping timeout: 260 seconds]
<discocaml>
<agarwal1975> Perhaps the main thing is to generate each submodule into its own ml. We are currently putting all the code for each service in one giant values.ml file. That is because the submodules are mutually recursive sometimes. However, that is rare. We should be able to workaround that and avoid the giant Values module. That would also improve the API by removing the extraneous Values name.
Anarchos has joined #ocaml
<discocaml>
<agarwal1975> We tried flambda a little, but didn't evaluate its effects rigorously. We ddin
aljazmc has joined #ocaml
<discocaml>
<agarwal1975> We tried flambda a little to compile awsm, but didn't evaluate its effects rigorously. We haven't tried customizing the installation of ocaml itself.
<discocaml>
<agarwal1975> We tried flambda to compile awsm, but didn't evaluate its effects rigorously. We haven't tried customizing the installation of ocaml itself.
<discocaml>
<chrisarmstrong> Yes the mutually recursive types in a number of AWS sdks are quite annoying and in my experience make it hard to split up, but it is doable I think.
<discocaml>
<Et7f3 (@me on reply)> Ah no I proposed to use the same mechanism. Here you have a base package with compiler configured in a certain ways. And installation of these fake package modify the component installed. This way you have one package with all findlib meta (but you enable only what you need)
<discocaml>
<Et7f3 (@me on reply)> It might reduce maintenance burden because you have to do one PR to update the SDK. and you can expose only a subset of library (with the option)
<discocaml>
<agarwal1975> Oh, so you mean about how to manage a release to opam? I'm not getting it. Are you saying we could release only one opam package?
<discocaml>
<Et7f3 (@me on reply)> here is where the logic is done. It is the same package: ocaml-variant
<discocaml>
<Et7f3 (@me on reply)>
<discocaml>
<Et7f3 (@me on reply)> This package change when other package are present like the various ocaml-options
<discocaml>
<agarwal1975> Got it. Okay, we'll look into this. I'm not sure of the details and what the result on the end user experience is.
Anarchos has quit [Ping timeout: 260 seconds]
<discocaml>
<agarwal1975> FYI, we have a lot of other work to do also. We aim to simplify the usage of different concurrency models. It is still a bit too hardcoded, and we think we can generalize it further.
<discocaml>
<Et7f3 (@me on reply)> publishing multiple independent package is better for end-users (because it avoid recompiling each libs) but is more complex for maintainers (you have to open multiple PR when a bump happen)
<discocaml>
<Et7f3 (@me on reply)>
<discocaml>
<Et7f3 (@me on reply)> Using options on the other hand make it easier to package for you (when a bump happen just publish one package) user might need to recompile it when an option is added. If they have a dune cache it is mostly no-op.
<discocaml>
<Et7f3 (@me on reply)>
<discocaml>
<Et7f3 (@me on reply)> It is fine, I just saw it is one tasks you need to do and I proposed a solution.
<discocaml>
<Et7f3 (@me on reply)> (you can ping me for help with packaging)
<discocaml>
<agarwal1975> Thank you for the suggestion. I'm generally inclined to prioritize end users, but that often means it takes us longer to get things done. ๐
Anarchos has joined #ocaml
<discocaml>
<xavierm02_> Let's say I have a module `Int : sig type t = int (* and a lot of stuff *) end`, and I want to define `Nat : sig type t = private int let of_int_exn : int -> t (* and the same stuff *) end`. This can be done with `module Nat = struct type t = private int let of_int_exn i = assert(i >=0); i include (Int : S) end` with `S = module type of Int with t := private int`, except that this `t := private int` substitution does not work, so
<discocaml>
<._null._> Imagine you have `module Int = struct type t = int let a : t = -1 end` how would you "interpret" this module in `Nat` ?
count3rmeasure has joined #ocaml
<discocaml>
<xavierm02_> I would shadow it after the include
<discocaml>
<xavierm02_> Well for functions, e.g. substract, I would shadow them and add asserts. For a `-1` constant, I'd probably want to remove it, but there isn't one in my use case
<discocaml>
<xavierm02_> The "right" way of doing things would be to have an operation that takes a signature and a set of names, and returns the signature restricted to the set of names, but I don't think that exists, so I'm looking for a workaround.
count3rmeasure has quit [Ping timeout: 260 seconds]
<discocaml>
<octachron> `module Nat : sig type t = private int ... end = Int` is enough.
<discocaml>
<xavierm02_> A priori, I would need `struct include Int let of_int_exn i = assert(i >=0); i end` in place of `Int`. And I still have to write the `...` which is fairly big.
alexherbo2 has quit [Remote host closed the connection]
Anarchos has quit [Ping timeout: 260 seconds]
<discocaml>
<octachron> That's the stable solution. Using `module type of` makes your definition brittle since an update to `Stdlib.Int` may break it.
Solid has joined #ocaml
Solid has left #ocaml [ERC 5.6-git (IRC client for GNU Emacs 30.0.50)]
bartholin has joined #ocaml
count3rmeasure has joined #ocaml
waleee has joined #ocaml
spip has joined #ocaml
gareppa has joined #ocaml
perrierjouet has quit [Quit: WeeChat 4.0.2]
perrierjouet has joined #ocaml
bartholin has quit [Quit: Leaving]
perrierjouet has quit [Client Quit]
gwizon has quit [Quit: Lost terminal]
<discocaml>
<vphantom> I dared upgrade from ocamlformat 0.20 to 0.26 and I'm fighting to try to get what I'm looking for. I got it generally okay except for two very specific annoyances which I can't find mentioned in their GitHub issues or the help page. Do I ask for help in a channel here, the forums or open a ticket which may just be educational?
<discocaml>
<vphantom> I dared upgrade from ocamlformat 0.20 to 0.26 and I'm fighting to try to get what I'm looking for. I got it generally okay except for two very specific annoyances which I can't find mentioned in their GitHub issues or the help page. Do I ask for help in a channel here, the forums or open ~~a ticket~~ an issue which may just be educational?
perrierjouet has joined #ocaml
<discocaml>
<kakadu18> @vphantom you wouldn't know until you try it...
aljazmc has quit [Remote host closed the connection]
<discocaml>
<Et7f3 (@me on reply)> In nix with already have the withSomething pattern. I think esy lack support for installed variable (and default to true)
<discocaml>
<Et7f3 (@me on reply)> Any other package managers I forgot ?