Skip to content

Instantly share code, notes, and snippets.

View hrdtbs's full-sized avatar
🎯
I may be slow to respond.

hrdtbs hrdtbs

🎯
I may be slow to respond.
View GitHub Profile
@tawashichan
tawashichan / future_sample.rs
Last active December 18, 2019 06:31
future_sample
// 参考
// https://rust-lang.github.io/async-book/02_execution/04_executor.html
// https://keens.github.io/blog/2019/07/07/rustnofuturetosonorunnerwotsukuttemita/
use std::{
future::{Future},
pin::Pin,
sync::mpsc::{sync_channel, Receiver, SyncSender},
sync::{Arc, Mutex},
task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
@yelouafi
yelouafi / algebraic-effects-series-1.md
Last active February 24, 2024 16:03
Operational Introduction to Algebraic Effects and Continuations

Algebraic Effects in JavaScript part 1 - continuations and control transfer

This is the first post of a series about Algebraic Effects and Handlers.

There are 2 ways to approach this topic:

  • Denotational: explain Algebraic Effects in terms of their meaning in mathematics/Category theory
  • Operational: explain the mechanic of Algebraic Effects by showing how they operate under a chosen runtime environment

Both approaches are valuables and give different insights on the topic. However, not everyone (including me), has the prerequisites to grasp the concepts of Category theory and Abstract Algebra. On the other hand, the operational approach is accessible to a much wider audience of programmers even if it doesn't provide the full picture.