Witchcraft, Algae, and Quark bring several utilities to Elixir from other languages like Haskell, enabling an easier, principled use of tools such as algebraic data types and monads. Witchcraft's goal was to feel fully idiomatic, and provide a gentle learning curve for learning the new concepts that it introduces. Porting concepts into new environments brings its own challenges: in this talk we'll explore some of the lessons I learned along the way.
Brooklyn Zelenka
Brooklyn is a distributed systems researcher, and editor of the UCAN auth spec. She founded the Vancouver Functional Programming Meetup, and has worked on standards spanning distributed VMs (EVM, IPVM), auth (UCAN), data privacy (Webnative FS, RhizomeDB), databases, wire formats, key agreement, and others.
/ expede
/ brooklynzelenka
Video sponsor – Ada Beat
https://adabeat.com
Merch
If you want to spread functional programming and support the channel, buy something from the shop:
https://funcprogsweden.myspreadshop.net/
Chapters
00:00 Introduction by Magnus Sedlacek
02:41 Thanks Ada Beat for sponsoring the video production
04:14 Witchcraft — Lessons From Porting Monads to Elixir by Brooklyn Zelenka
05:17 Change the way you think
06:06 Brooklyn Zelenka @expede
07:52 What is Witchcraft?
10:05 How Hard Could It Be?
10:40 Motivation
12:07 What Is? Quark
13:45 Strategy
16:59 Design Principles
17:38 Stack
17:55 Quark
19:27 Operator
21:30 Algae
24:59 TypeClass
30:27 Algae
33:06 Witchcraft
34:49 Consistency & Ethos – What We’re Trying to Avoid
35:39 Pipes
36:46 Dataflow & Directionality
37:09 Giving Pipes Superpowers
37:53 Dataflow & Directionality
38:55 Arrows
39:29 Functor Tower
40:05 Functor
40:26 Apply
40:53 Chain: Functions to Actions
41:26 Chaining with do-Notation
42:19 Monadic do-Notation
43:05 do-Notation Implementation
43:27 Writer Monad
44:21 Lessons Learned
46:52 Wardley Stages
48:45 Approch in 2024?
50:05 Thank you!
50:16 Q & A
#funcprogsweden