by raphlinus · 1mo ago · 0 comments
Dan Luu has done that kind of evaluation[2], and found that LLMs do well in a range of languages, but do underperform in assembler. My hypothesis is that expressing programmer intent clearly, and having the compiler verify things like consistent placement of variables in registers, will fix the problems that hold LLMs back.
This has been a hobby project, but it feels ready to break containment. I'm open to a research opportunity where I'd be able to work on it for real - get in touch.
[0]: https://github.com/raphlinus/symbolasm
I think it's a very promising approach - it makes assembly a lot more intuitive, especially to people with background in higher level languages. It makes listings far more immediately readable, even without memorizing every instruction mnemonic. But it just came in too late. By the time Blackfin happened, coding in assembly was firmly an afterthought.
I'd like it to succeed, but I have my doubts that it will.
Time is a circle. Assembler could come back if it's an appealing target for LLMs. Currently it's not, but that's my hypothesis.
But that's a bit of a problem too?
Because, unlike humans, LLMs have no trouble whatsoever recalling all the mnemonics. Hell, they can often recall all the opcodes and encodings too and disassemble from hex "manually".
So if the primary advantage of this syntax is better human-readability and human-understandability? The need for it in a future where low level assembly routines are written by LLMs in a perf evaluation loop isn't that great.
Or it is a self-similar fractal with significant and interesting variations
R0 = R1 + R2
[1]: https://en.wikipedia.org/wiki/Blackfin#Core_featuresPeople have ported Atari 2600 games to it with the resulting ROM being byte-exact.
The main difference is that it primarily targets 8-bit chips, so often has to expand a statement into multiple instructions, while I'm targeting ARM, which can get quite a lot done in a single instruction. But I absolutely will cite it as precedent.
Assembly with an effect system and flow typing.
Of course, the same issue exist in any compile language, say C, but you don’t expect to see C in a disassembly. Here you are working at the assembly level.
* It's possible to embed variable names into the debug info, so your debugger inspects those rather than just numbered registers.
* Optimizing compilers can do transformations which highly obscure the relationship between source and binary code. Here they closely match.
Thanks for your interest!