Myron has continued to grow and become more capable. There have been changes and additions in several areas.
Vectors, as distinct from tuple of real, were added in the previous release. For various reasons, there are now two kinds of vector: row vectors and column vectors. They have similar input syntax but display differently. They solve a quandry arising from multiplication of a column matrix by a row matrix: should this be a unit matrix? or a scalar? The matrix product of two matrices is now always a matrix, and the dot product of two vectors is always scalar, as it should be. All multiplications stem from a single operator, with the parser arbitrating as to the particular form of multiplication suitable to the operands, and with the chosen multiplication always returning the same type. Multiplication of matrices and vectors coerce the vector to the corresponding matrix shape. Less is required of the user. Myron simply chooses operators appropriate to the math involved.
Vector indexing has been improved so it is possible to use the
The type system has been improved so that appropriate operators can be chosen more effectively at parse time. This moves Myron another step away from dynamic typing and closer to fully static typing, with attendant performance increases. The type system also makes it easier to understand coercions in the presences of operators with mixed types.
A string value has been introduced. Support for string manipulation is provided by substring, index and concatenation. Embedded newlines allow strings to be split and stacked when displayed.
Casts have been introduced. It is possible to cast any value to any type, provided destination type constraints are met. Casting from string invokes the parser, making it possible to compose expressions from text and evaluate them.
A graphical display of binding has been provided. For a set of expression that can successfully bound, the bindings display shows exactly the definition to which a reference is bound. This is useful in deciphering the bindings of expressions with nested scopes.
The keyboard has been revisited. Again. There are three major enhancements. For Android keyboards, the keyboard-size selection is much more robust and the automatic selection by screen size is more effective. The biggest improvement, however, comes from using operator-category keys to initiate popup keyboards with related operator keys. This technique is copied in the desktop version, which provides a category selector that displays a keyboard subset. Finally, the Android keyboard can be configured with cache keys that retain recently used keys from the popups. A short period of working with the same kind of mathematical expression fills the cache with appropriate keys.
Automatic rearrangement of expressions in the workspace has been enhanced. The placement algorithm is different (and better), and animation is used to relieve the sudden appearance of rearranged expressions.
Myron now has lambda expressions, which permit functions to be passed as parameters to other functions.
The recursive transition diagrams used to present syntax in the documentation have taken on a dynamic flare. First the somewhat arcane TCL structures were abandoned in favour of syntactic elements represented by Myron expressions. Then the parser was enhanced to produce Myron expression from the same RTN source formerly used for the TCL interpreter. Together, these changes simply provided a different way to achieve the same goal: turning TCL input into PNG files. But two good things then happened. Leveraging Myron's ability to render to SVG made it possible to use other tools to render all the way to PDF, which meant much crisper diagrams in the print version of this book. The other good thing was a standalone graphical tool for displaying and debugging grammar specifications that made its way into Myron as another visual component. Starting from the goal symbol, it is now possible for the user to explore the syntax by transitioning to other diagram elements or by substituting other diagram elements directly on the displayed diagram.
The substitution and transformation lists are still present but they have been augmented by property lists. A property list is a set of substitution and transform rules that represent mathematical properties and can appear as a sort of mathematical toolkit in the workspace. Then a property can be selected and applied.
The file-system and rule-set interfaces have been reworked to support hierarchies.
Control of font size via a setting dialog has been replaced by pinch-zoom gestures in Android and shift-scroll in the desktop version.
A new form of complex number has been introduced using the simple real factor ⅉ
to mean
Linear systems can be displayed in “stacked” form using the linear-system pseudo type, like this:
Serial clauses have a new display form. They still consist of a tuple with definitions followed by an expression, but the definitions are displayed after the expression following the keyword where. Example:
Many of the matrix transformations have been added to the expression language as postfix operators on matrices. In particular, the new operators include D for determinants, G for row-echelon reduction, J for Gauss-Jordan (reduced row-echelon) reduction.
Factoring and root finding have been enhanced. In addition to Factor on the fast-action toolbar, Polynomials Factor finds monic and quadratic factors of polynomials with integer coefficients and Expressions Root uses Newton's method to find real roots.