andyarvanitis / purescript-native-cpp-ffi

C++ foreign export implementations for the standard library
MIT License
21 stars 8 forks source link

aff monad #5

Open angelinatarapko opened 4 years ago

angelinatarapko commented 4 years ago

any ideas how to implement it?

andyarvanitis commented 4 years ago

I haven't looked into it, although I've wanted to do so for a while. I imagine there are a few implementation possibilities. Do you have a specific use case or app that you want to port?

angelinatarapko commented 4 years ago

Hi, cool. No, I don't have use case yet, this is just something I noticed

joprice commented 3 years ago

I'm interested in this as well. So far, mostly to use dependencies that rely on it. For instance, I just hit this trying to use purescript-spec. https://github.com/purescript-spec/purescript-spec/blob/master/example/Main.purs. I ended up switching to quickcheck, as I just wanted any test library.

For concurrency in general, I wrote some hacky bindings around go routines using a wait group, with two functions async and await, where async kicks off a go routine and await waits on the wait group. It's missing all the sophistication of Aff, but maybe an alternative purescript-native concurrency toolkit aimed at things that are straightforward to implement in go would be useful: wrapping some of the basic features of go routines and channels.

andyarvanitis commented 3 years ago

There have been a couple people offering to implement Aff, but I haven't gotten a PR or report that they were successful. I'd like to do it myself (maybe initially just for golang, but eventually also for C++) if I manage to find the time.