tarides / hackocaml

OCaml hacking ideas, small and large.
MIT License
19 stars 1 forks source link

Make an Eio version of the Async examples in Real World OCaml #9

Open kayceesrk opened 7 months ago

kayceesrk commented 7 months ago

https://github.com/dkim/rwo-lwt

https://dev.realworldocaml.org/concurrent-programming.html

dangdennis commented 5 months ago

https://github.com/dangdennis/rwo-eio

I have about a few more sections to complete, and then I plan on asking for help from the forum or perhaps @talex5 to review and make sure my translation is accurate.

I don't have plans to update the readme to make the examples utop-friendly, as I've taken a slightly different approach.

kayceesrk commented 5 months ago

Great. Thank you for looking at this. I shall assign this issue to you (only to indicate that you are working on it). Please circle back here when you think the MVP work is done. I'd be happy to mark this issue as closed.

dangdennis commented 5 months ago

MVP is done. I shared it in discourse in case anyone wants to continue and improve upon my example. https://discuss.ocaml.org/t/i-roughly-translated-real-world-ocamls-async-concurrency-chapter-to-eio/14548

I'll take a break from this fun experiment for a bit now. Thanks for the inspiration @kayceesrk!

There are a few outstanding examples

  1. improve delay_logs
  2. how to cancel an cohttp-eio request
  3. how to copy bytes to an intermediate buffer from a reader to a writer