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 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.
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).
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!
Today’s presentations:
- D15: Co-dfns Update 2023 – Aaron Hsu
- U11: A YAML Parser in APL – Leveraging a Linear Dataflow Model to Unleash APL’s Expressiveness – Brandon Wilson
- D16: Statistical Libraries for Dyalog – Josh David
- U12: Grain Growth and Array Programming – Jesús Galán López
- D17: How I Won the APL Problem Solving Competition (Introduction and Prize Ceremony) – Brian Becker
- U13: How I Won the APL Problem Solving Competition (Non‑student Winner) – Alexander Block
- U14: How I Won the APL Problem Solving Competition (Student Winner) – Andrea Piseri