alt.hn

8/2/2026 at 10:45:11 AM

Show HN: Katharos Functional programming and CSP-style concurrency for Python

https://github.com/kamalfarahani/katharos

by kamalf

8/2/2026 at 10:45:11 AM

I've been working on Katharos, a functional programming and concurrency library for Python 3.13+. The idea behind it is simple: absence, errors, effects, and concurrent communication should be explicit, composable values instead of hidden control flow.

by kamalf

8/2/2026 at 2:54:14 PM

As someone intimately familiar with Python and not so much with "algebraic abstractions", I looked at your examples and can't figure out how they work (and why the abstraction is useful).

Am I missing something?

by rirze

8/2/2026 at 4:42:46 PM

I think it comes down to some people having a strong aesthetic aversion to imperative programming and the practical value of side effects (including exception bubbling), often manifesting in vain attempts to write 'perfect code'.

by pphysch

8/2/2026 at 3:53:04 PM

Very nice. Any plans to add algebraic effect handlers to this in the near future?

by iforiq

8/2/2026 at 6:36:31 PM

Would it help if I tell you could start with the big-picture of what it does and what problem solves and then jump the details? Just an idea!

by h2aichat

8/2/2026 at 4:30:39 PM

Can you focus on mlops and data pipelines at scale as well as locally. I want to incorporate this into PySpark or Ray to be able to have better composition. Also include plugins or something for arbitrary "registers" or extra logging of things like events for observability outside of normal instrumentation like dyantrace

by whattheheckheck

8/2/2026 at 4:21:05 PM

It's probably worth being up front about what your do syntax actually does. A generator is not as general as "do", Python doesn't have call/cc or anything like that. I checked and you (or Claude I guess) do it by rerunning the whole thing each time for things like the list monad which is not something I think anyone would want for anything more than a toy.

by almost

8/2/2026 at 4:33:02 PM

I think the idea here is what is the best syntax for writing these type of programs in pythonic zen mode and then simply have the library truly optimize it for the run time. Which basically has to be a distributed compute substrate like pyspark or ray.

The goal is more correctness and fluent declarative readability to get business stuff done better, faster and cheaper

by whattheheckheck