Soares Chen's Avatar

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.com ∘ https://contextgeneric.dev

145
Followers
227
Following
106
Posts
13.11.2024
Joined
Posts Following

Latest posts by Soares Chen @maybevoid.com

How to stop fighting with coherence and star writing context-generic trait impls -  Soares Chen
How to stop fighting with coherence and star writing context-generic trait impls - Soares Chen YouTube video by RustLab Conference

My RustLab presentation on **How to stop fighting with coherence and start writing context-generic trait impls** is now available on YouTube:

www.youtube.com/watch?v=gXIf...

04.03.2026 15:35 👍 1 🔁 0 💬 0 📌 0
Preview
Supercharge Rust functions with implicit arguments using CGP v0.7.0 | Context-Generic Programming CGP v0.7.0 has been released, bringing a major expansion to the CGP macro toolkit. The centerpiece of this release is a suite of new annotations — #[cgpfn], #[implicit], #[uses], #[extend], #[useprovi...

Supercharge Rust functions with implicit arguments using CGP v0.7.0 🚀

contextgeneric.dev/blog/v0.7.0-...

02.03.2026 12:27 👍 0 🔁 0 💬 0 📌 0

Thanks for the feedback! I have reduced the image sizes to 480p, and each image is now around 300 KiB.

25.02.2026 08:59 👍 2 🔁 0 💬 0 📌 0
Post image

Context-Generic Programming (CGP) now has a new website! We have now migrated from Zola to Docusaurus. This blog post explains the reasons behind the move.

contextgeneric.dev/blog/2026/02...

21.02.2026 21:28 👍 4 🔁 1 💬 1 📌 0
Preview
CGP v0.6.1 Release: Improving Ergonomics and Debugging | Context-Generic Programming

We're excited to announce the release of cgp v0.6.1, which brings several quality-of-life improvements to Context-Generic Programming in Rust.

contextgeneric.dev/blog/v0-6-1-...

02.02.2026 22:08 👍 0 🔁 0 💬 0 📌 0
Preview
Lambda Days 2025 - YouTube

We have some bittersweet news: Lambda Days will take a break in 2026.
But - we’re releasing something special 💛
🎥 All Lambda Days 2025 talk recordings are now public!
👉 youtube.com/playlist?lis...

11.12.2025 14:12 👍 4 🔁 2 💬 0 📌 0
Preview
Rust Week 2026: Call for Speakers RustWeek is back!Two days of talks (Tue 19 and Wed 20) and one day with workshops (Mon 18),as well as social events and activities all week (Mon 19 - ...

The Call for Proposals for RustWeek 2026 is now open!

If you’d like to give a talk, please submit your proposal via sessionize.com/rustweek-2026/

The CFP closes Dec 31.

#rustweek2026 #rustlang

03.11.2025 12:02 👍 15 🔁 9 💬 0 📌 2

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.

03.11.2025 13:14 👍 1 🔁 0 💬 0 📌 0
Preview
Announcing cgp-serde: A modular serialization library for Serde powered by CGP | Context-Generic Programming

I am excited to announce the release of cgp-serde, a modular serialization library for Serde that leverages the power of Context-Generic Programming (CGP).

contextgeneric.dev/blog/cgp-ser...

03.11.2025 13:14 👍 1 🔁 0 💬 1 📌 0
Post image Post image Post image

No more fighting the compiler! 😄
Soares Chen showed how Context-Generic Programming lets Rust devs go beyond coherence limits — safely and elegantly.
#RustLab2025 #RustLang @maybevoid.com

03.11.2025 12:00 👍 1 🔁 1 💬 0 📌 0
Preview
CGP v0.6.0 Release - Major ergonomic improvements for provider and context implementations | Context-Generic Programming

I’m excited to announce the release of CGP v0.6.0!
This version introduces major ergonomic improvements that make provider and context implementations simpler and more intuitive to write. #RustLang

contextgeneric.dev/blog/v0-6-0-...

26.10.2025 11:57 👍 2 🔁 1 💬 0 📌 0
Preview
CGP v0.5.0 Release - Auto dispatchers, extensible datatype improvements, monadic computation, RTN emulation, modular serde, and more | Context-Generic Programming

I am thrilled to announce the release of CGP v0.5.0! This new release includes many exciting features and improvements, including auto dispatchers, extensible datatype improvements, monadic computation, emulation of RTN, sneak preview of cgp-serde, and more.

contextgeneric.dev/blog/v0-5-0-...

12.10.2025 14:45 👍 1 🔁 0 💬 0 📌 0

So in a way, ML engineers have been writing monadic code in Python without being aware of it.

10.10.2025 16:23 👍 0 🔁 0 💬 0 📌 0

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.

10.10.2025 16:23 👍 0 🔁 0 💬 1 📌 0

My observation of ML frameworks from the POV of a functional programmer: PyTorch tensors are actually some kind of monad, with the dimensions being the "type" of the contained values.

10.10.2025 16:23 👍 0 🔁 0 💬 1 📌 0

Today’s my last day at AWS working on the Rust compiler. Unfortunately, back in July I received notice that I had to choose between moving to Boston from NYC, or leaving the company due to RTO policy. I unfortunately couldn’t abandon the city I plan on being my long term home.

05.09.2025 13:14 👍 138 🔁 11 💬 1 📌 3
Post image

Tired of fighting Rust’s coherence rules?
S@maybevoid.com introduces Context-Generic Programming: a new way to write flexible trait impls without breaking the rules.
🧩 How to Stop Fighting with Coherence and Start Writing Context-Generic Trait Impls
#rustlang #rustlab2025

26.08.2025 11:30 👍 2 🔁 2 💬 1 📌 1
RustLab | How to Stop Fighting with Coherence and Start Writing Context-Generic Trait Impls Soares Chen at RustLab 2025

I will be presenting at @rustlab.it on how to stop fighting with coherence and start writing context-generic programs with @contextgeneric.dev. Use the discount code SP20FR to attend the conference with 20% discount!

rustlab.it/talks/how-to...

23.08.2025 10:51 👍 4 🔁 2 💬 1 📌 0
RustLab | Schedule Check the schedule of the international conference on Rust in Florence, Italy

🦀 We are proud to announce the Schedule for RustLab 2025!
It’s not completed yet: there will be some minor changes or additions, especially in the workshops and social events areas, but this is it!
Take a look at it and join us now! 🤗

👉 rustlab.it/schedule

16.05.2025 11:18 👍 5 🔁 4 💬 0 📌 0
Growing the Java Language #JVMLS
Growing the Java Language #JVMLS YouTube video by Java

Oh wow, so even Java has type classes now, or it looks more like Scala implicits. At least it is still good that Java is becoming more FP-friendly. Now when is Go's turn?

www.youtube.com/watch?v=Gz7O...

21.08.2025 20:40 👍 2 🔁 0 💬 0 📌 0
Preview
Programming Extensible Data Types in Rust with CGP - Part 3: Implementing Extensible Records | Context-Generic Programming

The third and fourth parts of Extensible Data Types for Rust - the design and implementation of extensible records and variants - has been published!

contextgeneric.dev/blog/extensi...
contextgeneric.dev/blog/extensi...

05.08.2025 15:43 👍 0 🔁 0 💬 0 📌 0

Though most programmers would rather go through all hoops to continue programming with dynamic types than to learn to write generic code.

11.07.2025 15:00 👍 3 🔁 0 💬 1 📌 0
Preview
Context-Generic Programming Context-Generic Programming: Modular programming paradim for Rust

My work on Context-Generic Programming can remove pretty much all needs to use dyn traits or vtable or reflection: contextgeneric.dev

11.07.2025 15:00 👍 1 🔁 0 💬 1 📌 0

Learn about how to build modular interpreters and visitors in Rust using CGP!

10.07.2025 13:55 👍 0 🔁 0 💬 0 📌 0

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!

09.07.2025 22:50 👍 0 🔁 0 💬 0 📌 0

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!

09.07.2025 22:47 👍 0 🔁 0 💬 1 📌 0

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.

09.07.2025 22:47 👍 0 🔁 0 💬 1 📌 0

Surprisingly, it turns out CGP already supports fully monadic computation in Rust! It is just that the CGP monads are in the form `a -> m b` instead of the usual `m a`.

09.07.2025 22:47 👍 0 🔁 0 💬 1 📌 0

CGP v0.4.2 has been released, with brand new support for extensible records and variants. Check out the blog post to find out more!

contextgeneric.dev/blog/extensi...

07.07.2025 14:01 👍 0 🔁 0 💬 0 📌 0

Howdy all. I'm unfortunately not going to be with my employer for much longer due to team relocation. If anyone has any info on roles that would allow me to continue my Rust compiler work (in New York City), they'd be greatly appreciated.

02.07.2025 17:31 👍 92 🔁 45 💬 1 📌 1