companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.3.0 released: https://ocaml.org/releases/5.3.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
jessegreathouse has quit [Remote host closed the connection]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 260 seconds]
jessegreathouse has joined #ocaml
mange has joined #ocaml
jessegreathouse has quit [Remote host closed the connection]
wickedshell has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 248 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 250 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 258 seconds]
toastal has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ocaml
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
Frostillicus has joined #ocaml
bartholin has joined #ocaml
Frostillicus has quit [Ping timeout: 258 seconds]
hwj has joined #ocaml
hwj_ has joined #ocaml
_whitelogger has joined #ocaml
toastal has quit [Ping timeout: 258 seconds]
hwj_ is now known as hwj
toastal has joined #ocaml
toastal has left #ocaml [#ocaml]
bartholin has quit [Quit: Leaving]
deavmi has quit [Ping timeout: 245 seconds]
<discocaml> <sim642> What is `Warning 58 [no-cmx-file]: no cmx file was found in path for module Big_int_Z, and its interface was not compiled with -opaque` trying to say? I don't really get it because `big_int_z.cmx` is in `_opam/lib/zarith/`, next to `big_int_z.mli`, etc.
<discocaml> <froyo> I am a great supporter of the production of ice cream. The production of ice cream needs to be expanded as much as possible. I am lobbying for ice cream, because it is a very delicious and nourishing food.
<discocaml> <sim642> And yes, I should just port the code from `Big_int_Z` to `Z`, but I want to understand what's supposedly the issue
<discocaml> <froyo> `Big_int_z`
<discocaml> <froyo> (small z)
<discocaml> <sim642> Hmm no, it's all capital: https://github.com/ocaml/Zarith
<discocaml> <froyo> apologies, I was going by what you wrote
<discocaml> <sim642> I just typoed in the message indeed, the file has it capital actually
<discocaml> <sim642> I would've missed that detail, but that doesn't seem to be the actual reason
Tuplanolla has joined #ocaml
<discocaml> <nojb_77943> what is the command-line that is producing the message?
<discocaml> <sim642> It seems to be this from dune: `(cd _build/default && /home/simmo/dev/goblint/sv-comp/goblint/_opam/bin/ocamlopt.opt -w -40 -g -I src/ext/zrapp/.zrapp.objs/byte -I src/ext/zrapp/.zrapp.objs/native -I /home/simmo/dev/goblint/sv-comp/goblint/_opam/lib/stdlib-shims -I src/.goblintCil.objs/byte -I src/.goblintCil.objs/native -I src/ext/liveness/.liveness.objs/byte -I src/ext/liveness/.liveness.objs/native -intf-suffix .ml -no-alias-deps -open Zrapp
<discocaml> <nojb_77943> what is the command-line that is producing the warning?
<discocaml> <nojb_77943> I don't see the zarith directory listed here...
<discocaml> <nojb_77943> are you compiling with implicit-transitive-deps = false ?
<discocaml> <sim642> Oh indeed, I wasn't even aware of it. I guess that explains why the warning only comes up on one module that's not the one directly even using `Big_int_Z`
<discocaml> <nojb_77943> implicit-transitive-deps = false has some shortcomings in OCaml < 5.2, but should work well in >= 5.2.
<discocaml> <nojb_77943> You may also be interested in `(implicit_transitive_deps false-if-hidden-includes-supported)` introduced in Dune 3.20, see https://dune.readthedocs.io/en/stable/reference/dune-project/implicit_transitive_deps.html.
Frostillicus has joined #ocaml
deavmi has joined #ocaml
Frostillicus has quit [Ping timeout: 244 seconds]
switchy_ has joined #ocaml
switchy has quit [Ping timeout: 248 seconds]
Serpent7776 has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 248 seconds]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 256 seconds]
toastal has joined #ocaml
nemin has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 248 seconds]
myrkraverk has joined #ocaml
<discocaml> <sim642> Ugh, for a while I was confused why also couldn't reproduce the warning, even after `dune clean` and building with dune cache disabled, but then I realized it only happens in release profile
<discocaml> <sim642> Because the normal dev profile has everything with `-opaque`
<discocaml> <nojb_77943> Yes, that's right
myrkraverk_ has quit [Ping timeout: 250 seconds]
<discocaml> <sim642> And then I was surprised why the warning only came up on one module, while there are multiple which work with the library that uses zarith, but none of those modules actually invoke any of the functions, so `Big_int_Z` isn't being linked there
<discocaml> <sim642> It would be neat to have some kind of tool which could tell, why and where a certain module is being linked in. Like, give the source code location for the actual usage
<discocaml> <sim642> It would also be useful for trimming down large binaries. I've used modulectomy to find out what weird modules have been linked in, but it doesn't have a way to easily tell exactly why each one has been included
<discocaml> <sim642> Although maybe this information isn't readily available at that point anymore?
<discocaml> <nojb_77943> Yes, `.cmx` files needed during _compilation_ in order to do cross-module inlining, but this happens relatively late during compilation, when it is no longer so easy to provide location information (and there is no location information readily available for the object being inlined).
<discocaml> <sim642> I suppose some multi-stage lookup maybe could work? To first get the module-level thing at the linking level and then go back to the individual module's compilation to find out where in that module is the usage?
<discocaml> <sim642> But maybe alias deps and other stuff also complicate it
Frostillicus has joined #ocaml
<discocaml> <nojb_77943> Sure, there are things that could be done ... PR welcome! 🙂
Frostillicus has quit [Read error: Connection reset by peer]
Everything has joined #ocaml
<discocaml> <darrenldl> companion_cube: thank you for containers-data, very handy. Needed an immutable trie today.
no-name7 has joined #ocaml
no-name has quit [Ping timeout: 260 seconds]
no-name7 is now known as no-name
marijanp has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 248 seconds]
cedb has quit [Ping timeout: 244 seconds]
ced2 has joined #ocaml
Frostillicus has joined #ocaml
toastal has left #ocaml [#ocaml]
hwj has quit [Ping timeout: 256 seconds]
toastal has joined #ocaml
hwj has joined #ocaml
Frostillicus has quit [Ping timeout: 250 seconds]
itszor has joined #ocaml
zor has quit [Ping timeout: 265 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 250 seconds]
Scarry_Barry has quit [Remote host closed the connection]
Frostillicus has joined #ocaml
gwizon has joined #ocaml
wnh has joined #ocaml
<discocaml> <del.nox> Hi
<companion_cube> good to hear @darrenldl :)
cawfee is now known as pongers
Frostillicus has quit [Ping timeout: 255 seconds]
<discocaml> <vbmithr.> Hi all
<discocaml> <vbmithr.> I have a weird issue when installing ocaml from opam on Archlinux, no matter what I do I can’t install 5.2/5.3 from opam (though it builds fine from the repo)
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<discocaml> <vbmithr.> Mmh actually I got the same result using ocaml repo, make install fails basically
<discocaml> <nojb_77943> Sounds like an issue with Autoconf. What's your Autoconf version ?
<discocaml> <nojb_77943> Do you have the `install` program installed?
toastal has quit [Ping timeout: 252 seconds]
Everything has quit [Read error: Connection reset by peer]
Everything has joined #ocaml
<discocaml> <vbmithr.> 1.18
<discocaml> <vbmithr.> [vb@sita ~/code/ocaml]% which install
<discocaml> <vbmithr.> /sbin/install
<discocaml> <vbmithr.> Yeah it’s regular Archlinux
<discocaml> <nojb_77943> normally if `install` is in your PATH, `./configure` should choose it over the `install-sh` script... so something is amiss somewhere, but hard to say exactly from a distance
<discocaml> <vbmithr.> mmh interesting, thanks.
toastal has joined #ocaml
<discocaml> <vbmithr.> if I do INSTALL=/sbin/install make install it works
<discocaml> <nojb_77943> If the failure is only with OPAM, I suspect that`/sbin` is not being passed in the PATH, due to sandboxing and all that.
hwj has quit [Ping timeout: 256 seconds]
<discocaml> <jacob4466> hey im trying to set up ocaml and i keep running into problems when I try to run "opam init" in the command line. I keep getting the "cygwin setup failed to download" warning and then it fails to find a repository
<discocaml> <yawaramin> hi, try #windows-support
<discocaml> <jacob4466> will do, thanks
<discocaml> <vbmithr.> It is also with normal install from repo
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 250 seconds]
myrkraverk_ has joined #ocaml
Haudegen has joined #ocaml
myrkraverk has quit [Ping timeout: 250 seconds]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 256 seconds]
amadaluzia has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 258 seconds]
bartholin has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
zarakshR has joined #ocaml
hwj has joined #ocaml
wickedshell has quit [Ping timeout: 248 seconds]
Everything has quit [Quit: leaving]
nemin has quit [Quit: zzz]
zarakshR has quit [Quit: zarakshR]
zarakshR has joined #ocaml
bartholin has quit [Quit: Leaving]
zarakshR has quit [Remote host closed the connection]
zarakshR has joined #ocaml
hwj has quit [Ping timeout: 258 seconds]
hwj has joined #ocaml
Serpent7776 has joined #ocaml
zarakshR has quit [Ping timeout: 252 seconds]
zarakshR has joined #ocaml
zarakshR has quit [Ping timeout: 256 seconds]
zarakshR has joined #ocaml
hwj has quit [Ping timeout: 256 seconds]
zarakshR has quit [Ping timeout: 265 seconds]
myrkraverk_ has quit [Ping timeout: 256 seconds]
<gahr> is `type choice = One [@name "one"] | Two [@name "two"] [@@deriving yojson] type obj = { a: string; b: int; c: choice } [@@deriving yojson] let () = Printf.printf "%s\n" (obj_to_yojson { a = "A"; b = 13; c = Two } |> Yojson.Safe.to_string)` expected to produce `{"a":"A","b":13,"c":["two"]}`, where the `c` member is an array?
<gahr> (same w/o the @name thing)
<dh`> that seems somewhat odd
<gahr> ah
<gahr> "Variants (regular and polymorphic) are represented using arrays"
<discocaml> <edhebi> I think I remember this one
<gahr> I wonder why...
<discocaml> <edhebi> iirc you can for some reason fix this by specifically having it be `module Choice = struct type t = ... [@@deriving yojson] end`
<discocaml> <edhebi> don't have a computer to check it tho
<gahr> let me try
<discocaml> <edhebi> (if that doesn't work defining to_yojson by hand also works but kind of sucks)
<gahr> yeah that was the other option
<gahr> nah, nesting in a module doesn't help
<gahr> I'll go with the custom to_yojson function, thanks
<discocaml> <edhebi> you could keep the [@@deriving yojson] and shadow the generated choice_to_yojson with a function that does the unwrapping
zarakshR has joined #ocaml
<discocaml> <edhebi> there's also ppx_deriving_yojson and ppx_yojson_conv which might do different stuff ?
<gahr> I'm using the former
zarakshR has quit [Quit: zarakshR]
zarakshR has joined #ocaml
zarakshR has quit [Remote host closed the connection]
zarakshR has joined #ocaml
LainIwakura has joined #ocaml
LainIwakura has quit [Client Quit]
zarakshR has quit [Ping timeout: 260 seconds]
Serpent7776 has quit [Ping timeout: 256 seconds]
LainIwakura has joined #ocaml
zarakshR has joined #ocaml
zarakshR has quit [Ping timeout: 248 seconds]
Tuplanolla has quit [Quit: Leaving.]
Haudegen has quit [*.net *.split]
toastal has quit [*.net *.split]
LainIwakura has quit [Quit: Client closed]
Haudegen has joined #ocaml
toastal has joined #ocaml
LainIwakura has joined #ocaml
nlocalhost has quit [Read error: Connection reset by peer]
nlocalhost has joined #ocaml
LainIwakura has quit [Ping timeout: 250 seconds]
mange has joined #ocaml
Everything has joined #ocaml
Everything has quit [Quit: leaving]
zarakshR has joined #ocaml