Choreographic Programming in Rust
github.com
github.com
https://www.microsoft.com/en-us/research/project/orleans-vir...
I had Claude implement a similar one for me in Rust which I'm pausing for now, I'm prototyping a simpler version of Orleans in Go that I eventually want to port over to Rust as my v2 from scratch. The ideas in Virtual Actors reminded me a lot of Erlang, but simple to use in a language like C# I'm still surprised it didn't take off in other languages.
Honestly, if Go supported message passing between processes and over the network out of the box, it would make for a slightly more interesting language, I still love Go though.
What I have that Orleans is missing is compile time protocol checking, typesd and hash checked remote calls, capability management, cluster authentication, and no stop the world GC. Orleans doesn't have choreography per se, they have sagas as a convention.
Yeah, GO routines are meant to solve different problems than share nothing actors.
https://github.com/Giancarlos/Culebral
I had to pause for now, been building other things I have wanted made for years with Claude, Culebral was my dive into seeing how 1 million tokens in Claude could accomplish, I think current state took under 1 or 2 million tokens from Claude total.
I know it sounds silly, but the only .NET Pythonesque language I saw available is basically abandonware iirc so I wanted something that was more .NET specific so I could write less code to do the same as I would in C#.
Yeah, claude can get pretty far into language projects on 1 million tokens.
I'm not in touch with him, but I have looked at Chorex. I was hoping to see him at ElixirConf but I had to change my plans last minute. Have you used Chorex?
*edit it seems like I need an invite.
"There are few who can. The language is that of Opus 5, which I will not utter here... In the common tongue it says... err.. actually I don't know what it says."
And human-readable code, for that matter.
So they generate a code "rubric" and give a model some number of gold stars for how "well" another language model thinks it satisfies specific enumerated aspects (for code, this is gonna be things like using language features idiomatically, compactness, etc; for writing, this is gonna be things like what you'd get graded on in writing assignments in the fifth grade). Incredibly stupid. I'm shocked it works at /all/. But the lack of any truly objective criteria of "quality" wrt. code/prose explains why it doesn't work all too well, IMO.
This is how imperitive languages work. One line executes before the one below it as a default.
I would instead say that choreographic languages enforce global visibility of communication. The global behavior of the system is available syntactically. It doesn’t necessarily or even typically involve mutation, explicit loops, side effects etc at least in the literature.
Abstractions should be earned.
Not because executing them is expensive but because understanding them is.
To explain it briefly though, choreographic programming is a method of writing distributed programs that communicate in some message-passing fashion by -- rather than writing separate programs that communicate with send/recv and must be very intentionally designed to be in sync -- you have /one/ unified messaging primitive. In a typical distributed system, you might have something like A.send_to(B) / B.recv_from(A). In a choreographic system, you'd rather have something like A ~> B, where send_to and recv_from are /projected/ from ~> into separate programs during the process of compilation.
You might want this kind of abstraction for various reasons, but the biggest is that many choreographic systems offer a guarantee of deadlock-freedom. This isn't without tradeoff. At the moment, choreographic systems (and session types, another distributed abstraction) are very bad at handling any kind of failure / degraded performance over the network. There is active work within the PL community on resolving these issues, but for now, choreographic programming is primarily useful for prototypes, rather than production systems.
The creator of this posted it here, though. So maybe if someone is posting something here we can ask that they include sufficient context for the intended readers to understand it.
How are you doing endpoint projection?
What is your KoC strategy?
What existing research systems (Choral, MultiChor, Chorex, etc.) did you take as inspiration?
What benefits does your system have over ChorRus?
You can get even more power if you integrate choreographic programming directly into the compiler - for an example of that you can see Choral, an extension of Java that I've been contributing to for a few years [3].
[1]: https://github.com/lsd-ucsc/ChoRus [2]: https://arxiv.org/pdf/2311.11472 [3]: https://github.com/choral-lang/choral
> Repeated regions add no iteration field to endpoint types, descriptor rows
So what? Is this a goal or an admission? Is this something you implemented or what was done before?