News for hackers. Stuff that matters.
Re:The Concurnas Programming Language by willtim on Thursday May 28, 2020 @02:45AM (#23334223)
In a language that supports Monads (e.g. Haskell or Scala), the above could be implemented as a library.
Re:The Concurnas Programming Language by artemonster on Thursday May 28, 2020 @11:25AM (#23338411)
can you recommend something to read to be able to understand more parctically HOW to implement those with monads? thank you
Re:The Concurnas Programming Language by willtim on Thursday May 28, 2020 @12:38PM (#23339340)
Monads are a pattern for sequential composition of effectful computations (i.e. statements). Some expessive languages, such as F#, Haskell and Scala support a special overloadable syntax for any arbitrary monad, therefore giving a fully programmable notion of statements.

For background reading in this area, perhaps start with "A poor man's concurrency Monad" by Claessen, it's a very easy read and shows how green threads can be written as a user library allowing pluggable schedulers. F# also implements its asynchronous workflows using essentially this technique, see "The F# Asynchronous Programming Model". LINQ and the reactive library Rx from C# are also great examples of Monads.