Functional Array Funhouse Intensive
How would your make your programs easier to write, inherently parallel, and have high performance across GPUs and CPUs? How about a development methodology that makes agile programming look sluggish and unreliable? How about shrinking the size and complexity of your code base by an order of magnitude, while increasing performance by an order of magnitude? This intensive workshop is designed to demystify the strange and special world of array programming like you may never have seen it before. Iverson-style array programming terrifies some and amazes others, but no one can argue with the results in areas such as finance, energy, education, or medical research. New research has made array programming scalable across a wide array of parallel hardware architectures. Often renowned for remarkably short, concise code that does a tremendous amount, the area of production level, array programming is an often misunderstood area. This workshop will bring you through a whirlwind of array programming concepts by example and case study, opening up the curtains on the original interactive functional programming language in its modern incarnation. You will learn how you can make use of this sometimes mystical world, with an emphasis on the concepts and how to integrate these concepts into a practical, targeted development methodology and ecosystem for maximizing productivity and leveraging the benefits of notational thinking to their full effect. The goal is to let you keep the magic and fun of programming alive while you use that magic for your benefit in the real world.
Outline/Structure of the Workshop
- Array Basics
- Learn by Example(s)
- Scaling (Human and Machine)
- Integrating Array Programming (Direct Development, etc.)
This workshop proposes to cover the following concepts:
- Foundational Array Programming concepts
- Fundamental building blocks of array programming
- Notational Thinking
- Traditional to Array programming technique equivalencies
- Idioms, “phrases,” and patterns that scale array thinking
- Exploratory and data-driven programming
- Direct Development as a methodology for leveraging array programming
- How to use tools for exploring arrays
- How to compile and target array programs to GPUs and CPUs
- Real-time debugging and exploratory programming with arrays
- Integrating direct development
Developers interested in parallel computing
It is critical that you ensure the following software is installed and working on your machine that you bring to the workshop. Having this software installed ahead of time will prevent delays in the workshop due to configuration issues.
Dyalog APL 16.0 Unicode (http://www.dyalog.com)
(Windows) Visual Studio 2017 (C++ Development Environment)
(Linux) GCC development toolkit
(Mac OS X) Apple Developer Tools with clang + Homebrew
CUDA Toolkit (Latest) if you are running on a machine with an NVIDIA card
In order to set the stage for the better use of our time in the workshop, please watch the following videos:
I’d divide the resources attendees need to study up before the workshop 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.
schedule Submitted 1 year ago
People who liked this proposal, also liked:
Aaron W Hsu - Design Patterns vs. Anti-pattern in APLAaron W HsuComputer ScientistIndiana University
schedule 1 year agoSold Out!
APL is a notorious language with a reputation for being "write only" and difficult to learn. Yet, many people consider APL to be their single most productive, advantageous tool that they hope never to give up. In particular, it is generally observed that many computer scientists have a poor opinion of the usability of APL, while many data scientists and domain experts find the language to be exceptionally usable.
This session focuses on the experienced programmer's struggle to gain real facility with APL beyond the basic, trivial understanding of its semantics and syntax (which can be taught in a few hours). We will observe this struggle through a "human-centered" experience analysis identifying a set of Pattern/Anti-pattern tensions that are at the heart of the intermediate APL learning "wall." By examining the experience of thinking and working with APL code versus regular code, we can identify principles of APL coding practice that directly oppose the widely taught and embraced best practices of the broader programming community. We'll see not only what these principles are, but also why they survive in APL and how they contribute to the positive development cycle of an experienced APL programmer, instead of the negative impact such practices usually have when writing in other languages.
Understanding these practices will provide a focus point for the discussion of programming experience design and the use of concise array language, as well as provide a structure for becoming better able to write, read, and think in APL expert.
Dhaval Dalal / Morten Kromberg - Code Jugalbandi
In Indian classical music, we have Jugalbandi, where two lead musicians or vocalist engage in a playful competition. There is jugalbandi between Flutist and a Percussionist (say using Tabla as the instrument). Compositions rendered by flutist will be heard by the percussionist and will replay the same notes, but now on Tabla and vice-versa is also possible.
In a similar way, we will perform Code Jugalbandi to see how the solution looks using different programming languages and paradigms.This time the focus of code jugalbandi will be on solutioning in different paradigms - object-oriented or functional programming and array-oriented paradigms.
During the session, Morten and Dhaval will take turns at coding the same problem using different languages and paradigms. There would be multiple such rounds during the Jugalbandi.
Debasish Ghosh - Mining Functional PatternsDebasish GhoshPrincipal Software EngineerLightbend Inc
schedule 1 year agoSold Out!
Using a programming language that supports first class functional programming doesn’t necessarily imply that the code you write is functional. Functional programming has the nice properties of being compositional - you design smaller abstractions and then reuse them to build larger ones. You use the power of algebraic properties that these abstractions offer to build larger elements of your model out of smaller ones.
However often we find that many code bases designed in a functional programming language are inherently imperative, especially when you are using a multi-paradigm language like Scala or Java. There’s nothing wrong with imperative code, but it lacks the niceties of expression based composition that makes reasoning about your code so much easier. Also assignments used in imperative code are inherent side-effects that are best avoided (or at least minimized) in an expression oriented language.
In this session I will discuss some of my experiences of mining imperative code and refactoring them into functional patterns. You will be surprised to see how much functional goodness can be derived through functional thinking. Algebraic structures like Monoids, Monads and Kleislis are just buried within the reams of imperative statements crying to come out. In an exercise of half an hour we will liberate them and see how the code quality improves from the point of view of modularity, compositionality and simplicity.
The slides of the talk has been uploaded at https://www.slideshare.net/debasishg/mining-functional-patterns.
Roger Hui - Tests, Derivations, ProofsRoger HuiprogrammerDyalog Ltd.
schedule 1 year agoSold Out!
John Hughes and Mary Sheeran in Why Functional Programming Matters  list “algebra as a litmus test” as one of the four salient features of functional programming, and Ken Iverson in Notation as a Tool of Thought  lists “amenability to formal proof” as one of the five important characteristics of notation. Using the language APL, we prove the correctness of some programs, derive simplifications, and illustrate design validation and program test techniques for functional programs.
 Hughes, John, and Mary Sheeran, Why Functional Programming Matters, Code Mesh, London, 2015-11-02 to -04.
 Iverson, Kenneth E., Notation as a Tool of Thought, Communications of the ACM, volume 23, number 8, 1980-08.