r/ProgrammingLanguages • u/Dog-Mad • May 24 '26
Language announcement Try creating your own Programming Language with IRON!!!
IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database designed for making programming languages. It is written entirely in Assembly and is extremely performant.
The best part of IRON, is that it separates code from the syntax and intrinsics. Meaning that once your programming language is finished, you would only need to rewrite IRON into it to make it bootstrap and nothing else.
This has the added benefit of allowing you to focus on the syntax and intrinsics before writing the lexer or parser.
IRON also doesn't rely on any external libraries, as of this moment its file size is 23.4kb and it has 1468 lines of code.
IRON can only be run on Linux 86-64, but I will work on porting it to MacOS and Windows in the near future.
The GitHub repo is: https://github.com/dogmaticdev/IRON
If you find to be useful or interesting please give the repo a star.
•
u/yorickpeterse Inko May 24 '26
Just adding this for the rest of the community: I too felt the project setup and such is a bit suspicious, as the use of box drawing characters for separators is rather uncommon (on account of them being a PITA to type out) and the presence of the usual "Add files via upload" commits.
However, beyond that it's really hard to determine if this project indeed used an LLM or not, and so I gave it the benefit of doubt. If anybody has any other indicators that OP might've in fact used an LLM after all then feel free to share them and we can still take action if necessary.
9
u/jcastroarnaud May 24 '26
(/me scratches head, confused)
From what I read, IRON seems to be an esoteric DSL for creating a very limited and cut down lexer.
The "database" seems more like a hash table. The choice of implementing in assembly is unusual, but to each their own.
The idea of IRON itself gave me another idea: a compiler with an actual database (SQLite), which holds tokens, ASTs and IRs for all programs it compiles; then, the compiler does large-scale optimization based on the additional context of code.
13
u/Dog-Mad May 24 '26
Per AutoModerator's request I hereby confirm that this project did not use an LLM as part of the development process.
4
u/igors84 May 24 '26
This sounds interesting but I am also failing to understand what it does. Can we get some end to end example? Something like
...
X. I get ___ and that is useful to me because ___
Also you don't depend on any libraries but you do depend on nasm to compile the source. Why not make your asm files compatible with gnu as which is almost always already present on all linux distros? You could then compile and link it with `gcc input.asm -o output`. You can even use Intel syntax if you add this to the start of your asm files:
```
.intel_syntax noprefix
.intel_mnemonic
```
2
u/Inconstant_Moo 🧿 Pipefish May 24 '26
I didn't understand most of that except the bit where you said "I have no intention of making the syntax readable", which you didn't.
You've given no examples of creating a language yourself using this. Have you tried?
5
u/ImYoric May 24 '26
I'm reading the README and I'm not sure what it does, exactly.
It seems extremely different from LLVM, that's all I can tell.
1
u/AustinVelonaut Admiran May 24 '26
IRON sounds sort of like Meta II or perhaps a Parsing Expression Grammar, in terms of target, except it has a much lower-level syntax, more akin to assembly-language with gotos everywhere. I'm not sure what benefit it would have over a more high-level representation, especially since it would (mostly?) be used in a meta-compilation sense, in building a compiler, rather than as part of the runtime.
1
u/alex_sakuta May 27 '26
I have many questions.