Proofs, Derivations, Tests
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.
Outline/structure of the Session
1.1 Sum of the Integers
1.2 Triangular Matrix Inverse
1.3 Cholesky Decomposition
1.4 Ackermann’s Function
3.2 The Diamond Kata
3.3 Tolerant Nub
3.4 Dyadic Transpose
The attendees will gain appreciation of the use of formal techniques in functional programming.
Anyone interested in the use of formal techniques in functional programming.
schedule Submitted 1 month ago
People who liked this proposal, also liked:
Haskell SpriteKit - a Purely Functional API for a Stateful Animation System and Physics EngineManuel Chakravarty
schedule 1 month agoSold Out!
Graphics, animation, and games programming in Haskell faces a dilemma. We can either use existing frameworks with their highly imperative APIs (such as OpenGL, Cocos2D, or SpriteKit) or we waste a lot of energy trying to re-engineer those rather complex systems from scratch. Or, maybe, we can escape the dilemma. Instead of a Haskell program directly manipulating the mutable object-graph of existing high-level frameworks, we provide an API for purely functional transformations of a Haskell data structure, together with an adaptation layer that transcribes those transformations into edits of the mutable object-graph.
I this talk, I will explain how I used this approach to architect a Haskell binding to the animation system and physics engine of Apple’s SpriteKit framework. I will discuss both how the binding is structured and how it achieves the translation of Haskell side changes to SpriteKit and vice versa, such that it is sufficiently efficient. Moreover, I will demonstrate by example how to use the Haskell library to implement a simple game.
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 two different paradigms - functional programming and array-oriented paradigm.
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.
Functional Array Funhouse IntensiveAaron W Hsu
schedule 4 weeks agoSold Out!
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.
Predator: A Framework for developing programmatic players for Complex Board Games( in Erlang and PureScript)Ravi Mohan
schedule 1 month agoSold Out!
Summary: An Experience Report on How I'm using Erlang and PureScript to create programmatic opponents aka 'bots' for complex boardgames I love to play but I can't find people to play with!
The number of boardgames that you can whip out at a gathering and expect people to want play is very small.. Monopoly, Snakes and Ladders, perhaps Settlers of Catan. And that's about it.
Getting people to play these games is relatively easy.
However the world of boardgames is *much* wider. There are literally tens of thousands of boardgames that simulate everything from very abstract geometry puzzles to ones thatcomplex economies and political situations. Some of the latter are used in very unexpected ways, e.g to train spies and military officers.
Here is an example
A Distant Plain (by GMT Games) is a boardgame for 4 players that put them in the roles of the US military forces, the Afghan government, the Taliban, and Warlords cum drug dealers, all competing for power in Afghanistan.
Here is another
The War of the Ring, a game for 2 players.
"In War of the Ring, one player takes control of the Free Peoples (FP), the other player controls Shadow Armies (SA). Initially, the Free People Nations are reluctant to take arms against Sauron, so they must be attacked by Sauron or persuaded by Gandalf or other Companions, before they start to fight properly ...."
And one more
"A game of Eclipse places you in control of a vast interstellar civilization, competing for success with its rivals. You will explore new star systems, research technologies, and build spaceships with which to wage war. There are many potential paths to victory, so you need to plan your strategy according to the strengths and weaknesses of your species, while paying attention to the other civilizations' endeavors."
What these games have in common
1. They are wonderful wonderful games, immersing you into their respective worlds.
2. They have (relative to Snakes and Ladders or Monopoly) complex rulesets.
3. They are rarely played in India.
4. Even when people own them, opponents are almost impossible to find and schedule.
Which means that if you own these games and live in India, getting to actually play these games is close to impossible. Which is a problem.
Being a programmer, I solve this problem by writing programmatic opponents (aka 'bots') to take the place of other players. This involves all kinds of interesting sub problems - game representation, logic processing for rules, building AI 'smarts' for your opponents, gui and event handling etc.
Since I am doing this in my non existent spare time, I use time and effort saving languages, aka functional languages, in my case Erlang (originally Haskell) for the backend and PureScript for the front end.
This talk is about the many challenges I faced in building automated game players (and extracting common frameworks/libraries) from them. Since this is an experience report, it is basically a list of lessons learned, victories *and defeats*, what worked *and what didn't work*.
If you can't use FP at work, but are considering doing so on a personal project, or want to learn how to get going on a non-toy FP learning effort, you could benefit from my mistakes and successes.
Learning Computer Architecture With ErlangManoj Govindan
schedule 2 days agoSold Out!
Computer Architecture begins with electronics. As computers are built layer upon layer starting with primitive gates baked into silicon, followed by chips and logic gates, hardware platform including ALU, RAM, cache etc., and so on, so is the study of computer architecture a study of each of these layers of abstraction.
Students of computer architecture usually rely on simulators, often written in Java or similar imperative/object oriented languages, to aid their learning. Here are some examples of such a program:
As an Erlang/functional programming enthusiast studying computer architecture I decided to write my own equivalent tools in Erlang and TypeScript as I went about my learning. I am studying computer architecture and simultaneously writing the required simulators and other tooling in Erlang and TypeScript.
Building such emulators and tools in Erlang and Typescript results in distinctly different architectures. I'll be demoing the simulator I built and talking about lessons learned doing this.