Live data from Hacker News

Channels, Concurrency, Cores: A New Concurrent ML Implementation (2017) [video]

youtube.com

21–24 of 24 posts

Re: Channels, Concurrency, Cores: A New Concurrent ML Implementation (2017) [video]

#21
post #17

How does this compare to Reagents? If I understand correctly, Reagents are the successor of Concurrent ML. http://kcsrk.info/ocaml/multicore/2016/06/11/lock-free/

Reagents generalise CML, but is also not as opinionated in that it is more a set of building blocks that can be used in many different ways. It gives you more flexibility, but at the cost of having to do a bit more yourself.

Reagents are more comparable to STM I would say, even though it is slightly less expressive in some areas, but on the other hand is always lock-free.

Re: Channels, Concurrency, Cores: A New Concurrent ML Implementation (2017) [video]

#22
post #6
post #3

Not only that, but guile just got a 2-4x speedup in the 2.9 branch (what will become guile 3). It is a really nice scheme implementation and very capable. The stuff the guix people have done is amazing! Concurrent ML is my favourite way of writing multi threaded parallel programs. It is a bliss! One can say that reagents in multidirectional ocaml is another step downwards in that it in most regards generalises CNL, b…

What are you using it for? Is any of the work publicly available?

I have started using it to do every single task that I would previously use threads for, and for a lot of other things that I would otherwise have done sequentially.

Two days ago I made my own very shitty static site generator parallel using fibers.

I have a POC for a irc-like server with proof-of-work to send messages depending on current message throughput. (Not online yet)

I am not really a programmer, so I mostly do stupid things with it. I made my smart home server (written by me, using ZigBee to communicate with devices) scale to thousands of parallel authenticated connections. Just for fun (or at least to be able to say that my WiFi and ZigBee dongle gave up before my own ZigBee controller software did).

I have even used it for fully cooperative multitasking (by setting the "Hz" in guile-fibers to 0).

Re: Channels, Concurrency, Cores: A New Concurrent ML Implementation (2017) [video]

#23
post #21
post #17

How does this compare to Reagents? If I understand correctly, Reagents are the successor of Concurrent ML. http://kcsrk.info/ocaml/multicore/2016/06/11/lock-free/

Reagents generalise CML, but is also not as opinionated in that it is more a set of building blocks that can be used in many different ways. It gives you more flexibility, but at the cost of having to do a bit more yourself. Reagents are more comparable to STM I would say, even though it is slightly less expressive in some areas, but on the other hand is always lock-free.

Apparently I also answered my own question a year ago as a comment on the associated blog post:

Reagents do generalise CML. The main difference is that CML only allows you to combine operations with select (op1 OR op2) while Reagents also allow you to combine operations into a transaction (op1 AND op2 for independent operations and op1 THEN op2 for dependent ones). Reagents are lightweight in that the library analyses the combined operation and then figures out an efficient CAS scheme to execute it. Reagents also include some more low level operations, such as CAS as a reagent. -- https://wingolog.org/archives/2017/06/29/a-new-concurrent-ml...

I hope that's correct...

> Reagents are more comparable to STM I would say, even though it is slightly less expressive in some areas, but on the other hand is always lock-free.

What is the difference in expressiveness between STM and Reagents? Is it that STM provides monadic bind, whereas Reagents only provide applicative, i.e. Reagents cannot dynamically decide to update different locations based on values read in the transaction?

Re: Channels, Concurrency, Cores: A New Concurrent ML Implementation (2017) [video]

#24
post #23
post #21

Earlier quoted context omitted.

Reagents generalise CML, but is also not as opinionated in that it is more a set of building blocks that can be used in many different ways. It gives you more flexibility, but at the cost of having to do a bit more yourself. Reagents are more comparable to STM I would say, even though it is slightly less expressive in some areas, but on the other hand is always lock-free.

Apparently I also answered my own question a year ago as a comment on the associated blog post: Reagents do generalise CML. The main difference is that CML only allows you to combine operations with select (op1 OR op2) while Reagents also allow you to combine operations into a transaction (op1 AND op2 for independent operations and op1 THEN op2 for dependent ones). Reagents are lightweight in that the library analyse…

Well, after having used reagents I have found that for most things so use it to more or less implement CML anyway. I have never been limited by the CML way, but I do appreciate the power that reagents give you.

In comparing STM and reagents I will probably just regurgitate what Aaron Turin says in his paper "Reagents: Expressing and Composing Fine-grained Concurrency" which you can find using a short Google. I only seem to be able to copy the Google link, so you will have to Google it yourself.

Post reply on HN