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/
spip has quit [Quit: Konversation terminated!]
Haudegen has quit [Ping timeout: 248 seconds]
spip has joined #ocaml
trillion_exabyte has quit [Ping timeout: 255 seconds]
theblatte has quit [Ping timeout: 255 seconds]
theblatte has joined #ocaml
trillion_exabyte has joined #ocaml
oriba has quit [Ping timeout: 248 seconds]
spip has quit [Quit: Konversation terminated!]
pieguy128 has quit [Ping timeout: 248 seconds]
chrisz has quit [Ping timeout: 248 seconds]
chrisz has joined #ocaml
mbuf has joined #ocaml
chrisz has quit [Ping timeout: 268 seconds]
chrisz has joined #ocaml
pieguy128 has joined #ocaml
rf has quit [Quit: Leaving]
John_Ivan has quit [Remote host closed the connection]
John_Ivan has joined #ocaml
azimut_ has quit [Ping timeout: 255 seconds]
trev has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
brettgilio has quit [Read error: Connection reset by peer]
bgs has joined #ocaml
Haudegen has joined #ocaml
bgs has quit [Remote host closed the connection]
bartholin has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Serpent7776 has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
olle has joined #ocaml
spip has joined #ocaml
azimut has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<Putonlalla> I have a Dune problem that disappears when I pass `--verbose` to `dune build`. How can I debug this?
<adrien> strace! (that's my default answer)
<Putonlalla> To be more specific, I have `(executable (name main) (modes native) (ocamlopt_flags (:standard -O2 -S)))` in my `dune` file.
Serpent7776 has quit [Ping timeout: 248 seconds]
<Putonlalla> I run `rm -fr _build && dune build && dune exec -- ./main.exe && find . -name '*.s'`, but the intermediate files are not there. Then, I run `rm -fr _build && dune build --verbose && find . -name '*.s'`, and suddenly they are there.
<Putonlalla> I'm trying to copy the intermediate files into the working directory, but it's not happening.
szkl has joined #ocaml
mro has quit [Remote host closed the connection]
<Putonlalla> The stanza `(copy_files (files main.s))` does nothing, whether the file is there or not.
Haudegen has quit [Quit: Bin weg.]
mro has joined #ocaml
rf has joined #ocaml
mro has quit [Remote host closed the connection]
<Putonlalla> Documentation on `install` or `promote` does not help either.
Haudegen has joined #ocaml
mro has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
<octachron> Copying intermediate files to the working directory is kind of opposite to dune philosophy, so I am not sure how well this is supported.
perrierjouet has quit [Quit: WeeChat 3.8]
perrierjouet has joined #ocaml
<Putonlalla> Why does a build tool need to have a philosophy? Anyway, I just want to manually assemble OCaml modules.
<companion_cube> the philosophy is to build something correctly, which is almost impossible to do manually
Serpent7776 has joined #ocaml
waleee has joined #ocaml
<discocaml> <darrenldl> manually assemble ocaml modules sounds curious
mro has quit [Quit: Leaving...]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
<discocaml> <Turambar> Hey
<discocaml> <Turambar> If I have something like this :
<discocaml> <Turambar> ```ocaml
<discocaml> <Turambar> type a = X of int | Y of int
<discocaml> <Turambar> type b = X of int
<discocaml> <Turambar> ```
<discocaml> <Turambar> Is there a way to transform an Y(3) in X(3) with `Obj.magic` or something like that ?
<discocaml> <Turambar> I want to change the type AND to change the variant
<companion_cube> really don't touch Obj.magic
<companion_cube> don't even think of it :p
<adrien> you can transorm Y(3) into maybeX(maybe3) with Obj.magic
<companion_cube> you can turn Y(3) into a segfault! ♥
waleee has quit [Ping timeout: 276 seconds]
<Putonlalla> Are you saying that there is no way to extract compilation artifacts from the `.main.eobjs` directory?
<companion_cube> I mean, you can promote stuff I think?
<Putonlalla> How?
<Putonlalla> I can add `promote (until-clean)` to the `executable` stanza, but that just copies the main executable.
<companion_cube> sure, what else do you want to promote?
<Putonlalla> The files `main.cmi`, `main.cmo`, `main.s` and `main.o`. Actually, also the files `main.mli` and `main.ml`, because they are generated by Coq.
<companion_cube> just don't
<companion_cube> compile them to a library, and install that
h11 has quit [Quit: You have been kicked for being idle]
<Putonlalla> Again, how?
<companion_cube> dune install/opam install? dune takes care of installing anything that's in a library with a public_name
<discocaml> <Turambar> I have a legitimate usecase where transforming a Y(3) into a X(3) is needed : I try to implement this article : <https://dl.acm.org/doi/pdf/10.1145/289423.289452>, which transform a recursive function into cps, then defunctionalize it, and after that use link tree inversion to reuse the space used by the defunctionalization
<companion_cube> that honestly sounds like a bad idea
<companion_cube> should be done directly in the compiler… but that's a lot of work
<discocaml> <octachron> Mutating tags is explicitly not supported: it breaks the GCs assumption.
mbuf has quit [Quit: Leaving]
<theblatte> naughtiness aside, is there a way to mix annotations and let-operators? eg something like let+[@warning "-partial-match"] Some x = Some 8 in ...
Haudegen has quit [Quit: Bin weg.]
bgs has joined #ocaml
<zozozo> @Turambar : you should not use `Obj.magic`, if you sue ti, the compiler is extremely likely to break your program in various and imaginative ways at any point
perrierjouet has quit [Quit: WeeChat 3.8]
perrierjouet has joined #ocaml
motherfsck has joined #ocaml
<discocaml> <sim642> It's not _that_ bad
<discocaml> <sim642> Always fun to have to use gdb to get stack traces because the segfault broke the OCaml runtime
<discocaml> <Hedgineering> does anyone understand mutually recursive types?
<discocaml> <Hedgineering> does anyone understand mutually recursive types? (if so I'd really appreciate it if you could answer my question in #beginners )
bartholin has joined #ocaml
neiluj has joined #ocaml
<neiluj> Hi! what do you think of wrapping exceptions in Result.t?
<neiluj> the idea is to have uniform error handling
<neiluj> I agree that some exceptions are truly unrecoverable so must be kept as exceptions
Haudegen has joined #ocaml
<discocaml> <Kaustubh> does utop not run in concurrent mode?
<discocaml> <Kaustubh> i've been trying to increment an `int ref` value with many concurrent domains but i'm not getting a reduced value, as should be expected due to race conditions.
<discocaml> <Kaustubh> i'm also doing a `Domain.cpu_relax ()` in between the read and the write.
<discocaml> <Kaustubh> does utop not run in concurrent mode by default?
<discocaml> <Kaustubh> i've been trying to increment an `int ref` value with many concurrent domains but i'm not getting a reduced value, as should be expected due to race conditions.
<discocaml> <Kaustubh> i'm also doing a `Domain.cpu_relax ()` in between the read and the write.
rf_ has joined #ocaml
<discocaml> <Kaustubh> monitoring the system activity too, it doesn't seem to create extra threads
<discocaml> <Kaustubh> monitoring the OS activity too, and it doesn't seem to create extra threads
rf has quit [Ping timeout: 255 seconds]
waleee has joined #ocaml
rf_ has quit [Quit: Leaving]
rf has joined #ocaml
Serpent7776 has quit [Ping timeout: 248 seconds]
Tuplanolla has joined #ocaml
Stumpfenstiel has joined #ocaml
alexherbo2 has joined #ocaml
neiluj has quit [Quit: WeeChat 3.6]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
waleee has quit [Ping timeout: 248 seconds]
infinity0 has quit [Remote host closed the connection]
waleee has joined #ocaml
trev has quit [Remote host closed the connection]
infinity0 has joined #ocaml
olle has quit [Ping timeout: 248 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
bgs has quit [Remote host closed the connection]
alexherbo2 has quit [Remote host closed the connection]
Stumpfenstiel has quit [Quit: No Ping reply in 180 seconds.]
Stumpfenstiel has joined #ocaml
Stumpfenstiel has quit [Ping timeout: 276 seconds]
bartholin has quit [Quit: Leaving]