Dyalog ’18 Videos, Week 5

We are releasing four talks this week from Dyalog ’18 in Belfast. Three of them focus on techniques for deploying APL applications across all the platforms supported by Dyalog APL, in particular Microsoft Windows, Apple macOS, and GNU Linux on x64 platforms (many tools will also work under IBM AIX and on the Raspberry Pi).

If that isn’t your sort of thing, we invite you to relax with Dr. Charles Brenner’s entertaining talk on The Manly Chromosome – How Simplicity can be Confusing. Charles is a “purveyor of forensic mathematics”; he participates in CSI (Crime Scene Investigation) using mathematics. When he actually needs to compute a number for a court case, he often does it in APL (did you know how useful ×.! is?). Although the underlying subject is a serious matter – the mis-interpretation of DNA data related to the Y Chromosome in criminal cases – the talk is full of humour, although you will need to concentrate as some of jokes are rather understated!

Returning to the theme of the week, my own second presentation follows on from my opening keynote. In the keynote, I whizzed through a flurry of scenarios in which a new user of APL was able to run, edit and debug APL code under Linux without actually installing APL, and then deploy the code as a Web Service using JSONServer, and finally as a Web Application using MiServer. The keynote intentionally did not explain much about the technology. In this week’s talk, entitled Cloud Computing, I reveal some of the details of how the smoke was generated and the mirrors were polished for the opening talk.

As mentioned, Dyalog APL is available on a variety of platforms. Our goal is to allow you to freely select a platform for development, and independently select a platform for deployment. For example, you might develop and test the application under Windows or macOS, and deploy it to the cloud under Linux. If your application has a user interface, you may be interested in Brian Becker’s talk on Cross Platform User Interfaces, where he presents a project with the internal code name “DUI” (Dyalog User Interface). We’ve been working on DUI for several years as a component of our Web Server framework MiServer. Brian demonstrates the results of this endeavour: the new HTMLRenderer, which embeds the Google Chrome Browser Engine (known as Chromium) inside Dyalog APL for Windows, macOS and Linux. The same code can now be used for MiServer and HTMLRenderer, allowing it to drive UI without a Web Server using the same principles as Node JS.

If your application is – or can expose – an engine without a user interface, one of the options for deployment is to run it as a Web Service. This makes it callable from anywhere that can connect to it via a network, for example using the JSONServer as demonstrated in my opening keynote. Marko Vranic’s talk on Severless APL demonstrates the latest fashion in deployment technology, where individual functions – rather than applications – can be deployed to the cloud (or a collection of internal servers). Obviously, the name is a little misleading since the functions do run on servers. The point is that you do not need to define a new server or even a container for your application; once the Kubeless environment is set up, developers can continuously deploy new or modified functions into the “serverless” framework from the command line. The framework takes care of encryption of network traffic, allows you to control access to your functions, and lets you manage scaling and load balancing. This talk probably contains a bit more technology and more moving parts than many APL users will be comfortable with, but the important point that Marko makes is that we have all the pieces required to use APL in scenarios where extreme security and scalability are a requirement.

Summary of this week’s videos:

Dyalog ’18 Videos, Week 4

This week is mostly a deep dive into the new world of storing source code in text files rather than workspaces and other “binary” formats. However, in case that is not your cup of tea yet, we can offer you another talk by Marshall Lochbaum, who presents more amazing algorithms to make the very widely used primitive search functions ∊, ⍳ and ⍸ run faster than ever before. By combining non-branching algorithms with vector instructions and a technique known as Robin Hood Hashing, Marshall is able to drive a modern CPU close to the theoretical maximum throughput, and in many cases spend less than one nanosecond searching for each item of an array.

Source code in text files is the dominant theme, and we are fortunate enough to have three pioneers to show us the way: Paul Mansour, Gilgamesh Athoraya and Kai Jaeger.

Paul has been working on – and using – source code management systems for decades. Recently, his team have implemented a lightweight version of the Acre project management system, named Acre Desktop, based entirely on textual source files. Apart from having to start your day by ]Open-ing a project, rather than by )LOAD-ing a workspace, there are very few changes to how you would actually use APL – but now you have access to a huge collection of professional tools developed for programmers using other programming languages, such as GitHub.

One of the very significant advantages of the APL community starting to use common structures for source code – and projects – is that it becomes realistic to share tools and utilities.
Following on from Paul’s talk, Gilgamesh Athoraya demonstrates a prototype of an APL Package Manager (APM). The APM connects to a repository of packages written in APL and allows you to declare package depenedencies from a public or private repository. It also keeps tabs on the availability of new versions of dependencies, and allows you to easily update them when the time is right.

A package manager can only be successful if there are packages to be managed. Kai Jaeger has been an APL Toolsmith for a very long time, and made much of his work available via the APLTree. Now, Kai has transferred the contents of the APLTree to GitHub, making everything available as textual source. With a bit of luck, once the APM finds its legs, we’ll all be able to use Acre Desktop to define projects, Git[Hub/Lab] to manage the source, and APM to search for Kai’s tools and manage our dependencies on them!

Summary of this week’s videos:

Dyalog ’18 Videos, Week 3

The four presentations from Dyalog’18 that we are releasing this week address both the visible (user interface) and invisible (performance) parts of application design. Starting with performance:

“You don’t have to be an engineer to be a racing driver, but you do have to have Mechanical Sympathy.” – former Formula One racing driver Sir John Young “Jackie” Stewart, OBE


This quote was at the heart of the talk by our invited keynote speaker Martin Thompson. In order to write software which performs well, you need to have a basic understanding of how the underlying machinery works. Understanding basic mathematical models for the theoretical throughput of software and hardware helps us take the step from being alchemists to scientists, as we endeavour to write high-performance systems.

Martin takes us for an entertaining stroll through the evolution of modern processors, and some of the maths behind high performance systems. The good news is that systems which make sequential and predictable memory accesses are likely to find sympathy with modern hardware…

Marshall Lochbaum, the most recent addition to the core interpreter team at Dyalog, followed up with a talk on a number of his ideas for increasing the mechanical sympathy of Dyalog APL, to take maximum advantage of branch prediction and other features of modern processors. Some strategies take advantage of runtime inspection of the arguments, something that is more natural in an interpreter with the ability to dynamically select data types, as opposed to strongly typed strategies typically employed by compilers.


TamStat is an application which helps students Tame Statistics. In two talks at Dyalog’18, Stephen Mansour and Michael Baas focus on two different aspects of the user experience. In the first talk, Stephen focuses on the notation available to users of TamStat. Where many statistical libraries contain dozens of strangely named functions with a variety of switches and parameters, TamStat uses a small set of functions, combined with another small set of operators, to provide a very simple but extremely elegant notation for computing probabilities based on a wide variety of distributions. For example:

⍝ Probability that 7 coin flips (0.5 specifying a "fair" coin) will result 
⍝ in at least 3 heads:
7 0.5 binomial probability ≥ 3
⍝ Probability that a number from a normal distribution with a mean of 0 and 
⍝ standard deviation of 1 will be ≤ 3:
0 1   normal   probability ≤ 3

I almost wish I could go back to University and start Statistics 101 again 😊.


Notation is a powerful tool of thought, but graphs make it easier to visualise the results. Following Stephen’s talk, Michael Baas describes work that Dyalog is doing in collaboration with Stephen, with the goal of wrapping TamStat in a modern, HTML/JavaScript based frontend. Current TamStat is based on the ⎕WC (Window Create) library function and is therefore restricted to running on Microsoft Windows. However, many of Stephen’s students use Mac or Linux laptops. The new interface also makes it possible to run TamStat as a web-based service with a web site. We expect that this work will make TamStat accessible to a much wider audience.

Summary of this week’s videos: