11 ms·
Pony: An actor-model, capabilities-secure, high-performance programming language
https://www.ponylang.io/discover/ https://www.ponylang.io/discover/
https://playground.ponylang.io/ https://playground.ponylang.io/
- throwthrowrow 1y agoDiscussion from 4 years ago: https://news.ycombinator.com/item?id=25957307 https://news.ycombinator.com/item?id=25957307
- tomhow 1y agoThanks! Pony – High-Performance Safe Actor Programming - https://news.ycombinator.com/item?id=25957307 https://news.ycombinator.com/item?id=25957307 - Jan 2021 (152 comments)
- voidUpdate 1y agoI 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 https://tutorial.ponylang.io/getting-started/hello-world
- burnt-resistor 1y agoExactly. A "try language" demo should dive right into an editable executor with syntax highlighting and API-docs floating tool tip code completion. Make it as painless and fast to understand as possible.
- codethief 1y agoYou mean this executor[0] which is linked right there on the page we are discussing here? [0]: http://playground.ponylang.io/ http://playground.ponylang.io/
- ben0x539 1y agoThey should probably put more than three lines of code in there?
- kasey_junk 1y agoThe rust and golang versions are exactly the same. Printing hello world is the default of the industry for this sort of thing.
- ameliaquining 1y agoThe Go playground actually has a dropdown menu with 15 examples, of which "Hello World" is merely the first; together they do a decent job of demonstrating the language's core features. The Rust playground defaults to "Hello World" but that's just because there has to be something there, it's not on the home page of the website or anything (though it used to be).
- kasey_junk 1y agoThe golang playground added those through time though. It f pony gets adoption (and I don’t know why it would) they likely would go through the same transition. Mainly my point is it’s weird to complain about hello world. It’s been the first program for languages for decades.
- burnt-resistor 1y agoThat's not the home page and that's not what I'm talking about if you had bother to have read what I wrote that differs from a conventional and limited "try" playground. Also, I've used Pony before and gave up on it. You also don't get to be the chief decider of what all of us may or may not talk about.
- ratdragon 1y agoExample pony applications: https://github.com/ponylang/ponyc/tree/main/examples https://github.com/ponylang/ponyc/tree/main/examples Playground: https://playground.ponylang.io/ https://playground.ponylang.io/ They're on HP https://www.ponylang.io/ https://www.ponylang.io/ unfortunately the article link points to /discover/
- jillesvangurp 1y agoI was also wondering what kind of language this is and where they were hiding all the code. Even the tutorial requires clicking past several pages of (more) introduction before you get to see any code. Probably better to lead with the code. Less waffling, more code would be my recommendation.
- Timwi 1y agoHonestly, I get it. The document wants to tell you what's new and different under the hood, not what the language looks like superficially. Code examples don't actually tell you what the language feels like in production. It's kinda like judging a person's character by how they dress. I would be torn if I had to write intro documentation like this. On the one hand, people demand code examples, but on the other hand, the majority of people reading code examples will nitpick minor pet peeves in the syntax and completely detract from the actual new ideas and concepts that go way beyond just the syntax. I found the descriptions of the concepts very enlightening and I honestly think they gave me a better idea of what the language would “feel like” to program in than a code example (or a description of the syntax) would have. In theory, syntax should be interchangeable. It's conceivable to parse a syntax into an AST and reexpress it in another syntax without changing the AST. In practice, this is not done for many reasons (incl. tooling like diffs) but a big reason is that individual bits and bobs of the syntax are tied to the new concepts in subtle ways. There could absolutely be multiple syntaxes for the same concept, but if the concept is new, even in small and unobvious ways, then no prior existing language’s syntax will map it exactly. For this reason, a code example can't really express the new concept, especially if the syntax is superficially similar to another language that doesn't actually have that concept.
- archerx 1y agoYea but the syntax looks like a mix of Python and JavaScript. By just seeing that I know I don’t want to use it, by seeing the code up front I know that I don’t want to keep reading what ever rationalizations they have to justify the existence of this language. So by seeing the syntax up front I can save a lot of time because in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most.
- swiftcoder 1y ago> in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most Wat? If all languages were just syntax re-skinning, we really wouldn't need more than one compiler backend... Generally the semantic differences are much more important. Rust isn't interesting for its syntax, it's interesting for its ownership rules and borrow checker. Erlang isn't interesting because of its syntax, it's interesting for its actor model concurrency. And so on...
- jibal 1y agoThe syntax is the least interesting thing about the language, and hello-world examples demonstrate almost none of the syntax. This bit from the About page is notable: "never write a programming language. That’s like rule #1. Everybody will just tell you it isn’t needed and then argue about syntax."
- klas_segeljakt 1y agoIt's not only about showing off syntax. It's also about showing what type of applications the language makes easy to implement.
- jibal 1y agoBut that's not what was asked for. To find that out, one must dig fairly deeply into the documentation ... at least read the About page.
- poulpy123 1y ago> The syntax is the least interesting thing about the language, and hello-world examples demonstrate almost none of the syntax. I agree for the hello world but I disagree with the syntax. It is the first thing you see and the characteristic you can never escape. It is like the layout and typesetting of a text: the substance is of course more important, but it is still very important. I personally find much more readable languages that have a concise-but-not-too-much syntax, that use not too many special characters, and that is read like fortran/pascal/c/etc (I don't how to define it, but for example lisp is different)
- jibal 1y agoFor Pony in particular, the syntax is not important ... it's simply not the point of the language.
- SiempreViernes 1y agoHaving looked at some source examples, I'm pretty sure Pony has syntax errors just like every other parsed language.
- notfed 1y agoEven 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?
- nallerooth 1y agoI 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/ https://nim-lang.org/
- voidUpdate 1y agoYeah, that's exactly the thing I'd hope to see on anything trying to sell me on using a new language. Tell me about what it does, and show me how it does it
- johnisgood 1y agoYeah I think Nim's website is well-made. You can see the features / pros of the language, with many different (and IMO cool) examples.
- 1980phipsi 1y agoThe D language home page has something similar with a drop down with code examples https://dlang.org/ https://dlang.org/
- Alifatisk 1y agoI was about to mention Dlangs website aswell, very well designed and clearly presents the language
- vova_hn 1y agoI 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, and it’s still broken. You can’t really call that “a good presentation of a language” when the very first real-world example links to nowhere—and nobody’s bothered to fix it for years. [0] https://dlang.org/areas-of-d-usage.html https://dlang.org/areas-of-d-usage.html
- stared 1y agoAlso 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.
- brap 1y agoUnfortunately 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!
- rapnie 1y agoSame 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 https://github.com/ponylang/ponyc/tree/main/examples
- katzgrau 1y agoI also (usually) go looking right away to see if the syntax makes me feel warm and fuzzy. I’m so shallow.
- dismalaf 1y agoAgreed. Pony even has nice syntax. Web page is pretty bad though.
- Twey 1y agoI'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/ https://factorcode.org/
- gmfawcett 1y ago(also, velociraptors)
- FrustratedMonky 1y agoI wish these new languages would put an elevator pitch on first page. Why another object language?
- sitkack 1y agoIt is funny you say this, because nearly every posting of the Pony language includes this comment. And it is always apologized as you need to go to https://tutorial.ponylang.io/ https://tutorial.ponylang.io/ which still doesn't have source on it. https://github.com/KittyMac/PonyCAT/blob/master/pony-cheat-sheet.pdf https://github.com/KittyMac/PonyCAT/blob/master/pony-cheat-s... The project looks hostile to any sort of adoption.
- 0x457 1y agoProbably hiding the fact that it's whitespace significant
- spooneybarger 1y agoIt's not.
- 0x457 1y agoWhat is this, then? https://github.com/ponylang/ponyc/blob/main/examples/echo/echo.pony https://github.com/ponylang/ponyc/blob/main/examples/echo/ec...
- __red__ 1y agoIt is not whitespace signficant. That is indented to assist the human reader, not the compiler.
- 0x457 1y agoso you're telling me this is valid Pony? actor Main new create(env: Env) => TCPListener(TCPListenAuth(env.root), Listener(env.out)) ?? If so, I don't want to every see that language in my life ever again.
- jbritton 1y agoI 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.
- thesz 1y agoExamples such as Hello, World! can tell you many things. They can tell you whether language is statically typed or not, does it have an effect typing (it necessarily needs higher order types), does it have type inference, etc, A syntax of one is semantic of other.
- WorldMaker 1y agoCode 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?"
- catlover76 1y ago[dead]
- newswasboring 1y ago>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 https://tutorial.ponylang.io/getting-started/how-it-works
- Timwi 1y agoI personally thought it was pretty well-written. It sticks to the details that are relevant in the moment so it doesn't detract or get bogged down, but it does let you know what other things are there so it doesn't feel limited or barebones.
- simonask 1y agoThis is my pet peeve. "We'll get back to that later" is almost never a useful thing to say, particularly not in writing, and it often just increments the mental burden of the reader by adding another loose end. Instead, outline the concepts you need within context and provide a "Read more" link.
- burnt-resistor 1y agoNotable 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 https://ponylang.zulipchat.com 1. https://www.microsoft.com/en-us/research/project/project-verona https://www.microsoft.com/en-us/research/project/project-ver...
- zelphirkalt 1y agoHaving 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.
- teiferer 1y agoI 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.
- ratdragon 1y agoExample pony applications: https://github.com/ponylang/ponyc/tree/main/examples https://github.com/ponylang/ponyc/tree/main/examples Playground: https://playground.ponylang.io/ https://playground.ponylang.io/ They're on HP https://www.ponylang.io/ https://www.ponylang.io/ unfortunately the article link points to /discover/
- teiferer 1y agoSure, if I go dig deep I'll find that. But I was talking about the sales pitch. Once it's necessary to go click links in a levels-down comment in the HN discussion section, you've already lost most folks.
- jibal 1y agoThey aren't selling anything, and they didn't write their documentation with HN in mind ... the OP is probably not associated with them.
- sbt 1y agoThis 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).
- ndr 1y agoI 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?
- mcintyre1994 1y agoI was randomly looking at examples and I think this is one showing that: https://github.com/ponylang/ponyc/blob/main/examples/under_pressure/main.pony https://github.com/ponylang/ponyc/blob/main/examples/under_p...
- api 1y agoGo 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.
- RossBencina 1y ago> 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.
- __red__ 1y agoI'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_co-design_for_actor_languages.pdf 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.
- delifue 1y agoThe 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.
- pjmlp 1y agoAnd that it has a nice garbage collector, which is good enough due to the way capabilities work, being per actor, and how references work.
- api 1y agoPony 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.
- ucyo 1y agoThere is a nice Podcast about choosing the right programming language for a project and in this, the final choice is relevant to this post :) https://corecursive.com/055-unproven-with-sean-allen/ https://corecursive.com/055-unproven-with-sean-allen/
- macgillicu 1y ago"The love child of Erlang and Rust" Wow, what a phrase! Thanks for the link, very interesting stuff!
- webprofusion 1y agoTook a while to find the Hello World. It looks like a sort of oop python.
- ramon156 1y agoSorry 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
- danneezhao 1y agoWhat's new next we can see?
- adwn 1y ago> 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.
- otabdeveloper4 1y agoA contended mutex is a system call and likely stalls all the CPUs on your machine. Lockfree spinlocks will only waste cycles on one CPU. A huge difference when you have dozens and hundreds of cores.
- adwn 1y ago> A contended mutex is a system call […] Because modern mutexes are so cheap (only 1 byte directly in the data structure, no heap allocation), you can do very fine-grained locking. This way, a mutex will almost never be contended. Keep in mind that a reader waiting on an empty queue or a writer waiting on a full queue will also involve syscalls. > […] and likely stalls all the CPUs on your machine. Huh? Where did you get this idea? Only the waiting thread will be blocked, and it won't "stall" the core, let alone the entire CPU. By the way, if all your threads are waiting on a single mutex, then your architecture is wrong. In the equivalent case, all your actors would be waiting on one central actor as well, so you'd have the same loss of parallelism.
- gpderetta 1y agoSo does a contended queue. As much as I might like the model, message passing is not a silver bullet. Any sufficiently complex message passing system will end up implementing shared memory on top of it... and mutexes.
- alfanerd 1y agoSending 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"
- pjmlp 1y agoWithout wanting to derail the conversation too much. Its original designer, Sylvan Clebsch, is nowadays working at Microsoft Research on languages like Verona [0], the last paper he contributed to, which has Guido as well among the collaborators, is about adding regions to dynamic languages, using Python as example implementation, https://www.microsoft.com/en-us/research/publication/dynamic-region-ownership-for-concurrency-safety/ https://www.microsoft.com/en-us/research/publication/dynamic... [0] - https://www.microsoft.com/en-us/research/project/project-verona/ https://www.microsoft.com/en-us/research/project/project-ver...
- CharlieDigital 1y agoNotable the Microsoft has not one but two actor model "frameworks": Orleans (for .NET) and Dapr Actors (for containerized workloads).
- pjmlp 1y agoProbably even more, most folks aren't aware of how many research is sponsored by Microsoft Research across all their university sites.
- guiriduro 1y agoThe .NET ecosystem itself has another mature actor-based framework in Akka.NET, being probably closest to the Erlang/Elixir supervisor style, in C#/F#.
- halfmatthalfcat 1y agoHighly recommend Akka(.NET). Batteries included framework that scales really well.
- threatofrain 1y agoIs Verona still receiving attention? Seems like a quiet project.
- 1y ago
- zelphirkalt 1y agoAs always with the languages, I think about what the ecosystem looks like. What libraries exist? Seems there is a list of available packages on their website: https://www.ponylang.io/use/packages/ https://www.ponylang.io/use/packages/
- xnorswap 1y agoI clicked one at random (net_ssl) to get a sense of what a package looked like in this ecosystem and how to install it, but it takes you straight to a github page which says it's deprecated and to use a different package (ssl) instead, which is not listed on the packages page. Not a great look, although it looks like it was only deprecated 2 weeks ago, so I'll give them a pass.
- zelphirkalt 1y agoWith such sanctified list of libraries, I think it is not unlikely, that more packages exist out there, that are simply not listed, or that there are repos out there, showing how to do things, but are not isolated libraries. Maybe a third-party awesome list or so would be interesting. Other than that, I guess one could get involved in the community to ask questions about things one needs for some project, or search more specifically for things one needs and hope to then find them.
- spooneybarger 1y agoThanks. I had missed that. https://github.com/ponylang/ponylang-website/commit/89211a89c9df5ef37cceb1d38ed45030d9003be7 https://github.com/ponylang/ponylang-website/commit/89211a89...
- seunosewa 1y ago"Exception-Safe¶ There are no runtime exceptions. All exceptions have defined semantics, and they are always caught." So checked Exceptions like Java?
- ameliaquining 1y agoThe difference is that there's only one exception type and it can't carry payloads. This turns out not to be very different from an option type like in Rust or Swift, just with a bit of syntactic sugar around it.
- pjmlp 1y agoIn Rust and Swift they can have payloads and variants, which in Rust's case due to lack of ergonomics, there are plenty of macro crates to work around this.
- ameliaquining 1y agoYeah, to be clear, it's similar to an option type rather than a result type.
- spopejoy 1y agoHmm ... 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?
- ameliaquining 1y agoSo 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 errors; either a function is guaranteed not to fail, or it isn't. A function that isn't is called "partial", and can only be called either from another partial function or from a try block that specifies how to handle errors. So anything that can fail in any way, including indexing into an array, has to be partial; there's no way to tell the compiler "please don't force my caller to handle the possibility of a bounds check failure, I'm sure that won't happen, and if it does then everything is terminally messed up and we should just crash". Likewise with a value of a union type being None when it shouldn't be, or otherwise being the wrong type. (They tried having integer division be partial, but apparently that was a bridge too far—so instead, any integer divided by zero is zero.) The top-level error-handling pattern would need to be implemented by making basically every non-leaf function in your codebase partial. Also, these errors can't have payloads or anything, so the top-level handler can't make use of any diagnostic information (if you want that then you need to instead return a custom union type and forgo the partial-function syntactic sugar). I haven't actually used Pony in anger but this is definitely the feature of the language that impresses me least; it's ostensibly in the name of correctness, by prohibiting programs from crashing, but you can't actually prevent the root causes of crashes without dependent types, so instead they've made this mess that makes effective error handling impossible. Rust: Exceptional results are represented with the Result type, instances of which are just values returned from a function like any other. There's syntactic sugar (the ? operator) to propagate an error up a stack frame. A Result has a payload whose type must be specified; ergo, every function's API must effectively declare not only whether it can return exceptional results, but also what kinds. In a library, you'd typically design a structured error type to represent the possible exceptional results that your API can return, but in a binary, you may not care about that level of detail in each function's API, and instead prefer to return a catchall "some exceptional failure, idk what" type. Out of the box the language has Box<dyn Error> for this, but it's more common to use a third-party crate like anyhow or eyre that makes this pattern more ergonomic. In an application that handles errors this way, most likely every function that does I/O returns Result<T, Box<dyn Error>> (or the anyhow or eyre equivalent), while functions that just do pure computation on trusted data return non-Result types. Runtime errors use a different system, panics, which are not part of a function's API (so any function can panic); by default, panicking unwinds the call stack until it reaches a catch_unwind call or the bottom frame of the current thread's stack (allowing a top-level handler to use catch_unwind or Thread::join to catch and handle runtime errors), but when building an executable binary you can instead configure it to skip all that and immediately crash the process when a panic occurs (there are pros and cons to doing this). For this reason, library code can't rely on catch_unwind working, so it's important for libraries not to try to use panics to convey recoverable errors. A Result can be turned into a panic with the unwrap method, if you're sure that the relevant exceptional result can't occur or if you're just being lazy/writing prototype throwaway code and don't want to bother getting the function signatures right. Swift: Exceptional results work like checked exceptions in Java, but without all the problems that make the latter not work very well in practice. Each function signature can either never throw anything (the default), throw any Error (with an arbitrary payload whose type is unknown at compile time, analogous to Rust's Box<dyn Error>), or throw a specific Error subtype with a specified payload (this last one is uncommon). When calling a throwing function, you must either handle the error or (if you throw a compatible type) propagate it up to your own caller; there are various syntax-sugar niceties to handle this. There's a Result type like in Rust but it's not commonly used as a return value, it's mostly only needed if you're storing errors in data structures or similar. So a top-level error handler is done by having all functions that do I/O be throwing functions, like in Rust but with nicer syntax. Runtime errors are not declared in function signatures and always immediately crash the process; unlike in Rust, there is no way to have a top-level handler for them. Like in Rust, you can turn an exceptional result into a runtime error (Swift's syntax for this is the try! operator).
- anacrolix 1y agoIt's a great concept but the ecosystem, tooling, and stewardship are really crap.
- jmcgough 1y agoIt's sad that the only company using it in production switched to using Rust.
- pull_my_finger 1y agoThe only company "publicly" using it. I know Sean has mentioned there's a lot of fintech (i think) using it, just not blogging about it.
- spooneybarger 1y agoI didn't say that but it isn't far from what I said. I said that we have from time to time seen that indications of non public use but there is nothing I can point to.
- __red__ 1y agoTO 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.
- gpderetta 1y ago> 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.
- BlanketLogic 1y agoIt is based on actors and "reference capabilities". These two blogs[1,2], could provide nice introduction. 1. https://blog.jtfmumm.com//2016/03/06/safely-sharing-data-pony-reference-capabilities/ https://blog.jtfmumm.com//2016/03/06/safely-sharing-data-pon... 2. https://bluishcoder.co.nz/2017/07/31/reference_capabilities_consume_recover_in_pony.html https://bluishcoder.co.nz/2017/07/31/reference_capabilities_...
- gpderetta 1y agoThat's quite interesting, but it doesn't answer the question: Would the python program running on an interpreter written in pony deadlock or not?
- throwaway328 1y agoRequest to HN mods: that the link be changed from https://www.ponylang.io/discover/ https://www.ponylang.io/discover/ to https://www.ponylang.io/ 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.
- tomsmeding 1y agoPersonally, I would say that if one is a real PL fanatic, one is more interested in the semantics than the syntax. :) The problem with the linked docs on the Pony website is not that it doesn't explain the semantics (it does!) but that it seems to be written at a pace appropriate for someone who has no clue what static types even are. [1] Give a concise demonstration of the syntax and the semantics, even if that means that the latter will use terminology that not everyone will understand. Then the full tutorial is there for the details. [1]: https://news.ycombinator.com/item?id=44722779 https://news.ycombinator.com/item?id=44722779
- Mawr 1y ago> 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. Welcome to interface design! Your way of thinking could not be more wrong if you tried :) How buying stuff on say Amazon works: 1. Click on picture of a car 2. Click "Buy Now" How it would look like if we apply yours/the Pony website designers' approach: 1. Read a 10 page description of what the car is 2. Click on a link buried on page 12 that lets you buy the thing Which approach gets more sales?
- gwd 1y agoIf you want to dive right into what seems like the first key "interesting" idea, it's here: https://tutorial.ponylang.io/types/actors 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/reference-capabilities 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 https://tutorial.ponylang.io/types/classes#functions , but that's clearly just an isolated quirk, not part of the core idea of the language.)
- brightball 1y agoAugust 15th and 16th there will be a talk on Pony at the Carolina Code Conference in Greenville, SC. https://carolina.codes https://carolina.codes
- pseudocomposer 1y agoWas this meant to be a reply to the top-level story, and not a specific comment? It seems really bizarre to respond to “there should be easily-accessible examples of code that demonstrate the language’s key features on the website” with “there’s a $200 conference in South Carolina where there will be a talk on it.” Honestly, it comes across as not just bizarre, but somewhat disrespectful (though I’m sure that was not your intention).
- brightball 1y agoI just clicked the first reply button in a hurry when I saw the Pony thread. It's hard to turn off the conference promoter mode. :-) My apologies.
- dang 1y agoMoved to toplevel now :)
- brightball 1y agoThanks!
- bdcravens 1y agoI lost track of how many links I had to click to get to a screen that had a line of code.
- tomsmeding 1y agoI'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.
- ameliaquining 1y agoI agree with you, but also, it is legitimately hard to explain concisely the unique aspects of Pony's semantics. My short attempt at it from a couple years ago: https://news.ycombinator.com/item?id=33980738 https://news.ycombinator.com/item?id=33980738
- tomsmeding 1y agoThank you! This is quite illuminating. It's not enough for me to know precisely how the language works or how it feels to program in it, but it allows me to put the language in a box so that I know what concepts it introduces and what problems it tries to fix. :)
- TOGoS 1y agoI don't have a one-page overview of Pony, but I did listen to https://corecursive.com/055-unproven-with-sean-allen/ https://corecursive.com/055-unproven-with-sean-allen/ in the car a couple of times and that made me want to try it.
- 1y ago
- NortySpock 1y agohttps://youtu.be/u9da3UzEhEI https://youtu.be/u9da3UzEhEI For those who enjoy long form video interviews, here is Kris Jenkins of Developer Voices interviewing Sean Allen on Pony language
- babygetoboy 1y agoHere is a talk about Pony https://www.youtube.com/watch?v=WlGSpYFntUU https://www.youtube.com/watch?v=WlGSpYFntUU
- tempodox 1y agoI keep being irritated by the fact that Pony does not have operator precedences. You have to parenthesize arithmetics.
- gwd 1y agoOK, so having poked around the documentation a bit, I do think the Pony documentation could use a lot more examples. But there's one reasonably concrete example here: https://patterns.ponylang.io/data-sharing/isolated-field https://patterns.ponylang.io/data-sharing/isolated-field Basically what I gather is: 1. Actors are like threads, but have data structures associated with them. Actors have functions like methods associated with them called "behaviors", which are called asyncronously. BUT, any given Actor will only ever have one thread of execution running at a time. So calling a "behavior" is like sending a message to that actor's thread, saying, "Please run this function when you get a chance"; "when you get a chance" being when nothing else is being run. So you know that within one Actor, all references to Actor-local data is thread-safe. 2. They have different types of references with different capabilities. Think "const *" in C, or mutable and immutable references in Rust, but on steroids. The extra complexity you do in managing the types of references means that they can get the safety guarantees of Rust without having to run a borrow checker. So in the above example, they have a Collector actor with an internal buffer. Anyone can append a character tot he internal buffer by calling Collector.collect(...). Code execution is thread-safe because the runtime will guarantee that only one thread of Collector will run at a time. The data is of type 'iso' ("isolated"), which ensures that only one actor has a reference to it at any time. Once the internal buffer gets up to 10, the Collector will transfer its buffer over to another Actor, called a Receiver, by calling Receiver.receive(...) with its own internal buffer, allocating a new one for subsequent .collect() calls. But its internal buffer has a reference of type 'iso', bound to Collector. How can it transfer this data to Receiver? The magic is in these two lines: let to_send = _data = recover Array[U8] end This creates a new local variable, to_send. Then it atomically: - makes a new Array[U8] of type iso - assigns this new array t; Collector._data - Assigns the old value of Collector._data to to_send Now Collector._data has a new reference of type iso, and to_send has the old one. Next we do this: _receiver.receive(consume to_send) The "consume" ensures that to_send can't be referenced after the consume call. So the compiler can verify that Receiver.receive() will be the only one able to access the old value of _data that we passed it. Sounds like an interesting approach; it would be nice to see more examples of realistic patterns like this; perhaps simple sequential programs broken down into multiple actors, or things like a simple webserver implementation, with some sort of shared state.
- germandiago 1y ago> Incorrectness is simply not allowed. It’s pointless to try to get stuff done if you can’t guarantee the result is correct. This is more nuanced actually. And it could have implications and contradictions with "get stuff done". IfI can have a non-provable piece of code that serves me well 99% of the time I could save coding time at the expense of correctness and could fit the bill for my use case.
- wongarsu 1y agoEven academic mathematics and computer science work like that to a degree. We get a lot of stuff done assuming P != NP, that no polynomial-time prime factorization algorithm for classical computers exists, that one-way functions exist, etc. As long as assumptions are clearly stated and are routinely questioned it's fine to have them
- syngrog66 1y ago[flagged]
- wongarsu 1y agoI love the syntax for checked math. a + b for wrap around, a +? b to raise an exception on under/overflow, and a +~ b for maximum performance, leaving behavior on under/overflow undefined (including floats having undefined behavior on +-Inf and NaN). Compared to e.g. Rust (one of the better modern examples of easy rigorous math) I really like how concise they are. What I'm missing are saturating operations. I know some people find them useless, and through a "perfect results" lens they are, but they still give you the closest representable number. And they are often intuitive for humans since that's how most analog instruments work
- renox 1y agoIt's interesting that Rust and Pony have différent default for addition.
- 1-more 1y agoA fun fact about Pony: it solves the problem of division not being total by making integer division by zero equal zero! A few proof assistants and Elm take this approach too.
- dmux 1y agoI think this is the first time I've seen a github badge (with number of stars) that's for the website itself and not the language repo!
- thebeardisred 1y agoBringing more pony play into computing.
- vfclists 1y ago> 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 https://tutorial.ponylang.io/getting-started/hello-world + 85 replies The usual HN post where the threads which are tangential to the topic always rise to the top. How much irrelevant dross to readers have to read through before they get to comments on the actual product? Time to sit back and see if this one will also rise to the top or somewhere near.
- dang 1y agoRelated. Others? The New Wave of Programming Languages: Pony, Zig, Crystal, Vlang, & Julia - https://news.ycombinator.com/item?id=36911186 https://news.ycombinator.com/item?id=36911186 - July 2023 (9 comments) Pony Programming Language - https://news.ycombinator.com/item?id=33970547 https://news.ycombinator.com/item?id=33970547 - Dec 2022 (82 comments) We moved from Pony to Rust - https://news.ycombinator.com/item?id=28777306 https://news.ycombinator.com/item?id=28777306 - Oct 2021 (175 comments) Pony – High-Performance Safe Actor Programming - https://news.ycombinator.com/item?id=25957307 https://news.ycombinator.com/item?id=25957307 - Jan 2021 (152 comments) Pony, Actors, Causality, Types, and Garbage Collection - https://news.ycombinator.com/item?id=24398469 https://news.ycombinator.com/item?id=24398469 - Sept 2020 (29 comments) Pony 0.29 - https://news.ycombinator.com/item?id=20370448 https://news.ycombinator.com/item?id=20370448 - July 2019 (19 comments) Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart - https://news.ycombinator.com/item?id=19241427 https://news.ycombinator.com/item?id=19241427 - Feb 2019 (143 comments) Pony 0.25.0 released - https://news.ycombinator.com/item?id=18212633 https://news.ycombinator.com/item?id=18212633 - Oct 2018 (38 comments) Introduction to the Pony programming language - https://news.ycombinator.com/item?id=17195580 https://news.ycombinator.com/item?id=17195580 - May 2018 (72 comments) Pony (programming language) Cheat Sheet - https://news.ycombinator.com/item?id=17118368 https://news.ycombinator.com/item?id=17118368 - May 2018 (1 comment) The Snake and the Horse: How Wallaroo's Python API Works with Pony - https://news.ycombinator.com/item?id=16768706 https://news.ycombinator.com/item?id=16768706 - April 2018 (8 comments) Some high level information about the Pony programming language - https://news.ycombinator.com/item?id=16619264 https://news.ycombinator.com/item?id=16619264 - March 2018 (10 comments) Why we wrote our Kafka Client in Pony - https://news.ycombinator.com/item?id=16264845 https://news.ycombinator.com/item?id=16264845 - Jan 2018 (95 comments) Why we used Pony to write Wallaroo - https://news.ycombinator.com/item?id=15558051 https://news.ycombinator.com/item?id=15558051 - Oct 2017 (84 comments) Pony Performance Cheatsheet - https://news.ycombinator.com/item?id=14999899 https://news.ycombinator.com/item?id=14999899 - Aug 2017 (35 comments) Pony: Combining safe memory sharing with Erlang-like actors - https://news.ycombinator.com/item?id=14676505 https://news.ycombinator.com/item?id=14676505 - July 2017 (62 comments) An Early History of Pony - https://news.ycombinator.com/item?id=14280565 https://news.ycombinator.com/item?id=14280565 - May 2017 (8 comments) Pony language 0.11.0 released - https://news.ycombinator.com/item?id=13846063 https://news.ycombinator.com/item?id=13846063 - March 2017 (52 comments) On the State of Pony - https://news.ycombinator.com/item?id=12331458 https://news.ycombinator.com/item?id=12331458 - Aug 2016 (40 comments) Using Pony for Fintech [video] - https://news.ycombinator.com/item?id=11849579 https://news.ycombinator.com/item?id=11849579 - June 2016 (6 comments) Pony is an open-source, actor-model, high performance programming language - https://news.ycombinator.com/item?id=10902906 https://news.ycombinator.com/item?id=10902906 - Jan 2016 (57 comments) Pony – High Performance Actor Programming - https://news.ycombinator.com/item?id=9482483 https://news.ycombinator.com/item?id=9482483 - May 2015 (124 comments)
- matesz 1y agoFor anyone interested in a deeper dive into the foundations of the Actor Model, I highly recommend this entertaining 45-minute explainer by Carl Hewitt, one of the model’s original pioneers: https://m.youtube.com/watch?v=7erJ1DV_Tlo https://m.youtube.com/watch?v=7erJ1DV_Tlo