5 ms·
I think Oberon would be a better candidate for this than C. You could get a tiny and extremely fast compiler for a full-featured programming language.
by Koshkin 7y ago
I think Oberon would be a better candidate for this than C. You could get a tiny and extremely fast compiler for a full-featured programming language.
- giancarlostoro 7y agoI'm looking into self-hosting compilers, is there a good link for Oberons code that achieves this? Or you just are mentioning that Oberon would probably be able to if one were implemented?
- kryptiskt 7y agoOberon is implemented in itself: http://www.projectoberon.com http://www.projectoberon.com The implementation includes the hardware too. Taken together, the system including single-tasking OS, windowing system and Oberon takes about 9000 lines of code.
- alexisread 7y agoEven better, A2/bluebottle is multithreaded with a ZUI and runs faster than Linux: https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/147091/eth-26082-02.pdf https://www.research-collection.ethz.ch/bitstream/handle/20.... Also, following on from A2, Composita introduces a component architecture to allow managed memory without GC, and contextless switches (IMHO better than Rust): http://concurrency.ch/Content/publications/Blaeser_Component_Operating_System_PLOS_2007.pdf http://concurrency.ch/Content/publications/Blaeser_Component...
- lboasso 7y agoYou might be interested in oberonc [0] an oberon-07 self-hosting compiler for the JVM. [0] https://github.com/lboasso/oberonc https://github.com/lboasso/oberonc
- southpawflo 7y agoat the bottom of the linked page the author explicitly references oberon as a source of inspiration for this project
- sitkack 7y agoFunny because Selfie reminds me of a maximally compact version of http://www.projectoberon.com/ http://www.projectoberon.com/
- z29LiTp5qUC30n 7y agoYou can get a proper C compiler in 2KLOC [or under 5Kloc of assembly https://github.com/oriansj/mescc-tools-seed/blob/master/x86/cc_x86.M1 https://github.com/oriansj/mescc-tools-seed/blob/master/x86/... | https://github.com/oriansj/mescc-tools-seed/blob/master/x86/NASM/cc_x86.S https://github.com/oriansj/mescc-tools-seed/blob/master/x86/...] Covering things like gotos, inline assembly, structs, unions, arrays and dozens of types and primitives. Oberon doesn't provide much advantage over that.