62 comments

[ 5.7 ms ] story [ 66.2 ms ] thread
I wish these language websites would put an example of some code right there on the homepage so I can see what the language "feels" like. I finally found some code in the tutorials https://tutorial.ponylang.io/getting-started/hello-world
Even caling this an example is a stretch... it's a hello world...that's it. I mean, at least show some conditionals, or something. We get it, your language is amazing, ok, so...can we see it now?
I think Nim has a good homepage, with some bullet points explaining what the language is all about coupled with several code examples. I'm not saying Nim is better, but I visited the page the other day and thought it was neat.

https://nim-lang.org/

Also it took surprisingly many clicks to see any code. After 3 clicks I had impression that it is not yet a language, just and idea for one.
Unfortunately this is true for basically any kind of “product”.

It’s crazy how many people build something and make a website for it, only to hide the thing they’ve built somewhere deep in the website. Just show me the damn thing!

Same impression. I was reading several pages with "Interesting.. interesting.. interesting.. but where is the code?". First code I managed to find was a Github repo with examples [0], and just now trying to follow the click path that led me to it, couldn't find it anymore. I looked up the link from my browser history.

[0] https://github.com/ponylang/ponyc/tree/main/examples

I also (usually) go looking right away to see if the syntax makes me feel warm and fuzzy. I’m so shallow.
I've always loved Factor's homepage, which includes a random snippet of non-trivial (i.e. small but not ‘hello world’) code: https://factorcode.org/
I wish these new languages would put an elevator pitch on first page.

Why another object language?

Agreed. Pony even has nice syntax. Web page is pretty bad though.
Probably hiding the fact that it's whitespace significant
I see this comment on all language postings and I just don’t get it. I’m much more curious about the motivation behind the language. If the syntax was that of APL, Forth, or Prolog would you just instantly ignore it because it doesn’t look like Java. I think if the language motivation is compelling then you can decide to dive into a tutorial where the syntax will be explained step by step. I don’t see how syntax can be judged before it is understood. Do you accept/reject languages over simple syntax like curly braces vs begin/end or significant white space, or abbreviations you don’t like eg. def, fun, defun, function, procedure.
Code is poetry and even if you don't know the syntax or details of the tools of the language, a choice example up front gives you a sense of the "rhyme" and "meter" of the language.

Sure, some people are going to use that as an immediate gut filter for "doesn't look enough like languages I already know" or various pet peeves, but on the other side for those that love to dig deep into the syntaxes of esoteric/lesser-known languages it becomes like the first sniff when working on tasting notes of a beverage and tells you a lot up front to your "nose" faster than paragraphs of prose about the motivations of the language. "Ah, yes, I'm sensing a strong Python influence on top of earthy notes of Erlang and just a bit of floral Pascal-ness most recently from the vineyards of Typescript, perhaps?"

>This is a type declaration. The keyword actor means we are going to define an actor, which is a bit like a class in Python, Java, C#, C++, etc. Pony has classes too, which we’ll see later.

> The difference between an actor and a class is that an actor can have asynchronous methods, called behaviours. We’ll talk more about that later.

Who wrote this[1]? The Doctor?

[1] https://tutorial.ponylang.io/getting-started/how-it-works

Notable for the GC (ORCA) and the sharing model. They have a Zulip[0] and a weekly office hours.

Sylvan Clebsch is now working on Project Verona[1].

0. https://ponylang.zulipchat.com

1. https://www.microsoft.com/en-us/research/project/project-ver...

Having a Zulip (preferably self hosted) is sympathetic, compared to having shitty options like Slack. It indicates, that the people care about privacy. A zulip chat I would consider visiting, a Slack would be a hard pass.
I gave it an honest look for 5 minutes and after still only having found a 3-line hello world I gave up (and came here to complain).

It's great that you have all that philosophy behind it, all sounded great, but if you don't show me a compelling example in the first minute or two, not even in tutorial, then you'll fail to capture my interest.

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).
I loved playing with this a few years ago, but have lost track of it for a while.

The causality model was great, but is there a way to handle backpressure now?

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.
It's GC'd, because this is faster and secure.
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!

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.

The difference between Pony and Rust is that Pony allows easy reference cycle.

One of the innovative point of Pony is the iso reference. iso reference means that an object graph is accessible from only that iso reference. It avoids sharing mutable data.

And that it has a nice garbage collector, which is good enough due to the way capabilities work, being per actor, and how references work.
Pony also seems to hide more complexity and come with more batteries included than Rust, making it a little closer to the spirit of Go in that sense. That’s my first impression.
Took a while to find the Hello World. It looks like a sort of oop python.
It doesn't look anything like Python (which is fine at OOP itself).
Don't be tricked by syntax.

It's statically and strongly typed, and super concurrent. It's a very different vibe than anything python.

More like Pascal/Algol/Ada inspired than Python.
Sorry for another complaint, but after skimming through I only see boasting paragraphs without any real information

If I click "why pony" i want to know when to use it. I want to decide for myself if I want to use this

I couldn't find a page where it's clear if I should invest my time in it

How to do this: - examples - companies/projects who use X - what this language aims to do - what this language is good at

> The standard way to avoid these problems is to use locks to prevent data updates from happening at the same time. This causes big performance hits […]

No. Modern mutex implementations [1] are extremely efficient, require only 1 byte of memory (no heap allocation), and are almost free when there's no contention on the lock – certainly much faster and much lower latency than sending messages between actors.

[1] Like the parking_lot crate for Rust.

"Exception-Safe¶ There are no runtime exceptions. All exceptions have defined semantics, and they are always caught."

So checked Exceptions like Java?

It's a great concept but the ecosystem, tooling, and stewardship are really crap.
> Deadlock-Free: This one is easy because Pony has no locks at all! So they definitely don’t deadlock, because they don’t exist! This really annoys me every time I read Pony description. What does deadlock free even mean here? Deadlock-free is typically the property of an algorithm, not a language.

Does pony guarantees forward progress in all cases? Does it means that if I tried to implement a python interpreter in Pony it will statically reject the implementation? Requires me to submit a proof of deadlock freedom with any program I feed the interpreter? Or any python program running on this interpreter is magically free of deadlocks?

edit: as an aside, deadlocks have little to do with locks.

Of course it cannot guarantee forward progress in all cases, because that would be NP.

Pony guarantees deadlock freedom by eliminating locks and other mechanisms that can lead to deadlocks. Instead, Pony uses a message-passing concurrency model and static analysis to prevent data races and deadlocks at compile time. This means developers don't need to worry about manually preventing deadlocks because the compiler handles it. The scheduler is lock-free, the order of message-delivery to all actors is guaranteed.

Here's a more detailed explanation:

Message-Passing:

Pony employs a message-passing model where actors (objects) communicate by sending messages to each other. This avoids the need for shared mutable state and locks, which are primary sources of deadlocks.

Static Analysis:

The Pony compiler performs static analysis to ensure that concurrent access to data is safe. It prevents data races and other concurrency issues that could lead to deadlocks by verifying that no two actors can simultaneously write to the same memory location.

No Locks:

Because Pony doesn't use locks, there's no possibility of threads getting stuck waiting for each other to release locks, which is a common cause of deadlocks.

Data Race Freedom:

By eliminating the possibility of data races (concurrent modification of shared mutable state), Pony also eliminates a major source of potential deadlocks.

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 enthusiasts here seem to be getting quite worked up over how inaccessible the code examples are. Instead of being able to immediately see the syntax so they can rush back here to make insightful and educated comments on how that syntax compares to $their_fave_lang, they are forced to spend up to 4 or even 5 minutes reading documents clearly describing the design of the language, and being obliged to click on their mouses up to 10 times even in some cases.

If a member of the Pony team sees this: even though it's more than a tad ridiculous and you have in fact made a lovely website with loads of clear information, maybe consider adding the "Try it in your browser" link as another option in the burger menu thing on the left. That way it follows everyone around, and you never have to suffer a HN discussion getting needlessly derailed by the resident PL fanatics.

If you want to dive right into what seems like the first key "interesting" idea, it's here:

https://tutorial.ponylang.io/types/actors

If you know a few programming languages I think you should be able to guess what the syntax does from context.

And then the next key idea is here:

https://tutorial.ponylang.io/reference-capabilities/referenc...

(Although I think the first actual interesting I idea I saw was "Destructive read" under https://tutorial.ponylang.io/types/classes#functions , but that's clearly just an isolated quirk, not part of the core idea of the language.)

I lost track of how many links I had to click to get to a screen that had a line of code.
I'm going to join the choir saying that languages need a concise description of what makes them special easily accessible — but while syntax is important, with a language like Pony (where the cool stuff is in the semantics), the cool semantics should be upfront.

It seems, from some skimming of the first like 10 pages of the guide, that Pony is an object-oriented language with actors, and a built-in concept of mutability of references. What kind of references are there? You say that deadlock is impossible; how — do you have session types or something? You say that nulls don't exist; how — do you have linear typing? How do you express capabilities?

Essentially, give me a one-page overview of the static and dynamic semantics (i.e. type system and runtime semantics) that gives me all I need to know about this language to decide whether I want to learn more about it.

The language looks cool, but all documentation I've seen so far seems to assume that the reader doesn't even know what static typing is. To get knowledgeable people interested, I think it's useful to have a pitch that appeals to people who are already familiar with a bunch of languages.

I keep being irritated by the fact that Pony does not have operator precedences. You have to parenthesize arithmetics.