This is amazing: <https://github.com/shinh/elvm>
# linking-together
k
🐣 1
🤣 5
❤️ 1
🙂 2
r
Terrifying, hilarious, and amazing are all appropriate adjectives here!
☝️ 3
e
It may be cute, but it is an amusing toy. Integers can only be 24 bit, and there is no floating point. Just exactly what is this good for then? Nothing real. I do like the concept of naming the registers A, B, C and D. However if you are inventing your own assembler, for goodness sakes at least give people 16 registers which is enough to hold all the function call arguments in registers, which is super efficient. Intel 8086 only had 4 registers, and it has been a giant pain in the ass ever since.
👎 1
i
This is clearly an art project.
💯 2
o
There is even a Scratch3.0 backend! That means that at last you can compile C to Scratch. ❤️
d
24 bit integers are not a limitation! ELVM is Turing complete, and you can just write library code to emulate floating point. If the existing C front end doesn't already do this, it would be a worthwhile extension.
It's true that there are performance issues with ELVM, if you compile to (say) Brainfuck, and then use a Brainfuck interpreter. Fortunately, there are hardware implementations of Brainfuck: https://hforsten.com/fast-brainfuck-microprocessor.html
😂 3
🍰 1
g
honestly would prefer to write c over vimscript so i see this project as an accidental net good
❤️ 1
even outside its artistic merit