Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.13.0 released: https://ocaml.org/releases/4.13.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Quit: Leaving.]
vicfred has quit [Quit: Leaving]
Techcable has quit [Changing host]
Techcable has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reynir1 has joined #ocaml
slothbee has joined #ocaml
slothby has quit [*.net *.split]
reynir has quit [*.net *.split]
gravicappa has joined #ocaml
Techcable has quit [Ping timeout: 240 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
Nahra has quit [Remote host closed the connection]
terrorjack has joined #ocaml
kaph has quit [Read error: Connection reset by peer]
waleee has quit [Ping timeout: 240 seconds]
bobo has joined #ocaml
spip has quit [Ping timeout: 256 seconds]
mbuf has joined #ocaml
kaph has joined #ocaml
Techcable has joined #ocaml
rgrinberg has joined #ocaml
sagax has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
Techcable has quit [Remote host closed the connection]
Techcable has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
Haudegen has joined #ocaml
dextaa_ has quit [Remote host closed the connection]
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jonasbits has joined #ocaml
reynir1 is now known as reynir
mro has quit [Remote host closed the connection]
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
bartholin has joined #ocaml
jonasbits has joined #ocaml
olle has joined #ocaml
<d_bot> <Kakadu> Do you have any issues with macos + setup-ocaml + GithubActions? Something like that:
<d_bot> <Kakadu> Error: mkdir(/Users/runner/.cache/dune/db/temp): File exists
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Client Quit]
jonasbits has joined #ocaml
mro has joined #ocaml
<d_bot> <Kakadu> Nevermind, I fixed my ubuntu issue
kaph has quit [Read error: Connection reset by peer]
gentauro has quit [Read error: Connection reset by peer]
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
gentauro has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
kaph has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Fardale1 is now known as Fardale
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
mro has quit [Remote host closed the connection]
andreypopp_ has quit [Ping timeout: 245 seconds]
romildo has joined #ocaml
andreypopp has joined #ocaml
mro has joined #ocaml
romildo has quit [Quit: Leaving]
bartholin has quit [Ping timeout: 252 seconds]
Haudegen has quit [Remote host closed the connection]
Haudegen has joined #ocaml
bartholin has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
Anarchos has joined #ocaml
jonasbits has joined #ocaml
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
jonasbits has joined #ocaml
neilthereildeil has joined #ocaml
<neilthereildeil> hey guys
<neilthereildeil> what do the brackets here mean?
<neilthereildeil> et r, _, _ = Unix.select [ fd ] [] [] (min max_blocking_time !left) in
<neilthereildeil> let*
<olle> lists
<olle> empty lists
<neilthereildeil> so we are sending 3 lists and the result of a call to function min as parameters to Unix.select?
<olle> What I can see
<octachron> neilthereildeil, it might more efficient to read https://ocaml.org/manual/coreexamples.html from the start or https://johnwhitington.net/ocamlfromtheverybeginning/index.html
waleee has joined #ocaml
<Corbin> Yes. Conceptually, it's like the select() syscall, which also takes three lists and a duration of time.
<neilthereildeil> also what does the '.' mean when i write "let max_blocking_time = -1."
<neilthereildeil> ?
<d_bot> <VPhantom> Float vs int.
<d_bot> <VPhantom> Timestamps tend to be floats in the OCaml standard library.
<neilthereildeil> also, is the parenthesis in "(min max_blocking_time !left)" necessary if i pass max_blocking_time without calling the min function?
<Corbin> No, the parentheses are only necessary because otherwise `min` would look like an argument to `Unix.select`; it would parse as a single six-argument call, not a nested call.
<d_bot> <VPhantom> So you mean `(max_blocking_time)`? Not needed there. You only need parentheses in OCaml to make nesting clear.
<neilthereildeil> is it OK to leave the parenthesis?
<neilthereildeil> i have "let max_blocking_time = -1."
<neilthereildeil> and "let r, _, _ = Unix.select [ fd ] [] [] (max_blocking_time) in"
<d_bot> <VPhantom> Side note: this is exactly the kind of thing I use `ocamlformat` for btw. I tend to be generous with parentheses and it takes care of removing unneeded ones for me.
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
<neilthereildeil> does that syntax accurately pas -1 to Unix.select?
<neilthereildeil> pass*
jonasbits has joined #ocaml
<Corbin> Yes. Does it work for you?
<d_bot> <orbitz> The let looks wrong at least on this display
<companion_cube> it's a good call though, `(-1.)` is what you'd need without the variable
<companion_cube> or `~-1.` but well
<neilthereildeil> i didnt get a compiler error
<neilthereildeil> why does the let look wrong?
<d_bot> <orbitz> If it's compiling then it's fine
<neilthereildeil> ok
<neilthereildeil> thx
jonasbits has quit [Client Quit]
jonasbits has joined #ocaml
mro has quit [Remote host closed the connection]
<companion_cube> ugh, mtime doesn't use @since
<companion_cube> I'm disappointed in dbunzli right now :/
<Anarchos> lol
xgqt has quit [Ping timeout: 256 seconds]
xgqt has joined #ocaml
neilthereildeil has quit [Quit: Client closed]
olle has quit [Remote host closed the connection]
<Boarders_> if I have a project with file token.ml and I open it in utop with dune utop lib, then how can I load that file?
<octachron> You don't need to load a file. The module Token should be available in the toplevel.
<Boarders_> I get "Unbound module Token"
<companion_cube> maybe Mylib.Token ?
<Boarders_> ah perfect, thank you!
<Boarders_> it actually ended up as Simple_C__Token
<companion_cube> Simple_C.Token as well, probably
<companion_cube> the __ is a magic form used by dune
<Boarders_> ah yes, that works, thank you very much!
<companion_cube> 👍
<dmbaturin> Is there a specific reason why OCaml 4.13 still isn't in the homebrew repo for macOS?
mro has joined #ocaml
spip has joined #ocaml
bobo has quit [Ping timeout: 268 seconds]
<d_bot> <RegularSpatula> Is there an easy way to show which deps are pulling in other deps for an opam package? Eg so I could run it, see that dep A pulls in X,Y, and Z. And then if I wanted to remove Z from my dep list, then I know I would need to remove A or swap it for something else. I tried `dune-deps` and `depgraph` but those aren't quite what I'm looking for.
rgrinberg has joined #ocaml
bartholin has quit [Quit: Leaving]
<sim642> They both seem to be for more project-internal use, rather than on the opam switch itself
<sim642> I suppose it should be possible to graph all installed packages, although interpreting that graph wouldn't be as direct as you're imagining
<sim642> Because removal of a dependency might cause the constraint solver to do a lot of unpredictable things
<sim642> For example, it may be possible to remove Z without removing A by just downgrading/upgrading A to a different version without the dependency
<sim642> And at the same time install different dependencies or require other changes
slothbee is now known as slothby
<companion_cube> my personal hack, because I suck, is to type `opam remove foo`, see what would be removed, and ctrl-c away
<d_bot> <octachron> You can use `opam list --depend-on=A --recursive` for a slightly faster hack
mro has quit [Remote host closed the connection]
<d_bot> <RegularSpatula> ccube: that's a nice hack
mro has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot> <RegularSpatula> i suppose that make a new switch and then run `opam install .` on whatever i want to check works okay too for seeing what depends on what
Anarchos has quit [Ping timeout: 252 seconds]
JosEduardo[m] has joined #ocaml
mro has quit [Quit: Leaving...]
mbuf has quit [Quit: Leaving]
rgrinberg has joined #ocaml
neilthereildeil has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
neilthereildeil has quit [Quit: Client closed]
vicfred has joined #ocaml
neilthereildeil has joined #ocaml
zebrag has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
neilthereildeil has quit [Quit: Client closed]
rgrinberg has joined #ocaml
mro has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
mro has quit [Ping timeout: 240 seconds]
jlrnick has joined #ocaml
dextaa_ has joined #ocaml
Tuplanolla has joined #ocaml
mro has joined #ocaml
<d_bot> <undu> Or prepend the command with `env OPAMNO=true`
mro_ has joined #ocaml
mro has quit [Ping timeout: 256 seconds]
mro_ has quit [Ping timeout: 252 seconds]
wyrd has quit [Ping timeout: 240 seconds]
wyrd has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 245 seconds]
vicfred has quit [Quit: Leaving]
rgrinberg has joined #ocaml
<Leonidas> Is there something like `caml_copy_string` where I can pass in the size of the string to copy, like memcpy?
<Leonidas> Ah, `caml_alloc_initialized_string` looks like exactly what I want.
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tuplanolla has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 252 seconds]