Hacker News new | ask | show | jobs
by munificent 718 days ago
I think a more accurate way to describe it is that it's a C compiler written in C and then automatically transpiled to VimScript.

No human hand-authored this giant pile of VimScript: https://raw.githubusercontent.com/rhysd/8cc.vim/master/autol...

3 comments

Yes. It is compiled to Vim script using ELVM[1]. Though the author of Vim script backend of ELVM is me :)

[1]: https://github.com/shinh/elvm

That is very cool! So with ELVM one could put together a C compiler in TeX too? Or transpile Vim into Vim script to self-host it?
Cool. Why, though? I mean, it's not like this project has any practical value anyway, but wouldn't it be actually easier and more efficient to actually implement a C compiler in VimScript? Or is the vimscript ELVM backend the actual end-goal here, and C-compiler at question is basically just a proof that it works?
Thanks, at first I thought someone had written it in vim script, then I inspected the README in detail and learned it's only transpiled from C to vim script, which is not particularly exciting or impressive compared to a human wielding such a degree of vim script fu.
Ah - my impression went from 'this is pure masochism' to just 'this is slightly insane'.