top | item 40857120

8cc.vim: Pure Vim script C Compiler

162 points| JNRowe | 1 year ago |github.com | reply

24 comments

order
[+] WalterBright|1 year ago|reply
Back in the 1970s, I was told that somebody had written a FORTRAN compiler as a TECO macro just to prove it could be done.

(TECO means Text Editor Charactor Oriented, a line editor that had a macro capability. EDLIN was a line editor for MS-DOS.)

[+] mhh__|1 year ago|reply
Sometimes I worry that software, because you can do this, also let's you do similarly bizarre things obfuscated under a layer of complexity.

Imagine a car company announcing they'd built a perfectly cuboidal car entirely out of (say) tungsten — it only does 3mph and is expensive but we value engineering time over performance!

[+] timando|1 year ago|reply
Can you use the ELVM backend to compile Emacs into Vim script?
[+] zorrn|1 year ago|reply
An operating system inside a text editor inside an operating system maybe inside a vm inside another operating system. Wait I forgot nested virtualization.
[+] INTPenis|1 year ago|reply
It looks like they're just taking the entire eightcc compiler and stuffed into vim buffer memory.
[+] rhysd|1 year ago|reply
No. It is a C compiler compiled to Vim script. So it is actually a C compiler written in Vim script.
[+] flying_sheep|1 year ago|reply
I'd love to use vim to compile vim lolz
[+] queuebert|1 year ago|reply
I always suspected Emacs would achieve sentience before vim. Maybe I'll be wrong.