Show HN: Coma – Bilingual ES/EN language with LLVM back end and C runtime
1 pointsOkay, I’m not famous yet... Umm... Well. How are you guys doing? Did you eat your lentils? I didn’t, I think they’re gross.
Anyway, today I’m writing this unprofessional, attitude-filled abomination of a post to talk about .Coma, the bilingual ES/EN programming language that goes from Nim to LLVM (native binary) and is capable of competing against C (a knife fight to the death xd). And yes, I’m only 14 years old—so I’m definitely going to flex that and I don’t care what anyone says :).
Alright, enough jokes.
Why did I create .Coma?
I created .Coma because I felt decent programming languages are unnecessarily complicated—why not translate a script simpler than a Python script down to low level? Without the famous Garbage Collector, simple, human, and readable.
Why is it called .Coma?
I chose the name .Coma because on day one it sounded so bad I wanted it, and then I found tons of meanings—initially it was just Coma, and I added that `.` because it’s like C++ or C#, a joke about the C family’s need to tack a weird symbol onto the end, except instead of at the end it’s at the start. Plus, "Coma" in Spanish is literally "," which with the `.` sounds like `;`, which is the exact thing that doesn’t exist in this language, along with other weird symbols.
My motivations?
I want to build something bigger in the future, make systems so good—first to show off :), second, to create a wide range of compatibility and a friendly network for everyone; I want to do this because I like it and I want to change the world, that’s my motivation.
What's my goal here?
I want you to clone this GitHub repo, tear it apart, and humble my ego until I can't even get out of bed. Why? So I can fix it. I want you to criticize everything and break all my code—just send it my way, and I'll fix it.
Anyway, here are the links:
- GitHub: https://github.com/Agm1ne/.Coma
- Product Hunt: https://www.producthunt.com/products/coma-2?launch=coma-2
And with that I’m signing off. Bye-bye!
Comments (5) 2 threads
There are some examples in https://github.com/Agm1ne/.Coma/tree/main/ejemplos . It would be nice to have also a version in English.
I was translating an old program, and that line failed. Can you spot the error?How do you select the Spanish or English mode? Can you mix keyword in Spanish and English? It may be a nightmare to guess why a instruction does not compile for someone that does not know the other language.
A while ago I got a weird error in Python, something like
And the compiler is universal, meaning that keywords in English and Spanish are treated in exactly the same way; each keyword within the compiler has a single, definitive term (since I speak Spanish, these primary terms are in Spanish), while other variations—such as colloquial terms or English equivalents—act as pointers that map to the function of that specific keyword.
Yep, "in" is a reserved word in Python. I expect that most programmers that speak Spanish also speak English (at some level), so English keywords would not be a surprise. The reverse is not true, and I expect unexpected collisions with Spanish keywords for English speaking programmers, or even worse for programmers that speak a third language.
but you can use and there are like other ~20 variants.For example in Racket you can add at the top a line #lang that select which of the language in the distribution you are going to use. Something like
For now, my guess is that you don't need something like this, but later if you get more users it would be nice to select which keyword are available. Something like
for only English and or for only Spanish, and for the mixed case. It also may help to add other languages later.PS: Is there a joke in the name about "punto y coma"?
Your Racket #lang inspired idea is really valuable, though I see two design challenges I'd love your thoughts on solving:
1. Minimal special characters: My programming language is built to use as few special characters as possible—just `|` (and `.` if you count that). Adding `#` would break that minimalist rule, so I'd need a cleaner way to declare it. 2. What should the default be? It seems most reasonable that omitting the directive simply falls back to the default mode, which brings back the exact collision issue you pointed out. Maybe the compiler should detect the conflict and show a helpful error message—for instance, if a Spanish keyword causes an error, it could explain how to fix it or switch the file to English-only mode (and vice versa).
And yes! `.Coma` is a pun on "punto y coma" (semicolon), among other things: first, the semicolon joke itself since the language avoids them; second, a play on C, C++, and C#—except instead of tacking `++` or `#` onto the end, it puts a `.` right at the start. When I came up with the name, I wanted something so silly that I'd regret it (I never did :) ) while still packing a lot of meaning behind it.
• Bilingual syntax: Keywords and constructs work natively in both English and Spanish, so you can write code in whichever language feels more natural without switching mental contexts.
• Compilation pipeline: The compiler lowers source code to LLVM IR and uses zig cc to link against a lightweight C runtime, producing standalone native executables on Windows and Linux (anytimes).
• Tooling & examples included: The repo ships with a single-executable IDE and a playable dungeon crawler written entirely in Coma to stress-test real-time loops and unbounded lists.
All comments shown.
Couldn't load more comments. Check your connection and try again.