<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."
<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…]