Here are my take-away points from this year’s conference (I am pretty new to the FP world so excuse the oversimplification here):

# Compose 2017 - NYC

http://www.composeconference.org/2017/

## Day 1 (May 18)

#### KEYNOTE: A categorical view of computational effects

- Presenter: Dr. Emily Riehl
- Website: http://www.math.jhu.edu/~eriehl/
- Twitter: https://twitter.com/emilyriehl

- Slides: http://www.math.jhu.edu/~eriehl/compose.pdf
- Concept: Lawvere theory
- Concept: Moggi’s Monad:
- Paper: Notions of computation and monads - https://core.ac.uk/download/pdf/21173011.pdf
- Paper: The Category Theoretic Understanding of Universal Algebra: Lawvere Theories and Monads - http://www.sciencedirect.com/science/article/pii/S1571066107000874

###
`choose`

Your Own Derivative

- Presenter: Kenneth Foner - http://very.science/
- Slides/repo* : https://github.com/antalsz/choose-your-own-derivative
- How to abstract event based methods where you have to wait for the results:
- Concept: Zipper Structures
- Concept: Zippers -> Derivative
- Paper: The Derivative of a Regular Type is its Type of One-Hole Contexts - http://strictlypositive.org/diff.pdf
- Blog: http://strictlypositive.org/calculus/

### Reactive Sheets: an intuitive approach to functional‑reactive computing

- Presenter: Enzo Alda -
- Concept: Reactive Programming: https://en.wikipedia.org/wiki/Reactive_programming
- Concept: Functional Reactive Programming: https://en.wikipedia.org/wiki/Functional_reactive_programming
- Concept: Incremental Computation: https://en.wikipedia.org/wiki/Incremental_computing

### Typed-Tagless Final Bioinformatics

- Presenter: Seb Mondet
- Website: http://seb.mondet.org
- Twitter: https://twitter.com/smondet

- Slides: http://wr.mondet.org/slides/Compose2017-BioTTFI/#/
- Concept: use of modules for EDSL: QueΛ
- Code:
- Ketrew: https://github.com/hammerlab/ketrew
- Biokepi: https://github.com/hammerlab/biokepi
- Epidisco: https://github.com/hammerlab/epidisco

### The Probability Monad

- Presenter: Tikhon Jelvis
- Website: http://jelv.is
- Twitter: https://twitter.com/tikhonjelvis

- Modeling probability models as monads would simplify quite a lot of things:
- Combining distributions to get joint distributions
- Assigning weights, normalizing, and transformations
- Sampling for joint expectations
- Building more complex distribution combinations (e.g. decision tree like ones)

- Paper: Functional Pearls - http://gallium.inria.fr/~huet/PUBLIC/zip.pdf
- Implementation options:
- Exhaustive: each possible element is listed with assigned weights
- Makes it easy to transform
- Not feasible for all distributions

- Exhaustive: each possible element is listed with assigned weights
- Upsides: expressive, intuitive, and fits into Haskell
- Downsides: slow and issues with normalization
- Use case: basic examples implemented at Target to optimize distribution networks to reduce costs
- Paper: Practical probabilistic programming with monads - http://mlg.eng.cam.ac.uk/pub/pdf/SciGhaGor15.pdf
- Paper: Probabilistic Functional Programming in Haskell - https://web.engr.oregonstate.edu/~erwig/pfp/

### Lock-step simulation is child’s play

- Presenter: Joachim Breitner
- Website: https://www.joachim-breitner.de/
- Twitter: https://twitter.com/nomeata

- Slides: https://github.com/nomeata/codeworld-talk
- Case studies from https://code.world/
- Interactive, fun, and gamified teaching platform for programming (e.g. Haskell)
- Single-user player implementation is trivial but easily gets boring for the learner
- Multi-user player implementation is challenging
- Need to generalize for different types of games
- Which user is responsible for computation and which for visualization
- If all: redundancy, need to handle conflicts, delays, …
- If one: hard to provide interactivity and engagement (if one cannot interact with the game, it gets boring)

- Potential solution #1: everybody keeps track of their own local state but broadcast changes to others. This works fine with basic games (e.g. tic-tac-toe) but even minor network delays cause state divergences across clients when the game is more complex (e.g. pong)
- Potential solution #2: use local states but broadcast more information that enable prediction of the next state on the other agent’s side

### TUTORIAL: Learning F#: Case study with branch and bound

- Presenter: David Rhodes - http://www.opcoast.com/about.html
- Slide materials: http://www.opcoast.com/demos/fsharp/index.html

### QuickFuzz Testing for Fun and Profit

- Presenters: Martín Ceresa and Gustavo Grieco
- Website/Project: http://quickfuzz.org/#authors
- Paper: QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs - http://www.eecs.northwestern.edu/~robby/courses/395-495-2009-fall/quick.pdf
- Long long list of target programming languages and file formats to be used as an input: http://quickfuzz.org/#list-of-file-types-to-generate

### Working with Monads in OCaml

- Presenter: Stephen Compall
- Twitter: https://twitter.com/s11001001

- Slides: https://bazaar.launchpad.net/~scompall/working-with-monads-in-ocaml/trunk/files
- Myth: ML doesn’t support higher kinds

## Day 2 (May 19)

### Teaching Haskell

- Presenter: Barry Burd
- Website: https://users.drew.edu/bburd/
- Twitter: https://twitter.com/allmycode

- To better teach the concepts of the functional programming
- Common practice (doesn’t work well)
- Analogies (cars, engines, burritos)
- Pute math explanations (good for theory but too abstract)

- What we need to do:
- Explain everything in three ways
- Don’t fear redundancy in the material
- Lots and lots of various and interesting exercises
- We don’t have enough

- Common practice (doesn’t work well)
- Recommended resources:
- Monad Challenges - https://github.com/mightybyte/monad-challenges
- Brain Beckman: Don’t Fear the Monad
- Barry’s Introduction to Functional Programming course on O’Reilly
- Real World Haskell - http://book.realworldhaskell.org/
- Great book but the exercises are not enough

- Open call for people who can contribute new exercises!

### Distrest - REST access to distributed services

- Presenters: Hezekiah Carty and Chris Donaher
- Endgame: https://www.endgame.com/

- Motivation
- Data science and malware research need to happen quick at Endgame
- Limited time and resources for developers and researchers

- People want to use already existing domain-specific tools and libraries spanning multiple languages and hardware requirements

- Data science and malware research need to happen quick at Endgame
- Goal
- Minimal intervention with the code to be used
- Scale (in an easy way; e.g. adding a new computation node to the system)
- Take tools and turn them into services
- Ease experimentation

- Distrest
- Handles and routes RPC-like REST requests to tool services
- Supports multiple languages via a broker/proxy implementation in OCaml
- Implements basic workflow engine needs (e.g. dependency graph)
- Facilitates parallelization of service runs
- Soon to be open-sourced

- Use case
- Collect information about the binary, extract features (via machine learning), and learn features to be used for classification of the binary (e.g. malware or not?)
- Aggregate binaries and allow proxy requests for others interested in analyzing the archived binaries

- Practical consideration
- Versioning, deployment/scaling, and routing
- Kubernetes to rescue!

### Implementing an Event-Driven Microservices Architecture in F#: A case study of Jet.com

- Presenter: Nikhil Barthwal
- About Jet.com’s infrastructure
- Microsoft Azure for servers and F# for implementation (back- and front-end)

### BuckleScript: Making functional programming accessible to JavaScript developers

- Presenter: Hongbo Zhang
- Twitter: https://twitter.com/bobzhang1988
- BuckleScript: https://bloomberg.github.io/bucklescript/

- BuckleScript: A platform that features an optimizing OCaml compiler to readable JS. Optimization and readable JS code are the killer features.
- Support all OCaml except C FFI and also Facebook’s ReasonML
- Allows propagation of annotations on the OCaml level to the JS level
- No way around using JS in web-technologies so BuckleScript addresses an important need for proper programming and is not meant to become yet-another-framework
- Migration from JS to BuckleScript does not necessarily require a complete rewrite. Can be done in an incremental manner
- Supports commonly used JS module systems; e.g. AmdJS, CommonJS, ES6, Google modules
- MariOcaml comparison:
- JSCCO (original): https://github.com/mahsu/MariOCaml
- BuckleScript: https://github.com/chenglou/MariOCaml
- PureScript/Fable: https://github.com/stweb/MariOCaml

- Adoption: React bindings/libraries/types, WebAssembly support, …

### Android programming in Froid

- Presenter: Michael Chavinda
- Twitter: https://twitter.com/_mchav
- Website: https://mchav.github.io/

- Motivation
- For a beginner, it is really hard to get started with developing GUIs
- There are many GUI libraries but setting up the infrastructure takes much more time than the coding itself
- Android GUI space was essentially lacking a reliable solution
- Choice of language: Frege - because it provides a nice intermediate stepping stone for people who are making the transition from Java to Haskell or the other way around

- Extensive documentation and guidelines are available on the Froid Wiki: https://github.com/mchav/froid/wiki
- Basic setup to try Froid: https://github.com/mchav/try-frege-android

### Data Driven UIs, Incrementally

- Presenter: Yaron Minsky
- Website: https://blogs.janestreet.com/author/yminsky/
- Twitter: https://twitter.com/yminsky

- When you are dealing with long lists or huge tables of data, UIs are the best; but how do you build a UI that is fast, reactive (responds to the data), and typed? Inspiration from React-* framework
- Structure UIs as functions of a model, action, and virtual DOM
- Apply: applies an action on the model
- View: mutates the virtual dom based on the expected effect of the action on the UI

- Consider UIs as online algorithms
- Instead of rendering the actual DOM every time the virtual one changes, instead figure out actions that are needed when all the actions are combined by incremental computing tricks: https://en.wikipedia.org/wiki/Incremental_computing
- Jane St develop a general purpose incremental computing framework, called
`Incremental`

:

- Make use of
`diff`

and`patch`

tools/ideas- Even if you are making use of a really good incremental computing framework, it is still hard to find/replace the elements that are changed for actual manipulation
- Diff algorithms provide a nice way to reduce two versions of the model down to a minimal work to be done to convert one to another (e.g.
`Table.symmetric_diff`

in`Incremental`

) and by making use of`patch`

to fire methods required, the problem becomes easier to deal with - When the view itself is dynamic, the problem is a nested incremental problem.

- Structure UIs as functions of a model, action, and virtual DOM
- Useful Incremental tricks to simplify the problem: filtering, partial rendering, and focus management
- Upsides of using Incremental
- The semantics of the code easier to understand
- Significant performance boost
- Sharing code is also made easy
- Debugging becomes easier (thanks to JS)

- Demo reactive table: https://github.com/janestreet/incr_dom

Sorry, had to leave at this point. No notes from now on

### Multiplying by 1 - an important form of computation and how it reveals distinctions between kleislis

- Presenter: Edmund Cape

### Smart Contracts and Formal Verification with Z3 with Pact

- Presenter: Stuart Popejoy

### New Hasql - a simpler, safer and faster Postgres client

- Presenter: Nikita Volkov