0.19.0 Released

Saturday, September 02, 2017 | Posted in Release

Pony 0.19.0 contains breaking changes. If you don’t use the Itertools package then upgrading should be painless. If you do use Itertools, the process should be relatively straightforward. MacOS, FreeBSD and Dragonfly BSD users are recommended to upgrade as soon as possible to fix a race condition on the kqueue event system.

Improve the Itertools API

The implementation of RFC #49 makes many changes to the itertools package. The first significant change is that all classes other than Iter have been removed. All of these classes have had equivalent functions in the Iter class, the exception being Repeat, which is now handled by the repeat_value constructor. So, for example, Repeat[String]("a") should be replaced by Iter[String].repeat_value("a").

Another significant change is that fold has become non-partial and has had its arguments switched so that the lambda is placed last. For example:

let sum =
    Iter[I64]([1; 2; 3].values())
      .fold[I64]({(sum: I64, n: I64): I64 => sum + n }, 0)?

Should be replaced by

let sum =
  Iter[I64]([1; 2; 3].values())
    .fold[I64](0, {(sum: I64, n: I64): I64 => sum + n })

If the lambda argument to fold needs to be partial, then you should use the new fold_partial method.

Other methods have been added to the Iter class such as flat_map, filter_map, as well as methods that allow lambdas with ref receivers for stateful transformations. These methods have a “_stateful” suffix, such as map_stateful and filter_stateful.

Fix signals on Sierra

MacOS Sierra changed how signals are delivered to multithreaded processes. Pony’s signal handling has been broken on Sierra since it was introduced. It’s now fixed as Sylvan and Sean finally sat down to figure out what was going on.


  • Fix codegen failures on incompatible FFI declarations (PR #2205)
  • Disallow named arguments for methods of a type union where parameter names differ (PR #2194)
  • Fix compiler crash on illegal read from ‘_’ (PR #2201)
  • Fix signals on Sierra (PR #2195)
  • Fix race condition in kqueue event system implementation (PR #2193)


  • pony_chain runtime function


  • The pony_sendv and pony_sendv_single runtime functions now take a message chain instead of a single message
  • Improve the itertools API (RFC 49) (PR #2190)
  • Forbid struct finalisers (PR #2202)


Sean T. Allen

Sean is a member of the Pony core team. His turn-ons include programming languages, distributed computing, Hiwatt amplifiers, and Fender Telecasters. His turn-offs include mayonnaise, stirring yogurt, and sloppy code. He is one of the authors of Storm Applied, and VP of Enginerring at Wallaroo Labs.