Hacking with APL

Vassar Hackathon Poster

Vassar Hackathon Poster

Thanks to our dear friend Dr. Ray Polivka, Dan Baronet and I had the opportunity to travel to Vassar College to participate in their Community Hackathon held on 5-6 Friday 2016.

“What’s a hackathon?” you ask?
Well, we did too, as we’d never participated in one before.  :)
According to the Hackathon’s announcement:

“CommunityHack is a way to bridge the gap between Vassar CS Majors and Vassar students in other departments as well as local high school and community college students in order to provide them with the opportunity to explore innovative applications of Computer Science. Dance, music, art, video games? CS can be incorporated into all of that and more!”

StuCommunityHack_Sponsorsdents from Vassar as well as nearby colleges and high schools were invited to attend. In other words, it was a great opportunity to introduce APL to a new generation.  As this was our first Hackathon, we had no idea what to expect.  Laura, the Hackathon’s organizer, did a wonderful job organizing the event and making us feel welcome. We were invited to give an hour long presentation and Dyalog was listed as an event sponsor.

The Hackathon was a 24 hour event where students were encouraged to split up into groups and pick a problem to solve.  During the course of the event, presentations were made on a variety of subjects including “Autonomous Robots Test Ideas About the Evolution of Brains”, “How to make games quick!”, “Virtual Reality”, and of course “Hacking with APL”. Friday evening started with introductions and ice-breakers. During our introduction, I was able to talk a bit about APL and the presentation we would be making on Saturday. Apparently this generated some interest as a number of students came up to Dan, Ray, Jon McGrew and me to ask about APL. We spent several hours showing them APL, to which they seemed eagerly receptive.

I had the pleasure of working with Grace, a CS sophomore, to implement APL (A Puppy Language) in APL. Her project idea was to write an application for potential puppy owners to use so they could get an idea of the responsibility of owning and caring for a puppy. We worked into the wee hours of the night and wound up implementing a multi-threaded domain-specific-language (DSL) where the “puppy”, running in a separate thread, would react to commands typed into the APL session. Negative actions and ignoring the puppy would cause the the puppy’s happiness points (PHPs) to decrease whereas positive actions would increase PHPs.   Grace seemed to really enjoy working with APL and returned to the hackathon twice on Saturday as her schedule permitted to continue work on her project.

Saturday, I was slightly concerned that following a talk on virtual reality, APL might not seem all that “cool”, but my fears were allayed for, as I was waiting before my presentation, several students asked the person at the registration desk specifically about the APL presentation.


The presentation went rather well.  Watching the jaw-dropping “Wow!” expressions on the faces of many of the students as we showed the power of APL notation made me reminisce back to the time when I first learned APL and was amazed at what I could do with a computer.  It also reminded me how blessed I’ve been to have used APL throughout my career.

Our participation in the Hackathon was a great experience. We were able to show Dyalog to close to 100 students, promote the upcoming APL Problem Solving Competition, and encourage people to download and try Dyalog – we had 18 student downloads over the Hackathon weekend. This may have been our first Hackathon, but I’m certain it won’t be our last.

On a personal note, after Dan and I drove up to Montreal to spend the upcoming week working with the APL Tools Team, I received a very nice email from Grace where she wrote “I just wanted to thank you so much for taking the time to work with me on puppy.dws – it is currently my favorite thing that I have ever made.” and “It was really fun working in APL, and I will definitely check out the Dyalog competition.”



Happy New Year from the CXO!

To all our existing users, business partners and friends we have not yet met: Happy New Year from everyone at Dyalog – we hope that we can be of service to you in the year(s) to come!

But what – or who – is a CXO? Well, according to Wikipedia, chief experience officer (CXO) is the officer responsible for the overall user experience (UX) of an organization. The chief experience officer ensures the organization has good customer service, so customers are able to have a positive experience.

Since I joined the company nearly eleven years ago, the responsibility for customer experience has been an important part of my job as CTO. During this period we have grown very significantly – the five people who were responsible for Dyalog APL before the acquisition in 2005 have now become more than twenty, and we have plans to hire a couple more this year. We have reached a point where we have the manpower not only to keep existing clients happy by continuing to accelerate what has become one of the largest sustained investments in APL in the history of the language, but also to be more aggressive in going after completely new business – and attracting new generations of APL users.

As a natural consequence of this growth, we have decided that it is time to split the CTO role into two parts, with the addition of a CXO role. The CXO will focus on understanding the customer experience and what we need to do as a company to improve it, and the CTO will be responsible for implementing enhancements to the technology that we offer our users (and make sure that Dyalog itself masters the technologies that it needs to use to implement solutions today and in the decades to come).

Jay Foad appointed CTO

JayWith immediate effect, Jay Foad will assume the title of Chief Technology Officer and be responsible for the core development team at Dyalog Ltd. Jay has been with Dyalog for just over five years now, and has impressed everyone with his ability to rapidly understand almost everything that goes on under the hood. Most importantly, he combines a keen interest in the lowest levels of hardware and software, with the ability to argdiscuss the finest points of APL language theory with the likes of John Scholes and Roger Hui.

I will take the role of Chief Experience Officer and be responsible for the rest of what was the CTO role. In many ways, I will be going back to what I have been doing most of my life – working with large and small APL users to put APL technology to good use. My primary responsibility will be to make sure that Dyalog understands the needs of current and potential users and to work closely with the CTO and his team to satisfy these requirements. This is not just a question of eliminating defects and making sure that the help desk provides a good experience when users need help with our software (although that IS important). More importantly, the software needs to have the features that current and future users actually need in order to be competitive when using APL as a development tool. The features need to perform well, have decent quality and they need to be designed in such a way that each feature is not only easy to discover and use but it should ideally also be easy NOT to use, if you have no need for it.

More APL Skills at Dyalog

For the last 2-3 years, we have been moving steadily along an essentially unchanged technical road map. You can find slides and video recordings of presentations from the last many Dyalog User Meetings at http://dyalog.com/user-meetings/index.htm. Our most important goals are to:

  • continuously improve the quality of our products.
  • continuously increase performance – this includes taking advantage of parallel hardware.
  • port Dyalog APL to new platforms.
  • provide cross-platform development tools that make it straightforward to develop applications on any of the platforms we support and deploy and maintain them on any other.

During the same period, we have gradually increased our investment into adding tools written in APL, in addition to enhancing the core technology. One important change in emphasis signalled by the creation of the CXO role is that Dyalog intends to accelerate this trend and significantly increase its capacity to do programming in APL, by adding young APL developers to our staff. There are several reasons for this:

  • We need more APL developers in order to create tools, tutorials, documentation and other training materials. This is necessary to make existing users more productive and to make Dyalog an attractive tool for a new generation of users.
  • We would like to increase our capacity to engage with our existing users in order to better understand requirements and help you take advantage of new tools and language features.
  • We would like to work with new users, helping them get started with that first application implemented in Dyalog APL.
  • We want to participate in the creation of the next generation of APL “Top Guns” so that we can eventually extend our application audit, tuning and migration services.

You may be able to help us: we will be looking to place APL and core technology developers within user organisations as part of their training. If you think you could host a Dyalog developer for a few days or a week to show them what life looks like on the front lines, or you have a small APL development project that might be suitable for a young APL developer to use as a learning experience, please contact me.

Promoting APL

In addition to having the right features and tools, we need to be sure that people know about them. Over the past decades, our ability to develop new features has often exceeded our ability to produce training materials and samples for them. A significant part of the CXO role will be to work with our CEO, Gitte Christensen, to significantly increase our efforts to tell the world outside the existing APL community about the well-kept secret that is Dyalog APL.

An important goal will be to produce completely new, modern samples and training materials – including videos and regular web casts – to make it easier for both existing and new users to discover and take advantage of Dyalog APL and associated tools. We will also spend significantly more time and effort creating a presence at conferences and online forums outside the array language community.

It is going to be a busy New Year!

APL Puns

In the Beginning


and were punnish when the notation was introduced in 1962. They have long since gone mainstream, used even by respectable mathematicians and computer scientists.

To see why is a pun, see the Vector article My Favourite APL Symbol.

•         •        •        •         •

The following are a joint effort by the Dyalog team, many derived after a sumptuous dinner and a few glasses of wine. Column 0 are valid APL expressions. For an enhanced experience may we suggest covering column 1 as you read column 0 for the first time.

In Modern Times

⊃⎕A~'L' the first no el
⍴⍴⍴'your boat' rho rho rho your boat
*⍣¯1⊢fly+fly log of the flies
{⍺←23 ⋄ (2÷(○1)*0.5)×-/⍵×(⍵*2×⍳⍺)÷
erf ghanistan
↑^≡ mix and match
>/+/∘⎕UCS¨'the parts' 'the whole' the sum of the parts is greater than the whole
?⍨2e9 a big deal
○1 APL π
2(⌷⍤1)2 3 4⍴○1 a slice of APL π
0 0⍉3 4⍴○1 another slice of APL π
easy←○1 easy as π
{4×-/÷1+2×⍳⍵}1e6 a π long in the making
pike; see APL Quotations and Anecdotes
Concorde taking (and showing) off
{⍵⌷⍨⊂?⍨≢⍵} degrade
bb∨~bb two b or not two b
bb≥bb two b or not two b
×× sign of the times
a←2÷⍨3 4⍴⍳12 ⋄ *○0j1×a show off
a←2÷⍨3 4⍴⍳12 ⋄ *○0j1×a+2e9 shameless show off
⍎turtles←'⍎turtles' it’s turtles all the way down…

In Honour of a Certain Movie Series

0⍴'menace' I. The Empty Menace
⊢⎕ns¨ 2⍴⎕this II. Tack of the Clones
⌽'htxiS'~'x' III. Reverse of the Sith
⎕io←~⎕io IV. A New Beginning
{'Jedi'⊢1e3×○R} V. The M π R Strikes from the Back
{'Jedi'} VI. Return Jedi
(+⌿÷≢)3 4 5⊣⎕dl 10 VII. The Fork Awakens
may←+⌿÷≢ ⋄ may∘∪ may the fork be with you
0 1 2 3 (⌊/⍬) 5 6 the fourth is strong with this one
4 4 4 4 (⌊/⍬) 4 4 I feel a great disturbance in the fours
1=?2e9 this is not the number you are looking for
1=?2e9 in my experience, there’s no such thing as luck
Luke.## I AM your father
4 ⊃ 0 1 2 3 'dark side' vier ist the path to the dark side
x{0.5×⍵+⍺÷⍵}⍣≡darkside do not underestimate the power of the dark side
⎕ct←1 I find your lack of faith disturbing
0.2 ∊ ÷3 1 4 1 9 2 6 3 8 9 7 9 I find your lack of a-fifth disturbing
{0::⍺⍺~⍵ ⋄ ⍺⍺ ⍵} do, or do not; there is no :Try
>⍝ Help me, Obi-Wan Kenobi, you’re my only hope
⊂○⊃ Princess Leia
<○> Yoda
○>--- Death Star
>∘< X-wing fighter
⊢○⊣ tie fighter
○⍨ tie fighter in stealth
⊢○⊣ 1 π fighter
⊣⍲⍲ ATAT
imperial cruiser
⍋⍒ imperial cruisers colliding
│⊢ │⍒ │⍒⍒│⍋⌽│⌽ │⍋ │⍋⍒│⍒⌽│
│⍒ │⍒⍒│⍋⌽│⊢ │⍒⌽│⌽ │⍋ │⍋⍒│
│⍒⍒│⍋⌽│⊢ │⍒ │⍋⍒│⍒⌽│⌽ │⍋ │
│⍋⌽│⊢ │⍒ │⍒⍒│⍋ │⍋⍒│⍒⌽│⌽ │
│⌽ │⍋ │⍋⍒│⍒⌽│⊢ │⍒ │⍒⍒│⍋⌽│
│⍋ │⍋⍒│⍒⌽│⌽ │⍋⌽│⊢ │⍒ │⍒⍒│
│⍋⍒│⍒⌽│⌽ │⍋ │⍒⍒│⍋⌽│⊢ │⍒ │
│⍒⌽│⌽ │⍋ │⍋⍒│⍒ │⍒⍒│⍋⌽│⊢ │




climatic space battle

FinnAPL Meeting in Helsinki, November 26th 2015

Hyvää päivää (good day)

On the last Thursday of November, I had the privilege to meet with with some members of the Finnish APL community in at the Vatt Institute for Economic Research in downtown Helsinki.

Presenting new Dyalog APL features at FinnAPL

Presenting new Dyalog APL features at FinnAPL

The morning was spent engaged in lively conversation about user interfaces and Dyalog APL. In particular we talked about MiServer – Dyalog’s framework for cross-platform user interface development – and the RIDE (Remote Interactive Development Environment). MiServer can run on any platform where Dyalog APL runs. As such, I was able to demonstrate several examples of web sites running under MiServer on a Raspberry Pi. With RIDE, one can access a Dyalog APL development environment via a TCP/IP connection – the development environment can be on the same machine as RIDE or on another machine, as long as it is listening for a RIDE connection. While Dyalog APL for Windows has always had windowed interactive development and debugging capabilities, RIDE brings a comparable level of capability to environments which were previously limited to only TTY-based terminal interaction.

About a dozen more FinnAPL members joined us for the afternoon session where I spoke about some of the recent features of Dyalog. We discussed Function Trains, the Rank operator, the Key operator and user commands. We looked at both recently introduced and some of the long-established user commands. I demonstrated how to create a new user command (command AIKA=TIME in Finnish!) and how to debug it before letting the group conclude their meeting.

The day ended with nearly all of us going out for dinner and a few drinks in Helsinki, which looked wonderful with all its Christmas decorations. It’s always a pleasure to be able to sit down, share time and exchange ideas with fellow APLers.

All in all, a good day!

Response to Feedback on Cut, Under and Merge

At Dyalog ’15 John Scholes and I presented proposals for future operators cut, under, and merge. Following the release of the video of this presentation, we received some feedback from a user. Our response to the feedback may be of wider interest.

  1. It’s early days yet for cut, under, and merge (they are tentatively planned for release in version 16.0), and one of the reasons for that is so that we can receive feedback from the user community. So thank you for your comments.
  2. We take our inspiration from many sources, and while it’s true that J has cut, under, and merge, cut saw the light of day in Rationalized APL (1983), under in Operators and Functions (1978), and merge in Rationalized APL (1983) again. And even before that, the ideas have been in mathematics or functional programming for many years.Wherever the inspiration came from, we don’t take them just on faith, just because they are in J.
    Even now, even in these early days, cut, under, and merge have undergone a vigorous internal debate. The discussion is informed by the experience in other contexts, J or otherwise.
  3. We are interested in what you think are the “few fundamental ideas expressed by a handful of mathematical symbols”, what you say is the definition of APL. From our perspective we have not violated and will not violate what we think are the fundamental ideas. But perhaps our set of fundamental ideas differ from yours?
  4. No one here is thinking of adopting the J spelling scheme (with the dots and colons).
  5. The Dyalog development team are in unanimous agreement that dfns, ⍺⍵-functions, are A Good Thing. As we see it, the recent and proposed additions to Dyalog APL have only enhanced the elegance and utility of dfns. For example, {(+⌿⍵)÷≢⍵}⍤r to compute the mean of not just vectors but subarrays of a specified rank, {⍺⍵}⌸ to compute the unique keys and the corresponding indices, {⍺(+⌿⍵)}⌸ to compute the unique keys and corresponding sums, and {⊂Cut ¯2⊢⍵,','}Cut ¯2 ⊢x~⎕av[4] to partition CSV x into its columns and cells.
  6. Cut, under, and merge are described and documented in discussion papers accompanying the video. If you have not already read them, they can be found in the Dyalog ’15 webpage and specifically here. Please tell us what more can be done as far as documentation, and what parts specifically are unclear.
  7. We have previously (and recently) examined the question of adding quaternions to Dyalog. Currently there are no plans to add them.
  8. Finally, examples of under from everyday life. Of course the processes involved can be composed, so that for example “dinner” can be:
    open the fridge
        take the food
    close the fridge

    but it can also be a more elaborate:

    take plate from cupboard
        open the fridge
            take the food
        close the fridge
        put food on plate
            open mouth
                put food in mouth
            close mouth
        clean plate
    put plate back into cupboard

    As remarked in the Dyalog ’15 presentation, once you are attuned to it you can see under everywhere, sometimes in subtle ways: Ashes to ashes, dust to dust.

SWEDAPL Meeting in Malmö, November 11th 2015

The November cycle of APL User Meetings is kicking off; the SWEDAPL meeting in Malmö was first this year, holding a meeting at the top of the famous Turning Torso in Malmö. Since it was just a short trip from our Danish office, Dyalog was represented by Gitte Christensen, Bjørn Christensen and Morten Kromberg – with Brian Becker and Dan Baronet joining the meeting remotely. Next week, Richard Smith and Nick Nickolov will be representing Dyalog at APL Germany in Erfurt and Dan Baronet at FinnAPL in Helsinki – check http://dyalog.com/dates-for-your-diary.htm periodically for a list of APL meetings and Dyalog presentations!

Gilgamesh Athoraya welcomes us to SWEDAPL

Gilgamesh Athoraya welcomes us to SWEDAPL

This turned out to be a very international group – ten Swedes (two of whom were from India but based in Göteborg), six Danes who made the trip across the sound, two from the UK, one German and one delegate from each of Serbia and the Ukraine – plus about five North Americans who joined the afternoon sessions via GoToMeeting. This was the first “themed” SWEDAPL meeting; all of the talks were related to the use of Web Services in APL.

First up was our host Gilgamesh Athoraya from Data Analytics in Malmö, who showed us how he had been using Paul Mansour’s new RUMBA application interface which is built on top of Dyalog’s TCP toolkit (which is known as CONGA). Gil has been experimenting with support for Web Sockets, which are bi-directional connections that allow the server to push data to web client applications, making it possible to have very responsive user interfaces in web applications.

Joakim Hårsman explaining how slippery SOAP can be

Joakim Hårsman explaining how slippery SOAP can be

The next presentation was by Joakim Hårsman of CompuGroup Medical, who have been exposing data held on IBM AIX servers via Microsoft.NET-based Web Services for many years. Joakim had a few interesting stories to tell about getting a grip on and maintaining Web Services based on the protocol known as SOAP, which is supposed to make this easy…

The last talk before lunch was by Stephan Poßberg of Vallourec, who talked about the use of Web Services to make computational code available across a large, global organisation. Lunch was served on the 54th floor; unfortunately the weather didn’t quite allow us to see all the way to Helsingør.

The Turning Torso in the Mist, After Dark

The Turning Torso in the Mist, After Dark

After lunch, it was Morten’s turn, assisted by Brian Becker (who joined the meeting from Rochester NY) to present Dyalog’s brand new support for RESTFul web services, available in MiServer 3.0. Paul Mansour also joined this session and provided valuable insights into REST technology, which seems to be taking over as the preferred Web Service architecture for new applications.

Finally, Peter Simonsson from Aplensia in Göteborg told us how Web Services had become widespread at Volvo Cars, where a couple of hundred APL-based services provide the backbone of a network of applications centered around product data and production planning – with the earliest web services dating back to the days when APL ran under VM on IBM Mainframes.

Many thanks to Gilgamesh, Data Analytics and Optima Systems for arranging this event, which provided much food for thought, and inspiration for future work by several people at Dyalog – and by the sound of it, a number of users of APL as well! Expect to see more support for Web Services and Sockets in future versions of Dyalog products!