Kilo editor ported to Forth for RISC-V(github.com)
github.com
Kilo editor ported to Forth for RISC-V
https://github.com/mcmenaminadrian/filo/blob/main/fori.fth
2 comments
KILO - the text editor implemented in under 1000 lines of C (hence the name) has been ported to Riscyforth, a Forth for RISC-V SBCs and similar running Linux.
The Forth port comes in at 1377 lines, perhaps reflecting C's greater expressiveness (things you never expected to type!).
Is anyone out there using Forth for serious projects still, or is it strictly for vintage enthusiasts only?
"serious" might not be the right term[1][2], but Dusk OS[3] has a wide set of features, including a C compiler[4] and a Text editor[5] which clocks at 339 lines of code[6][7] (third of a kilo?).
You can see the editor in action at time 2:30 of the first screencast[8] on the Dusk OS website
[1]: https://lists.sr.ht/~vdupras/duskos-discuss/%3CZ0Cr6m01ZNaAN...
[2]: https://lists.sr.ht/~vdupras/duskos-discuss/%3CCADfQ9L9D6DNR...
[3]: http://duskos.org
[4]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/doc/co...
[5]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/doc/te...
[6]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/text/e...
[7]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/text/g...
[8]: https://duskos.org/demo.html
You can see the editor in action at time 2:30 of the first screencast[8] on the Dusk OS website
[1]: https://lists.sr.ht/~vdupras/duskos-discuss/%3CZ0Cr6m01ZNaAN...
[2]: https://lists.sr.ht/~vdupras/duskos-discuss/%3CCADfQ9L9D6DNR...
[3]: http://duskos.org
[4]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/doc/co...
[5]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/doc/te...
[6]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/text/e...
[7]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/text/g...
[8]: https://duskos.org/demo.html
>[4]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/doc/co...
I've been looking for C compiler implementation in Forth, this is great work!
I've been looking for C compiler implementation in Forth, this is great work!
The more interesting question is how many byte of *compiled* code is each one?
[deleted]