4 ms·
Wow, Pony! Pony is one of my favorite young languages. It fits a similar niche that Go fits (not saying that either language can't be used for other purposes),
by Touche 9y ago
Wow, Pony! Pony is one of my favorite young languages. It fits a similar niche that Go fits (not saying that either language can't be used for other purposes), in that they both are great for building cli tools with good concurrency primitives.
Pony, however, uses the Actor model like Erlang (although the programming model is a bit different). In my opinion this is a superior model for concurrency than goroutines. I highly recommend checking it out if you have any interest in cli tools or erlang/elixir.
- samuell 9y agoYes, pony stacks up nicely among the growing list of compiled languages, based on features: https://docs.google.com/spreadsheets/d/1BAiJR026ih1U8HoRw__nzbCSFnnHicWrjxpW5l6-O3w/edit#gid=0 https://docs.google.com/spreadsheets/d/1BAiJR026ih1U8HoRw__n...
- samuell 9y agoIn my view and experience, the actor model and the CSP model of Go and others (which is also very similar to Flow-Based Programming (FBP) if using buffered channels), can actually fit together very nicely, with each of them sitting at different abstraction levels: - The actor model for high-level coordination and communication - CSP and/or FBP at the low-level, for high performance processing. The reason for this is mainly that CSP/FBP inherently supports blocking channels between processes when processes are busy (or channels are full for FBP), thus providing implicit backpressure. This can simplify low-level programming a lot, since you don't need to worry about over-filled mailboxes or overbooked CPUs. OTOH, for communication e.g. across a cluster, this becomes problematic since you can't rely on the same level of integrity of the network connections ... meaning that the very communication-intensive nature of CSP/FBP might be less of a good fit. Thus in my view, the actor model would fit better for communicating between services which are internally implemented e.g. with CSP/FBP. I wrote a post about this, some time ago: http://bionics.it/posts/flowbased-vs-erlang-message-passing http://bionics.it/posts/flowbased-vs-erlang-message-passing It will be interesting to see whether Pony manages to fill more than just the coordination role. Given its much higher raw-crunching performance, perhaps that is the case. I'm a little worried about the lack of implicit back-pressure (due to the actor model), but let's see. Perhaps because of its high-performance, back-pressure won't be too costly to implement anyway? One can hope. Would be nice with a language that can encompass both programming paradigms, and be suited for the full spectrum between low-level crunching and high-level coordination and communication.
- felixgallo 9y agothe actor model in Erlang and (recently!) in Pony implements something even better: explicit backpressure by deprioritizing senders to busy mailboxes. The model can do this because it includes the scheduler in its scope, which doesn't happen in CSP.
- samuell 9y agoInteresting. thanks for the info!
- strmpnk 9y agoThis was never meant to be a complete solution to back pressure in Erlang and has recently been remove for the next major release: https://github.com/erlang/otp/commit/2e601a2efc19d64ed0628a5973596e6331ddcc7c#diff-de35f5a632c1decd2fbd06cf7ed2c8dc https://github.com/erlang/otp/commit/2e601a2efc19d64ed0628a5... I’ve heard speculation that it really only helped scheduler efficiency and this didn’t apply all that well on SMP schedulers and has finally been removed since non-SMP builds are no longer supported. As for Pony, their actor model doesn’t support selectively receiving messages so their queue handling may have some different trades to make there, as well as interaction with primitives like promises (which are used where Erlang would prefer a ref tagged receive clause). Spooneybarger has done work on backpressure in Pony so maybe he or other Wallaroo labs people can elaborate.
- spooneybarger 9y agoMy reply would be that while both Pony and Erlang are actor model languages, the semantics are quite different. I never speak of either being better than the other. Rather, they are different. I'm an expert on backpressure in Pony, not so much in Erlang, so I'll leave it at that.
- strmpnk 9y agoI’m a fan of both approaches. As we can never it say too soon in life: tradeoffs.
- Thaxll 9y agoI think the lack of support for compiling on other platform is a huge issue for CLI, Go compiles on many platform very very easily it's a one liner and you can do it from any platforms, Pony can't do it. So why would you bother doing CLI on language that don't support that? CLI should be a single binary or having a very minimal runtime that can run anywhere.
- spooneybarger 9y agoYou can cross compile Pony, it isn't however, well documented at this point in time.
- Thaxll 9y agoHave you seen how hard it is to make it works on Windows?