Version 13.0 Highlights
Version 13.0 of Dyalog APL started Beta test in January 2011 and we are expecting to release the new version on Friday, April 1st. As usual, it will be available in 32- and 64-bit versions under Microsoft Windows, AIX and Linux (and for Solaris "on demand").
There are a number of enhancements to Version 13.0 and below we have listed some of those we find most significant;
Language enhancements
- Support for 128 Bit Decimal Floating-Point numbers
- Support for Complex numbers
- ⎕R/⎕S: System operators which perform replace and search operations using regular expressions
- Removal of many limitations on size of arrays in 64-bit version
- ⎕PROFILE, a profiling tool for APL code
- Enhancements to ⎕NA to add support for pointers
- New system functions Left (⊣) and Right(⊢)
- New system operator Variant (⍠/⎕OPT), although so far only in conjunction with ⎕R and ⎕S
- ⎕RSI lists references of spaces from which functions on stack were called
- Performance and accuracy enhancements to Matrix Invert
- Short left arguments to Take(↑), Drop(↓) and Index(⌷)
Performance Enhancements
- New idioms, including Euler's idiom for right arguments which are a multiple of 0J0.5 so that 0=1+*○0J1 true even though the computer cannot accurately hold values of pi. (We know this is the most likely test to check the usage of Complex Numbers !)
- Retained tables for expressions such as ⍺∘⍋ and ⍺∘⍒ so that the second and subsequent calls run faster
Other enhancements
- Major changes under Windows for entering APL characters into Unicode editions of Dyalog APL and other applications which support Unicode input. The new Dyalog IME removes the need for a separate IME and Dyalog Ctrl/Dyalog AltGr keyboard mechanisms and is based on more easily alterable input translate tables.
- Non-GUI versions of Dyalog APL now support session files which can initialise ⎕SE
- Non-GUI versions of Dyalog APL now thread switch at 6-space prompt
Now let's take a closer look at some of the things mentioned above. V13.0 will be break significant new ground on a number of fronts:
First (because it caused us the largest headaches), we have been working on adding support for 128-bit decimal floating-point numbers, implemented according to the IEEE-745 2008 (DPD) standard – with hardware support on recent IBM POWER and "z" processors and software emulation on other platforms. The current 64-bit binary floating-point representation (corresponding to roughly 16 decimal digits) is sufficient for the vast majority of applications, but financial reporting involving multiple currencies can run into problems due to the limited precision (16 digits) and the fact that many decimal numbers cannot be precisely represented, leading to multiple small errors which can become significant if financial portfolios are sufficiently large. Version 13.0 allows the optional use of 34-digit decimal numbers, which avoid all such inaccuracies at the cost of slower calculations.
If you are willing to spend ~USD 10,000 on memory chips and have enough coffee to get you through the time it takes to )LOAD it from disk, you can now have nearly 128Gb of workspace in memory on "ordinary" hardware.
In version 13.0, most primitive functions are no longer subject to the limit of 2 billion elements per simple array that existed in earlier 64-bit versions. In version 13.1, we plan to remove the size limits for all primitive functions, upgrade our test machine from 32 to 128Gb, and revisit other strategies and limits in the interpreter that might come into play when workspaces grow extremely large.
For technical and educational users, we have added complex numbers, which are implemented as a pair of 64-bit binary floating-point numbers (we do not think there is much of a market for 2x128-bit decimal complex numbers). Our implementation follows the extended ISO APL standard (ISO/IEC 13751:2001) and should be identical to that found in IBM APL2, SHARP APL or J.
Although APL applications tend to have a numerical focus, APL is also a terrific language for connecting things together; massaging, cleaning and redistributing data for use by APL code or indeed applications written in other languages. An important missing link has been integrated support for regular expressions. "Regex"s have become a tool that most young computer scientists, software engineers or hackers pretty much take for granted and miss when they move to APL.
Version 13.0 contains our first system operators, ⎕S for searching and ⎕R for replacing using regular expressions as implemented by PCRE, one of the most widely used regular expression engines available today.
Version 13.0 also adds a number of good ideas pioneered by other array language dialects. Take (↑), drop (↓) and squad (⌷) indexing allow short left arguments (you only need specify what to select on leading dimensions, as in SHARP APL). We have implemented the functions right ⊢ and left ⊣.
We have also been inspired to implement a much simpler yet more powerful application profiling tool, similar to ⎕PROFILE in APLX.
The addition of the two new numeric data types mentioned above has forced us to revisit a number of algorithms, in particular index of (dyadic ⍳), matrix inverse (⌹) and the gamma/beta functions (monadic and dyadic!), with the result that they are not only significant faster (for all data types) but often produce more accurate results.