> Pony's reference capabilities and Rust's borrow checker both provide data safety; they just approach it in different ways and have different tradeoffs. Would like to see a summary of what those tradeoffs are. Very curious!
This won't be an exhaustive answer, but I can asnwer a little. Also note, this is purely based on my own experiences with Rust (and Pony) and from what I've heard from other folks as well. Both are difficult for folks just learn the languages to grasp. When I tried doing async programming in Rust, I found the borrow checker especially hard to deal with. Pony's reference capabilities, once you understand them, apply q…
Introduction to the Pony programming language
11–20 of 77 posts
Re: Introduction to the Pony programming language
#12Earlier quoted context omitted.
Hi spooneybarger. I'm curious: why is 1/0 == 0? Is it because there is no way to panic/kill the current actor with an error?
That's covered in the Pony tutorial. https://tutorial.ponylang.org/gotchas/divide-by-zero.html I can elaborate a bit on what is in the tutorial. With the current semantics, you as the application programmer can check for division by zero and throw `error` if you want. Otherwise, every division operation would be partial which given that pony forces you to handle all partial functions, can get to be very painful. We a…
PS: This is the approach PHP took in the early days too.
Re: Introduction to the Pony programming language
#13Please consider putting some code snippets in the home page, I needed I don't know how many clicks to find a random code snippet to look at in the docs.
Fortunately Rust doesn’t do this and has a big example right at the top of its front page.
Re: Introduction to the Pony programming language
#14Earlier quoted context omitted.
That's covered in the Pony tutorial. https://tutorial.ponylang.org/gotchas/divide-by-zero.html I can elaborate a bit on what is in the tutorial. With the current semantics, you as the application programmer can check for division by zero and throw `error` if you want. Otherwise, every division operation would be partial which given that pony forces you to handle all partial functions, can get to be very painful. We a…
It's better to be wrong and functional than correct and complicated? PS: This is the approach PHP took in the early days too.
Re: Introduction to the Pony programming language
#15Re: Introduction to the Pony programming language
#16Lots of discussion from three years ago: https://news.ycombinator.com/item?id=9482483
> Yes you're right, we will put some code samples in earlier on.
Re: Introduction to the Pony programming language
#17> "A programming language is just another tool. It's not about syntax. It's not about expressiveness. It's not about paradigms or models. It's about managing hard problems." —Sylvan Clebsch, creator of Pony Well, isn't that a zero content statement? Sure, if you can't help in managing problems (and hard problems) the language is not that good. But I'd argue a language succeeds or fails in helping you manage problems…
Re: Introduction to the Pony programming language
#18Earlier quoted context omitted.
This won't be an exhaustive answer, but I can asnwer a little. Also note, this is purely based on my own experiences with Rust (and Pony) and from what I've heard from other folks as well. Both are difficult for folks just learn the languages to grasp. When I tried doing async programming in Rust, I found the borrow checker especially hard to deal with. Pony's reference capabilities, once you understand them, apply q…
Sounds very interesting. Very much like to see other languages starting to take this stuff seriously. Do you know where Pony is used in industry?
An early version of the Pony runtime is in use at one of the large banks in the UK.
There's a couple other uses that I've heard of that I'm not at liberty to talk about.
Publicly, Wallaroo Labs (where I work) is the only company talking about their usage.
It's still early days for Pony. Pre-1.0 and all that. Plenty of improvements that we want to make to the language, the standard library and ecosystem before it makes it to 1.0.
Re: Introduction to the Pony programming language
#19Earlier quoted context omitted.
It's better to be wrong and functional than correct and complicated? PS: This is the approach PHP took in the early days too.
BTW, this is the same approach taken by the Coq, Isabelle and Lean theorem provers. In all of them, 1/0 = 0. It is certainly unconventional , but whether this is wrong is a matter of philosophy. Basically, division by zero is undefined, but you can define it to be zero and so extend the definition. This is consistent with the rest of arithmetic. You get more theorems (like for all a, b and c, a/c = b/c), but no incon…
Re: Introduction to the Pony programming language
#20Hi all, In addition to being the submitter, I'm also the author and a member of the Pony core team. I'll check the comments here from time to time and answer what I can.
I understand that its actor model pursues very different ideas from Erlang and is therefore very limited and bare bones, basically allowing only per actor event handlers (behaviors in Pony terms). How does it work in practice, do you use higher order functions to construct basic flows? Like doing something, then entering receive loop for certain messages and making sure no other handler gets called to mess with the s…
There's a good talk by Scott Fritchie on the differences between Pony and Erlang that I would suggest.
talk: https://www.youtube.com/watch?v=uv-3ptTD8hg&feature=youtu.be slides: https://github.com/slfritchie/wide-world-of-actors
Like Erlang, each Pony actor has a mailbox that is processed in a serial fashion so that only one message is being processed.
In Erlang, you have selective receive that allows you to receive messages out of order that they arrived. Pony has causal messaging where each message has to be handled in the order it was received. Otherwise they are same in terms of how received messages are handled.
There's no `receive` in Pony as the behaviors are called directly.
I would not call that "very limited and bare bones". Its different.