<discocaml>
<ape_logic> I use nix-overlays, I couldn't really grok how opam-nix works
<discocaml>
<ape_logic> I use the nix-ocaml one, I couldn't really grok how opam-nix works
<discocaml>
<ape_logic> maybe I should try it again now I understand OCaml more
<discocaml>
<ape_logic> oh, it looks like it doesn't have any substituters.. so that's a big +1 to nix-ocaml, they're all precompiled
haesbaert has joined #ocaml
mange has joined #ocaml
<discocaml>
<darrenldl> anyone using sqlite3 or caqti package? wondering about quality, ease of use etc
<companion_cube>
sqlite3 is excellent but it's low level bindings
<discocaml>
<yawaramin> various OCamlers have their favourite wrappers for it, i have one called fun-sql
<companion_cube>
I have one called sqlite3_utils :)
ygrek has joined #ocaml
agentcasey has joined #ocaml
zenmov has joined #ocaml
mbuf has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
ygrek has quit [Remote host closed the connection]
mange has quit [Quit: Quittin' time!]
domq has joined #ocaml
domq has quit [Client Quit]
patrick_ is now known as patrick
patrick has quit [Changing host]
patrick_ has joined #ocaml
bartholin has joined #ocaml
Haudegen has joined #ocaml
olle has joined #ocaml
deavmi has quit [Ping timeout: 252 seconds]
<discocaml>
<xavierm02_> ddddd: I don't really understand it either, but pasting the flake.nix (and changing the package name in it) in a project that has an opam file is enough to get a working `nix develop` (unless there are native dependencies, but even then you just need to list them at the right place in the flake.nix), which I find pretty convenient
deavmi has joined #ocaml
<discocaml>
<xavierm02_> With nic-ovaml/nix-overlays, you have to explicitly list all dependencies in the flake.nix, don't you?
bartholin has quit [Quit: Leaving]
YuGiOhJCJ has joined #ocaml
<discocaml>
<ape_logic> yup, they are overlaid into pkgs.ocaml-ng
mbuf has quit [Ping timeout: 245 seconds]
<discocaml>
<xavierm02_> Is there some way to automatically erase fields of type unit, i.e. have `Obj.size (Obj.repr {a = 1; b = ()})` be `1` instead of `2`?
<discocaml>
<octachron> No that would be unsound.
<discocaml>
<octachron> You don't want to have a crash for `type 'a t = { a: int; b:'a } let b r = r.b let () = b { a=0; b = () }`.
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Haudegen has quit [Quit: Bin weg.]
<discocaml>
<xavierm02_> octachron: I forgot to specify the type but I meant `type t = { a: int; b: unit }`, and I think it'd be sound to replace all `r.b` (where `r : t`) by `let _ = r in ()`.
<discocaml>
<octachron> Then you are probably generating the type, and you can automatically not generate the field.
<discocaml>
<xavierm02_> Hm. In my use case they'd be generated by a functor. Where can I find information on the runtime representation of functors?
<discocaml>
<octachron> There is also the issue that this still unsound with respect to type abstraction: `M:sig type t type r = { x: t; y:t } end = struct type t = unit ... end`.
<discocaml>
<octachron> Functors are just functions at runtime.
<discocaml>
<xavierm02_> Polymorphic functions, so they run into your previous crash example?
<discocaml>
<octachron> And changing the shape of type depending on functor argument would be unsound.
<discocaml>
<octachron> There is no types at runtime.
<discocaml>
<xavierm02_> Yes, I mean that all instances use the same generated code like for polymorphic functions, as opposed to if you monomorphise and duplicate the code for each instance
<discocaml>
<xavierm02_> Anyway, I got the answer to my initial question: not currently possible. Thanks!
Anarchos has quit [Quit: Vision[]: i've been blurred!]
olle has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
Haudegen has joined #ocaml
troydm has joined #ocaml
bartholin has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 252 seconds]
<discocaml>
<mbacarella> so, what's the legacy of lightweight higher-kinded polymorphism? yallop and white freed us from the tyranny of functors but it seems like it wasn't really taken up?
<discocaml>
<mbacarella> seems like... people actually alike functors?
<discocaml>
<mbacarella> seems like... people actually like functors?
<discocaml>
<octachron> The lightweight higher-kinded article presents a hack that is not supposed to be used in practical settings.
<discocaml>
<octachron> The non-hackish version is modular explicit/path dependent function/lightweight functor which has a review in progress.
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
<discocaml>
<hannes6838> that's a bit too general... from my perspective there are some OCaml developers who're very keen on functors... and 90% who are not... I personally try to remove functors when I see them
<discocaml>
<barconstruction> "That claim is a bit too general" (immediately makes a bold sweeping claim in the opposite direction)
<companion_cube>
I'd agree, I mostly avoid functors
<discocaml>
<barconstruction> "90% of OCaml programmers dislike the feature that most distinguishes the language from every other major programming language." is plausible but it raises follow up questions. Sounds a bit like "90% of Go developers dislike goroutines" - why are you using Go?
Anarchos has joined #ocaml
f[x] has quit [Remote host closed the connection]
<dh`>
I don't think it's reasonable to claim that ocaml is so much more major than sml that sml can be ignored
<discocaml>
<hannes6838> you're right, that claim of 90% was not very wise. thanks for your comment.
<dh`>
also, asking whether coq is major will probably just start an argument but it does also have functors
<discocaml>
<hannes6838> and there are various fine uses of functors where I'm happy OCaml has them 😄
Everything has joined #ocaml
<discocaml>
<mbacarella> I consider myself a functor enjoyer
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<dh`>
functors have definite value when writing something highly virtualized/parameterized, but it's extremely annoying to need to lay down functors every time you need an abstract type
Anarchos has joined #ocaml
bartholin has quit [Quit: Leaving]
<discocaml>
<._null._> dh`: Coq's functors are very rarely used as far as I'm aware, and very badly understood as per the people who implemented them
<dh`>
maybe so but they're all over the stdlib
zenes has joined #ocaml
Stumpfenstiel has joined #ocaml
Stumpfenstiel has quit [Changing host]
Stumpfenstiel has joined #ocaml
<discocaml>
<ape_logic> is a functor basically a thing that generates a module by filling in some abstract types to concrete?
<discocaml>
<ape_logic> is a functor basically a thing that generates a module by filling in some abstract types in another module to concrete?
<Anarchos>
ape_logic it takes a module and returns a module.
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml>
<ape_logic> right so a parameterised module
<discocaml>
<ape_logic> oh wait it TAKES a module too
<discocaml>
<ape_logic> hmm
zenes has quit [Quit: zenes]
<discocaml>
<Kali> a functor is a module level function, essentially