News for hackers. Stuff that matters.
Re:Multicore OCaml: April 2021 by NanoCoaster on Thursday May 13, 2021 @07:25AM (#27140883)
I'm sorry if these are dumb questions, I'd be totally fine with some pointers in the right directions if you don't want to waste your time :)

I'm under the impression that the implementation is based on algebraic effects. Does that include extending the language in a way that lets users define their own effects & handlers?

Also, how's the performance? Last time I looked this stuff up (and played around with Eff), which was quite a while ago, I was told that regular usage of effects may impact performance quite noticeably.

Re:Multicore OCaml: April 2021 by sadiq on Thursday May 13, 2021 @10:33AM (#27142502)
Not dumb questions at all.

Multicore adds parallelism via Domains (which are essentially heavyweight threads) and concurrency via Effects and fibers. There's a multicore GC that supports both of those.

We plan to upstream things in two parts. First domains-only parallelism and then effects as a follow-up. When the latter lands users will be able to define their own effects and handlers, yes.

Performance is pretty good, you can see our PLDI2021 paper for a proper performance evaluation and loads more details: https://arxiv.org/abs/2104.00250

Re:Multicore OCaml: April 2021 by NanoCoaster on Thursday May 13, 2021 @11:14AM (#27143016)
Thank you, interesting stuff. Very much looking forward to user-definable effects! I like Ocaml in principal, but haven't yet strayed beyond learning the very basics some time ago. Seeing a usable implementation of algebraic effects in a somewhat popular language...that I gotta see :)
Re:Multicore OCaml: April 2021 by sadiq on Thursday May 13, 2021 @11:49AM (#27143470)
Worth pointing out you don't just need to stop at seeing it, you can get started playing around with it today: https://github.com/ocaml-multicore/multicore-opam#install-mu...
Re:Multicore OCaml: April 2021 by NanoCoaster on Thursday May 13, 2021 @12:20PM (#27143932)
Cool, thanks for the link. Will definitely play around with it as soon as I find the time.

Too many programming languages, too little free time, sadly.