
Manuel Chakravarty
Lambda Scientist
Tweag I/O & IOHK
location_on Netherlands
Member since 5 years
Manuel Chakravarty
Specialises In
Manuel M T Chakravarty works with Tweag I/O as a functional programming evangelist, architects blockchain languages at IOHK, and develops the interactive development environment Haskell for Mac — one of the first Swift apps on the Mac App Store. His interests span from functional programming, novel compiler technology & programming language theory over high-performance & distributed computing to blockchain technology.
He used to be an associate professor at UNSW Sydney and contributed to both the design and implementation of the Haskell programming language as well as several Haskell tools and open source libraries, including multiple systems for data parallel programming of multicore CPUs and GPUs. Over the last few years, he focused on making functional programming more broadly accessible and on exploring its role in app development in Swift. Currently, he is busy researching and developing a novel approach to blockchain contract development with IOHK's Plutus Team. Most importantly, he believes in the fruitful combination of theory and practice.
-
keyboard_arrow_down
A Type is Worth a Thousand Tests
30 Mins
Talk
Intermediate
One of the biggest changes in the transition from Objective-C to Swift is the new type system. This change is at the heart of Swift’s language design, from optionals over value types to constrained generics, and to truly understand the language, a thorough understanding of its type system is indispensable.
In this talk, I will explain the advantages of Swift’s strong commitment to a sophisticated type system. I will illustrate the impact on language and program design through a series of examples, drawn from my experience of developing one of the first Swift-based applications published in the Mac App Store and illustrated by walking through key design issues in a simple iOS app. I will discuss why type-driven design benefits from functional programming principles, and also, how it allows us to write less tests without a loss of confidence in our code.
-
keyboard_arrow_down
Do Extraterrestrials Use Functional Programming?
60 Mins
Keynote
Advanced
Is functional programming just the result of clever language design? Are there deeper reasons for the effectiveness of the paradigm? Why has functional programming not caught on earlier?
In this talk, we will have a look at the roots of functional programming, at their contribution to the success of the paradigm, and at the lessons we can draw to maximise the benefit we derive from functional languages. I will argue that the core of functional programming is a principled approach to software design compatible with both rigorous and agile methods of software development. It stems from a desire for purity, composability, and elegant logical properties, and I will outline how to leverage these ideas to solve practical programming problems.
-
keyboard_arrow_down
Foreign Inline Code in Haskell
30 Mins
Talk
Advanced
Template Haskell is a meta programming framework for Haskell implemented by the Glasgow Haskell Compiler (GHC), which is widely used as a template meta-programming system for Haskell, to define macros, code generators, or even code transformation engines. Subsequent support for the quasiquoting of arbitrary programming languages greatly simplified writing code generators in Haskell that produce complex C, CUDA, OpenCL, or Objective-C code by writing code templates in the syntax of the generated language.
Additionally, quasiquoting of C-like languages enables a purely library-based system for inline C code in Haskell. This dramatically simplifies language interoperability, and especially, the use of frameworks and libraries written in C-like languages from Haskell. It is, for example, helpful in applications based on native GUI libraries and projects integrating code written in multiple languages.
In this talk, I will explain the concepts of template meta-programming and quasiquoting and how they are used in Template Haskell. I will demonstrate quasiquoting by way of a few simple and intuitive examples. Finally, I will demonstrate the use of inline C code in Haskell and compare it to other forms of language interoperability as provided by Haskell and other functional languages.
This talk will explore the use, but not the implementation of quasiquoting and inline C & Objective-C code. Hence, the material should be accessible to anybody with an intermediate-level working knowledge of Haskell and C.
-
keyboard_arrow_down
Functional Programming in a Stateful World
30 Mins
Talk
Intermediate
Today, functional programming is mostly used in the development of server-side software and command line applications. This is changing with Swift, a language with strong support for functional programming that is pitched as the successor of Objective-C for desktop and mobile applications. Unsurprisingly, there are obstacles. Any attempt to use Swift’s support for functional programming to its full potential leads to architectural challenges, especially in the separation of stateful and purely functional computations. In desktop and especially in mobile applications, a superb user experience is the central aim in application design.This typically leads to a ubiquitous use of application frameworks, such as Cocoa, which tend to encourage a tangled web of stateful, mutually mutating objects — very much the anti-thesis of modern functional programming.
Established approaches to disentangling stateful from pure computations, while necessary, are not sufficient for desktop and mobile applications. A careful separation of the view layer (implementing the user interface) from the application logic (forming the computational heart of the application) requires us to rethink application architecture and depends on adopting an interaction paradigm focusing on the data flow between components rather than on object mutation.
This talk summarises my experience with building a desktop application including a complex user interface in Swift and Haskell. The talk will provide answers to the following questions. In which way is functional programming useful in desktop and mobile applications? What are the advantages of stateless, pure functions? What software architecture maximises the impact of functional programming in that context? How can we propagate changes from user interactions, file system & network events, and so on in a manner that keeps an application responsive, while facilitating stateless computations.
Although, the talk mostly resolves around Swift, no previous knowledge of Swift is required and the main ideas translate to writing desktop and mobile applications in other functional languages, such as Scala, F#, or Haskell.
-
keyboard_arrow_down
Haskell SpriteKit — A Purely Functional API for a Stateful Animation System & Physics Engine
30 Mins
Talk
Beginner
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.
In 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 internally and how it achieves the translation of Haskell side changes to SpriteKit and vice versa, such that it is sufficiently efficient. Moreover, I will explain how to use the Haskell library to implement animations and games.
-
keyboard_arrow_down
Welcome to FP Introductory Workshop
480 Mins
Introductory Workshop
Beginner
Functional programming has become inevitable. New programming languages draw inspiration from the functional paradigm; old programming languages retrofit support for functional programming; and development teams change their coding style to adopt the best functional programming idioms. We are clearly experiencing a paradigm shift in our industry.
Due to its academic roots, functional programming sometimes seems unapproachable, with unfamiliar jargon, obscure concepts, and bewildering theories. It doesn’t have to be like that.
In this one-day series of lectures and hands-on workshops, we will translate the jargon, demystify the concepts, and put the theories into practice. There is nothing inherently difficult about functional programming. In fact, its main aim is to simplify programming and to make it more widely accessible. Functional programming is about being able to understand one function without the million lines of code it is a part of. It is about code reuse. It is about modularity and keeping code easy to change and refactor. These are all goals of good program design that every developer appreciates. Based on this common ground, we will explore functional programming together and see how it can help us to achieve these design goals. In fact, by learning the fundamentals of functional programming in Haskell, we can improve program design in mainstream languages, such as Javascript and C++, and even more so, in hybrid languages, such as Scala and Swift.
Throughout the day, we will explain the most commonly used functional programming terminology. You will learn the fundamentals of Haskell, one of the most popular functional programming languages. In the process, we will look at a lot of concrete code to understand what functional programming is all about and how to use it in your own programs. In the workshops, you will have plenty of opportunity to write code yourself, experiment, and ask questions. It’ll be fun!
Bring your laptop and your curiosity and by the end of the day, functional programming will be another tool in your toolbox, and you will be ready to enjoy the main YOW! Lambda Jam conference.
-
keyboard_arrow_down
Plutus — Haskell for Blockchain Contract Development
30 Mins
Invited Talk
Beginner
With the proliferation of blockchain designs, we see a proliferation of proposals for languages and systems to script the rules governing transactions on these blockchains, generally known as smart contract languages. Despite the name, these languages are usually fairly conventional programming languages used to impose constraints on the transactions permitted to transfer assets and manipulate data stored on the blockchain.
Given the high financial stakes and widely publicised exploits on first generation (Bitcoin) and second generation (Ethereum) blockchains, the third-generation Cardano blockchain places a strong emphasis on functional programming and formal methods. This includes a new approach to contract languages based on state-of-the art research in programming languages and the increased safety provided by functional programming. The benefits of functional programming go even further: instead of having to invent yet another custom language, we simply use Haskell for the job, we design a functional blockchain architecture, and we seamlessly combine on-chain and off-chain computations.
In this talk, I will outline how IOHK’s Plutus team combines programming language theory, functional programming in Haskell, and theorem-proving in Agda to develop a radically new approach to blockchain contract development. This work has resulted in the Plutus Platform, which uses meta-programming in Haskell for distributed contract applications operating on the Cardano blockchain.
-
keyboard_arrow_down
Welcome to FP Introductory Workshop
480 Mins
Introductory Workshop
Beginner
Functional programming has become inevitable. New programming languages draw inspiration from the functional paradigm; old programming languages retrofit support for functional programming; and development teams change their coding style to adopt the best functional programming idioms. We are clearly experiencing a paradigm shift in our industry.
Due to its academic roots, functional programming sometimes seems unapproachable, with unfamiliar jargon, obscure concepts, and bewildering theories. It doesn’t have to be like that.
In this one-day series of lectures and hands-on workshops, we will translate the jargon, demystify the concepts, and put the theories into practice. There is nothing inherently difficult about functional programming. In fact, its main aim is to simplify programming and to make it more widely accessible. Functional programming is about being able to understand one function without the million lines of code it is a part of. It is about code reuse. It is about modularity and keeping code easy to change and refactor. These are all goals of good program design that every developer appreciates. Based on this common ground, we will explore functional programming together and see how it can help us to achieve these design goals. In fact, by learning the fundamentals of functional programming in Haskell, we can improve program design in mainstream languages, such as Javascript and C++, and even more so, in hybrid languages, such as Scala and Swift.
Throughout the day, we will explain the most commonly used functional programming terminology. You will learn the fundamentals of Haskell, one of the most popular functional programming languages. In the process, we will look at a lot of concrete code to understand what functional programming is all about and how to use it in your own programs. In the workshops, you will have plenty of opportunity to write code yourself, experiment, and ask questions. It’ll be fun!
Bring your laptop and your curiosity and by the end of the day, functional programming will be another tool in your toolbox, and you will be ready to enjoy the main YOW! Lambda Jam conference.
-
keyboard_arrow_down
Functional Programming in Swift
480 Mins
Workshop
Beginner
Swift’s strong functional programming support generates a lot of interest in adapting functional programming techniques to improve designing, developing, and maintaining Cocoa applications. This workshop will help you unlock this potential.
We will explore the foundations of functional programming and how functional programming helps to improve software development. We will start by discussing the main goals of functional programming, followed by surveying Swift’s language features that support functional programming. Then, we will look at how to put functional programming principles into practice using Swift. We will focus on immutable data structures, value types, and functional reactive programming.= Value types
One of the biggest changes in the transition from Objective-C to Swift is the new type system. This change is at the heart of Swift’s language design, from optionals over value types to constrained generics, and to truly understand the language, a thorough understanding of its type system is indispensable. We will survey these type system features with special attention to value types. We will discuss how structs and enums in Swift can be used to help avoid bugs by design and how immutable data structures help to avoid unwelcome side effects.
= Functional reactive programming
Functional reactive programming (FRP) promises to replace unstructured side effects by structured change propagation in response to user input, network events, sensor activity, and similar. Typically explained by way of sophisticated, but often also complex functional reactive programming frameworks, such as ReactiveCocoa and RxSwift, it can be difficult to see the simple principles underlying functional reactive programming. In fact, these principles are sufficiently simple that we can explain them by building a functional reactive programming library from scratch.
We will discuss how we can construct our own lightweight functional reactive programming library out of simple components using Swift’s support for protocol-oriented programming. Moreover, we will discuss how to use this library to design and implement the change propagation between the model and view components of a Cocoa app.
All of this is illustrated with hands-on coding exercises based on simple iPhone application that incorporates the discussed techniques. -
keyboard_arrow_down
Haskell SpriteKit - a Purely Functional API for a Stateful Animation System and Physics Engine
45 Mins
Demonstration
Intermediate
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.
-
No more submissions exist.
-
No more submissions exist.