Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for that. This article is nearly impossible to read on mobile due to word wrapping and riddled with ads.

My first thought was “can this lead to easier implementation of a higher level language” and it seems Mu is exactly that? What’s performance like?



Yeah! Most statements translate to a single instruction, and you have to pick registers, so even though performance hasn't been a priority I think it'll tend to be pretty good. It does have some simplifications for safety and clarity rather than optimization. For example, setting a register to zero generates a copy with a 32-bit immediate rather than the xor trick most Assembly programmers would use.


I’m having the same problem reading the website (wordbreaks, ads). I wonder:

* is there a list of instructions that are included?

* is it possible to target this x86 subset with some C compiler?


List of supported instructions: https://github.com/akkartik/mu/blob/main/subx_opcodes

I haven't tried to implement C, but can't immediately think of a reason why not. Forks strongly encouraged; if you decide to try to implement one, I'd love to contribute.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: