5 ms·
How is the concurrency story with Nim. I know that this is a repeating question, just wondering how well it works and how safe it is. I am still eyeballing Pon
by wuschel 8y ago
How is the concurrency story with Nim. I know that this is a repeating question, just wondering how well it works and how safe it is.
I am still eyeballing Pony-lang for it's design choices, but development seems to have slowed down there.
- dom96 8y agoConcurrency is achieved via async await. For parallelism each thread has its own GC so that makes things a lot safer, but sadly less efficient if your algorithm wants to share data between threads a lot (you can copy data between threads). You can also allocate shared memory but that's considered unsafe, this will hopefully be improved in the future. As for how well this all works, well, I recently implemented a high performance parallel HTTP server [1]. It's currently hosting the Nim Forum[2] and has been doing so for the past few months. Also it's proving very performant[3]. 1 - https://github.com/dom96/httpbeast https://github.com/dom96/httpbeast 2 - http://forum.nim-lang.org/ http://forum.nim-lang.org/ 3 - https://www.techempower.com/benchmarks/#section=test&runid=b9d29130-bd5a-4c2a-829d-352613d03cd2&hw=ph&test=plaintext https://www.techempower.com/benchmarks/#section=test&runid=b...
- wuschel 8y agoMany thanks for the detailed answer & ref.links.
- michaelsbradley 8y agoIt would be amazing if Pony Lang's[+] concurrency model could be realized in Nim, or if Nim could be extended as a language to optionally and cleanly support it. That's easier said than done, of course, since Pony's concurrency model is deeply wedded to its type system ("reference capabilities"). [+] https://www.ponylang.org/discover/#what-makes-pony-different https://www.ponylang.org/discover/#what-makes-pony-different
- spooneybarger 8y agoWe are still going strong in Pony land. There an ebb and flow to publicly seen development.
- mcintyre1994 8y agoThe writing style in your documentation is awesome! I haven't come across Pony before but it looks really nice, definitely going to give it a try. :)