szkl has quit [Quit: Connection closed for inactivity]
gzar has quit [Quit: WeeChat 4.2.2]
hsw has joined #ocaml
jabuxas has quit [Ping timeout: 255 seconds]
<discocaml>
<darrenldl> mccd: saw your posts about stitch, i gave it a try and it's pretty neat i have to say
jabuxas has joined #ocaml
jabuxas has quit [Ping timeout: 240 seconds]
<dh`>
er, immutable, yes
<dh`>
obviously, except apparently to my fingers
jabuxas has joined #ocaml
mbuf has joined #ocaml
dh` has quit [Ping timeout: 255 seconds]
cr1901_ has joined #ocaml
cr1901 has quit [Ping timeout: 268 seconds]
Serpent7776 has joined #ocaml
dh` has joined #ocaml
dh` has quit [Changing host]
dh` has joined #ocaml
wingsorc has quit [Ping timeout: 268 seconds]
jabuxas has quit [Ping timeout: 240 seconds]
YuGiOhJCJ has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 240 seconds]
neiluj has joined #ocaml
olle has joined #ocaml
neiluj has quit [Ping timeout: 255 seconds]
neiluj has joined #ocaml
<discocaml>
<dinosaure> miou has green thread but I prefer the `fiber` term which is, IMHO, is better defined. But miou, and this is where it differs from eio, automatically has a pool of domains & is able to launch a parallel task which is represented also as a promise. This is the diff between `Miou.call_cc` which launches a fiber and `Miou.call` which asks a domain to run the given task. Both return a `'a Miou.t` which the promise of the task. In other words, it
<discocaml>
<kayceesrk> > Computations are periodically interrupted
<discocaml>
<kayceesrk> Does that mean there is preemptive multi-threading in miou? i.e, timer interrupts forcing a context switch? How does this work?
<discocaml>
<dinosaure> I should probably ask what you mean by context-switch but to clarify according to your example, a `Miou_unix.sleep` will invoke `select(2)` and leave the opportunity for another pending task to run (according to the round-robin policy).
<discocaml>
<dinosaure> basically, any effects do a suspension, put the suspended task in the end of the todo list, then miou lookup for system events and run the next pending task
<discocaml>
<dinosaure> a special case exists for the cancellation but we are deeper in details 🙂
<discocaml>
<dinosaure> ah and about domains, actually, I/O are local to domains - we don't share events across domains (it's too complicated and probably not really interesting)
<discocaml>
<dinosaure> so a domain can sleep and, at the same time, another domain can run few tasks (and handle its events)
waleee has joined #ocaml
neiluj has joined #ocaml
<anadon>
Is there a good way to split strings taking into account escaped characters?
waleee has quit [Quit: WeeChat 4.1.2]
<octachron>
It depends what you mean by "good way" and "escaped characters" (and on the nature of "strings"). If you have small delimiters, comparing normalized character subsequences with the delimiter is probably good enough.
neiluj has quit [Ping timeout: 255 seconds]
neiluj has joined #ocaml
<anadon>
I'm trying to split $PATH correctly, and handling "\:" correctly, because _somebody_ is going to include a colon in their actual filepath eventually.
neiluj has quit [Ping timeout: 268 seconds]
<discocaml>
<limp.biskit> anadon: i would just write a regex will
<discocaml>
<limp.biskit> something like [^\]:
<discocaml>
<limp.biskit> something like [^\\]:
<anadon>
I'm looking at that, and checking if I can have the assumption that results maintain ordering.
<anadon>
Also, if I do that, I'd have to correctly infer when to re-merge on splits which would be a pain.
<anadon>
It really looks like it'll just be easier to implement my own from scratch. I don't think it's worth the fuss of using the stdlib.
neiluj has joined #ocaml
jabuxas has joined #ocaml
jabuxas has quit [Ping timeout: 260 seconds]
gzar has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
neiluj has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 240 seconds]
<discocaml>
<kayceesrk> > context switch
<discocaml>
<kayceesrk>
<discocaml>
<kayceesrk> If a fiber is purely CPU bound (spins in an infinite loop), does it allow other fibers to run? From your answer, probably not. (Neither does Eio).
neiluj has joined #ocaml
<discocaml>
<dinosaure> ah yes, in this case, we the fiber keeps the exclusivity of the cpu but I'm not certain that it's possible to avoid this case in pure OCaml
<discocaml>
<dinosaure> ah yes, in this case, yes the fiber keeps the exclusivity of the cpu but I'm not certain that it's possible to avoid this case in pure OCaml
neiluj has quit [Ping timeout: 256 seconds]
neiluj has joined #ocaml
<companion_cube>
With threads you might still make progress
<companion_cube>
Unless you have n fibers locked in a loop at the same time of course
neiluj has quit [Ping timeout: 240 seconds]
neiluj has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
jabuxas has joined #ocaml
neiluj has quit [Ping timeout: 260 seconds]
neiluj has joined #ocaml
<discocaml>
<limp.biskit> sounds like you want something with preemptive multitasking
<Leonidas>
anadon: also, what about "C:\path\with\colon":more:paths