
Pony, Actors, Causality, Types, and Garbage Collection - pjmlp
https://www.infoq.com/presentations/pony-types-garbage-collection/
======
staticassertion
Pony is an amazing language, but I feel like it burned its entire complexity
budget. Reference capabilities are really great, but they have this weird
special syntax around them, and they're all termed in a very unique way.

I very much want a language like Pony because, as this talk demonstrates, it's
doing some incredibly cool and powerful things. But it's pretty confusing.

Rust types like Arc, Mutex, &, &mut, and affine, have been wayyyy easier to
learn for me because they aren't totally new concepts - I know what Arc is,
Mutex, references are, moves are new but that's just one thing and it wasn't
too crazy coming from C++. I know how to convert between these types because
they're regular structures, with methods and documentation like all other
structures. This is in really direct contrast to my experience with Pony where
I had to learn like 6 new keywords, try to map them back to my own reference
model, and, worst of all, trying to remember the strange incantation to map
between them. I bet this is a "learn it once" thing, and it would be fine if
that were the _only_ new thing, but it's not - there are object capabilities,
actors, learning the runtime/GC, learning new libraries, etc - there just
isn't enough complexity budget in my brain for all of these things.

I contrast this with Rust, which people consider quite hard to learn, and Pony
has just been way, way harder. It's a little "too good" \- nothing in Pony is
unjustifiable, like not having assertions/ failures, but I really want those
things! Division by 0 is a perfectly fine thing to define as returning 0, I
seriously don't even care, but it's just one more straw.

All in all, I was so hooked on learning Pony at first, totally enamored, and
then I just found that I couldn't justify putting in the time.

I ended up writing an actor library inspired in part by Pony for Rust, using
macros, and I've been fairly satisfied - though there's much more Pony offers,
by far. I'd really like to see more actor model languages crop up, and
incorporating many features that Pony has, but maybe making some 'worse is
better' decisions in a few places.

~~~
rkallos
I had the opposite experience to you. I found Pony much easier to learn than
Rust.

Reference types are probably the trickiest bit to learn, especially in how
they relate to Pony's generics. Everyone is different, but I found learning
the 6 reference capabilities to be a lot easier than trying to understand
borrowing and lifetimes in Rust.

I readily accept other reasons not to pursue Pony; it's library ecosystem is
budding, the runtime is still a bit unstable, and there is limited support for
non-x86_64 architectures. However, I invite anyone reading this comment to
form their own opinion of the language. I feel I've benefited greatly from
learning it.

Also, Pony has a pretty active community on Zulip, where you will find people
who will jump at the chance to help you get unstuck while you're writing Pony.
[https://ponylang.zulipchat.com/](https://ponylang.zulipchat.com/)

~~~
vanderZwan
> _I feel I 've benefited greatly from learning it._

I have this feeling (or maybe I should say "hope") that once you learn Pony
reasonably well, you kind of take that "reference type awareness" with you and
it will make you a better programmer no matter what language you are
programming in. It basically makes explicit what you should already be doing
implicitly.

I really should put in the effort to learn it someday

------
smallstepforman
I’ve been following Pony for a couple of years, and fear they’ve lost momentum
and drive, which doesn’t bode well for the future of the language. My major
grief is no support for “locked” (or synchronous) patterns, ie. when actor#A
needs to modify actor#B and have the change accessable in the same
Actor#A::Behaviour. In my own Actor framework (C++), I’m forced to implement a
LockToWorkThread() pattern where I prohibit Actor#B from being scheduled on
other work threads while locked. This way 2 Actors can interact from an
“atomic” Behaviour() function. However, C++ doesnt protect against sharing
pointers so I’m always on eggshells.

~~~
ivanbakel
It seems like your major grief is at serious odds with the design principles
of the language itself.

It's very difficult to introduce any kind of synchronous behaviour that
doesn't also allow deadlocks. "Locking" an actor to prevent it from processing
messages would very trivially allow for deadlocks - and since Pony intends to
avoid them by design, the language can't ever allow for it.

Why are promises not fit for your purpose?

~~~
spooneybarger
Verona has been exploring the idea of "behavior-oriented programming" as
compared to "actor-oriented" like we have in Pony.

Verona's model allows for something along the lines of what is being
suggested. How that works out in the long run, we'll see. It's still very
early days for Verona.

A number of folks working on Pony also are associated with Verona and vice-
versa so there's a cross-polination of ideas going on.

[https://github.com/microsoft/verona](https://github.com/microsoft/verona)

In particular see:

[https://github.com/microsoft/verona/blob/master/docs/explore...](https://github.com/microsoft/verona/blob/master/docs/explore.md#concurrent-
mutation-and-memory-safety)

and

[https://github.com/microsoft/verona/blob/master/docs/explore...](https://github.com/microsoft/verona/blob/master/docs/explore.md#concurrent-
ownership)

------
spooneybarger
I'd like to extend an invitation to anyone who is interested in learning more
about Pony to join us in our community Zulip. Various Pony core team members,
committers, and other interested folks are often on and regularly answer
questions etc from people who are interested in learning more.

[https://ponylang.zulipchat.com/#](https://ponylang.zulipchat.com/#)

And you can find more Pony related content on the website:

Talks (and what-not): [https://www.ponylang.io/community/planet-
pony/](https://www.ponylang.io/community/planet-pony/) Papers:
[https://www.ponylang.io/community/#papers](https://www.ponylang.io/community/#papers)

------
ProfHewitt
Actors are described here:

[https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3418003](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3418003)

------
devmunchies
Judging from github contributions and user profiles it looks like the creator,
Sylvan Clebsch, works in the Microsoft Research Lab, but he isn't involved
anymore. Someone else working at Microsoft, Sean Allen, is the new owner?

[https://github.com/ponylang/ponyc/graphs/contributors](https://github.com/ponylang/ponyc/graphs/contributors)

Is MSFT involved with pony (that'd be huge) or is this just a MSFT employee
side project?

~~~
pjmlp
Sylvan Clebsch now is on Project Verona, alongside David Chisnall that used to
contribute to GNUStep and also researcher on CHERI CPU.

[https://www.microsoft.com/en-us/research/project/project-
ver...](https://www.microsoft.com/en-us/research/project/project-verona/)

The Imperial College hosts a Microsoft Research unit.

~~~
devmunchies
wow so many languages being researched/developed at microsoft. There's this
one too: [https://www.microsoft.com/en-us/research/project/bosque-
prog...](https://www.microsoft.com/en-us/research/project/bosque-programming-
language/)

~~~
pjmlp
Microsoft Research does lots of cool stuff, occasionally some of it actually
lands on Windows.

MDIL (Windows 8.x .NET compiler based on Bartok from Sigularity), .NET Native,
async/await and C# 7+ low level features (influenced by Midori), WSL
(picoprocesses came from DrawBridge), Windows 8 USB stack (P language), driver
validation (Z prover),....

------
ssivark
Is there a clear explanation of how Pony's concurrency (actor) model is
different from Erlang/Elixir, and what implications that has in practice?

~~~
rkallos
Yes there is!
[https://www.youtube.com/watch?v=_0m0_qtfzLs](https://www.youtube.com/watch?v=_0m0_qtfzLs)

~~~
ProfHewitt
Actors are described here:

[https://papers.ssrn.com/abstract=3418003](https://papers.ssrn.com/abstract=3418003)

------
the_duke
I was excited about Pony a few years ago.

But then the company went bust and development slowed down. I checked it out
again ~ 1 year ago and both language and ecosystem did not look terribly
healthy or active.

What's the current status?

ps: I love the video + synchronized slides side by side. I wish this was more
common for talks. There should be resizing functionality though.

~~~
spooneybarger
Hi,

Excellent question. I can't address "healthy or active" as those would really
be your own metrics to decide.

We have a lot of things going on including:

Work on a new dependency manager:
[https://github.com/ponylang/corral](https://github.com/ponylang/corral)

Work on an installation tool to make it easier to get started with Pony:
[https://github.com/ponylang/corral](https://github.com/ponylang/corral)

A lot of work has gone into making our release process across projects much
easier to deal with as it was problematic before.

Joe, a core team member, has been working on ideas to address problems that
we've seen folks experience with Pony. He has a semi-functional experimental
compiler that will hopefully see the light of day eventually.

We've been working on some runtime improvements that will eventually see the
light of day.

Most of the work that goes on these days is in repos other than the ponyc repo
that most people tend to look at.

In the end, the important thing to know is that Pony is a volunteer driven
project and thus, moves at a different timeline than something like Go or Rust
with a lot of backing.

Those of working on Pony are doing it because we believe that in the long run,
the time we put in outside of our jobs will be worth it. But our timeline is
probably a lot longer than other folks.

-Sean, a Pony core team member.

------
posnet
[https://github.com/WallarooLabs/wallaroo](https://github.com/WallarooLabs/wallaroo)
is probably the largest example of an open source pony project.

------
Thaxll
What's the status with Wallaroo Labs and Pony, are they still using the
language?

------
ProfHewitt
Actors are described here:

[https://papers.ssrn.com/abstract=3418003](https://papers.ssrn.com/abstract=3418003)

~~~
BalinKing
Regarding the spam with these comments from ProfHewitt: I don't know anything
about Prof. Hewitt personally, so this isn't intended as an insult (assuming
the user ProfHewitt actually _is_ him). However, he has been banned from
Wikipedia in the past[1] for inappropriate self-promotion (specifically
regarding actors), which might be relevant given that the article in the
parent comment is Prof. Hewitt's.

[1]
[https://en.wikipedia.org/wiki/Talk:Carl_Hewitt#Short_history...](https://en.wikipedia.org/wiki/Talk:Carl_Hewitt#Short_history_of_Hewitt_at_Wikipedia)

