Live data from Hacker News

Pony: An actor-model, capabilities-secure, high-performance programming language

ponylang.io

261–270 of 284 posts

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#261
post #221

Request to HN mods: that the link be changed from https://www.ponylang.io/discover/ to https://www.ponylang.io/ On the second link, as another commenter mentions, the "Try it in your browser" is one click away, near the top. On the first link, it's two clicks away, but the first of those clicks is a perhaps surprising backwards-lick to get back to the homepage... Unfortunately, many of the diehard language enthusiast…

Ok, I've done that and put the other links at the top.

Top modding, I couldn't believe how much discussion was being wasted on trivial matters. And for such a cool-looking language!

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#262
post #13

This is probably my favorite programming language I would like to use if it had more backing. Their reference capabilities in particular seem like a very good match for the actor model. Alas, it does not appear to have a large corporation behind it pushing it forward, nor a compelling niche use case (e.g. it is still GC'd).

The guy behind the language - Sylvan Clebsch - seems to have a very solid background, and current professional situation. He works at "Microsoft Research Cambridge" in the Programming Language Principles group.

Read the "Early History of Pony":

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

My point is - sure, it doesn't have a handful of massive companies stewarding it like Rust. But, on the other hand, it's made by a guy with really serious chops, who has a solid programming language related job. So while not being as industry-sanctified as Rust, or Java, it seems nonetheless like a language that could go places!

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#263

Earlier quoted context omitted.

You say that but I will never use Rust because of it's awful syntax, I'll stick with C/C++ and be happy and not miss out on anything. I don't know much about erlang so I have no comments on it.

> and not miss out on anything I mean, you do you. No one is judging. The fact remains that Rust exists primarily because there are some features that C++ cannot reasonably provide

Rust exist because people have skill issues. Same deal with typescript.

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#264

Earlier quoted context omitted.

I was about to mention Dlangs website aswell, very well designed and clearly presents the language

I remember the first time I visited the DLang website. I clicked “What is D used for?” [0] and scrolled to the very first section, “1. Industry.” The opening example was “1. Games,” so naturally I went to read more…and found the first link, “AAA game,” was dead. It led straight to an error page on Xbox. That was years ago. After reading your comment, I decided to check again. The same “AAA game” link is still first,…

If you don't file an issue, then no one will know to fix it. Took me literally three minutes to create a PR using the "Improve this page" button.

https://github.com/dlang/dlang.org/pull/4277

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#265

It's a great concept but the ecosystem, tooling, and stewardship are really crap.

It's sad that the only company using it in production switched to using Rust.

TO be clear…

The switched because they changed their business focus from one of their products to another.

I'm sure we'd all agree that the best language to use is the language the best fits your problem domain.

Rust was a better fit for that new product than pony. That's not a reflection on the language.

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#266
post #255

Earlier quoted context omitted.

It's not.

What is this, then? https://github.com/ponylang/ponyc/blob/main/examples/echo/ec...

It is not whitespace signficant.

That is indented to assist the human reader, not the compiler.

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#267
post #234

Earlier quoted context omitted.

Go is GC’d and that doesn’t stop it. What’s wrong with GC? Maybe for tiny tiny tiny embedded or constant time use cases that’s a deal breaker.

> constant time use cases that’s a deal breaker. There are real-time safe GC algorithms. I don't know whether Pony offers that option. I would like to know.

I'm not sure I understand what you mean by "real-time safe GC algorithms", but pony is not a language that has being a "real time system" as a design goal.

This pony paper here describes the pony GC algorithms and compares their performance under various scenarios to other language GCs.

https://www.ponylang.io/media/papers/orca_gc_and_type_system...

The charts you want to look at are on pages 19-21.

It shows that ORCA (pony's GC) has extremely low jitter and is highly performant compared to the other industry leaders at the time of publication.

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#268

Earlier quoted context omitted.

Hmm ... How do you implement the common pattern of a top-level exception catcher (e.g. for a long-running thread) with option types in pony/rust/swift? In Haskell this is ergonomic thanks to Functor and friends, but how do langs other than Haskell propagate this behavior up the call stack?

So for baseline context, we can consider two kinds of errors; there's no standard terminology, but I'll call them "exceptional results" (caused by problems outside your process's control, like filesystem or network failures) and "runtime errors" (caused by bugs in your code, like trying to dereference a null pointer or index past the end of an array). Pony: Doesn't distinguish between exceptional results and runtime…

Pony is a strongly typed language. If you want your functions to return an Optional Type, define an Optional Type.

For example, the OpenFile API returns you either a valid pony File object, or why it failed (FileEOF, FileBadFileNumber, FileExists, FilePermissionDenied, etc…).

What partial functions do is ensure that all of the error cases are actively addressed by the programmer, so you don't get panics or SEGVs.

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#269
post #13

This is probably my favorite programming language I would like to use if it had more backing. Their reference capabilities in particular seem like a very good match for the actor model. Alas, it does not appear to have a large corporation behind it pushing it forward, nor a compelling niche use case (e.g. it is still GC'd).

This is alas the chicken and egg scenario and the most common reason I hear for people not wanting to invest the time in pony.

The vast majority of people I discuss it with understand the value and the problems it is designed to solve, but they either don't have domain-problems that require pony's approach more than any other language - or the lack of supporting libraries makes them nervous over adoption.

As a pony developer for 5+ years, it can be frustrating - but I do understand.

Re: Pony: An actor-model, capabilities-secure, high-performance programming language

#270

Earlier quoted context omitted.

Sending a message between Actors can be just moving a pointer to a piece of shared memory. I think sending messages is more about the way you think about concurrency, more than the implementation. I have always found the "one thread doing "while True receive message, handle message" much easier to reason about than "remember to lock this chunk of data in case more than one thread should access it"

Unless you have NxN queues across actors[1], which is done on some specialized software but is inherently not scalable, queues will end up being more complex than that. [1] at the very least you will need one queue for each cpu pair, but that's yet another layer of complication.

Pony schedulers default behaviour is as follows:

1. One scheduler per core. 2. Schedulers run one actor behaviour at a time. 3. When a scheduler has an empty work queue, they will steal work from other schedulers. 4. The number of schedulers will scale up and down with the amount of work (but never more than number of cores).

There are various parameters you can change to alter scheduler behaviour should your pattern of use need it.

Post reply on HN