<Guest45>
Hi! I'm debating between using higher-order functions, or use first-order modules for functions like `binary_exp ~mul x n` or `binary_exp (module G: Group) (x : G.t) (n : int) = ... G.mul x x ...` where the latter is nice from the user's perspective as they don't have to explicitly pass the operations they need, and make them comply with the
<Guest45>
signature of mul
<Guest45>
on the other hand, I wonder what is the added cost in terms of performance of passing the module as argument to `binary_exp`, compared to passing a pointer to a function
<Guest45>
with the last option (first-order modules), the nice thing is that I can create functions that return a new module defining a new group at runtime, allowing for the creation of fresh types at runtime (G.t)
Guest45 has quit [Ping timeout: 250 seconds]
<discocaml>
<gooby_clown> I don't think there's anything nice about first class modules from the user's perspective
Anarchos has joined #ocaml
dhil has joined #ocaml
waleee has joined #ocaml
Guest97 has joined #ocaml
<Guest97>
gooby_clown: what makes you think so?
Serpent7776 has quit [Ping timeout: 264 seconds]
<discocaml>
<gooby_clown> Overall cluttered/heavy syntax from what I've seen
<discocaml>
<gooby_clown> And since OCaml doesn't have implicit modules you are still forced to pass *something*
<discocaml>
<gooby_clown> Making that something a first class module doesn't seem to me like it would make anything easier to use, if anything potentially harder
<discocaml>
<gooby_clown> In fact recently Jane Street has exercised its influence to make EIO use first class modules instead of objects, and in my opinion it strictly made the library less comfortable to use, although at the end of the day it's a personal choice
<Guest97>
I see, thanks!
<Anarchos>
first class modules , aren't they tag as experimental features ?
<discocaml>
<deepspacejohn> I don’t think so. Recursive modules are still experimental though.
<discocaml>
<sim642> I don't think recursive modules are experimental either, they've been around for 20 years now
<Guest97>
omg my ocaml library uses a C library that allocates everything in a preallocated stack, that I now have to garbage collect manually...
<Guest97>
i m gonna die
<discocaml>
<octachron> It depends a lot of the meaning of experimental. Neither recursive modules nor first class modules will be ever removed.
<Anarchos>
octachron sure, but they are still in "chapter 8 : language extensions" in the manual
<discocaml>
<octachron> At the same time, no one would hesitate to apply some breaking changes (in corner cases) to make recursive modules fit a good specification.
<discocaml>
<octachron> This section is mostly non-meaningful. It semantic is mostly: changes older than 3.12 that I have yet to convince other maintainers that it is high time to move them to the main part of the manual. (except for recursive modules, values, and effect handlers that are still mostly in flux).
<Anarchos>
makes sense :)
<Anarchos>
why do recursive modules have a non good specification ?
<discocaml>
<octachron> They don't even have a specification, there is still many open question about then.
<octachron>
Typically, there was a change in 5.1 to avoid an issue with classes inside recursive modules.
dnh has joined #ocaml
bibi_ has joined #ocaml
<Anarchos>
yeah strange to see classes so powerful, and use so little
Serpent7776 has joined #ocaml
Guest49 has joined #ocaml
<Guest49>
hi! is there a way to specify the number of iterations for Crowbar tests?
Guest97 has quit [Ping timeout: 250 seconds]
<Guest49>
hmm, actually I need qcheck instead
Guest49 has quit [Ping timeout: 250 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has quit [Ping timeout: 255 seconds]
dnaq has quit [Remote host closed the connection]
dnaq has joined #ocaml
Anarchos has joined #ocaml
dnaq has quit [Remote host closed the connection]
dnaq has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Serpent7776 has quit [Ping timeout: 255 seconds]
bartholin has quit [Quit: Leaving]
troydm has quit [Ping timeout: 240 seconds]
troydm has joined #ocaml
<discocaml>
<darrenldl> Guest49: you can pass a timeout argument to afl-fuzx
<discocaml>
<darrenldl> afl-fuzz
<discocaml>
<darrenldl> but crowbar itself has no control afaict
<discocaml>
<darrenldl> (would be an odd design if program being fuzzed and stop the fuzzer)
wingsorc has quit [Read error: Connection reset by peer]