companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Ping timeout: 255 seconds]
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dh` has quit [Ping timeout: 255 seconds]
waleee has quit [Ping timeout: 240 seconds]
wingsorc has quit [Ping timeout: 258 seconds]
chrisz has quit [Ping timeout: 245 seconds]
chrisz has joined #ocaml
CO2 has quit [Quit: WeeChat 4.1.0]
average has joined #ocaml
kitzman has quit [Ping timeout: 264 seconds]
kitzman has joined #ocaml
random-jellyfish has joined #ocaml
random-jellyfish has quit [Changing host]
random-jellyfish has joined #ocaml
<greenbagels> ok i resolved my earlier project design issue but now i have another dune question
<greenbagels> say i have two modules src/a.ml and src/b.ml and dune is configured to collect every module in src/ into a library
<greenbagels> is there any way to have code in src/b.ml depend on functions in src/a.ml?
aljazmc has joined #ocaml
<discocaml> <andreypopp> Just refer to functions in a.ml via A module, dune should figure out dependencies automatically
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
<greenbagels> ah, thanks for the tip! it made me re-check my code and realize i was just typoing the module name :p
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
TrillionEuroNote has quit [Ping timeout: 245 seconds]
TrillionEuroNote has joined #ocaml
TrillionEuroNote has quit [Ping timeout: 248 seconds]
TrillionEuroNote has joined #ocaml
<discocaml> <andreypopp> so some time ago I was asking if there's a simplified deriving framework, I have this now https://github.com/andreypopp/react_of_ocaml/blob/main/ppx_deriving_schema/ppx_deriving_schema.mli
<discocaml> <andreypopp> was able to build deriving yojson in under 200LoC, same for deriving melange json https://github.com/andreypopp/react_of_ocaml/blob/main/ppx_deriving_json/ppx_deriving_yojson.ml
<discocaml> <andreypopp> it does have some assumptions like having same repr for variants and polyvariants but overall it reduces boilerplate quite a lot
CO2 has joined #ocaml
<discocaml> <fabric.input_output> hello, why do I get this error ```
<discocaml> <fabric.input_output> 1. Unbound value sexp_of_data
<discocaml> <fabric.input_output> Hint: Did you mean sexp_of_mat?
<discocaml> <fabric.input_output> ```
<discocaml> <fabric.input_output> in this part of the inline test: ```ocaml
<discocaml> <fabric.input_output> [%test_eq: data] foo bar
<discocaml> <fabric.input_output> ```
<discocaml> <fabric.input_output> it erroring about `data`, which is a type I have defined just above the test. I can do `[@@deriving eq]` on the type but I can't seem to be able to do `[@@deriving sexp]`, which is probably the solution.
bartholin has quit [Ping timeout: 264 seconds]
<discocaml> <fabric.input_output> I managed to do `[@@deriving sexp]` but it still errors
bartholin has joined #ocaml
<discocaml> <ambersaber> hello
<discocaml> <ambersaber> i love ocaml language
wingsorc has joined #ocaml
waleee has joined #ocaml
dnh has joined #ocaml
yoyofreeman has joined #ocaml
waleee has quit [Ping timeout: 255 seconds]
Anarchos has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
average has joined #ocaml
patrick__ is now known as patrick
Anarchos has quit [Quit: Vision[]: i've been blurred!]
random-jellyfish has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
_whitelogger has joined #ocaml
dhil has joined #ocaml
dh` has joined #ocaml
dh` has quit [Changing host]
dh` has joined #ocaml
<src> is there a way to suppress creation of auxiliary files .cmx .cmi .o when using ocamlopt
<src> I find no such flag in the man page and keep writing one off little puzzle solvers where I need only the executable
waleee has quit [Ping timeout: 246 seconds]
<octachron> .cmx, .cmi and .o are a necessary part of the compilation process.
<discocaml> <Kali> if you really don't want them, then execute it with ocaml instead of ocamlc/opt
<discocaml> <Kali> which will certainly be slower, but it doesn't produce those files
<discocaml> <Kali> or you can just remove the files after they're made
waleee has joined #ocaml
Serpent7776 has joined #ocaml
random-jellyfish has joined #ocaml
random-jellyfish has quit [Changing host]
random-jellyfish has joined #ocaml
aljazmc has quit [Quit: Leaving]
<discocaml> <ds_trop_cringe> @orangecatjunior come in vocal
random-jellyfish has quit [Ping timeout: 264 seconds]
bartholin has quit [Ping timeout: 245 seconds]
bartholin has joined #ocaml
<dh`> src: just write a makefile that leaves them in a subdir
<companion_cube> use dune and it'll all be only in _build
waleee has quit [Ping timeout: 248 seconds]
waleee has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Ping timeout: 264 seconds]
average has quit [Quit: Connection closed for inactivity]
<greenbagels> are there general principles for when to use vs avoid closures
<greenbagels> performance implications? code cleanliness? etc
<companion_cube> I'm not sure what the rule would be :)
<companion_cube> use closures when it makes sense
bartholin has quit [Quit: Leaving]
waleee has quit [Ping timeout: 255 seconds]
waleee has joined #ocaml
<discocaml> <deepspacejohn> Yeah I’m not aware of any special reasons to use/avoid closures in general. For performance, it probably depends on what how alternative code for your use case performs.
Tuplanolla has quit [Quit: Leaving.]