<d_bot_>
<mimoo> but it doesn't print anything. I think it works because if I rewrite it to not recurse it prints out some messages it receives
<d_bot_>
<mimoo> I'm not sure I'm using the Event API correctly
<d_bot_>
<mimoo> or if recursing like this to listen continuously is a bad idea?
<d_bot_>
<mimoo> there are no examples on the Event doc (https://ocaml.org/api/Event.html#TYPEevent), so it's really hard to understand how to use this API. For example, the documentation for Event.choose is not understandable to me:
<d_bot_>
<mimoo>
<d_bot_>
<mimoo> > choose evl returns the event that is the alternative of all the events in the list evl.
<d_bot_>
<mimoo> what is an alternative?
vicfred has quit [Quit: Leaving]
tomku has quit [Ping timeout: 252 seconds]
tomku has joined #ocaml
nfc_ has quit [Ping timeout: 260 seconds]
gravicappa has joined #ocaml
adanwan has quit [Ping timeout: 240 seconds]
adanwan has joined #ocaml
xgqt has quit [Quit: WeeChat 3.3]
zebrag has quit [Quit: Konversation terminated!]
spip has joined #ocaml
bobo has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
kaph has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
kaph has joined #ocaml
xgqt has joined #ocaml
kaph has quit [Read error: Connection reset by peer]
ski has quit [Quit: Lost terminal]
ski has joined #ocaml
def has joined #ocaml
def has left #ocaml [#ocaml]
unyu has quit [Quit: WeeChat 3.4]
vicfred has joined #ocaml
vicfred_ has joined #ocaml
vicfred_ has quit [Client Quit]
vicfred has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
kaph has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot_>
<quernd> I'm pretty sure a native gRPC client for etcd is feasible, in fact I think I have code for that somewhere. Remind me later in the day
amosbird has joined #ocaml
mro has joined #ocaml
jlrnick has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
kakadu has joined #ocaml
mbuf has joined #ocaml
haesbaert has joined #ocaml
olle has joined #ocaml
jlrnick has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
chrisz has quit [Ping timeout: 252 seconds]
chrisz has joined #ocaml
wingsorc has quit [Quit: Leaving]
unyu has joined #ocaml
bobo has joined #ocaml
spip has quit [Ping timeout: 272 seconds]
mro has quit [Remote host closed the connection]
jlrnick has joined #ocaml
jlrnick has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
szkl has joined #ocaml
<d_bot_>
<ansiwen> Cool. I just worry a bit in about the ocaml-h2 client dependency, because we are using it in a mirage unikernel, that also acts as a cohttp-server, but I hope that is not a conflict, @anmonteiro ?
oriba has joined #ocaml
zebrag has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
zebrag has quit [Quit: Konversation terminated!]
<d_bot_>
<kodwx> Does anyone else think OCaml stdlib errors should be more detailed?
<d_bot_>
<anmonteiro> Should be fine
mro has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bartholin has joined #ocaml
mro has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 250 seconds]
dextaa_ has quit [Remote host closed the connection]
bartholin has joined #ocaml
Haudegen has joined #ocaml
dextaa_ has joined #ocaml
adanwan has quit [Ping timeout: 240 seconds]
xgqt has quit [Ping timeout: 250 seconds]
adanwan has joined #ocaml
xgqt has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 240 seconds]
<d_bot_>
<mbacarella> bane of existence is a top-level exception in the middle of some application linked to millions of lines of code that just says "Not_found"
<companion_cube>
OCAMLRUNPARAM=b
<companion_cube>
et voilà !
<d_bot_>
<mbacarella> i meant it'd be nice if it said the thing that was `Not_found`, like `Not_found_s key`
<companion_cube>
if you get `Not_found_s 42` it doesn't help taht much :)
<d_bot_>
<mbacarella> mmmmmmmm disagree
<companion_cube>
if you have tons of integer tables…
<d_bot_>
<mbacarella> convert them to strings. much more descriptive that way.
bartholin has quit [Ping timeout: 252 seconds]
<companion_cube>
except we don't have a universal type to string converter
<d_bot_>
<mbacarella> `Not_found_s "42"` ✅
<companion_cube>
I mean you have to modify `Map.Ordered` for that
<companion_cube>
to include a printer
<companion_cube>
and then you pay additional costs for each lookup miss
bartholin has joined #ocaml
seeg has quit [Remote host closed the connection]
jakzale has quit [Remote host closed the connection]
b0o has quit [Remote host closed the connection]
sleepydog has quit [Remote host closed the connection]
sleepydog has joined #ocaml
jakzale has joined #ocaml
b0o has joined #ocaml
seeg has joined #ocaml
mro has joined #ocaml
<d_bot_>
<mbacarella> seems fine? i guess i'd be annoyed if i relied on matching `| Not_found` instead of `Map.mem` that i now had this waste hanging on the end `| Not_found _`
<companion_cube>
Map.mem + Map.find is 2 lookups
<companion_cube>
ofc now we have Map.find_opt so that's kind of ok
<d_bot_>
<octachron> And matching with `| exception Not_found -> `
mro has quit [Ping timeout: 252 seconds]
olle has quit [Remote host closed the connection]
<sleepydog>
i think it's better not to assume it's OK to print function arguments. that's how you get sensitive information in a log file
<d_bot_>
<minimario> i'm having problems printing in ocaml jupyter notebooks; ie i type something like ```let _ = Printf.printf "hi" in 3``` and it doesn't print anything
<d_bot_>
<minimario> anyone know how to fix this?
<d_bot_>
<octachron> First, you should try to add `\n` of `%!` to the printed string.
<d_bot_>
<octachron> Otherwise, the stdout channel might not be flushed.
<d_bot_>
<minimario> oh i see
<d_bot_>
<minimario> when i manually "flush stdout" it works now
<d_bot_>
<minimario> 🙂
bartholin has quit [Quit: Leaving]
mro has joined #ocaml
mro has quit [Ping timeout: 256 seconds]
zebrag has joined #ocaml
dh` has quit [Ping timeout: 240 seconds]
Haudegen has quit [Quit: Bin weg.]
szkl has quit [Quit: Connection closed for inactivity]
<d_bot_>
<quernd> I found my old etcd gRPC code, it still works. I'm going to clean it up and add it as an example to the repo
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dh` has quit [Changing host]
dh` has joined #ocaml
<d_bot_>
<mbacarella> well, this is confusing. Error: This expression has type unit Deferred.t but an expression was expected of type unit Async_command__.Import.Deferred.t Async_command__.Import.Deferred.t is abstract because no corresponding cmi file was found in path.
<d_bot_>
<mbacarella> is it somehow failing to unify those types because the .cmi is missing?
<reynir>
I am running opam upgrade in one shell and that prevents me from running opam source --dev some-package in another shell /o\
<reynir>
ah okay if I enter a different switch it's possible. I guess that makes sense in a way..
wyrd has quit [Ping timeout: 240 seconds]
<d_bot_>
<andreypopp> I see dune rpc exposes diagnostics information. Is there some way to pull this into editor somehow?
wyrd has joined #ocaml
bobo has quit [Quit: Konversation terminated!]
spip has joined #ocaml
<d_bot_>
<leviroth> @mbacarella Isn't the cmi file exactly where you would expect the necessary information to be?