Pony 0.27.0 is a big release for us. LLVM 7, 6, and 5 are all now fully supported by Pony. This is the last release that LLVM 3.9.1 will be supported for.

Additionally, there are a number of important fixes and a couple of breaking changes in the release. Keep reading for more information.

LLVM 7.0 Support

This release adds official support for LLVM 7, LLVM 6, and LLVM 5. Previously, LLVM 3.9 was the highest officially supported version, while support for LLVM 5 and LLVM 6 was listed as experimental, and did not have all optimizations enabled. Now all the above versions are officially supported with all optimizations enabled. In the next release, support for 3.9 will be dropped.

Change default to disable pinning of scheduler threads to CPU cores

Prior to this change, if a random user happened to be running multiple pony applications that are CPU intensive, they would run into unnecessary CPU contention due to CPU pinning (at least on Linux) due to the first few cores being the ones used by all the applications even if the system may have more cores available. This was particularly troublesome because users may not even be aware that the application they're running is a pony application.

With this change, the default is to not pin scheduler threads to CPU cores. It also removes the --ponynopin CLI argument and replaces it with the --ponypin CLI argument to leave the control for pinning as an option for advanced users without requiring all users of pony applications to understand pinning and how to disable it.

Change --ponyminthreads default to 0

Change the --ponyminthreads default so that it allows all scheduler threads (as opposed to all but 1 previously) to suspend resulting in a more efficient application with no busy polling at all when there is no work to be done (the ASIO thread is still awake and will wake up a scheduler thread when more work needs to be done either due to a timer, or network io, or some other similar event).

Windows implementation of Process and Pipe

The release brings in a refactoring of the process package, and upon that a basic implementation on Windows of child Process creation and monitoring, as well as non-blocking anonymous pipes for stdin, stdout and stderr. The async pipe reading and writing are handled using a Pony timer plus polling, with IOCP support a possible future task.

FreeBSD 12 with LLVM 7 added as supported platform

Our FreeBSD support has been a little hit or miss since the first port. For a long time, we had no way to do FreeBSD CI and things would invariably break. Then, we ran into a number of issues building on FreeBSD 11 that were never fully resolved. With the release of Pony 0.27.0, we now have CI for FreeBSD thanks to Cirrus CI. With this release, FreeBSD 12 is a supported platform for Pony when used in conjunction with LLVM 7.0.

Make String.f32() and String.f64() partial

This change changes the methods builtin.String.f32(offset: ISize) and builtin.String.f64(offset: ISize) to be partial and fail on input that cannot be parsed as a floating point number. This is the current behavior already for parsing integers from Strings.

Previously the methods for parsing floats would just return 0.0 on invalid input, overflow, or when the given offset was beyond the bounds of the String it was invoked on. As 0.0 is a valid float, there was no real way to determine if the parsing failed or if 0.0 is a legit parsed value. These examples try to show the behavior of Pony prior to 0.27.0:

// true with Pony 0.26.0 and older "".f32() == F32(0) "ABC".f64() == F64(0) "0.123".f64(10) == F64(0)

The following example shows the new behavior with Pony 0.27.0 and newer:

// these expressions will error with Pony 0.27.0 and newer try "".f32()? end try "ABC".f64()? end try "0.123".f64(10)? end

[0.27.0] - 2019-03-01

Fixed

Fix default arguments not being displayed correctly in generated docs (PR #3018)

Fix linker library version error on MacOS when installed via Homebrew (PR #2998)

Correctly specify linkage on Windows for runtime library backpressure functions. (PR #2989)

Reject Pointer and MaybePointer from being embedded (PR #3006)

Added

Add FreeBSD 12 with LLVM 7 as supported platform (PR #3039)

Windows implementation of Process and Pipe. (PR #3019)

LLVM 7.0.1 compatibility (PR #2976)

[RFC 61] Add Modulo Operator (and floored division) (PR #2997)

Update Windows build system to handle the latest Visual Studio 2017 version (PR #2992)

Changed