pony
play

Pony A Brief Programming Language Overview! October 2017 - PowerPoint PPT Presentation

Pony A Brief Programming Language Overview! October 2017 Disclaimer! I am a fan of some of the ideas in Pony! I am not a Pony programmer Pony contributor etc Disclaimer! Most of the content of these slides is from Deny


  1. Pony A Brief Programming Language Overview! October 2017

  2. Disclaimer! I am a fan of some of the ideas in Pony! I am not a • Pony programmer • Pony contributor • etc

  3. Disclaimer! Most of the content of these slides is from • Deny Capabilities for Fast, Safe Actors (by Clebsch, Drossopoulou, Blessing, and McNeil) • A blog post by Adrian Colyer on that paper (https://blog.acolyer.org/2016/02/17/deny-capabilities/) Check those out for more info!

  4. Pony is an open-source, object-oriented, actor-model, capabilities- secure, high-performance programming language

  5. Pony describes itself as • Type safe • Memory safe • Exception safe • Data-race free • Deadlock free • Native code compiled • Compatible with C

  6. Other bullets about Pony (from a podcast in July): • Pony has no locks! • Scales from a Raspberry Pi through a 64 core half terabyte machine to a 4096 core SGI beast • Actors have 256-byte overhead, so creating hundreds of thousands of actors is possible • Actors GC their own heaps – no global stop-the-world pauses • Because the type system is data-race free, it’s impossible to have [many common] concurrency problems in Pony

  7. class def field constructor methods

  8. actor def field constructor methods behaviors

  9. reference of type ‘S’ with capability ‘k’ a possibly “unaliased” type Reference capabilities (i.e. deny properties)

  10. Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/

  11. iso : Isolated references form static regions: mutable references reachable via the iso reference can only be reached via the iso reference, and immutable references reachable via the iso reference are either globally immutable or only reachable via the iso reference. Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/

  12. trn : allows an object to be written to only via the trn reference, but read from via other aliases held by the same actor. This allows the object to be mutable while still allowing it to transition to an immutable reference capability in the future, in order to share it with another actor. Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/

  13. ref : a ref variable can be used to read and write the object within an actor, and other variables within the same actor can also be used to read and write the object, but access (both read and write) is denied to any other (global) actor. Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/

  14. val : a val variable is a bit like const, it denotes a variable that is globally immutable – it denies write capabilities both locally and globally (and hence by implication, allows reading from anywhere). Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/

  15. box : a box variable denies any other actors (global actors) the right to use a variable to write to the object. Other variables within the same actor may be used to write to the object, and other actors may be able to read it (but not both). Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/

  16. tag : we can alias a tag (pass it as a parameter, assign it to other tag variables), and we can also invoke behaviors on it. (i.e. to send messages to another another actor, you only need a tag reference to it) Note! A tag reference is opaque, i.e. we can only invoke behaviors or compare Image and descriptions borrowed from https://blog.acolyer.org/2016/02/17/deny-capabilities/ for identity equality.

  17. Recall -- Pony is • Data-race free • Deadlock free (i.e. no locks in runtime) Made possible • GC’d with no global stop-the-world pauses by reference capabilities (since actors GC their own heaps)

  18. Mutable, Doubly Linked List

  19. Persistent list (our old friend)

  20. Persistent list (our old friend)

  21. Persistent list (our old friend)

  22. Pony today? • Version 0.20.0 (breaking changes occur occasionally) • One of the Pony team members is VP of Engineering at Wallaroo Labs, where they use Pony daily. • Under active development (e.g. generalized runtime backpressure is a feature currently being worked on)

  23. To learn more: https://www.ponylang.org

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend