Skip to content

Releases: ponylang/ponyc

0.33.1

13 Dec 13:38
Compare
Choose a tag to compare

Pony version 0.33.1 is now available. The release features no breaking changes for users' Pony code. We recommend updating at your leisure.

Let's get this one out of the way, the most significant change users will notice with Pony 0.33.1 is a change to the Linux release process. As of this release, all Linux releases will be available as .tar.gz files via our Cloudsmith release repository. There are builds available for both musl and glibc based Linux distributions.

Before the next release, we will have a new tool ponyup for doing Pony installations on Linux. You can use ponyup now to install 0.33.1 as well as nightly Pony builds. However, please note that there is a breaking change coming with ponyup within the next couple of weeks. If you want to use ponyup to install 0.33.1 and report any issues might encounter using either ponyup or ponyc, we'd welcome the feedback.

We want to warn you, however, that in a couple of weeks, you will need to delete your existing ponyup installation and reinstall it. For this reason, we recommend Linux users hold off on installing Pony 0.33.1 unless they are willing to help beta-test ponyup or need the bug-fix detailed below.

Windows and macOS users, nothing has changed about the installation process for you; however, heads up Windows users, within the next few months, changes are coming.

Fix nested tuple access regression introduced by #3304

PR #3304 introduced a bug that caused segfaults with nested tuple access, such as:

actor Main
  new create(env: Env) =>
    let x = (U8(1), (U8(2), U8(3)))._2._1

The issue is now resolved, and a test added to prevent another regression.

[0.33.1] - 2019-12-13

Fixed

  • Fix building ponyc with clang on Ubuntu (PR #3378)
  • Fix error using latest VS2019 to build ponyc (PR #3369)

Changed

0.33.0

01 Nov 17:04
Compare
Choose a tag to compare

Pony version 0.33.0 is now available. The release includes a couple of small breaking changes in command line handling when starting up Pony applications.

Big things are afoot behind the scenes in the Pony community. The 0.33.0 release is the first real public indication of those changes.

Our packaging of releases for Linux is about to change a great deal. Up until now, you've been able to get distro-specific packages for Pony releases. Maintaining packaging for Debian and various Fedora/OpenSuse etc. distributions has been very time-consuming. 0.33.0 is the last release that you will be able to get them. Instead, we are replacing them with tar.gz packages.

0.33.0 is the first Pony release where you can download release binaries from Cloudsmith. tar.gz packages for x86 based Linuxes, both musl and glibc based are now available. We'd love it if people started trying them out today.

When we do the next Pony release, the only option for install ponyc Linux binaries will be via the packages hosted by Cloudsmith. With that release, however, you will have a new tool available to you to manage your installation of prebuilt ponyc binaries: ponyup. Look for more news about ponyup in upcoming issues of our newsletter Last Week in Pony.

With the first round of packaging news out of the way, let's move on to information about the rest of the release:

Default to statically linking LLVM into ponyc

Previously, we built ponyc with LLVM dynamically linked by default. This PR changes to statically link LLVM- except on Windows, which hasn't been addressed yet.

There are now three options that can be supplied to the Makefile via the link option

  • static
  • llvm-static
  • llvm-dynamic

static

static will only work when using musl libc. it will attempt to statically link every related to ponyc .

llvm-static

the new default, llvm-static, will statically link LLVM into ponyc. Additionally, it will statically link libstdc++ and if using GCC, libgcc

llvm-dynamic

llvm-dynamic is the previous default where LLVM would be dynamically linked to ponyc.

Added minima checks around --pony* options that accept arguments

  • --ponythreads & --ponygcfactor option's value can't be less than 1
  • --ponyminthreads, --ponysuspendthreshold, --ponysuspendthreshold, --ponygcinitial all can't be less than 0
    • in previous releases, negative values would have silently overflowed, while being assigned to unsigned int

Renamed --ponythreads to --ponymaxthreads

  • Since the introduction of scheduler scaling, --ponythreads was controlling the maximal number of threads the runtime would spawn. Renaming it to --ponymaxthreads is more inlined with the --ponyminthreads.
    Be aware that --ponythreads will silently be ignored from now on. There will be no error if you don't update this to --ponymaxthreads.

Introducing the --llvm-args command line option

Now developers can feed LLVM-specific command line options into the LLVM part of ponyc via the --llvm-args option. Which accepts multiple LLVM options as a comma-separated string. This feature is only available in debug build.

Examples

(1)

ponyc --llvm-args=-debug ...

Passing -debug option to the LLVM part. Which is same as running opt -debug ...

(2)

ponyc --llvm-args=-debug-pass=Arguments,-debug-only=dce ...

Passing multiple options in a comma-separated string. Which is same as running opt -debug-pass=Arguments -debug-only=dce ...

(3)

ponyc --llvm-args=-debug-only=dce,-debug-only=licm ...

Note that some of the LLVM options, -debug-only for example, also accept a comma-separated string. That is, with opt, you can do like opt -debug-only=dce,licm. However, with this new --llvm-args option, you can only separate them into different -debug-only pairs as shown above.

Allow programmatic override of the default runtime options

Prior to this release, the only way to override the default pony
runtime options was via the command line.

This release allows for programmatic override of the default pony
runtime options via a specific bare function created on the Main
actor:

fun @runtime_override_defaults(rto: RuntimeOptions) => None

In order to override the values, a programmer would replace the
None with logic to directly set the various options on the rto
variable. This bare function is limited in what is allowed and
is only allowed to call functions on primitives to ensure no
memory allocation occurs as it is called before the runtime is
fully initialized.

More information can be found in the documentation for the RuntimeOptions struct in the builtin package.

[0.33.0] - 2019-11-01

Fixed

Added

  • Allow programmatic override of the default runtime options (PR #3342)

Changed

  • --ponythreads has been renamed to --ponymaxthreads (PR #3334)
  • All --pony* options that accept a value, will be checked for minimal values (PR #3303)
  • Default to statically linking LLVM into ponyc (PR #3355)

0.32.0

29 Sep 11:39
Compare
Choose a tag to compare

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.

[0.32.0] - 2019-09-29

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)

0.31.0

31 Aug 12:03
Compare
Choose a tag to compare

Pony version 0.31.0 is now available. This is a "smaller" release than some recent ones. Most of the changes in Pony lately have been happening behind the scenes.

0.31.0 is a breaking release. There's a small change to Map.sub that might break your code. Details follow. There are no serious bugs fixed in 0.31.0 so you can upgrade at your leisure.

Remove unnecessary argument to Map.sub

Before:

let m: Map[String, U32] = Map[String, U32]
m.insert("one", 1)
m.insert("two", 2)
let m2 = m - ("two", 3132047) // removes ("two", 2) from the Map

After:

let m: Map[String, U32] = Map[String, U32]
m.insert("one", 1)
m.insert("two", 2)
let m2 = m - "two"

Add proxy_via(host: String, service: String): (String, String) to TCPConnectionNotify

This function is called before the initial TCP connection is made, allowing the TCPConnectionNotify to alter the target of the connection. This enables a TCPConnectionNotify implementation to handle the proxy handshake and redirect traffic via that proxy.

It is optional to implement, with the default changing nothing.

It is recommended that TCP client creators add a parameter to their constructors, with the default of NoProxy and to wrap their TCPConnectionNotify which enables users to use proxies.

actor MyClient
  new create(env: Env, host: String, service: String, proxy: Proxy = NoProxy) ? =>
    TCPConnection = TCPConnection.create(
        env.root as AmbientAuth,
        proxy.apply(MyConnectionNotify.create()),
        host,
        service)

[0.31.0] - 2019-08-31

Fixed

  • Fix static linking issue by changing the link order (PR #3259)

Added

  • Add --link-ldcmd command line argument for overriding the ld command used for linking (PR #3259)
  • Make builds with musl on glibc systems possible (PR #3263)
  • Add proxy_via(destination_host, destination_service) to TCPConnectionNotify to allow TCP handlers to change the hostname & service from a TCPConnectionNotify before connecting (PR #3230)
  • Add add and sub to collections/persistent/Map (PR #3275)

Changed

  • Remove unnecessary argument to Map.sub (PR #3275)
  • No longer supply AppImage as a release format (PR #3288)

0.30.0

27 Jul 10:39
Compare
Choose a tag to compare

Pony version 0.30.0 is now available. This is a high-priority bug fix release that contains a fix for a bug that could cause Pony programs to segfault. We recommend upgrading as soon as possible. Also note, this release does include a breaking API change (albeit small). Please note that, at this time, the update to Homebrew has yet to be merged, but should be within a day. All other release targets are completed.

Fix segfault due to Cycle Detector viewref inconsistency

Prior to this fix, the Cycle Detector could end up in a situation
where it would have an inconsistent viewref which would result
in a segfault with the cycle detector trying to send a message
to an actor that was already destroyed.

Make Map insertion functions total

Before this change, code that inserts into maps might look like:

try map.insert("key", 1)? end
try map.insert_if_absent("key", 5)? end
try
  map.upsert("key", 1, {(current, provided) => current + provided})?
end

Af
ter this change, the question marks and the surrounding try expressions can be removed. Respectively, the above blocks become:

map.insert("key", 1)
map.insert_if_absent("key", 5)
map.upsert("key", 1, {(current, provided) => current + provided})

Remove glob from the standard library

The glob package is being removed from the standard library and
moved to a new home at https://github.com/ponylang/glob/ where it
will live on as an independent library.

It is being removed because it has a transitive dependency on an
external library libpcre and that dependency makes creating release
artifacts more difficult.

At the moment we have to deal with packaging up pcre for each Linux
distro etc and they all have their own methods to do so. This
lead us to do a lot of work on supporting distro specific packaging.
That has turned out to be too much work. We are moving to having
a single glibc Linux friendly .tar.gz that can be done to install
Pony.

To faciliate this move, we decided that we want to remove items from
the standard library that depend on external libraries like pcre.
Full conversation about the decision is available in the audio of
the Pony development sync July 9, 2019 audio that you can download
from: https://sync-recordings.ponylang.io/r/2019_07_09.m4a

Remove regex package from standard library

The regex package is being removed from the standard library and
moved to a new home at https://github.com/ponylang/regex/ where it
will live on as an independent library.

It is being removed because it has a dependency on an external
library libpcre and that dependency makes creating release artifacts
more difficult.

At the moment we have to deal with packaging up pcre for each Linux
distro etc and they all have their own methods to do so. This
lead us to do a lot of work on supporting distro specific packaging.
That has turned out to be too much work. We are moving to having
a single glibc Linux friendly .tar.gz that can be done to install
Pony.

To faciliate this move, we decided that we want to remove items from
the standard library that depend on external libraries like pcre.
Full conversation about the decision is available in the audio of
the Pony development sync July 9, 2019 audio that you can download
from: https://sync-recordings.ponylang.io/r/2019_07_09.m4a

Remove OpenSSL as a requirement for building Pony

The net/ssl and crypto packages are being removed from the standard library
and moved to a new home at https://github.com/ponylang/net-ssl/ and
https://github.com/ponylang/crypto respectively. Each will live on as an
independent library.

They are being removed because they have a transitive dependency on an
external library openssl and that dependency makes creating release
artifacts more difficult.

At the moment we have to deal with packaging up openssl for each Linux
distro etc and they all have their own methods to do so. This
lead us to do a lot of work on supporting distro specific packaging.
That has turned out to be too much work. We are moving to having
a single glibc Linux friendly .tar.gz that can be done to install
Pony.

To faciliate this move, we decided that we want to remove items from
the standard library that depend on external libraries like openssl.
Full conversation about the decision is available in the audio of
the Pony development sync July 9, 2019 audio that you can download
from: https://sync-recordings.ponylang.io/r/2019_07_09.m4a

Stop creating Buster Debian packages

When Buster graduated to a supported Debian version, they dropped LLVM 3.9.
We were relying on that LLVM 3.9 support. All our Debian packaging code assumes that
the LLVM version is used across distros. With Buster dropping LLVM 3.9, that is no longer the case.
We could spend time fixing that so that our releases work again, however, we are moving away from doing distro specific packaging.

Given that we don't want to continue doing distro specific releases, we are instead removing building Buster packages now. Expect to see a new release packaging system roll out over the next couple of months.

[0.30.0] - 2019-07-27

Fixed

  • Fix which dtrace path check (PR #3229)
  • Fix segfault due to Cycle Detector viewref inconsistency (PR #3254)

Changed

  • Make Map insertion functions total (PR #3203)
  • Stop building Tumbleweed packages for releases (PR #3228)
  • Stop creating Debian Buster releases (PR #3227)
  • Remove glob package from standard library (PR #3220)
  • Remove regex package from standard library (PR #3218)
  • Remove crypto package from standard library (PR #3225)
  • Remove net/ssl package from standard library (PR #3225)

0.29.0

06 Jul 14:15
Compare
Choose a tag to compare

We are proud to announce the release of Pony version 0.29.0. This release includes several improvements to the standard library's TCP support. This version contains breaking API changes. We recommend upgrading as soon as possible.

Change how TCPConnection reads data to improve performance

Before Pony 0.29.0, when using the expect call on TCPConnection, a large number of system calls would be generated. expect is used to make it easier to write code to handle framed message protocols in Pony. The prior version would do a system call per frame segment. For example, if two framed messages were received with a corresponding header and payload section were read, four system calls would be made; 2 each for both the header and payload segments. From a performance perspective, this was very wasteful. The performance of the old expect code had gotten worse over the past couple of years as system calls became more time consuming due to various operating system Spectre et al. mitigations.

With the release of Pony 0.29.0, we have switched to creating a large buffer which we populate with a signal system call and then carve off bits as required for proper expect usage. The change has been made for all non-Windows platforms and in our testing, can result in up to a 10x performance boost for high-volume framed TCP protocols.

Make TCPConnection.expect partial

TCPConnection's expect method is now partial. Previously, you could set the expect value to any size, and the runtime would allocate enough memory to handle. expect was a possible DOS attack vector on Pony applications. Unless the programmer checked every framed message's payload size against a max allowed buffer size, the program could be made to OOM by providing a sufficiently large number.

As of Pony 0.29.0, when creating a TCPConnection, you can provide a maximum buffer size (or use the provided default). expect cannot be set to larger than that buffer size. Should you attempt to set expect to larger than the buffer size, an error will be generated.

It's possible that we will end up with other breaking API changes that cascade from this change as it gets used in the wild. There's already been a discussion of possible changes between Sean and Dipin on the PR for this change.

Alpine Docker release images

Each Pony release now gets Alpine as well as Ubuntu based Docker images generated for it. You can grab them from our DockerHub under the release-alpine tag.

Do not permit leading zeros in JSON numbers

Before this release, the standard library JSON parser would violate RFC8259 by accepting numbers with leading zeros such as "01", "-012", "012". Fellow Brooklynite Luke Rodgers submitted a fix to address the issue. Thanks, Luke.

[0.29.0] - 2019-07-06

Fixed

  • Do not permit leading zeros in JSON numbers (PR #3167)
  • Make reading via TCPConnection re-entrant safe (PR #3175)
  • Cleanup TCPConnection GC-safety mechanism for writev buffers (PR #3177)
  • Add SSL tests and fix some SSL related bugs (PR #3174)
  • Fix lib/llvm to support MacOS (PR #3181)
  • Close Denial of Service issue with TCPConnection.expect (PR #3197)
  • Fix return type checking to allow aliasing for non-ephemeral return types. (PR #3201)

Added

  • Allow use of OpenSSL 1.1.1 when building Pony (PR #3156)
  • Add pointer.offset to get arbitrary pointer tags via offset (PR #3177)
  • Add DTrace/SystemTap probes for muted & unmuted events (PR #3196)
  • Add method to AsioEvent to see if an event is a oneshot (PR #3198)

Changed

  • Do not permit leading zeros in JSON numbers (PR #3167)
  • Make TCPConnection yield on writes to not hog cpu (PR #3176)
  • Change how TCP connection reads data to improve performance (PR #3178)
  • Allow use of runtime TCP connect without ASIO one shot (PR #3171)
  • Simplify buffering in TCPConnection (PR #3185)
  • Allow for fine-grained control of yielding CPU in TCPConnection (PR #3197)
  • Make TCPConnection.expect partial (PR #3197)

0.28.1

01 Jun 12:28
Compare
Choose a tag to compare

Pony 0.28.1 is here! It includes a couple high-priority bug fixes. Updating as soon as possible is recommended. Please note, the Homebrew PR hasn't yet been merged so you can't update using Homebrew until that is done. All other supported platforms are good to go!

Fix cycle detector issue with checking for blocked actors

Fix issue #2975 where the cycle detector wasn't correctly reaping cycles of dead actors. Change cycle detector to use the maximum of 1000 or 10% of all actors currently alive for how many actors to query when the cycle detector periodically checks to see which actors are currently blocked. This is based on a suggestion by @plprofetes to ensure that the cycle detector is effective even for applications with a large number (millions) of temporary actors.

Add unchop to array and unchop, repeat_str and mul to string

  • Adds unchop to both array and string to allow the the original string or array to be recovered by combining the two pieces from a previous chop.
  • Adds repeat_str and mul to string to allow easy repeating of strings (such as 'abc' * 6 to get abcabcabcabcabcabc or 'abc'.repeat_str(6, ', ') to get abc, abc, abc, abc, abc, abc)

Several Improvements to the random package

Don't turn off Epoll OneShot when resubscribing to OneShot events

Fixes the performance regression introduced in #2897

[0.28.1] - 2019-06-01

Fixed

  • Don't turn off Epoll OneShot when resubscribing to events (PR #3136)
  • Add unchop to array and unchop, repeat_str and mul to string (PR #3155)
  • Fix cycle detector issue with checking for blocked actors (PR #3154)
  • Wake up suspended scheduler threads if there is work for another one (PR #3153)

Added

  • Add Docker image based on Alpine (PR #3138)
  • Added XorOshiro128StarStar and SplitMix64 PRNGs. (PR #3135)
  • Added function Random.int_unbiased. (PR #3135)
  • Added from_u64 constructor to 128 bit state PRNGs. (PR #3135)
  • Add unchop to array and unchop, repeat_str and mul to string (PR #3155)

Changed

  • Updated XorOshiro128Plus parameters. This PRNG will now produce different values for the same seed as before. (PR #3135)
  • Use fixed-point inversion for Random.int if the platform allows. (PR #3135)

0.28.0

22 Mar 19:58
Compare
Choose a tag to compare

Pony 0.28.0 is a high-priority release. We advise updating as soon as possible.

In addition to a high-priority bug fix, there are "breaking changes" if you
build Pony from source. We've also dropped support for some Debian and Ubuntu
versions. Read on for further details.

Ensure methods reached through a union are detected as reachable

Prior versions of Pony contained a bug in code reachability analysis that caused
deterministic runtime crashes due to undetected reachability of a method call
under certain specific conditions, including:

  • the method being called only through a trait within a union type
  • the order of compilation causing the concrete type to be seen as reachable
    after reaching the method call

The issue has been fixed in this release, and it's recommended that all users
update to prevent the possibility of such runtime crashes.

Stop trying to be clever when finding user's LLVM installation

Summary

We used to try and guess the location of your LLVM installation. Going forward,
we will use the first llvm-config found in your path to locate the LLVM
installation. To override this behaviour, set the LLVM_CONFIG environment
variable to your preferred LLVM installation.

Details

Prior to this commit, we were trying to be clever by trying to find the user's
LLVM installation whereever their package manager of choice might put it. This
was, in the end, a losing battle. We were constantly adding more and more
variations.

To make it worse, we tried to have a hierarchy where we would look for
LLVM 7 first then 6 etc. We did this by looking something like:

  • llvm-config-7
  • llvm-config-6

The problem with this approach was that some installations, wouldn't use
the -7 notation. For example, if you download a release directly from
releases.llvm.org, then your llvm-config will simply be llvm-config.

We discovered this when, after a user installed LLVM 7 from releases.llvm.org,
and the build process continued to have LLVM 6 used because the search looked
something like:

  • llvm-config-7
  • llvm-config-6
  • ... more stuff ...
  • llvm-config

In the end, that's all just too much clever.

With this change, we'll use the first llvm-config we find in your path
if you haven't set the LLVM_CONFIG environment variable which should be
considered the preferred way to select an LLVM when building ponyc.

Stop building packages for older Ubuntu and Debian's

As of 0.28.0 we no longer build binary ponyc packages for Ubuntu Trusty (14.04
LTS), Ubuntu Artful (17.10), and Debian Jessie (8). We still build binary
packages for Ubuntu Xenial and Bionic as well as Debian Stretch (9) and Debian
Buster (10).

[0.28.0] - 2019-03-22

Fixed

  • Ensure methods reached through a union are detected as reachable. (PR #3102)
  • Fixed issue with ponyc not being able to find Visual Studio Build Tools in non-standard locations. (PR #3086)
  • Update TCPConnection docs around local and remote addresses (PR #3050)

Changed

  • Stop Supporting Ubuntu Artful (PR #3100)
  • Upgrade Docker image to use LLVM 7.0.1 (PR #3079)
  • Stop trying to be clever when finding user's LLVM installation (PR #3077)
  • Stop supporting Ubuntu Trusty (PR #3076)
  • Stop supporting Debian Jessie (PR #3078)

0.27.0

01 Mar 20:41
Compare
Choose a tag to compare

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

  • make String.f32() and String.f64() partial (PR #3043)
  • Change --ponyminthreads default to 0 (PR #3020)
  • Change default to disable pinning of scheduler threads to CPU cores (PR #3024)
  • Fix linker library version error on MacOS when installed via Homebrew (PR #2998)

0.26.0

25 Jan 19:10
Compare
Choose a tag to compare

Pony 0.26.0 is a breaking release. It is however a pretty small breaking change. Most of the release is a series of bug fixes. As such, upgrading as soon as possible is recommended.

Hello!

This is going to be a short bit of release notes because things are kind of hectic in my next of the woods. Pony 0.26.0, what can I say about you?

Well, the biggest change is one you won't see in the CHANGELOG. Wink Saville put in a ton of time getting it so that we could use non system versions of LLVM to build Pony. Why would we want to do that? We've encountered problems with LLVM from time to time and we want to be ready to be able to ship our own patched version (similar to what Rust does). Wink put in a lot of time, so everyone, please send him your thanks.

Add Vendored LLVM

This change supports both system installed LLVM binaries and vendored LLVM sources. The default is the system installed LLVM binaries with the vendored LLVM sources supported if make -f Makefile-lib-llvm is used.

When using Makefile-lib-llvm both LLVM 3.9.1 and 6.0.0 are supported. If no make target is specified, make -f Makefile-lib-llvm, the default is whatever the lib/llvm/src submodule is pointing to, currently that is LLVM 3.9.1. If you desire to test with the LLVM 6.0.0 pass llvm_proj=llvm_6.0.0 to make, make -f Makefile-lib-llvm llvm_proj=llvm_6.0.0.

For details see "Building ponyc using LLVM sources" in the main README.md and lib/llvm.

[RFC 60] Binary Heaps

RFC 60 adds binary heaps to the Pony standard library. Binary heaps are a useful data structure for processing items based on priority, as in priority queues. A min or max heap may be created through the MinHeap or MaxHeap classes, respectively.

Here is an example of a min-heap containing integers:

use "collections"
use "itertools"

actor Main
  new create(env: Env) =>
    let q = MaxHeap[I64](5) .> append([1; 5; 8; 3; 4])

    // prints `8 5 4 3 1`
    env.out.print(" ".join(
      Iter[USize](Range(0, q.size()))
        .map_stateful[I64]({ref(n)? => q.pop()? })))

Fix silent crash with incorrect time formats in Windows

Prior to Pony 0.26.0, PosixDate.format() was a total method. That is, it wouldn't error out. However, on Windows, when supplied an incorrect time format, it would error out, just silently. Not exactly a good situation.

PosixDate.format() is now a partial method that can result in an error.

Where previously you had code such as:

let date = PosixDate(Time.seconds()).format("%Y-%m-%d")

You now need to do:

try
  let date = PosixDate(Time.seconds()).format("%Y-%m-%d")?
else
  // handle bad format error here, if you care
end

[0.26.0] - 2019-01-25

Fixed

  • Fix signed/unsigned conversion bug in siphash24 implementation (PR #2979)
  • Fixes for telemetry.stp script (PR #2983)
  • libponyc: resolve relative paths in use "path:..." statements (PR #2964)
  • Fix silent crash with incorrect time formats in Windows (PR #2971)
  • Add whitespace between multiple args on cli help output (PR #2942)
  • Fix unsafe cases in capability subtyping implementation (PR #2660)
  • Fix race condition with socket close event from peer (PR #2923)
  • Link to libexecinfo on BSD always, not just in a debug compiler (PR #2916)
  • Install libdtrace_probes.a into the right directory on FreeBSD (PR #2919)
  • Fix scheduler thread wakeup bug (PR #2926)
  • Correct README.md link to AppImage packaging location (PR #2927)
  • Fix unsoundness when replacing this viewpoint in method calls. (PR #2503)

Added

  • [RFC 60] Add binary heaps (PR #2950)
  • Make _SignedInteger and _UnsignedInteger public (PR #2939)

Changed

  • Fix silent crash with incorrect time formats in Windows (PR #2971)
  • Add before/after iteration hooks to ponybench (PR #2898)