Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
kleisli has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ocaml
dborisog_ has quit [Ping timeout: 256 seconds]
mbuf has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
kleisli has joined #ocaml
chripell has joined #ocaml
interruptinuse has quit [Quit: ZNC - https://znc.in -- bye bye!]
interruptinuse has joined #ocaml
_whitelogger has joined #ocaml
Haudegen has joined #ocaml
vicfred has quit [Quit: Leaving]
dborisog_ has joined #ocaml
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 246 seconds]
olle_ has joined #ocaml
<olle_>
;*
<flux1>
is it easy to have a ppx module in one .ml and use it to compile another .ml with dune? separate directories perhaps needed?
<Leonidas>
flux1: I think so, if you declare a thing as a ppx rewriter then dune should be able to pick it up in another `dune` file.
<octachron>
flux1, it is relatively easy in my experience. You don't even need a separate directory, but it helps to avoid listing target modules explicitly.
<Leonidas>
flux1: yes, I have a ppx_deriver that I use somewhere else on my project without installing.
<Leonidas>
octachron: separate directories are still a good idea to not confuse .merlin files, as such I very much recommend it.
<flux1>
perhaps I'll look into it :). I need to construct SQL queries from fragments and I was thinking of a ppx to enforce that fragments are always composed of string literals or from a blessed module
<flux1>
too bad syntax extensions don't get any private access to anything, so in principle I could just do whatever the syntax extension does and overcome any limitations
<flux1>
but then _in principle_ I could just do `module Db : sig type t val (!) : string -> t end` and just do `Db.(!"INSERT"..)` and that would in practice just be completely fine :).
<flux1>
(and perhaps [%lit "INSERT"] would be a too heavy-weight syntax anyway)
<octachron>
If you need a hard-to-stumble upon accidentally access, one potential option is to use non-parsable indentifier (like ⋄). Then only ppxs can insert this identifier.
<octachron>
Also for more complex foreign fragment, 4.11 has {%lit|INSERT|}.
<flux1>
I would need to implement "both sides" of the identifier use with a PPX then, but I guess that's doable, if not a bit hacky 🤔
<flux1>
(so both definition and usage)
<Leonidas>
oh, TIL {%lit||}
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<flux1>
I guess one reason not to use ppx for such a, well, frivolous benefit would be the potential ppx breakage in future OCaml releases?
<octachron>
A ppx that replace one extension point by an ast build with helper functions should be quite stable
mfp has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
ArthurStrong has joined #ocaml
ofzyh has quit [Ping timeout: 246 seconds]
ofzyh has joined #ocaml
ArthurStrong has quit [Quit: leaving]
nullcone has quit [Quit: Connection closed for inactivity]
ArthurStrong has joined #ocaml
silver has joined #ocaml
Haudegen has joined #ocaml
rain1 has joined #ocaml
<rain1>
hey
<rain1>
is there a math library that has stuff like factorization of polynomials?
<zozozo>
rain1: there is owl ( https://github.com/owlbarn/owl ), but I don't know if it has factorization of polynomials
<rain1>
thanks
<flux1>
pretty nice, I remember having seen that project a long time ago and still seems to be going strong
<flux1>
however, it's bit concerning that the page says it's being maintained by a consulting company https://komposio.com/ :-)
<flux1>
that kind of work might get a boon out of OCaml multicore support in the future
<olle_>
drinking game: drink everytime someone says "multicore" in ocaml community
<flux1>
just because we like to program OCaml don't mean we're all alcoholics :((
<flux1>
;)
<flux1>
but, some part of the mc project is already integrated, IIRC! Just not the tasty bits.
<Leonidas>
hannes: how difficult would it be to extend conduit for unix socket support?
oturtle has quit [Ping timeout: 240 seconds]
oturtle has joined #ocaml
ofzyh has quit [Ping timeout: 258 seconds]
ofzyh has joined #ocaml
<zozozo>
olle_: we'd all die before it's merged, XD
<octachron>
olle, do I need to drink if I use the "OCaml 5" code name ?
<Leonidas>
oh, hold on, it already does!
<olle_>
OCaml 5?
<olle_>
never heard
<hannes>
Leonidas: I've no idea, sorry. I still don't understand conduit too well.
rain1 has left #ocaml [#ocaml]
ofzyh has quit [Ping timeout: 256 seconds]
ofzyh has joined #ocaml
dckc has quit [Ping timeout: 256 seconds]
dckc has joined #ocaml
ArthurStrong has quit [Ping timeout: 265 seconds]
ArthurStrong has joined #ocaml
ofzyh has quit [Ping timeout: 265 seconds]
ofzyh has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
ArthurStrong has quit [Read error: Connection reset by peer]
andreas303 has joined #ocaml
ArthurStrong has joined #ocaml
vicfred has joined #ocaml
waleee-cl has joined #ocaml
<flux1>
it does indeed support it already, as does it support fds and some more exotic sockets
<flux1>
I recently used the fd-feature to implement end-to-end-testing with my server. 1) create and bind a socket on dynamic port 2) pass that socket to the binary 3) you now know the port and you can use that for the rest of the testing
<flux1>
a bit more complicated to implement without that (I guess the binary could do the dynamic binding itself and then write the port to some or, or something, but that's more hackish)
<flux1>
s/to some or/to some file/
<companion_cube>
mbuf: updated ocabot's readme
Anarchos has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
ofzyh has quit [Ping timeout: 256 seconds]
ofzyh has joined #ocaml
bartholin has quit [Quit: Leaving]
ofzyh has quit [Ping timeout: 265 seconds]
ofzyh has joined #ocaml
kleisli has quit [Ping timeout: 264 seconds]
Fardale has joined #ocaml
bartholin has joined #ocaml
olle_ has quit [Ping timeout: 256 seconds]
<mbuf>
companion_cube, thanks!
<companion_cube>
juste be careful not to spam the chan :)
jnavila has joined #ocaml
FreeBirdLjj has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
tane has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
malc_ has joined #ocaml
chripell has quit [Ping timeout: 260 seconds]
nullcone has joined #ocaml
smazga has joined #ocaml
jnavila has quit [Remote host closed the connection]
jnavila has joined #ocaml
Haudegen has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
dborisog_ has quit [Ping timeout: 265 seconds]
mbuf has quit [Quit: Leaving]
smazga has quit [Quit: leaving]
jnavila_ has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
jnavila_ has quit [Client Quit]
Hrundi_V_Bakshi has joined #ocaml
oriba has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
kleisli has joined #ocaml
malc_ has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
inkbottle has quit [Quit: Konversation terminated!]
inkbottle has joined #ocaml
nullcone has joined #ocaml
Hrundi_V_Bakshi has quit [Ping timeout: 240 seconds]
inkbottle has quit [Quit: Konversation terminated!]