Hi HN! I’m Abhirama, and I started Jaithon in 2023 when I was in 8th grade to teach myself how to code in C. Jaithon 1 was really bad, it was all in one file and it was completely an interpreter and it was extremely slow with bugs everywhere. Recently, I have came back to this project with the goal of making the perfect programming language that is not only fast, but it has the optimal syntax & features out of every programming language.
Jaithon has Python features such as comprehensions, f-strings and first-class functions with declared fields, explicit visibility, traits and checked type annotations, along with syntax choices from lua, Java, bash, c++, go, and rust.
The compiler separates lexing, parsing, type checking and bytecode generation. The VM has 107 opcodes along with a JIT compiler to speed stuff up, polymorphic inline caches and a garbage collector.
Jaithon is nearly completely bootstrapped, with the lexer, parser, and bytecode generation built completely within Jaithon itself. The syntax of jaithon code is also easily customizable.
It would mean a lot if you star the project on my GH as I am trying to reach 15 stars soon :) anyways, lmk if you have any feedback. Currently Jaithon is between Java and C++ for speed (a more detailed benchmark exists within the project by running make benchmark) and I am in the process of optimizing the VM.
I highly recommend you to rethink error handling. No way to know if function throws exceptions, no way to know what kind of exceptions. This is a minefield.
Nice! This is what I keep telling everyone: LLMs let you build stuff you may not have the time/energy to before. You still need to do the last 10% yourself though. Tying up all the loose ends.
Syntax is a personal choice. Can always be changed. Architectural choices are difficult to manage later on.
The VM seems to be a stack VM. I have my own python replacement project (https://news.ycombinator.com/item?id=48090665) that I am developing privately for now. LLM-assisted ofc. Started with a bytecode VM and then switched over to a register one. The biggest break from regular language systems was the decision to move to an Erlang-style preemptive scheduler.
This language keeps the best parts of Python while discarding the bad. I clicked the link apprehensively, but I have to agree that this syntax is spot-on (for me, at least). So many new languages miss the mark.
Neat, looks more like Rust than Java or Python on the surface though. That’s good in general.
Also am slightly dismayed that new langs are copying the f-string, which was chosen only because Python had no more Ascii punctuation chars left for such a feature. Would much recommend shell-style quote syntax instead, perhaps omitting $.
> I would not consider myself a "vibecoder", or jaithon as "ai slop"
> Additionally, around 80% of the raw code in this repository was produced with agentic coding tools
Not to be a party pooper, but even if the author wouldn't themselves describe it as "slop," the term still applies. It isn't really a "collaboration" if the vast majority of the implementation was carried out by one (non-human) party.
Additionally (i have no idea if this is intentional or not), the order of my words in the readme seems to be flipped here.
This line
> Additionally, around 80% of the raw code in this repository was produced with agentic coding tools
came prior to this line
> I would not consider myself a "vibecoder", or jaithon as "ai slop"
Phrasing it the other way like you just did makes it seem like I contradicted my self heavily, however in reality I had the second line with a bunch of reasoning in the readme.
I know we need to stay positive for these show HN things because Dang said so. But how valuable are these when anyone can churn out one of these things with AI. I get how it's valuable to show off work, but it's also like looking at a play list of AI music.
I can't help wondering why so many new languages provide two separate mechanisms to define mutable and immutable variables.
I see a value in defaulting to immutable unless explicitly stated, like in Rust. But having to choose between two different 3-letter words, like let and var, what stops one from always using var?
Coming to Jaithon in particular, I also wonder what the scope of immutability is, when it allows the following:
let names:list[str]=[]
names.push("whatever")
If a function takes a list[str] as input, how do I signal that it does or does not modify the list? And if it does, will it only shuffle the elements (e.g. sort) or will it also change the strings themselves (e.g. uppercase all elements)?
Const-ness is a complex topic, with more cases than can be captured by two keywords at variable definition.
I can speak for Jaithon but this is standard across most languages who have like immutable and mutable variables.
There is def nothing stopping you from using var everywhere, but (let) lets the compiler like catch any mistakes you did not mean to do. In jaithon, let is whats known as shallow: it prevents (in ur example) names = ... but the refrenced list is still mutable. Currently jaithon doesnt have anything like a read-only parameter so just knowing list[str] doesnt tell u anything about if a function mutates the list.
21 comments
[ 28.4 ms ] story [ 689 ms ] threadJaithon has Python features such as comprehensions, f-strings and first-class functions with declared fields, explicit visibility, traits and checked type annotations, along with syntax choices from lua, Java, bash, c++, go, and rust.
The compiler separates lexing, parsing, type checking and bytecode generation. The VM has 107 opcodes along with a JIT compiler to speed stuff up, polymorphic inline caches and a garbage collector.
Jaithon is nearly completely bootstrapped, with the lexer, parser, and bytecode generation built completely within Jaithon itself. The syntax of jaithon code is also easily customizable.
You can build and run it with:
git clone https://github.com/abhiramasonny/jaithon cd jaithon make ./jaithon examples/hello.jai
It would mean a lot if you star the project on my GH as I am trying to reach 15 stars soon :) anyways, lmk if you have any feedback. Currently Jaithon is between Java and C++ for speed (a more detailed benchmark exists within the project by running make benchmark) and I am in the process of optimizing the VM.
Would love to hear yalls thoughts!
- Abhi (abhiramasonny.com)
I have no reason whatsoever to use this, but it's a cool project!
Syntax is a personal choice. Can always be changed. Architectural choices are difficult to manage later on.
The VM seems to be a stack VM. I have my own python replacement project (https://news.ycombinator.com/item?id=48090665) that I am developing privately for now. LLM-assisted ofc. Started with a bytecode VM and then switched over to a register one. The biggest break from regular language systems was the decision to move to an Erlang-style preemptive scheduler.
At the point where you add a license, add an AI usage section to your readme. This is a perfect example.
Also am slightly dismayed that new langs are copying the f-string, which was chosen only because Python had no more Ascii punctuation chars left for such a feature. Would much recommend shell-style quote syntax instead, perhaps omitting $.
> Additionally, around 80% of the raw code in this repository was produced with agentic coding tools
Not to be a party pooper, but even if the author wouldn't themselves describe it as "slop," the term still applies. It isn't really a "collaboration" if the vast majority of the implementation was carried out by one (non-human) party.
This line > Additionally, around 80% of the raw code in this repository was produced with agentic coding tools
came prior to this line > I would not consider myself a "vibecoder", or jaithon as "ai slop"
Phrasing it the other way like you just did makes it seem like I contradicted my self heavily, however in reality I had the second line with a bunch of reasoning in the readme.
Good job tho! amazing prompting.
How would the human ever know that, though?
I see a value in defaulting to immutable unless explicitly stated, like in Rust. But having to choose between two different 3-letter words, like let and var, what stops one from always using var?
Coming to Jaithon in particular, I also wonder what the scope of immutability is, when it allows the following:
If a function takes a list[str] as input, how do I signal that it does or does not modify the list? And if it does, will it only shuffle the elements (e.g. sort) or will it also change the strings themselves (e.g. uppercase all elements)?Const-ness is a complex topic, with more cases than can be captured by two keywords at variable definition.
There is def nothing stopping you from using var everywhere, but (let) lets the compiler like catch any mistakes you did not mean to do. In jaithon, let is whats known as shallow: it prevents (in ur example) names = ... but the refrenced list is still mutable. Currently jaithon doesnt have anything like a read-only parameter so just knowing list[str] doesnt tell u anything about if a function mutates the list.