Top
Best
New

Posted by v0id_isgood 16 hours ago

Show HN: Wyzer Programming Language(github.com)
So i've been working on this project since a few days (or months i should say), it's called wyzer (meaning wiser) it's a statically typed, compiled, resource-oriented programming language with integrated distributed safety via choreographic programming and perceus memory model, The reason why i began this project is out of frustration from Rust, you see it does provide safety for your memory by the strict type checking but what it does not gurantee safety against are distributed deadlocks which is basically a few independent nodes or services wait permanently for resources or messages held by each other, forming a circular wait, the rest are cross-service correctness and protocol mismatch as well. If we are specific over here Wyzer works on mainly generalizing the concept of choreographic programming in a high level programming language because its the very few attempts of actually solving these gaps of safety. Instead of borrow checkers and lifetimes wyzer has linear/affine types and a perceus reference counting which is computationally much simpler for an LSP to understand as well

after 5 months of research and a few weeks of development i am soon going to release version 0.1.0 of it, if you would like to contribute to it you're most welcome!

184 points | 103 comments
jerf 13 hours ago|
I love the ambition and the fact that this is not just another "state of the art in 2015" language like I see so often. It's trying to do something genuinely different. The field of "taking stuff out of academia and making it work" is a rich and underharvested one.

However, your light is hidden under a basket, to use an old metaphor. I'm having to go digging to find the genuinely new things going on. I suggest recalibrating the entire documentation with a focus on the new stuff. People on HN often complain about not having syntax examples front and center but I would say for you, the very first thing I you should be hitting your new visitors with is the choreography idea.

Set up a simple example of doing something like a concurrent remote counter that is atomically safe by the construction of your language and immediately dive in to what that means. Forget even educating us on the rest of the mundane syntax of the language, immediately dive in to what that is and what that means. I see in the docs/ dir that it probably hurts your programmer mind to cover the choreography before covering sections 1-8, but you can safely assume that if you intrigue with the choreography that they'll hang around to learn about the rest, whereas you can't safely assume that a new reader will wade through all the rest of the relatively mundane details to get to the really interesting stuff.

A modern language with a modern take on compiling a "program" that takes a unified view of the world at the programming language level, and then emits a "server" and a "client" (and perhaps other roles) as separate executables is a pretty nifty idea. Hit it early and hit it hard.

bitwizeshift 9 hours ago||
Thank you for this comment. I had mostly shrugged off this project as “neat” but didn’t go digging until I read this.

The choreography stuff is actually really cool! Definitely agree this should be front and center

arcrevenant 9 hours ago|||
They did the right thing highlighting a working example front and center.

Nothing worse than PDFs full of theory and no working examples of the thing you’ll actually be doing all day.

I get that it’s important to show what abstractions and methodologies can arise out of using it, but with a good example that would be obvious. It’s the developer community using the language that will come up with the best abstractions (libraries) that - if it has an active community - helps shape what those novel developer experiences are.

A good analogy is the development of the skateboard - released first as a scooter - until someone knocked the handle off a started “surfing” down the street. Just show me the thing. I’ll tell you if it’s cool and how to use it

v0id_isgood 12 hours ago||
This is hands down some of the most constructive feedback we’ve received. You hit the nail on the head.

We definitely fell into the author’s trap of structuring docs "bottom-up" (Prerequisites -> Basic Syntax -> Advanced Concepts) rather than leading with our actual core innovation: choreography.

We are restructuring the main README/docs front page right now to lead immediately with a concrete example of choreographic execution (e.g., atomic multi-node orchestration / client-server emitting) before getting into standard syntax.

Really appreciate you taking the time to dig into the docs/ dir to pull this out it’s a huge help for our presentation.

adastra22 11 hours ago|||
You should avoid LLMs in your communications.
byson94 1 hour ago||
You do realize its not the real creator right? Its someone impersonating.
chime 12 hours ago||||
You should still keep doing the bottom-up approach for the rest of the docs. Just update the README first paragraph or two as the gp says.
jerf 11 hours ago||
Yes, strong agree, normalcy resumes at some point. But you want the hook in first.

I mean, I'm phrasing that in marketing terms, but in this case it's in harmony with what your users want anyhow. We want to know ASAP why we should care about this language. So it works for everyone. Of course when it comes time to deliver the promise, normal programming language documentation is the way it is for a reason.

bramadityaw 11 hours ago||||
you should really put some of the content in RESEARCH.md to the README.md. The language's core idea shouldn't just be known to contributors.
irq-1 10 hours ago||||
> linear/affine types and a perceus reference counting

You should put these up front also.

Jabbles 10 hours ago||||
I think it's quite rude to reply to a well thought out comment with AI slop
byson94 1 hour ago|||
The OP is not the creator of wyzer. Its someone impersonating. You can see the discussion about it in the discord.
winfredJa 1 hour ago|||
author is 12 year old. future kids are AI native i guess
arcrevenant 7 hours ago||||
Lmfao.

This is not an LLM talking but a kid who is learning to write with them, if you look closely. Still concerning

valorzard 9 hours ago|||
this REALLY reads like claude responded to this comment, so I really hope that I'm just mistaken and you just naturally talk like this
hyperhello 15 hours ago||
First of all, the syntax is very generic and conservative. I’m extremely positive about that. It just looks like C or Typescript or Java to me and I don’t see mysterious diacritical marks.

The next thing is, I need more examples. Read me documents can scroll forever and that’s fine. Add examples for every concept your language wants to cover to it. This is your chance to think things through and make the read me and the language astonishing.

And your AI disclaimer (or your AI’s disclaimer) makes sense.

v0id_isgood 14 hours ago||
i'm actively working on the documentation without AI because it has been an awful experience with it , i've also restricted AI from contributing to it in any way except for helping the developer write their commit messages (Refer to AGENTS.md) properly which is pretty much useless anyways, the language is in it's early stages as well and things might change a lot
gitgud 4 hours ago||
I love this choice. As I began reading, it was immediately clear that it was deliberately written by the author, not AI marketing slop
v0id_isgood 14 hours ago||
also , yes i have an example i reprogrammed donut.c in my programming language and called it donut.wyz https://github.com/rudywasfound/donut.wyz go check it out!
mightyham 12 hours ago|||
Please don't take this personally, trying to offer this as constructive criticism. I don't find this to be a very interesting example of the language. If the main feature is a unique approach to memory/multithreading/network safety, I would like to see an example of a multithreaded networking program that uses dynamic allocations, not a ~100 line a procedure that uses static buffers and terminal IO.
snek_case 13 hours ago|||
I would like to see an examples directory with a diverse set of example programs. What would be most interesting to me is programs with non-trivial memory usage and data structures, because that's where differences in the memory model would matter. I want to know what's possible and what's not allowed in this language. What makes this different and better than Rust's borrow checker.
vlovich123 14 hours ago||
One thing I don’t understand is how you can guarantee the lack of a distributed deadlock. I’m sure it’s covered in the underlying research, but just conceptually it’s hard to picture.

What stops a choreography where Claire send a message to Bob but Bob is waiting for Alice and Alice is waiting for Claire?

Is it like Rust memory safety where not all valid programs are accepted but all invalid programs are rejected?

I think some examples of the distributed code in action on a trivial and non trivial distributed example is more compelling than a 3d donut render

minraws 13 hours ago||
You can think about it as a protocol.

The protocol doesn't describe "Claire sends" and "Bob receives" as two independent actions that wait for each other, it describes them as a single communication in the global program/state.

When it gets executed into code, every send already has a corresponding receive by construction, so you can't write something like "Claire sends to Bob while Bob is actually waiting for Alice" unless the protocol itself allowed that execution.

So the cycle you're describing can't just accidentally appear because of sync issues, because the assumption is a communication is represented correctly at each turn.

So yeah it kinda does limit the set of all possible programs since I would expect not everything can be encoded this way also seems hard to resolve this in practice without only allowing communication b/w Wyzer systems.

I am not very familiar with this topic in practice so OP would be the best person to answer this, I am quite intrigued by how it works in practice as well.

fmontesi 9 hours ago|||
This question is in fact core to research in the paradigm. Let me first address how it works and then the expressivity question.

A choreographic programming language features programming abstractions for programming communication intent. For example, often they have a primitive like:

Alice.expr -> Bob.x

read 'Alice communicates the evaluation of expr to Bob, which stores the message in its local variable x'. (In fact, we discovered that we can extend any mainstream language to have this kind of high-level primitives by extending data types with locations, see choral-lang.org).

This makes it impossible to write mismatched communication actions, because you're expressing both the send and receive actions in a single atomic instruction: they are well-matched by construction. You then build a compiler (typically called 'projection') that generates distributed programs for Alice and Bob -- the former doing the send to Bob and the latter doing the receive from Alice. We like making formal models of these compilers and mathematically proving them correct. A compiler that respects the choreography then automatically entails deadlock-freedom of the compiled code without the need for complex checks, because the source choreography cannot syntactically express deadlocked terms.

Consequently, there are no deadlocked distributed programs that we can compile from choreographies. It's an application of the neat trick of designing high-level languages for 'guiding' programming: instead of programming a distributed system with low-level primitives and then attempting the generally very hard task of checking for deadlocks, we use a high-level language where deadlocks cannot be written (or are at least easy to check against).

The above hopefully explains the intuition of how choreographic programming works. But then, as you did, one naturally asks: What can we express in choreographic programming languages? Are there fundamental limitations?

We do not know exactly yet; this is an area of very active exploration. Over the years, people have developed more and more clever choreographic programming languages that capture more and more interaction patterns.

What's perhaps surprising is that, for some theories of distributed languages (or interaction patterns, if you like), we know that choreographic programming is complete, in the sense that it can capture all deadlock-free systems that can be modelled in those theories. The first result of this kind was about capturing all interaction behaviours that can be described in linear logic (in the Curry-Howard interpretation of it with process calculi), but there are also works that can deal with recursive behaviour and even process spawning (fork). That's encouraging.

I think that investigating what the paradigm precisely can and cannot do is fascinating (but I'm very biased here..), not least because using a mathematically-modelled compiler lets us optimise the generated code aggressively (e.g., adding more asynchrony, as in Ozone). From the state of the art already out there, it looks like choreographic programming is 'expressive enough' for many different purposes. Hopefully it's gonna be the typical situation with high-level abstractions, whereby for most cases and most people the high-level language is gonna be good and low-level communication actions will be necessary only in niche scenarios. In the meantime, there are choreographic languages that can be integrated with middleware and foreign APIs to cover up for deficiencies (like Choral, HasChor, etc.).

pgt 9 hours ago||
hmm, I suspect distributed systems can be modelled with a form of probabilistic borrow-checking as long as you have control all the connected systems.
jitl 15 hours ago||
Your README and docs don’t describe any of the interesting or unique things here. You cover `if` in README but not choreographic programming or perceus. Did i miss some big link?

Where’s the cool stuff?

v0id_isgood 15 hours ago|
you did read RESEARCH.md didn't you? :)
jitl 14 hours ago|||
i poked around in there, under choreographic programming there’s one example of something not in the language as a discarded idea.

if you claim X and Y make us cool and different, then you should document X and Y in your readme. don’t tell me something is the star, and then hide it away. this is baffling to me.

polymer8563 13 hours ago||
its speaking of discarded syntax for choreo, not that the feature was discarded
IsTom 12 hours ago||
Still there's not a single example.
andai 14 hours ago||||
GitHub hides RESEARCH.md for my convenience. I have to click "Show All Files" to see that it even exists.
derdi 14 hours ago|||
Why would they? The only thing the readme says about RESEARCH.md is "if you want to contribute to the language please read RESEARCH.md". The OP doesn't want to contribute, they want to see an example of choreographic programming. This shouldn't be hard. What is hard is guessing which of the random markdown documents to click to find an example.
hmokiguess 14 hours ago||
I saw this medium post from you https://medium.com/@atixwasfound/how-i-began-writing-my-own-...

In there it says you started this journey when you were 8 years old and that you are a 14 year old programmer

I'm not sure how I feel about this to be honest, I need to process that.

v0id_isgood 14 hours ago||
time flies :) the grass was greener before though and i miss that!
DoesntMatter22 6 hours ago||
Incredible if a 14 year old did this, the ven with AI
gwbas1c 7 hours ago||
I really appreciate this:

> 1. What Wyzer Is, In One Paragraph...

> 2. Why Make a New Language At All?...

Far too often I see projects on HN where, on a casual skim, I just can't figure out "the point." This is clear and concise.

---

One of the issues with "Writing one network rule that creates code for every computer. We borrowed this from academic research" is that often it's hard to have the same language on every computer. For example, for a web application, you're either going to have to transpile to Javascript or target WASM. (And WASM has a lot of overhead compared to Javascript.)

rbr94 12 hours ago||
For anyone looking for an easily digestible primer on choreographies: https://decomposition.al/zines/communicating-chorrectly-zine...

Too bad the github readme doesn't explain how the choreographic side of Wyzer works, or even what it looks like (please correct me if I'm wrong, couldn't find it after a quick skim).

tristanMatthias 8 hours ago|
This was a great introduction! Thanks for sharing
nicoburns 9 hours ago||
Huh, the Choreographic Programming (https://github.com/Wyzer-Lang/wyzer/blob/master/docs/08_chor...) looks very like "server functions" as implemented in Next.js / Dioxus / Leptos, but generalized as a language feature.

Definitely a cool idea. I guess time will tell whether lifting it into the language proves itself as worth it.

whateverboat 8 hours ago||
> Memory (Section 5): You write functional code that does not change data. Behind the scenes, if a piece of data has only one owner, the compiler changes it directly in memory. This makes it as fast as C without a garbage collector or lifetime rules.

What happens if the piece of data has multiple owners? Do you get sudden performance bugs which are hard to debug?

steeleduncan 14 hours ago|

    const MAX: u32 = 100;  // Compile-time constant
    let x: u32 = 10;       // Cannot be changed
If x cannot be changed, how does it differ (meaningfully) from a compile time constant in a safe language, ie in a case of no raw pointers
v0id_isgood 13 hours ago||
const can be used in places that need a compile-time-known value (like a fixed array size). let can't, even if it obviously holds a fixed number.
bramadityaw 11 hours ago||
isn't there a way to infer that from context? like if the variable is declared with the Comptime role. Some guy said that the const keyword was a mistake C made that is then blindly followed by its successors.
More comments...