The Avail Programming Language

Victim of Success

Tutorials

Cast a gander at the sidebar. See that Learn link? Here can now be found a small but growing collection of resources for learning Avail. Right now there are only two tutorials. One is the obligatory "Hello, world!" tutorial, which elaborates on the infamous archetypal introductory program at lengths which can only be considered Olympian. The other is a much more interesting walkthrough of building a Reverse Polish Notation expression language. It shows how to build a fully-fledged, if minimal, RPN domain-specific language (DSL) using only four method renames and a single method with two trivial statements. Building DSLs is where Avail really shines!

New unit tests

As we near our alpha release, we are switching focus to improving the quality of our existing codebase. Last week saw the introduction of over fifty new unit tests. There are currently 285 unit tests defined in the Avail standard library, testing a wide range of basic operations and control structures, as well as more esoteric features like computational backtracking, generators, write reactors, and so forth. The volume of test cases is going to swell in the coming days.

Inlined method dispatch

Avail supports multiple dispatch on all method arguments. In order to implement this efficiently, we use a decision tree and an algorithm that supports argument-at-a-time type analysis, starting with the arguments that prune the decision tree most effectively. In order to further optimize method dispatch, the dynamic translator now inlines this decision tree directly into the generated L2 code whenever it deems it profitable to do so. For correctness, logic also exists to deoptimize the generated L2 code whenever the contingent decision trees are updated. We expect a significant performance boost when we begin actually inlining ordinary method definitions also.

‹ Previous | Return to Newsletters | Next ›