Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sadiq
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
Diff Models – A New Way to Edit Code
(carper.ai)
237 points
by
sadiq
4y ago
|
199 comments
32.
▲
by
sadiq
4y ago
Also worth pointing out there's design constraints on the OCaml 5 GC imposed by some of OCaml's language features (looking at you ephemerons) and C API invariants. There may be different constraints for other runtimes.
33.
▲
by
sadiq
4y ago
One thing to point out to anyone listening to that episode is that at the time the plan was to only upstream the multicore GC for 5.0 and then follow up with effects. Instead they both went in to 5.0. (Was a very enjoyable episode though!)
34.
▲
by
sadiq
4y ago
We certainly hope so. You may find Thomas Leonard's talk from last year's workshop interesting: https://watch.ocaml.org/videos/watch/74ece0a8-380f-4e2a-bef5... The paper we wrote on retrofitting effect h
35.
▲
by
sadiq
4y ago
There's already some discussion on https://news.ycombinator.com/item?id=34013767 Am happy to answer questions people have on this one as well, there's also some other OCaml contributors lurking.
36.
▲
by
sadiq
4y ago
Just to add to the sibling comment. To maintain backwards compatibility, OCaml 5 has both threads and domains. Threads belong to a domain and only one thread can hold the runtime lock for the domain. This is the same behaviour as in OCaml 4
37.
▲
by
sadiq
4y ago
There's definitely some work to build atop the new functionality available in 5.0 and make sure there's plenty of good learning material. In terms of the compiler and runtime development, the OCaml and ML Workshops at ICFP in Octo
38.
▲
by
sadiq
4y ago
There are a few OCaml contributors lurking and happy to answer questions if you have them.
39.
▲
OCaml 5.0 Multicore is out
(discuss.ocaml.org)
465 points
by
sadiq
4y ago
|
173 comments
40.
▲
by
sadiq
4y ago
There's a high performance Chase-Lev work stealing queue written to exploit the OCaml 5 memory model in the lockfree library: https://github.com/ocaml-multicore/lockfree/blob/main/src/ws...
41.
▲
$10m bug bounty paid for Wormhole vulnerability
(medium.com)
2 points
by
sadiq
4y ago
|
0 comments
42.
▲
by
sadiq
5y ago
So that was in some quick benchmarks against the sequential one in the runtime: https://github.com/ocaml/ocaml/blob/trunk/runtime/skiplist.c I haven't done a huge amount of investigation but I
43.
▲
by
sadiq
5y ago
If anyone wants one based on Herlihy et al's "The Art of Multiprocessor Programming" there's a well reviewed, tested and heavily commented concurrent lock-free one in OCaml's runtime now: https://github.c
44.
▲
Third-party Framework expansion modules: MagSafe-style charging and RF support
(notebookcheck.net)
1 points
by
sadiq
5y ago
|
0 comments
45.
▲
by
sadiq
5y ago
Not a stupid question. I think adding parallelism to the compiler might be possible, though there are certainly parts that use a lot of mutable state that could prove tricky. Whether it's beneficial or not is unclear though.
46.
▲
by
sadiq
5y ago
Hah. I only contributed to the project for about half it's life. There's still a lot of work to be done before 5.0 is released, it's just it'll happen through the usual PR and review process rather than a separate one.
47.
▲
by
sadiq
5y ago
Along with the graphs from the PR in the sibling comment, there's also the extensive benchmarking from the ICFP2020 paper: https://arxiv.org/pdf/2004.11663.pdf Work on this is on-going via the sandmark benchmarkin
48.
▲
by
sadiq
5y ago
It involved a fair amount of research and there were many technical challenges. Maintaining backwards compatibility in terms of language features and single-threaded performance puts constraints around what you can implement. Also from my p
49.
▲
by
sadiq
5y ago
With the merging to trunk, Multicore doesn't really exist as a separate project. The last major milestone that is likely to have a multicore-dominant discussion thread is probably the 5.0 release.
50.
▲
by
sadiq
5y ago
Good question! https://github.com/ocaml-multicore/effects-examples has links to tutorials and examples for how effects can be used. There's also some slides from KC's talk on effect handlers https:/
51.
▲
by
sadiq
5y ago
As usual I'm happy to answer any questions I can. (for maybe the second to last time)
52.
▲
OCaml Multicore merged upstream
(github.com)
320 points
by
sadiq
5y ago
|
74 comments
53.
▲
by
sadiq
5y ago
For both 2 and 3 you may find https://github.com/ocaml/RFCs/blob/unboxed-types/rfcs/unboxe... very interesting. I'm hoping that progresses beyond the RFC stage.
54.
▲
by
sadiq
5y ago
To echo what avsm said, our intention is to preserve the C API. With the exception of naked pointers, if you follow the rules around the existing C API then your extensions should continue to work in sequential code running on 5.0. We have
55.
▲
by
sadiq
5y ago
1. Domains are the unit of parallelism. A domain is essentially an OS thread with a bunch of extra runtime book-keeping data. You can use Domain.spawn ( https://github.com/ocaml-multicore/ocaml-multicore/blob/5
56.
▲
by
sadiq
5y ago
You could use eio with an event loop per domain and the domain manager to distribute work to other domains. The restriction at the moment is that the tasks you spin off to other domains can't do asynchronous io. There is work on-going
57.
▲
by
sadiq
5y ago
5.00 (the first release with multicore) will include effects! More info: https://discuss.ocaml.org/t/multicore-ocaml-september-2021-e...
58.
▲
by
sadiq
5y ago
1. Before multicore got to this PR stage it went through two phases of detailed review by the core team. A summary of this is on November's Multicore Monthly: https://discuss.ocaml.org/t/multicore-ocaml-november-20
59.
▲
by
sadiq
5y ago
As usual, happy to answer any questions.
60.
▲
by
sadiq
5y ago
Correct. The 4.12+domains branch has effect handlers without syntactic support (which is what will be in 5.0), the 4.12+domains+effects has the syntax.
More ›