<d_bot>
<rgrinberg> i'm pretty sure the information to answer the question "is symbol x exported in the mli?" is present somewhere.
<d_bot>
<rgrinberg> Otherwise how would unused X warnings work?
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Quit: WeeChat 3.3]
<companion_cube>
it's from the .cmi, isn't it?
<sparogy>
hey all, I'm doing advent of code this year in ocaml to finally learn a statically typed functional langauge
rgrinberg has joined #ocaml
<sparogy>
it's not my first functional language though, so I'm not struggling too much for concepts at the moment, but I do love how the type system corrects me
<sparogy>
are there any recommendations for ocaml specific features I should try to use? I am used to elixir and lisp for functional stuff, and whatever you call functional JS these days
<companion_cube>
not particularly, just know that |> exists :)
<rgrinberg>
companion_cube I dont think the cmi saves the where the corresponding values/types are in the implementation though.
<rgrinberg>
but the information is bound to be computed as part of compilation
<companion_cube>
well, when you compile the .ml, you can warn for values that are not 1. used in the rest of the .ml 2. not exported in .cmi
<sparogy>
companion_cube: I am familiar with it, but due to currying it works very differently from elixir ^_^
<sparogy>
which was a fun learning experience
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
namkeleser has quit [Quit: Client closed]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zebrag has quit [Quit: Konversation terminated!]
shawnw has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
gravicappa has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
Serpent7776 has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
salkin has joined #ocaml
andreypopp has quit [Ping timeout: 256 seconds]
olle_ has joined #ocaml
andreypopp has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
If i modify the configure.ac from ocaml source code, do i just need to launch autoconf and submit the new 'configure' or do i need to modify the configure by hand too ? It added a whole paragraph about 'git' at the start of my configure
<d_bot>
<octachron> @Ulugbek :
<d_bot>
<octachron> 2. No, the unused warning message is the closest approximation, and it is done at the end of typechecking of an implementation file using internal state from the typechecker
<d_bot>
<octachron> 1. Neither. However, starting from 4.14/5.0 the cmt files will contain shape information that tracks the uid of exported items in implementation file.
<octachron>
Anarchos, generally it is better to use `make -B configure` to avoid caching issues
olle_ has quit [Ping timeout: 256 seconds]
<Anarchos>
octachron the -B rebuilds all the configure files ?
<octachron>
Yes, and the autogen cache which is(was?) sometimes annoying
bartholin has joined #ocaml
SdeSousa has joined #ocaml
<Anarchos>
octachron make -B doesn't seem to rebuild configure .
<octachron>
Did you forget the "configure" at the end of "make -B configure"?
<Anarchos>
octachron yes my sorry
Haudegen has quit [Remote host closed the connection]
Haudegen has joined #ocaml
SdeSousa has quit [Quit: Client closed]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
Anarchos has quit [Ping timeout: 256 seconds]
mro has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
namkeleser has joined #ocaml
shawnw has quit [Read error: Connection reset by peer]
shawnw has joined #ocaml
mro has joined #ocaml
olle_ has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Anarchos has joined #ocaml
mro has quit [Quit: Leaving...]
Haudegen has quit [Quit: Bin weg.]
Anarchos has quit [Remote host closed the connection]
Anarchos has joined #ocaml
<d_bot>
<Lupus> running into a weird issue when installing ctypes.0.19.1, it fails with "ocamlfind: Package `threads' not found"
<d_bot>
<Lupus> ocamlfind: Package `threads' not found
<d_bot>
<Lupus> ```
<d_bot>
<octachron> So you are either picking the wrong ocamlfind (`which ocamlfind` should resolve to an opam-controled directory), or possibly have a too old version of ocamlfind.
<d_bot>
<Lupus> some weird thing happening in CI, I can't reproduce it locally for some reason...
<d_bot>
<Lupus> ocamlfind 1.9.1
shawnw has quit [Ping timeout: 256 seconds]
<d_bot>
<Lupus> wow, easy repro, run `ocaml/opam:debian-11-ocaml-4.11` in docker and try to install ctypes there with `opam install ctypes`
<d_bot>
<octachron> This is unrelated to ctypes since the error happens with just `ocamlfind query threads`?
shawnw has joined #ocaml
zebrag has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<d_bot>
<cemerick> I wonder if someone can point me to a more verbose explanation of why out-of-order (higher order) function applications can't be type-inferred? (As glossed @ https://ocaml.org/manual/lablexamples.html#s%3Alabel-inference). The two relevant papers AFAICT (Garrigue 2001 and Furuse & Garrigue 1995) don't particularly explain it either, and I don't have enough mana to decode the proofs 😛
<d_bot>
<cemerick> Or, put another way, if the inference mechanism has incorrect call-by-value semantics for out-of-order labeled applications, I don't understand why it would do any better for in-order applications
<d_bot>
<octachron> I am not sure what you mean since the type of labeled function arguments is inferred?
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<d_bot>
<cemerick> I'm referring to the first inference caveat shown in that section, viz. that `((fun f -> f ~x:1 ~y:2) (fun ~x ~y -> x + y))` is well-typed but `((fun f -> f ~y:2 ~x:1) (fun ~x ~y -> x + y))` is not
<d_bot>
<Lupus> ```
<d_bot>
<Lupus> docker run --rm -ti ocaml/opam:debian-11-ocaml-4.11 sh -c 'opam install ocamlfind && ocamlfind query threads'
<d_bot>
<Lupus> ```
<d_bot>
<Lupus> does not work either
<d_bot>
<Lupus> "ocamlfind: Package `threads' not found"
<d_bot>
<octachron> @cemerick :once you have erased the labels, the application order matches in the first case but not in the second one.
gahr has quit [Quit: Lost terminal]
gahr has joined #ocaml
shawnw has quit [Ping timeout: 256 seconds]
mro has quit [Remote host closed the connection]
<sparogy>
Leonidas: I agree with you on |>. As soon as it clicked, it made perfect sense.
<sparogy>
and fair enough, simple code is often the best :)
Guest17 has quit [Quit: Client closed]
mro has joined #ocaml
Techcable has joined #ocaml
olle_ has quit [Ping timeout: 256 seconds]
namkeleser has quit [Quit: Client closed]
mro has quit [Remote host closed the connection]
average has quit [Quit: Connection closed for inactivity]
average has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
salkin has quit [Ping timeout: 252 seconds]
<companion_cube>
octachron: who do I have to bribe to make camlzip part of the stdlib? :p :p
olle_ has joined #ocaml
salkin has joined #ocaml
salkin-mada has joined #ocaml
salkin has quit [Ping timeout: 252 seconds]
salkin-mada has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
salkin has joined #ocaml
waleee has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
olle_ has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
salkin has quit [Ping timeout: 256 seconds]
<d_bot>
<zakkor> does anyone have the solution for aoc day 3 part 2? I am completely stumped and can't figure out why my solution is wrong
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
mro has joined #ocaml
<d_bot>
<quernd> I solved it (not in OCaml though), feel free to share your solution and I'll take a look
<d_bot>
<zakkor> I finally figured it out... I was doing integer division which was rounding down badly
<d_bot>
<Perry> Ah, you had trouble with the "more than half is really (x+1)/2" issue?
<d_bot>
<zakkor> yes
<d_bot>
<Perry> I hit that momentarily.
<d_bot>
<zakkor> haha
<d_bot>
<Perry> I'm also not using OCaml this year, I know it too well. I tend to use AoC to learn new languages.
rgrinberg has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
<Anarchos>
I am still unable to get my local ocaml compiler "dynlink.cmxa" file to appear in my switch /boot/home/.opam/5.00.0+trunk/lib/ocaml/
<Anarchos>
i tried 'opam pin myocaml' where myocaml is my local source directory for ocaml, and 'opam reinstall ocaml-variants'
gravicappa has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
<d_bot>
<cemerick> imagine my surprise to discover that `Random` always starts with the same seed, i.e. doesn't "initialize" itself
<d_bot>
<cemerick> I can't say I've encountered such a default in any other language
<d_bot>
<cemerick> hah, apparently golang does this too 🙃
<octachron>
companion_cube, for a module with a dependency on a C library? You probably need at least one innocent soul as a sacrifice. More seriously, why zip?
<companion_cube>
hm, whose innocent soul can I sacrifice then… is gasche around?
<companion_cube>
well, it's hard to find something that doesn't support deflate somewhere
<companion_cube>
and it's absolutely universal
<sadiq>
lz4 now that would be fun
<companion_cube>
if I had to pick something modern, it'd be zstd
<companion_cube>
but it's absurd to have zstd and not zlib
<companion_cube>
literally everyone knows how to speak zlib
<sadiq>
I was thinking more of something that could be done in pure OCaml
<companion_cube>
(well, deflate)
<companion_cube>
why is that better than using zlib? :p
<sadiq>
lz4 is quick enough you can normally throw it into any kind of streaming thing and it's a win
<sadiq>
(as in, where io is involved)
<sadiq>
though I guess that is slowly shifting. PCIe 4 drives you can probably read sequentially at a throughput you can't decompress on a single core.
<companion_cube>
but lz4 is… less common
<companion_cube>
can chrome open a trace.json.lz4? I doubt so :p
<companion_cube>
it can open trace.json.gz though
<sadiq>
oh sure
<companion_cube>
which is why it should be godamn standard
<sadiq>
I wasn't being entirely serious
vicfred has joined #ocaml
<sadiq>
(nor do I think it's likely we'd see either of them in the stdlib)
<companion_cube>
yeah I know
<companion_cube>
and camlzip is fundamentally limited right now, because channels still suck
<companion_cube>
:/
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has quit [Quit: Leaving...]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
gdd has quit [Read error: Connection reset by peer]
vicfred has quit [Quit: Leaving]
gdd has joined #ocaml
namkeleser has joined #ocaml
Serpent7776 has quit [Quit: leaving]
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]