Algebraic Effects from Scratch by Kit Langton

preview_player
Показать описание
Kit Langton explores algebraic effects, emphasizing separating syntax from semantics. Kit demonstrates this through the Kyo library, discussing syntax and semantics using method examples. He showcases handling failures and non-determinism, refactors code for efficiency, and introduces concepts like "and-then," "flatMap," and "map." The goal is to create a simple console DSL with type inference and sequential composition, enabling building larger programs as a single syntax tree. Kit also discusses challenges like type inference issues and making effects extensible and composable, promoting the Kyo library's speed and modular design for better optimization and JVM compatibility.

Video sponsor – Ada Beat

Merch
If you want to spread functional programming and support the channel, buy something from the shop:

Chapters:
00:00 Welcome Kit Langton
00:38 Algebraic Effects from Scratch
01:38 Agenda
02:25 Define me
05:24 Define Algebraic Effects
06:27 Functional effect systems
08:07 Syntax + Semantics
09:27 Custom syntax + semantics
14:30 Kyo example time
23:55 A simple DSL (Implement it from scratch)
28:48 We can use GADTs
33:36 Will it compose?
36:26 Sequential composition
58:36 Recapitulation
59:19 Add additional operations
01:11:28 Before and after
01:12:09 More code, more problems
01:18:54 Q&A

#funcprogsweden
Рекомендации по теме
Комментарии
Автор

Thank you Kit! The progressive enhancements and your animations made it very easy to follow. Love your enthusiasm.

alex.boisvert
Автор

This talk **rules** i hope a part two arrives sometime

garthgoldwater
Автор

I would have liked a cycling hue filter on Kit throughout the session :(

Worr
Автор

It's always the jump from the free monad to actually extensible effects that trips me. It's reasonable how you can handle a single effect by encoding it as a value and threading it, but the moment you introduce multiple effects things get quite complicated, specially the part where you track at the type level which effects have already been handled. Unfortunately this presentation did not get to that part 😞

valcron-
Автор

Awesome talk!
1:01:41 was that a family guy reference I spotted? 😄

DisFunctor