The following is an interview that I was asked to give about my upcoming LambdaConf workshop. I have reproduced it here because it has been removed from the original host location.
Aaron Hsu Interview
Aaron Hsu will be giving a talk. He will be speaking about Functional Array Funhouse Intensive.
How did you get into Functional Programming?
I began to really learn computer science when I was in Middle/High school with QBASIC. After I began to run into some problems with understanding how recursive algorithms works, especially with the stack limits in the QBASIC interpreter, my mentor suggested that I take a look at Lisp languages and see what I could learn from them.
I did some research on them and discovered Scheme, where I successfully implemented my first recursively defined Radix Sort, in much shorter time than I would have thought possible. That started over a decade of enjoyable programming with Scheme.
What is your talk about?
I think the abstract and workshop details cover it pretty well, but if I were to summarize, it’s about reaching a practical, usable understanding of array programming. Learning the basics of array programming is almost trivial. I can teach anyone that in about 30 minutes to an hour. But that’s a far cry away from enabling someone to use array programming as a tool of thought in their daily lives, and doesn’t really “open the magic” for programmers. They will not be able to break down those famous APL one liners or make new ones themselves, much less “speak” that language natively.
So, my workshop is about how you take array programming and actually use it, which means understanding what array programming is, why it is different, how you use/experience/interact with array programs, how they integrate with the broader ecosystem of programming environments and tools, and, last but certainly not least, how software engineering or development methodologies interact with array programming, particularly focusing on exemplars of development methodologies that are uniquely found inside of the Iverson-style array programming communities.
Who is your talk for?
My talks are for anyone motivated to learn and improve and grow. I generally don’t believe in a static, preconfigured corpus of knowledge rigorously presented under the assumptions that my audience will be this or that. Instead, I think every workshop and every lecture needs to be interactive and sensitive to the unique knowledge base and interests of the attendees. The only real bottom line requirement is that you are motivated to learn something. It also helps if you’re familiar with a functionally oriented programming language, such as Scheme, Haskell, Agda, Idris, ML, Lisp, or something like that. I usually start with functional thinking as the core basis of presenting array programming, so it helps if you are familiar with how to think “functionally” to start with.
For those who are not familiar with functional thinking, I think a strong foundation in traditional algebraic mathematical practice will be a suitable background as well. You can come at it from either angle, so either approach works.
What do you hope people will take away from the talk?
Hope or expect? ?? What I hope is that people will come away really understanding what this whole APL/array programming thing is all about, and be just as amazed, if not more amazed, and eager to explore and further their exposure and experiences in array programming on their own through their own self-study and application to real world problems. APL is a little like magic, with the magicians presenting “cute tricks” to the world that leave people suitably impressed, but often, not understanding the trick. There is also a distance that keeps people from really understanding things. I hope to close that distance and give people a chance to really internalize and make array programming something they can use.
Sort of like in martial arts (of which I am an avid practitioner), you can watch the masters at a distance, or you can get a chance to learn something for yourself and then the magic, though less mysterious, is no less fun or enjoyable.
I also hope that I can inject a huge dose of fun and pleasure and art back into the programming process. We’re in danger these days of programming becoming a commodity of operation that exhibits all the cold desirability of an accountant’s ledger. That’s definitely useful and practical, but I see programming as a form of human to human communication, and a part of that is going beyond just the raw semantics and seeing the human/human dynamic of programming, which is, at its root, a form of self-expression. Programmer’s that love the art they are making, IMO, make better code and have more fun doing it, than those who feel that they are two steps above a robot.
What concepts do you recommend people be familiar with to maximize their experience with the talk?
That’s a really good question. At the lowest level, I’d say they should have some basic familiarity with untyped functional programming such as Scheme/Lisp. Some concepts relating to mathematics/algebra are also helpful. Beyond those basic technical skills, if they are so motivated, then there are other concepts and areas they could explore that may enrich their experience, but are not required. Human Computer Interaction/Design is a domain of research that I think would be worth exploring a little bit. Things like Usability and Experience testing come from that realm.
Beyond that, there are some introspective things that I’d suggest anyone interested does just to begin thinking about things. The first would be to think about your favorite programs, programs that you think are beautiful in one way or another. Think about your daily grind of programming and compare what you love about your favorite programs and about the process of programming you go through on a daily basis. Then look back on your daily grind of programming and ask yourself what frustrates you, or where do you become bored? And then ask yourself how you think about problems and their solutions. What tools do you use in addition to your programming language. Do you use an IDE, an editor, do you have a whiteboard you like to work with, maybe a sketchpad? Do you use an automatic testing harness, and if so, how do you use it/leverage it? What are the various stages of your programming environment?
If you program to provide solutions to other people, how does this process differ from when you just want to write a program for yourself, or when you and another programmer work on a problem together? What tools and methods do you use to work with your “end user” compared to the tools that you use to work with your programmer colleagues? How do those tools differ and how does the interaction differ? What’s the development life cycle you work with?
I think a strong effort to think about the “process” and “experience” of programming and how it works and feels and how your own mental process interacts with your programming language and environment are some of the best things you can do to prepare for this workshop.
Finally, the papers “Notation as a Tool of Thought” by Kenneth Iverson (his Turing Award Lecture) and “Out of the Tar Pit” by Moseley and Marks are some great papers to read to let some “ideas” simmer and prepare the mind to play with ideas in the workshop.
What resources are available for people who want to study up before the talk?
I’d divide these resources into theoretical and practical.
Practical resources would include things like the John Scholes YouTube videos on APL, such as “Game of Life in APL” or “Sudoku Solver in APL”. There’s TryAPL which has a set of tutorials for learning the basics of APL. You can also download a free copy of the “Mastering Dyalog APL” book that contains a section at the beginning covering dfns, which is a good read.
To get a bit of background on myself and my work there is the following YouTube video where I describe the architecture of an APL compiler written in APL. This was spawned by a Hacker News discussion and contains a lot of “theory crafting” to ponder. It should provide a lot of fodder for the workshop.
The description of that video contains links to the Hacker News discussions.
I’ve mentioned above, but the following papers are also excellent reading:
“Notation as a Tool of Thought” by Kenneth Iverson
“Out of the Tar Pit” by Ben Moseley and Peter Marks
Of course, if you don’t prepare, then that’s fine too. ?? However, the more you read up and get some of your own ideas to think about first, the more you’ll get out of the workshop.
Where can people follow you online?
Are there any projects you’d like people to be aware of? How can people help out?
My current work is primarily on the Co-dfns project, which is an umbrella for a lot of things that are planned for the future, but which is primarily the APL compiler right now.
There are many ways for people to help out. Two of the best ways are to fund the project and use the products. ?? Funding is done through Gratipay.
This is the easiest way to show your support, and will greatly contribute to the long term success of the project, since I’m actively working to encourage a more open, engaged R&D of scientific computing and educational research, and this is one of the ways to do that.
And then, simply start using the compiler. It’s being actively developed, but there’s only so much testing I can do. The more people work on using the APL compiler as their daily methods of interacting with APL, the more bugs will be discovered and the better product I can provide. I have big plans for the compiler and what it can do for the state of computing and computing education, but this requires getting enough general use of the compiler to really shake it out, and at the moment I’m simply short on manpower to do that. People getting and using the compiler on a daily basis brings out the important bugs faster than anything else.
Where do you see the state of functional programming in 10 years?
I have to laugh at this question! You usually see this sort of question asked of people who have tremendous sway and influence over the direction of the programming community. I’m not in the same league as they are, and I’m not sure I’m qualified to opine on something so speculative as computing in 10 years. I’d like to think that in 10 years I’ll be able to look back and see my own small contributions to the betterment of humanity through a human-focused outlook on the programming experience, and the sorts of doors that could open, but who knows? The world of computing is changing so quickly, and is subject to so many fads and fashions that sometimes it’s nice to drop by a fashion show in New York and get a sense of stability and continuity away from the whirlwind that is programming languages and design.
Instead of predicting anything, I’ll rather state a vision I have. We’re getting really good right now on how to get computers to aid in our rigorous formalizations of computing ideas, though I think we still have a long way to go in that arena. There are a lot of things we can do now that simply were intractable some years ago. To me this opens up the possibilities of improving the fundamental interaction paradigms with computing. In some ways I think we’ve lost a bit of soul in our computing, and I’d like to see that brought back. I want to see programming language design especially bring a strong focus onto the human economy of thought, rather than the machine’s economy. My vision for computation in the future is that we have the ability to speak human to human at a competent level in code, or whatever that may look like in the future, in a way that empowers us to better understand and clarify our ideas, and that this isn’t just an experts tool, but is a tool considered as generally useful as basic mathematics is today. To me this doesn’t mean dumbing down the power of language, but instead, requires creating a more human-centered linguistic focus when designing programming languages, which may mean that we make different trade-offs in design to improve the human experience, rather than chasing ever more robust abstractions.
I have a phrase I like to throw out, “Abstraction Considered Harmful.” I’d like to see a shift in programming design where humans control the abstraction, rather than the state now, where I feel like, in a real sense, abstractions control us. This “discipline of the mind” is something we’ve been chasing since long before computing was a thing, and we’ll likely never see it in full, but I think it’s a worthy goal. I also think that the reification of such a vision is likely to be functional, rather than imperative, in nature.
If functional programming were a superhero, what superpower would it have?
?? Clearly time scrubbing. After all, the ultimate of functional programming is fully reversible programming. Naturally, being able to fully travel back and forth in time wouldn’t mean our superhero could do anything, side-effects are evil, don’t you know? But riding the rails of time would be the ultimate functional superpower.