companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
spip has quit [Quit: Konversation terminated!]
waleee has quit [Ping timeout: 240 seconds]
sagax has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Ping timeout: 256 seconds]
czy has quit [Remote host closed the connection]
<companion_cube> hu, one of the neovim code devs is interested in OCaml it seems
<discocaml> <cemerick> yeah, eio cancellation is just asking the switch / its fibers "pretty please"
<discocaml> <cemerick> _if_ you do IO (maybe only eio IO, not sure?) then ofc the requested cancellation will tangibly occur, but a long-running IO-free computation will not be halted
<discocaml> <cemerick> there's still sadiq's suggestion re: using a signal handler, the blast radius of which can apparently be narrowed to a particular domain? The comment @ https://github.com/ocaml/ocaml/issues/11411#issuecomment-1179153453 alludes to this, which I need to research
<companion_cube> tbh you probably need to run long CPU computations on a background domain via domainslib
<companion_cube> not on the Eio thread
h0rror has quit [Ping timeout: 250 seconds]
h0rror has joined #ocaml
<discocaml> <darrenldl> you can run it in a different domain through eio's domain manager
<discocaml> <darrenldl> but yeah, last i looked at eio's scheduling, it is very cooperative
<discocaml> <cemerick> eh, it seems I really do need to actually run an experiment; Xavier points out that pending exceptions are checked for upon non-C allocations, so either eio cancellation or a thread-masked signal may well be tripped over in a CPU-bound thread/fiber, as long as its task allocs somewhere
<discocaml> <cemerick> (which is a fine presumption for my use case anyway)
<discocaml> <cemerick> I assume the experiment will fail tho; if this were to work, then this wouldn't be a problem for coq anymore
synbian has quit [Remote host closed the connection]
chrisz has quit [Ping timeout: 260 seconds]
chrisz has joined #ocaml
<discocaml> <darrenldl> would be keen to hear a followup - if cancellation indeed preempts that would be very convenient
rf has quit [Ping timeout: 260 seconds]
azimut has quit [Ping timeout: 240 seconds]
<pgiarrusso> 3:50 AM <discocaml> <cemerick> a long-running IO-free computation will not be halted
<pgiarrusso> Isn’t that why the MR adds polls to backwards jumps in loops?
<pgiarrusso> Also, at starts of functions
<pgiarrusso> They don't add polls to function returns, so worst-case latency is linear with max stack size, but still finite
<companion_cube> I thought the polls where for the GC
<companion_cube> so that major collections can freez all threads
<companion_cube> +e
bartholin has joined #ocaml
<sadiq> minor collections stop the world. major collections do right at the final bit.
<sadiq> the polling changes will also ensure that OCaml signal handlers will run, even in tight loops
spip has joined #ocaml
Tuplanolla has joined #ocaml
Haudegen has joined #ocaml
olle has joined #ocaml
h0rror has quit [Ping timeout: 268 seconds]
h0rror has joined #ocaml
alexherbo2 has joined #ocaml
h0rror has quit [Ping timeout: 240 seconds]
h0rror has joined #ocaml
azimut has joined #ocaml
drewolson has quit [Quit: The Lounge - https://thelounge.chat]
<discocaml> <cemerick> so there's a number of challenges with using signals. First, it seems one cannot use signals between threads (per https://v2.ocaml.org/api/Thread.html#1_Managementofsignals, "signals generated by a thread are delivered to that thread"). Even if that were resolvable (maybe have a separate reaper process that sends a heartbeat of quit signals? 🤢), there's no way to control on _which_ thread the signal handler is run, an obvious problem if on
rf has joined #ocaml
curium has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
olle has quit [Ping timeout: 256 seconds]
h0rror has quit [Ping timeout: 268 seconds]
h0rror has joined #ocaml
bartholin has quit [Quit: Leaving]
azimut has joined #ocaml
perrierjouet has quit [Ping timeout: 260 seconds]
perrierjouet has joined #ocaml
oriba has joined #ocaml
h0rror has quit [Ping timeout: 240 seconds]
h0rror has joined #ocaml
waleee has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
sagax has quit [Quit: Konversation terminated!]
kurfen has quit [*.net *.split]
hrberg has quit [*.net *.split]
mal`` has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
justache has quit [*.net *.split]
SquidDev has quit [*.net *.split]
SquidDev has joined #ocaml
justache has joined #ocaml
justache has quit [Max SendQ exceeded]
kurfen has joined #ocaml
mal`` has joined #ocaml
CalimeroTeknik has joined #ocaml
justache has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
czy has joined #ocaml
spip has quit [Quit: Konversation terminated!]