by sadiq on 12/16/22, 12:21 PM with 173 comments
by logicchains on 12/16/22, 3:41 PM
by nequo on 12/16/22, 3:54 PM
https://signalsandthreads.com/what-is-an-operating-system/
He talked about the work to put a multicore-ready memory model[1] and GC[2] under OCaml.
[1] https://anil.recoil.org/papers/2018-pldi-memorymodel.pdf
by mbac32768 on 12/16/22, 4:20 PM
Anil covers it in a bit more plain English in this Signals and Threads episode. Here's a bit of the transcript, starting at about 50 minutes in: https://signalsandthreads.com/what-is-an-operating-system/
> Ron: Do you have a pithy example of a pitfall in multicore Java that doesn’t exist in multicore OCaml?
> Anil: There’s something called a data race. And when you have a data race, this means that two threads of parallel execution are accessing the same memory at the same time. At this point, the program has to decide what the semantics are. In C++, for example, when you have a data race, it results in undefined behavior for the rest of the program, the program can do anything. Conventionally, daemons could fly out of your nose is an example of just what the compiler can do.
> In Java, you can have data races that are bounded in time so the fact that you change a value can mean later on in execution, because of the workings of the JVM, you can then have some kind of undefined behavior. It’s very hard to debug because it is happening temporally across executions of multiple threads.
> In OCaml, we guarantee that the program is consistent and sequentially consistent between data races. It’s hard to explain any more without showing you fragments of code. But conceptually, if there’s a data race in OCaml code, it will not spread in either space or time. In C++, if there’s a data race, it’ll spread to the rest of the codebase. In Java, if there’s a data race, it’ll spread through potentially multiple executions of that bit of code in the future.
> In OCaml, none of those things happen. The data race happens, some consequence exists in that particular part of the code but it doesn’t spread through the program. So if you’re debugging it, you can spot your data race because it happens in a very constrained part of the application and that modularity is obviously essential for any kind of semantic reasoning about the program because you can’t be looking in your logging library for undefined behavior when you’re working on a trading strategy or something else. It’s got to be in your face, at the point.
(and so on)
by ecshafer on 12/16/22, 7:34 PM
This is a great achievement for OCaml, but does anyone have an explanation on why it was so difficult to implement for them?
by jon_smark on 12/16/22, 12:35 PM
by eatonphil on 12/16/22, 8:20 PM
by rg111 on 12/16/22, 7:43 PM
I know this one [0] so far. Also the famous Coursera PL course [1] covers ML.
by sadiq on 12/16/22, 12:23 PM
by UncleOxidant on 12/16/22, 5:28 PM
$ opam update
$ opam switch create 5.0.0 --repositories=default
$ eval $(opam env)
$ ocaml
OCaml version 5.0.0
Enter #help;; for help.
by runevault on 12/16/22, 4:33 PM
by systems on 12/16/22, 5:57 PM
I now run mainly on windows and this is an issue for me to try OCaml
by no_wizard on 12/16/22, 3:57 PM
I wonder how this will affect ReScript
by melling on 12/16/22, 1:08 PM
https://sixthhappiness.github.io/articles/python-scheme-and-...
Does anyone have any multicore benchmarks that illustrate performance increases in 5.0?
by vkazanov on 12/16/22, 12:56 PM
Congratulations to the team!
What are the next plans for the project? Spread newly available features..?
by maattdd on 12/16/22, 1:03 PM
by mnming on 12/16/22, 10:38 PM
I felt an ergonomic and modern syntax is the only missing piece in Ocaml.
by pjmlp on 12/16/22, 2:55 PM
by badrabbit on 12/16/22, 12:56 PM
Great work Ocaml devs!
by iainctduncan on 12/19/22, 4:46 PM
Wondering if anyone can comment on whether this might mean OCaml can be a contender in that space now?
by rg111 on 12/16/22, 7:41 PM
I know this one [0] so far. Also the famous Coursera PL course covers ML.
by nih0 on 12/16/22, 3:29 PM
by lilactown on 12/16/22, 4:55 PM
by aylmao on 12/16/22, 3:15 PM
by ghostwriter on 12/16/22, 5:00 PM
by Decabytes on 12/16/22, 4:46 PM
by InitEnabler on 12/16/22, 4:35 PM
by leoh on 12/17/22, 1:17 AM
by didip on 12/16/22, 11:39 PM
What is the use cases for OCaml?
by melony on 12/17/22, 6:47 AM
Any plans to backport its design back to Opam?
by toolslive on 12/16/22, 3:36 PM
by Alifatisk on 12/16/22, 4:15 PM
Just Hotwire Strada left.
by keepquestioning on 12/16/22, 6:41 PM
by laylomo2 on 12/16/22, 10:15 PM
by acaloiar on 12/16/22, 11:25 PM
At first glance, I understood the title "OCaml 5.0 Multicore is out" to mean "Multicore is no longer part of OCaml 5.0".
by pjmlp on 12/16/22, 2:55 PM
by 2wrist on 12/16/22, 2:36 PM
by poulpy123 on 12/16/22, 7:26 PM