Hacker News new | ask | show | jobs
by tidrel-tabpub 2262 days ago
Some additional thoughts I have in this direction in no particular order:

Both Holochain and Urbit emphasize composability. One of the main design patterns with Holochain are microservices that you can hook up together to make more complicated apps. This philosophy emanates from the receptor notion in Ceptr (the OS that Holochain is supposed to be distributed data integrity engine for). When I worked on Holochain I spent a lot of time going on about what sort of mathematics you'd need to do this well and without unintended side-effects: namely category theory, as category theory is a mathematical formalization of the notion of composability. Composition is a first-order concept in category theory and the whole point of category theory is to be able to think of things in terms of what they're composed of - this is a large chunk of the content of the Yoneda lemma. I believe that there is a good description of Holochain using category theory in the sense of David Spivak and his collaborators, and more generally that creating an entire operating system made of composable "atoms" like Ceptr would really benefit from that kind of theoretical backbone. I never got to the point of anything really worth sharing, though.

The one project that is going in that direction though is Statebox. They are designing a language for making distributed applications based on new ideas on composable Petri nets and how they can be used to represent symmetric monoidal categories. Work of Abramsky, Coecke, and collaborators has shown that in some sense, symmetric monoidal categories can be thought of as a general model for any kind of distributed computation, including quantum computing. Thus Statebox should be able to talk about things like blockchains, holochains, block lattices, whatever, all in the same categorical language. This will allow apples to apples comparisons, cross-compiling, and lots of other fun stuff. So Statebox is, in my mind, the most mathematically sound language that's in production for building composable systems of microservices. I think it would be really interesting to rewrite Holochain using Statebox.

Urbit attempts to achieve this level of composability by virtue of being written entirely in a purely functional language. Functional programming has many ties to category theory which is why this is the correct strategy, but Urbit actually tries to be as mathematically simple as possible. No category theory is really in sight (ok, some monads are hanging around now) and for the most part, nothing more than high school algebra is needed to understand how Urbit works. The whole system is actually much simpler than the Unix stack, it just doesn't look that way from the outside. Urbit follows the Unix philosophy of simple tools that just do one thing well. You can really start doing some magical things when all those tools are written in a purely functional fashion.

One other project I'm aware of that is trying to do the purely functional distributed apps thing is the Ambients protocol, but sadly I haven't put aside the time yet to learn about it.