r/ProgrammingLanguages 5d ago

Requesting criticism My first compiled language, Arrokoth-0

Hey guys, since I've been lurking around this subreddit for some time, I have decided to throw my little compiled language into the open for criticism. I won't update the language itself, as there's no point in doing that to such a small toy language (that's not even that widely useful), but I would appreciate your thoughts and criticism going forward. I grew to admire LLVM IR and compiler engineering, and this definitely isn't my last compiler I'll make! (Yes I know LLVM has a whole API for building IR... I'll utilize it in bigger projects XD)
https://github.com/norbcodes/Arrokoth-0

8 Upvotes

8 comments sorted by

3

u/pthierry 3d ago

For the next one, look at things like algebraic effects and capability security. We know how to make languages that produce vastly safer programs!

It's high time we provide developers with languages where supply chain attacks are a thing of the past. (WebAssembly is going in the right direction for that)

3

u/__NORB__ 3d ago

I'll definitely look into it. Still a lot to learn :)

Also dumb question, but is this because the compiler just fprintf's the LLVM IR?

6

u/AustinVelonaut Admiran 3d ago

No; "algebraic effects" and "capabilties" are things that would apply to the language being compiled, not (necessarily) to the implementation of that compiler. However, they are mostly research level topics at this point; very few languages have them, so I wouldn't think about those for your next project. Take small steps. Keep at it!

3

u/AnArmoredPony 3d ago

Arrokoth-0 code shall be put in .arr files for aesthetic purposes, but you can use any file extension

so uhh no imports?

1

u/__NORB__ 3d ago

Coming soon™ xD

3

u/cmontella 🤖 mech-lang 2d ago edited 2d ago

I've never seen this rule before that's interesting: Comments shall be enclosed with [].

Although strictly speaking it seems like the ] isn't needed for a single line comment?

2

u/__NORB__ 2d ago

Ah right, I gotta fix that in the readme. Thanks for pointing it out :)

2

u/__NORB__ 4d ago

Per AutoModerator's request I hereby confirm that this project did not use an LLM as part of the development process.