purescript-native-cpp-ffi
purescript-native-cpp-ffi copied to clipboard
aff monad
any ideas how to implement it?
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?
Hi, cool. No, I don't have use case yet, this is just something I noticed
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.
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.