0:00 / 0:00
#kyo#algebraiceffects#effectsystem
Algebraic Effects from Scratch by Kit Langton
Func Prog Sweden
56K subscribers • 32 videos on Hallway
- Recommended by 1 person: 1 in engineering communities.
- Presented by Kit Langton
Advanced. Deep dive for people who know the field.
21K views2 years ago1 recommendation
Programming languagesSoftware designScalaFunctional programmingLanguage design and type systems
Kit Langton explains algebraic effects from first principles, demonstrating how to build a simple console DSL and introducing Kyo.
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 adabeat.com Merch If you want to spread functional programming and support the channel, buy something from the shop: funcprogsweden.myspreadshop.net/ Chapters: Welcome Kit Langton Algebraic Effects from Scratch Agenda Define me Define Algebraic Effects Functional effect systems Syntax + Semantics Custom syntax + semantics Kyo example time A simple DSL (Implement it from scratch) We can use GADTs Will it compose? Sequential composition Recapitulation Add additional operations Before and after More code, more problems Q&A #funcprogswedenWhy it's here
1 person recommends thisWhat people say. Recommended as an exceptionally clear and educational live-coding explanation of algebraic effects.
Moments people linked to
u/u_tamtamin r/scala • Mentions
On “Kyo 0.12.0 released 🚀”
…-effects at the entry-points (a Console object, a Random number generator, …). Such a runtime is de-facto an "effect system": it ensures that capabilities are passed from producers to consumers and executed orderly.
If you are willing to jump into the rabbit hole, I found this video by /u/kitlangton to demystify a lot of what's going on with Kyo: link to this video…
u/negotiat3rin r/scala • Mentions
On “Algebraic Effects from Scratch”
Great video, ty! What I have yet to see (or figure out myself) is how to create custom effects in kyo itself. Something like a higher-level DSL that is interpreted in terms of kyo's built-in effects (among other things). For example, converting the program value you constructed in the "Kyo example time" chapter (link to this video to a first-class kyo effect