The Hills Are Alive With the Sound of Comonads

Опубликовано: 24 Февраль 2022
на канале: Hasgeek TV
194
10

Comonads famously project computations into future contexts. But what if the future is uncertain? What if, like in Demolition Man, the computation wakes up in a hostile, dystopian 2032? Instead, we’d like the computation to wake up in a place more like Encino Man, or at least An American Pickle.

This was the starting point for purescript-wags, a web audio engine that projects future audio states onto the mutable and referentially opaque Web Audio API. In this talk, I’ll show how existential types can be used inside of cofree comonads to add a modicum of type safety to a mutable-state model, and I’ll also show how linear types can be grafted onto comonads as a zero-cost abstraction to tame the volatile Web Audio API.

At the end, I’ll show how this facilitates the rendering of complex audio graphs in a sub-fifteen-millisecond deadline, allowing for low-latency MIDI and audio applications in the browser like https://wags.fm/, https://whatis.wags.fm/ and https://yap.wags.fm/.

https://hasgeek.com/FP-Juspay/pureconf/


Смотрите видео The Hills Are Alive With the Sound of Comonads онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Hasgeek TV 24 Февраль 2022. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 194 раз и оно понравилось 10 посетителям.