Dyalog ’23 Videos: Week 3 – Dyalog Core Development

This week’s collection consists of presentations by members of the development team, and concentrates on language features and development tools that the developers are currently designing or already implementing. Many of these features are likely to be in version 20.0 of Dyalog, which we plan to release in early 2025, about a year after version 19.0 becomes available. In other words, there is still time to comment on these ideas and propose changes or additions…please take a look and let us know your thoughts!

John Daintree presents an update to the design (and prototype implementation) of so-called Token-by-Token (TBT) debugging, which will make it possible to step through code one primitive at a time rather than one line at a time. This promises to be a wonderful teaching tool, and will also help experienced users debug complex expressions – especially trains and other tacit constructs.

In the presentation on “Setting and Getting Variable Values”, Adám Brudzewsky proposes extensions that will simplify (and speed up) a number of frequently-occurring patterns, where application code needs to reference or update variables based on arrays containing variable names. At the moment, most solutions require complicated, inefficient, and uncomfortable uses of the execute primitive (which some code scanners might identify as potentially unsafe).

Adám’s second presentation also proposes ways to simplify frequently-occurring use cases, this time related to a relatively recent addition to the Dyalog language, the key operator (). Similar to an SQL “group by” clause, key performs operations on groups of data that are partitioned using key values – and it suffers from similar issues if you want the results to be in a particular order, or include entries for key values that do not occur in the data which is at hand.

Peter Mikkelsen proposes a new mechanism for making shell commands from Dyalog. Rather than extending the existing mechanism (⎕SH and its synonym ⎕CMD), which is widely used by existing code bases, Peter proposes a new system function that will manage both binary and encoded input and output, and include features such as whether to error on a non-zero exit code and ways to redirect input and output

The final talk in this block is by Kamila Szewczyk, a student from Saarland University, who was an intern at Dyalog Ltd this summer. In this whirlwind talk, she covers her implementation of a prototype of an APL Array Notation deserialiser, which will be available as an I-Beam in version 19.0, and probably used by Link 4.0. When she needed a break from that project, she created internal experimental builds of the interpreter to try out a large number of interesting ideas that are present in other array language implementations, such as automatic numerical differentiation, the obverse operator, and a monadic inner product where, for example, -.× computes the determinant.

——————————————

This week’s videos:

Materials for all presentations can be downloaded from the Dyalog ’23 webpage.

Dyalog ’23 Videos: Week 2 – APL Problem Solving Competition

The section that is dedicated to the annual APL Problem Solving Competition is always one of my own favourite parts of a Dyalog user meeting, and the talks by the two winners this year were no exception. It is always a treat to hear about how the student winners are able to go from zero knowledge about APL to delivering very well designed, array-oriented, solutions in a few weeks, sometimes days!

This year, we were very pleased to have both the student grand prize winner Andrea Piseri and the professional winner Alexander Block present. Andrea is studying mathematics at Università degli Studi di Milano (University of Milan) and Alexander is an actuary at the Viridium Insurance Group in Germany.

Before Gitte Christensen presented the prizes to the winners and they gave their talks, our “Chief Problem Maker” Brian Becker gave us a brief history of the competition and overview of the contest website (which uses Dyalog-grown tools). He also mentioned that we are revising the format of the competition, most likely by running simpler/smaller problem sets at a higher frequency. We’ll be making official announcements about that early in 2024.

Read more about this section of the user meeting in our Dyalog ’23 daily blog post.

——————————————

This week’s videos:

Materials for all presentations can be downloaded from the Dyalog ’23 webpage.

Welcome to the Dyalog ’23 Videos!

Welcome to the 2023 edition of the Dyalog user meeting presentation recordings. This year, we plan to release a few talks each week until the Winter Solstice – and I will be doing my best to introduce each block of related talks.

Week 1 – A New CEO!

For the 19th year running, the annual Dyalog user meeting started with CEO Gitte Christensen’s Welcome, followed by my own Technical Road Map presentation. However, all is not as it has been: this year, Gitte opened the user meeting with the announcement that she intends to retire from her role as CEO when she turns 70 at the end of this year. The final presentation in this first block is by our incoming CEO, Kirstine Kromberg, and our new Administration Assistant, Jada Andrade, who closed Dyalog ‘23 with a presentation of the vision for the future of Dyalog Ltd.

The similarity between my name and that of the new CEO is not a co-incidence – she is the daughter of the current CEO and CTO. Kirstine (Stine for short) has an MBA in Business Administration and Information Technology from Copenhagen Business School, and everyone believed she was destined to become a manager at one of the large Danish shipping or pharma companies. However, after Stine’s second maternity leave, she discovered that returning to her job as a business consultant would mean twiddling her thumbs until the consulting market picked up again after the Covid pandemic. At the same time, the search for a new CEO for Dyalog Ltd had started.

Stine has been working for Dyalog Ltd for almost four years now, learning how everything works as an accountant and CFO and running several internal projects both on the administrative and technical side of the business. This experience confirmed to us – and to the board, where half of the directors represent our largest clients – that she could strike the right balance between preserving continuity and having the “change management” skills that are required as we grow beyond 25 full-time employees.

As you will see if you watch my presentation, I have a long list of features that I want to see in Dyalog before I retire – and since everything takes longer than I think, I expect to be around for quite some time! Uncharacteristically, both the first and the last talk mention money: Gitte introduces “The APL Fund”, which will allow successful APLers to contribute to the future growth of APL, and Jada speaks about the new prices for Dyalog licences (effective from 01 January 2024). Except for an initial adjustment when Gitte and I joined Dyalog Ltd, the price of a licence has not changed in the 19 years that Gitte and I have been with the company (don’t worry, they are not changing significantly now unless you are still running a 32-bit version!).

I hope you enjoy watching the first set of recordings from Dyalog ’23!

——————————————

This week’s videos:

Materials for all presentations can be downloaded from the Dyalog ’23 webpage.

Dyalog ’23 Day 5: The End, Yet Still Much More to Do

In his second presentation of the week, Brandon Wilson relayed some of his experiences as a relative newcomer to APL and Dyalog. Having heard that most users learn APL through an apprentice model in which they enter an organisation and are taught by already experienced users, he sought out further help to learn array programming beyond the toy problems that are explored in introductory materials. He urged Dyalog and the APL community to find a way to fill the gap for self-learners to be able to fulfil the Iverson promise, to reap the benefits of notation as a tool of thought in larger applications, and to learn how to map array thinking to their own problem domains.

Kamila talks about her experience this summer at Dyalog

Kamila Szewczyk is the second of Dyalog Ltd’s summer interns. Her primary task was implementing APL Array Notation in the interpreter. She also had lots of great ideas that she has been able to try in internal experimental builds of the interpreter, such as automatic numerical differentiation, the obverse operator as seen in the J language and a monadic inner product where, for example, -.×D computes the determinant of an array D.

Rich shows an interface from Dyalog to Vega-Lite

Rich Park has been exploring data visualisation with Dyalog. In particular, he has been seeing what it would be like to use Vega-Lite – a library inspired by the Leland Wilkinson’s Grammar of Graphics – to visualise data from APL. As well as this Dyalog to Vega-Lite interface, he mentioned that The Carlisle Group has also been exploring similar covers for SharpPlot in their Playfair project; it is exciting to see new work on data visualisation from the APL community.

In the last of the presentations, Stine Kromberg presented some of her thoughts moving forward as the future Managing Director (CEO) of Dyalog Ltd. Although she is not an APLer, she has been around APL all of her life and we feel secure that she understands the business and the people involved…and Gitte says she can call on her for advice for a long time to come! Of course, there has been a lot of new growth at Dyalog Ltd recently, and there are some changes required to co-ordinate the growing team, but Stine’s focus is on staying flexible and open-minded to meet future challenges and support the next generation of Team Dyalog and APL users. New administrative assistant and internal legal reviewer Jada Andrade explained the upcoming simplification of our licence terms, offering a new annual developer licence with access to all supported platforms.

Stine talks about the future of Dyalog

The user meeting concluded with a choice of three workshops; many delegates lamented the lack of a time machine to be able to attend all the sessions! The Testing APL Systems workshop gave participants a look into techniques and best practices for testing and showed some of the existing testing frameworks, such as APLTeam’s Tester2 or the lightweight method shown in Stefan Kruger’s book. In the workshop on Leading Axis Theory and Practice, participants were guided on how to think about arrays in terms of cells (a type of sub-array) and use the rank operator with dyadic transpose to apply any function to parts of data. The third workshop had participants looking at handling files, from some of the nuances of reading text files – much of the time hidden from users of system functions – to functions for copying files and listing the contents of directories.

It’s been another fantastic week, and we’ve really enjoyed getting to know all of you who joined us to Elsinore. There is a strong sense of reinvigoration and revitalisation that comes with face-to-face meetings with the people who we love to work with and support, both newly-hired APLers and familiar faces, and it’s always wonderful to hear about all the growing businesses and new areas that APL is expanding into. We’re already looking forward to seeing you again in Glasgow next year for Dyalog ’24!

Today’s presentations:

Dyalog ’23 Day 4: So Many Problems to Solve

We started Wednesday with an update to the co-dfns project by Aaron Hsu. Aaron is trying to make APL more accessible to more people for tackling more problems. He explained how version 4 focusses on good performance on GPUs and detailed error reporting – including a parser that can be used for static analysis of APL code outside of Co-dfns – and how version 5 intends to target more platforms, improving integration of APL in other systems. There are even rumours of a JavaScript backend on the horizon! Dyalog available in the browser, wherever you go.

Brandon Wilson presents the challenges of parsing YAML

Brandon Wilson is a relative newcomer to APL. Although his main interest is in AI safety, he has significant experience in mainstream computer systems. This is part of what made him decide to write a YAML (YAML Ain’t Markup Language) parser in APL. Interestingly, most of the existing YAML parsers in use today fail some part of the test suite. This speaks to the complexity of the task and how there are many interactions between different parts of YAML that are not obvious. Brandon is hoping that writing a complete parser the APL way will lead to insights into the YAML specification that he can give back to the YAML community to help the specification developers better communicate what is needed to other parser maintainers.

Next, Josh David highlighted the huge demand for statistics in data science, machine learning, and the increase of data-driven decision-making in business. Although data preparation is easy in APL, he noted the lack of ready-made code for doing statistics. Simple summaries and linear regression take just a few primitives, but Josh showed us a couple of libraries for doing more complex statistical analysis. He demonstrated rapid iteration on multiple linear regression using KokoStats by Dr. Bill Koko, performing multiple tests and seeing the impact of the selected data on the predictive power of the regression model. In Professor Stephen Mansour’s TamStat package, the use of operators reduces the overall number of functions that users need to memorise, and a cross-platform graphical interface makes a great environment for exploring and learning statistics.

Jesús Galan Lopez returned to expand on something that he mentioned in his previous presentation – the modelling of grain growth in solid materials. Students at his university were tasked with reproducing models from published research. They wrote their solutions in Python because it was familiar to them, but Jesús wanted to see how array programming would compare. He found that his APL solution was generally shorter, cleaner, and faster. Of course, he had to compare more like-for-like programs by trying his solution in NumPy as well, and he found Dyalog had comparable performance.

Grand Prize winner Andrea Piseri

Then it was time for the presentation of prizes to winners of this year’s APL Problem Solving Competition. Brian Becker gave a brief history of the competition and overview of the contest website (which uses Dyalog-grown tools). He also announced future changes to the competition, such as quarterly sets of Phase-1-style one-liner problems. Gitte then presented certificates to the student grand prize winner, Andrea Piseri, and professional winner, Alexander Block.

Alexander was first to introduce himself – he is an actuary using APL to solve problems, working in insurance companies in Germany – and talk us through a couple of his solutions. Having used Haskell, he is a big fan of point-free (tacit) programming, and liked his use of the over operator () in his solution to the Risk attack problem from phase 1 (problem 5).

Professional winner Alexander Block

Andrea Piseri is a mathematics student with a particular interest in abstract algebra and mathematical logic, as well as a programming language enthusiast. Coming from the functional programming world, Andrea first solved the DNA reading frames problem (phase 2, problem 1, task 5) using the “flatmap” pattern, but then came up with another solution leveraging comparison and interval-index to process the whole input at once. When tackling the “make change” problem (phase 2, problem 2, task 3) he was surprised to find APL was not so opinionated and that he could quite easily map iterative and recursive patterns from Haskell onto dfns.

This afternoon was the annual Viking Challenge, and this year the team from Midgaard Event set up a thrilling mystery in which we were split into teams to solve a variety of puzzles. The individual puzzles offered a range of challenges to suit all participants, with the ultimate challenge being to piece clues together in a process of elimination. There was temptation to write an APL program to solve the problem, but it was resisted as nine of the twelve teams managed to work out the solution with pen and paper. Eyes rolled with chagrin all around the auditorium when it was announced that the winning team was the team that included both Gitte and Stine!

The winning team of this year’s Viking Challenge

Today’s presentations:

Dyalog ’23 Day 3: Quantum, Human, and Network Communications

Tools Architect Brian Becker started today’s presentations with an overview of the tools provided by Dyalog Ltd. to help develop applications. He also explained the plans to improve documentation and tutorials and have more comprehensive testing, especially as our tools are supported across different platforms, architectures, and deployment scenarios. He then demonstrated use of HttpCommand to issue HTTP requests to web services, and announced the new WebSocket Server that he has been working on to facilitate asynchronous communication between Dyalog and non-APL applications.

Finn Flug discusses migrating an APL+Win application to Dyalog

Finn Flug presented a project recently undertaken to migrate a service created with APL+Win into a Jarvis-based web service with a browser-based user interface – he had some very useful advice on thread-safe error handling and implementing logging when deploying with containers because the containers disappear if the application crashes. To his satisfaction, he found that working with Dyalog tools allowed him to drop existing code into Dyalog, make a few minor tweaks, and discover that everything just works.

Ron Murray gave a demonstration of the results of his work migrating Dyalog to run on 64-bit ARM processors. He showed Dyalog running on a Raspberry Pi 4 as well as an Amazon ARM chip on Amazon Web Services (AWS). Of course, for the APL user on the new platform, it’s just APL and it works just the same.

Claus Madsen then discussed his financial application, which is deployed on AWS and needs constant up-time. He gave us a glimpse into his architecture: launching processes that log calls to the application so that when a customer reports an issue they can replicate the function calls exactly. Finally he demonstrated his continuous integration deployment workflow.

Elena Paviotti and Gianna Folladore of SimCorp Italiana entertained us with various experiences they have had when working with files and with people using files. This included problems such as when you ask for a CSV file but a naïve user has renamed a Microsoft Excel file – it looks like a CSV when opened in Excel, but is complete nonsense when imported as text! Regional settings for dates and numbers also provide a challenge, so dealing with these types of issues takes curiosity, collaboration, patience, and even more patience.

Gianna Folladore (left) and Elena Paviotti (right) share some funny stories of people and files

With an exciting new application, newcomer to APL Marcos Frenkel presented an introduction to the weird world of quantum computing. The current state of quantum programming languages are very implementation-specific, so he and his team from the University of Illinois are exploring APL as a high level way to express quantum algorithms. His representation of states as 1-column matrices and gates as square matrices allows application of gates to states to be simple matrix multiplication (+.×), which is natural and easy to explain to colleagues in the field.

Marcos Frenkel talks about quantum computing

The buzz of excitement at new scientific research with APL continued as Jesús Galan Lopez gave us an update on his investigations in metallurgy. He expressed how, in research, usually scientists are themselves the developers and they simply want to know “can APL solve my problem?” He has been pleasantly surprised by the reception to APL when he has talked about it to “whoever will listen”.

One of our two interns from this summer, Asher Harvey-Smith, described the work that he did during his internship; he started by implementing an extension to import data from text files as character matrices, then he addressed some issues in the Jupyter kernel that he found while writing some notebooks to teach linear algebra to other students at his university. Since returning to University he has seen great benefit to teaching an already familiar topic re-framed with the APL notation, and he anticipates a great opportunity using APL in that way for teaching in the future.

Asher Harvey-Smith relays his experiences teaching APL to fellow university students

Reflecting Mark Wolfon’s message yesterday, Stefan Kruger demonstrated an interface between Dyalog and Kafka, a publish-subscribe message streaming platform for managing inter-process communications in complex systems. In a modern, distributed, micro-service landscape, it is often the language of choice and, as Stefan sees it, if Dyalog can talk to Kafka then it can talk to anything that Kakfa talks to.

One issue raised in Stefan’s talk was that he had to leave APL and write a thin wrapper in C# to talk to the .NET Kafka client. John Daintree explained that this is because of a feature of C# called “generics” – generic methods and classes. If you live in C# world you probably already know about generics, and if not then you just might benefit from some awareness as many .NET packages in NuGet are only accessible using generics. Today that might require some C# code, but soon it will be all possible from APL.

When using the key operator () to do things with grouped data, it can be awkward to deal with absent values, sort the result, or query only a subset of the data. Adám Brudzewsky’s proposal for an array left operand that specifies the “dictionary” to key addresses all of these issues. The main issue currently is that this derived function returns a nested vector of grouped items, and the user must then apply their function on each grouping, but he had ideas on how to recognise and optimise this pattern.

Uncle Andy (Shiers) returned to the fireside (with great effect thanks to Jason!) to tell us about some of the backroom processes and lesser-known features and aspects of Dyalog. While a heartfelt goodbye to Geoff Streeter (who retired earlier this year) was garnished with a story about his erratic driving, we got some very useful advice about making lightweight Dyalog docker containers by removing help and sample workspaces. We also learned that 819⌶ is being removed in version 20.0 (use ⎕C instead!) and that version 19.0 will be the last version produced for intel-based macOS. He also introduced us to the new QA dev, Aarush, who we all had the pleasure to meet for the first time in person this week!

Today’s presentations: