0.32.0 Released

Sunday, September 29, 2019 | Posted in Release

Pony version 0.32.0 is now available. This release includes a few minor breaking changes that should be easy to adjust to. There are no pressing bugs closed by the release, so feel free to upgrade at your leisure.

Two important Notes:

  • Due to a change in COPR’s Fedora build configuration, there will be no 0.32.0 prebuilt packages available on COPR for Fedora. We should have that resolved before the next release. If you’d like to help address the issue, you can learn more on GitHub.

  • It appears that Homebrew’s Jenkins system is very backed up. There are still CI jobs from 5 days ago that haven’t completed. We are moving ahead with announcing the Pony 0.32.0 release despite it not yet being available via Homebrew. Based on what we are seeing, we would say that 0.32.0 will be available via Homebrew “eventually”. It could be days. It could be hours. We don’t have enough visibility to know.

Allow fields to be consumed (sometimes)

Before this release, fields could not be consumed. This release changes things to allow fields to be consumed only if they are reassigned in the same expression where they are consumed (i.e. z = do_stuff(consume z) or z.c = do_stuff(consume z.c)) and adhere to the following restrictions:

  • only if that expression does not include any partial calls
  • consumed fields cannot be referenced in any function calls after the field is consumed
  • only if that expression does not include any function calls on traits or interfaces in any part of the call tree
  • the parent object of a field cannot be consumed in that expression
  • the field cannot be a let or embed field
  • a field of the same type cannot be referenced in any function calls after the field is consumed

Rename MaybePointer to NullablePointer

MaybePointer has been renamed to NullablePointer. The previous name, MaybePointer, has confused many Pony users who are either new to the language or using the C Foreign Function Interface (C-FFI) for the first time. The purpose of MaybePointer was for passing pointers to structs across the C-FFI boundary where those pointers may be null. We’ve renamed MaybePointer to NullablePointer in the hope that the new name leads to less confusion for users.

To update your code, change any reference to MaybePointer to NullablePointer. No other changes should be required.

Added sanity checks around --pony* arguments controlling the runtime’s threads

  • --ponythreads’s value option can’t be bigger than cores available

The process will now err out on start if the value provided is larger than the number of physical cores on the machine.

  • --ponyminthreads option can’t be bigger than --ponythreads’s value

The process will now err out on start if the value of minimum threads is bigger than the value provided to --ponythreads. That includes the default one, i.e., the number of physical cores present, if you don’t explicitly give the --ponythreads to the process

Add –ponynoscale option

This new runtime argument is the equivalent of setting --ponyminthreads to the same value as --ponythreads to disable scheduler thread suspension by indicating that the minimum active scheduler threads required is the same as the total number of scheduler threads. You can’t use --ponynoscale along --ponyminthreads. If you don’t specify --ponythreads the scheduler will leverage all physical cores available.

Add --ponyhelp option to compiled program

Before this release, the only way to find out what pony runtime specific command-line options a compiled pony program supported was by running ponyc --help and looking at the usage info for the compiler.

This release adds a new --ponyhelp option to all compiled pony programs that will output the usage information for pony runtime related command-line options.

Added

  • Allow fields to be consumed (sometimes) (PR #3304)
  • --ponynoscale option (PR #3303)
  • --ponyhelp option to compiled program (PR #3312)

Changed

  • Rename MaybePointer to NullablePointer (PR #3293)
  • --ponyminthreads option can’t be larger than --ponythreads (PR #3303)
  • --ponythreads option can’t be larger than cores available (PR #3303)

AUTHOR

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 Engineering at Wallaroo Labs.