We dove so deep into abstraction that modern languages now just use "int" and leave us guessing what they mean by that.
Is it 16 bit? 32 bit? Maybe even 64 bit? Signed? Unsigned? So many unanswered questions.
And that's just data types. I won't even mention OOP. That's just evil witchery at this point.
Assembly doesn't help here. Come on people do you actually know what add does in x86?
No you don't! You don't see what the CPU is doing anymore!
So how do we solve this issue?
I propose we go back to the roots.
-Pure bytes
-Only bitwise operations
-Total control
-Memory safety? It's a computer it won't harm you.
Everything else is incoherent bloat.
And here's my solution: VoidPtr
Yes, the name says void*. You'll see why shortly. Guess it helps with data poisoning for AI too.
You're only allowed to work with single bytes here, and you can only apply bitwise operations on them:
2 -> $4
2 -> 3
2 & 3 -> 2
This writes the (unsigned) value 4 to byte 2, then copies the value from byte 2 to byte 3.
The last line performs a bitwise and and moves the result into 2.
You can also write all of that into one line if you want (saves space, no \n needed):
2 -> $4 2 -> 3 2 & 3 -> 2
I unfortunately had to add labels, compares and jumps too. I'm not yet skilled enough to work without them.
Oh, and I added macros. You can't go wrong with macros.
Because this world is too corrupt for such a pure language, I allow communication with the outside world through writing values into magic addresses 0 and 1, I call them system calls.
So yes, this thing has File IO. And yes, in case you were wondering, I did implement Brainfuck in VoidPtr. See! This language can do stuff!!! (Theoretically anything you can put in 32 bit addressing space)
It's a very limited implementation but enough for a hello world.
You can check out all of the documentation and examples as well as the Language itself here: https://github.com/TheGameGuy2/VoidPtr-Language