Soares Chen
maybevoid.com
Soares Chen
@maybevoid.com
Rust Nerd ∘ Creator of Context-Generic Programming @contextgeneric.dev ∘ Interested in Haskell, functional programming, type theory, category theory, programming language theory ∘ https://maybevoid.comhttps://contextgeneric.dev
In short, cgp-serde extends Serde’s original Serialize and Deserialize traits with CGP, making it possible to write overlapping or orphaned implementations of these traits and thus bypass the standard Rust coherence restrictions.
November 3, 2025 at 1:14 PM
So in a way, ML engineers have been writing monadic code in Python without being aware of it.
October 10, 2025 at 4:23 PM
If you treat the tensor monad as fully abstract, you then pretty much get free monad and algebraic effects. You can then do different kinds of abstract interpretation on the free monad, and do things other than the actual computation, such as compiling it to various optimized compute kernels.
October 10, 2025 at 4:23 PM
Though most programmers would rather go through all hoops to continue programming with dynamic types than to learn to write generic code.
July 11, 2025 at 3:00 PM
My work on Context-Generic Programming can remove pretty much all needs to use dyn traits or vtable or reflection: contextgeneric.dev
Context-Generic Programming
Context-Generic Programming: Modular programming paradim for Rust
contextgeneric.dev
July 11, 2025 at 3:00 PM
CGP also has the lift operator, called `Promote`, to lift the `m` in `(Ctx => a -> m b)`. With that, you can probably see how we can support everything essential about monads with CGP in Rust!
July 9, 2025 at 10:50 PM
Actually, the monadic form in CGP is more than just (a -> m b) - it is more like (Ctx => a -> m b). That makes it much more powerful and practical for monadic computation, because we can do dependency injection with the implicit constraints!
July 9, 2025 at 10:47 PM
Also, the composition operator for CGP monads is not (>>=) or (>>), but rather it is just pipe (|) :: (a -> m b) -> (b -> m c) -> (a -> m c).

Despite that, pipe is probably much as powerful as bind, just with different syntax.
July 9, 2025 at 10:47 PM