Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Fun with Algebraic Effects – From Toy Examples to Hardcaml Simulations (janestreet.com)
82 points by weinzierl 56 days ago | hide | past | favorite | 3 comments


Chapter 9 and section 10.7 of this book show some interesting (and to me unexpected) uses of effects in Ocaml and how they compare to implementations based on monads:

https://lukstafi.github.io/curious-ocaml/new_book.html

The dscheck model-checker is another interesting application of effects: https://github.com/ocaml-multicore/dscheck


That books seems very interesting in general, thank you for sharing!

Then again, I am a bit skeptical since the author also credits Claude Opus 4.5 and GPT-5.2. Both models got released in November/December last year, which makes me wonder: Was this book written in only 2 months, i.e. mostly by AI?

EDIT: No. Turns out the book is much older and only recent changes were done with the help of LLMs, https://github.com/lukstafi/curious-ocaml/commits/main/?afte... .


Thanks, I've been meaning to delve into algebraic effects and it seems OCaml is the only mainstream language that actually implemented them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: