Earlier quoted context omitted.
This sounds a lot like someone learning Rust. Both languages solve similar problems with very different solutions that come with complexity overhead.
At least with Rust, very few domains involve so much parallelism that one benefits from the overhead that the borrow checker adds to the development process. And many times the borrow checker is completely inadequate at preventing race conditions (frequently the case with distributed computing). Of course, Rust can recoup those losses elsewhere, by having better tooling or competing in domains where performance matte…
Pony – High-Performance Safe Actor Programming
121–130 of 159 posts
Re: Pony – High-Performance Safe Actor Programming
#122Re: Pony – High-Performance Safe Actor Programming
#123Earlier quoted context omitted.
It's sort of a general question though. What happens if I use a C library from Pony that does or can potentially do unsafe things. I'm not sure I understand how such situations can be solved without some kind of a locking mechanism. I mean, the answer can be 'just rewrite the underlying library in Pony'. Which would be fair enough.
That's an incredibly general question. "It depends on the specifics" would be the general answer. Once you use FFI, there's no guarantee of memory safety as the C code has access to the entire address space of the process. There is no sandboxing of foreign code at this time. If the code you are calling isn't thread safe and you run your Pony program with more than 1 scheduler thread (pony actors get run on 1 or more…
So from what I could gather from a quick glance through the tutorial, that would be to restrict the C code calls to a single actor, and have other actors call, I guess primarily through the async behaviors?
Re: Pony – High-Performance Safe Actor Programming
#124Earlier quoted context omitted.
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/
We do have an online playground! You can try it here: https://playground.ponylang.io/ It's linked from the page, but we should make it more obvious.
Re: Pony – High-Performance Safe Actor Programming
#125Earlier quoted context omitted.
That's an incredibly general question. "It depends on the specifics" would be the general answer. Once you use FFI, there's no guarantee of memory safety as the C code has access to the entire address space of the process. There is no sandboxing of foreign code at this time. If the code you are calling isn't thread safe and you run your Pony program with more than 1 scheduler thread (pony actors get run on 1 or more…
> maybe you can structure the Pony API so that you don't do that So from what I could gather from a quick glance through the tutorial, that would be to restrict the C code calls to a single actor, and have other actors call, I guess primarily through the async behaviors?
Re: Pony – High-Performance Safe Actor Programming
#126Earlier quoted context omitted.
At least with Rust, very few domains involve so much parallelism that one benefits from the overhead that the borrow checker adds to the development process. And many times the borrow checker is completely inadequate at preventing race conditions (frequently the case with distributed computing). Of course, Rust can recoup those losses elsewhere, by having better tooling or competing in domains where performance matte…
What domain is that?
Re: Pony – High-Performance Safe Actor Programming
#127Earlier quoted context omitted.
Right, I should have said "race conditions"; it hadn't occurred to me that the two weren't synonymous. My point wasn't that Pony does prevent race conditions, but rather that non-data-race race conditions are much more common in my domain (distributed computing) or really any domain where multiprocess architectures are common so I don't benefit much from the static guarantees that Rust affords.
Pony does not prevent race conditions. Two actors can wait forever for the other to send a message, deadlocking.
Re: Pony – High-Performance Safe Actor Programming
#128Earlier quoted context omitted.
i hope you have a tool that pulls all those links together for you.
I think the tool is probably this one: https://hn.algolia.com/
Re: Pony – High-Performance Safe Actor Programming
#129Earlier quoted context omitted.
This sounds a lot like someone learning Rust. Both languages solve similar problems with very different solutions that come with complexity overhead.
At least with Rust, very few domains involve so much parallelism that one benefits from the overhead that the borrow checker adds to the development process. And many times the borrow checker is completely inadequate at preventing race conditions (frequently the case with distributed computing). Of course, Rust can recoup those losses elsewhere, by having better tooling or competing in domains where performance matte…
Re: Pony – High-Performance Safe Actor Programming
#130Anyone know the judgement rules behind the interesting parts of Pony's type system? I'm about to crack the dissertation to see what's up but would love a concise description. https://www.ponylang.io/media/papers/a_prinicipled_design_of...
Capabilities describe both uniqueness and read-write ability. `iso` is fully unique and hence sendable, `trn` and `val` are write-unique (but `val` is also sendable since it isn't writable). The `tag` capability allows identity/message sending and is fully sendable
Recover blocks and automatic receiver recovery allow creation/usage of isolated data if only sendables are used from the external environment.
Only sendables can be included in messages.
Actors have `ref` access to themselves but `tag` access to other actors.