Live data from Hacker News

Pony – High-Performance Safe Actor Programming

ponylang.io

21–30 of 159 posts

Re: Pony – High-Performance Safe Actor Programming

#22
post #21

I still am wondering how error handling should be done in pony, it only tells you an error has happend, not what has caused it or what kind of error happend.

`error` in Pony is for partial functions.

A partial function is where you can't compute a result based on the input.

If you need to know what went wrong (because more than one thing might have gone wrong and that needs to be communicated), you can use a union type for the result and match accordingly (as you would in Rust as an example).

Re: Pony – High-Performance Safe Actor Programming

#23
post #17
post #7

I never saw Pony described as high performance. Now I'm interested

Well, in the very first benchmarks it was the fastest of all on multicore machines. Faster than C++ with pstl/openmp. Lockfree/non-blocking stdlib has its advantages. It's also safe, much safer than rust.

Not saying that Rust is fault-proof but that's a pretty bold claim. How do you back it?

Re: Pony – High-Performance Safe Actor Programming

#24
post #11
post #4

For anyone wondering "Why Pony?" - they have a section called just that: https://www.ponylang.io/discover/#why-pony

That didn’t answer the question I expected it to answer (“why Pony and not Brando, Gielgud, Nicholson, Streep…?”

You might be looking for "An Early History of Pony"[0] linked in the FAQ.

[0] https://www.ponylang.io/blog/2017/05/an-early-history-of-pon...

Re: Pony – High-Performance Safe Actor Programming

#25
post #16

it's really frustrating seeing these programming languages websites where you have to click in a million place before you can even see what the code looks like

Is there an a page with more than a few lines of code to show what actual Pony programs look like?

Re: Pony – High-Performance Safe Actor Programming

#26
post #17

Earlier quoted context omitted.

Well, in the very first benchmarks it was the fastest of all on multicore machines. Faster than C++ with pstl/openmp. Lockfree/non-blocking stdlib has its advantages. It's also safe, much safer than rust.

> It's also safe, much safer than rust. Can you give an example of this? How is Pony "much" safer than Rust?

As a member of the pony core team, I'm not comfortable saying Pony is safer than Rust. The approach of the two is different; each with their own trade-offs.

Given how easy it is to use c-ffi from Pony, it can be hard with existing tooling to feel confident in what your Pony code might do. Once you call out via C-FFI, all safety guarantees are off.

In this way, the c-ffi in Pony is as problematic for reasoning about safety as `unsafe` is in Rust.

Pony allows you to turn off FFI for all packages except for some that you allow but even then, FFI is an end around for the memory safety and capabilities security that the language otherwise provides.

Improving FFI tooling is an ongoing conversation amongst the core team.

Re: Pony – High-Performance Safe Actor Programming

#27
post #16

it's really frustrating seeing these programming languages websites where you have to click in a million place before you can even see what the code looks like

Is there an a page with more than a few lines of code to show what actual Pony programs look like?

There are a number of simple examples in the ponyc repo:

https://github.com/ponylang/ponyc/tree/master/examples

You can find a number of pony library projects under the ponylang org on GitHub:

https://github.com/ponylang/

Re: Pony – High-Performance Safe Actor Programming

#28
post #21

I still am wondering how error handling should be done in pony, it only tells you an error has happend, not what has caused it or what kind of error happend.

`error` in Pony is for partial functions. A partial function is where you can't compute a result based on the input. If you need to know what went wrong (because more than one thing might have gone wrong and that needs to be communicated), you can use a union type for the result and match accordingly (as you would in Rust as an example).

Ah, i see. The files package does that apperently, correct? But cannot find it in the net package for example.

Re: Pony – High-Performance Safe Actor Programming

#29

Earlier quoted context omitted.

Is there an a page with more than a few lines of code to show what actual Pony programs look like?

There are a number of simple examples in the ponyc repo: https://github.com/ponylang/ponyc/tree/master/examples You can find a number of pony library projects under the ponylang org on GitHub: https://github.com/ponylang/

I think you should consider showing some code on the front page, like D [0] or Ruby [1], or maybe have a "Try Pony" button that links to an online playground.

0: https://dlang.org/

1: https://www.ruby-lang.org/en/

Re: Pony – High-Performance Safe Actor Programming

#30
post #16

it's really frustrating seeing these programming languages websites where you have to click in a million place before you can even see what the code looks like

Is there an a page with more than a few lines of code to show what actual Pony programs look like?

See also the Patterns part of the tutorial.

https://patterns.ponylang.io/

Post reply on HN