Live data from Hacker News

Introduction to the Pony programming language

opensource.com

31–40 of 77 posts

Re: Introduction to the Pony programming language

#31
post #10

Please 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.

https://bluishcoder.co.nz/2016/05/11/exploring-actors-in-pon...

Looks like JS crossed with Python (not a bad thing at all)

Re: Introduction to the Pony programming language

#32

Hi 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.

The website does not show any code in the first or second page. Only a cheatsheet after 3 clicks - which is a pdf.

You'd be looking for the tutorial: https://tutorial.ponylang.org/

Re: Introduction to the Pony programming language

#33
post #28
post #22

Earlier quoted context omitted.

Pony's model is different than Erlang's, so trying to think of it in terms of Erlang's model ("entering receive loop") may not be helpful when trying to understand it. The Pony runtime takes care of scheduling an actor to run when there is a message for that actor. The actor runs through the behavior and then waits to be scheduled again by the runtime when another message is available. If you want to filter messages…

I get it, it's like event driven programming with static event handlers per actor. Where you can't express a wait for a specific message directly in the body of the function. But you still have to do it somehow, which is what my question was about, how do people do it in Pony. Typically in event driven systems to do this either nested callbacks are used or higher order programming (futures/promises, etc).

You can use callbacks, state machines, promises. All are available as options to use.

Re: Introduction to the Pony programming language

#34
post #10

Earlier quoted context omitted.

https://bluishcoder.co.nz/2016/05/11/exploring-actors-in-pon...

Looks like JS crossed with Python (not a bad thing at all)

We've heard the Python comment before, never the JS one. That's a new one to me. What brings JS to mind?

Re: Introduction to the Pony programming language

#35

> 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…

Being the dual of Sean, I know Rust super well, but don't have as much experience with Pony, especially newer versions. This basically corresponds to my understanding as well. I also say "Pony is like Rust with Erlang" too.

I'd like to do a comprehensive comparison someday, but just don't have the time...

Re: Introduction to the Pony programming language

#36

Earlier quoted context omitted.

The website does not show any code in the first or second page. Only a cheatsheet after 3 clicks - which is a pdf.

You'd be looking for the tutorial: https://tutorial.ponylang.org/

It would be good to show off the language more prominently, on the home page.

You could consider some runnable demos like python and rust's. [1], [2]

[1]: https://www.python.org/

[2]: https://www.rust-lang.org/en-US/

Re: Introduction to the Pony programming language

#37

Earlier 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…

Being the dual of Sean, I know Rust super well, but don't have as much experience with Pony, especially newer versions. This basically corresponds to my understanding as well. I also say "Pony is like Rust with Erlang" too. I'd like to do a comprehensive comparison someday, but just don't have the time...

Same (on the just dont have the time).

Re: Introduction to the Pony programming language

#38
post #3

Earlier 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…

It might be worth clarifying in that tutorial that this behavior is different for floating point division by zero (correct?) I believe that numerical tools like MATLAB give the same result as Pony for integer divide by zero, if that gives you or others more comfort... Although they return a 'divide by zero warning' at the same time which can be user-disabled.

Re: Introduction to the Pony programming language

#39
post #36

Earlier quoted context omitted.

You'd be looking for the tutorial: https://tutorial.ponylang.org/

It would be good to show off the language more prominently, on the home page. You could consider some runnable demos like python and rust's. [1], [2] [1]: https://www.python.org/ [2]: https://www.rust-lang.org/en-US/

Not every language presents itself as an object to be marketed.

Also, pony is still an early product. It's secure, but it still needs more work before extremely important work happens using pony.

In that regard, it's better to attract only those who propel themselves then to attract a bunch of users who wont/cant contribute and will impose their demands on the core team.

It's just not time to market yet.

Re: Introduction to the Pony programming language

#40
post #22

Earlier quoted context omitted.

Pony's model is different than Erlang's, so trying to think of it in terms of Erlang's model ("entering receive loop") may not be helpful when trying to understand it. The Pony runtime takes care of scheduling an actor to run when there is a message for that actor. The actor runs through the behavior and then waits to be scheduled again by the runtime when another message is available. If you want to filter messages…

So kind of like the RabbitMQ worker/message/job dynamic?

This might be a little hard to converse on over HN comment. If you stop by the #ponylang channel on freenode, it would be easier to discuss as there would probably be a lot of back and forth.
Post reply on HN