4 ms·
From the project’s README [1]: > Selfie is implemented in a single (!) file and kept minimal for simplicity. There is also a simple in-memory linker, a RISC-U
by jay-barronville 4y ago
From the project’s README [1]:
> Selfie is implemented in a single (!) file and kept minimal for simplicity. There is also a simple in-memory linker, a RISC-U disassembler, a garbage collector, L1 instruction and data caches, a profiler, and a debugger with replay as well as minimal operating system support in the form of RISC-V system calls built into the emulator and hypervisor. The garbage collector is conservative and even self-collecting. It may operate as library in the same address space as the mutator and/or as part of the emulator in the address space of the kernel.
I was a bit skeptical reading that, but I’m very impressed right now [2] . . .
[1]: https://github.com/cksystemsteaching/selfie/blob/5de675a0f08613adab2315d50ce7c2db2079005d/README.md https://github.com/cksystemsteaching/selfie/blob/5de675a0f08...
[2]: https://github.com/cksystemsteaching/selfie/blob/5de675a0f08613adab2315d50ce7c2db2079005d/selfie.c https://github.com/cksystemsteaching/selfie/blob/5de675a0f08...
- flik 4y agoChecking out further... Related course (https://cksystemsteaching.github.io/CS4All/ https://cksystemsteaching.github.io/CS4All/) and book (https://github.com/ckirsch/book https://github.com/ckirsch/book)
- wrycoder 4y agoThe design of the selfie compiler is inspired by the Oberon compiler of Professor Niklaus Wirth from ETH Zurich. RISC-U, the target language of the selfie compiler, is inspired by the RISC-V community around Professor David Patterson from UC Berkeley. The selfie garbage collector is inspired by the conservative garbage collector of Hans Boehm. The design of the selfie microkernel is inspired by microkernels of Professor Jochen Liedtke from University of Karlsruhe. That's quite the pedigree! This is a very interesting project to dig into, starting with the book.
- boberoni 4y agoThis part of the README explains what exactly Selfie can be used for: > a self-compiling compiler called starc that compiles a tiny but still fast subset of C called C Star (*) to a tiny and easy-to-teach subset of RISC-V called RISC-U, > a self-executing emulator called mipster that executes RISC-U code including itself when compiled with starc, > a self-hosting hypervisor called hypster that provides RISC-U virtual machines that can host all of selfie, that is, starc, mipster, and hypster itself, and a tiny C* library called libcstar utilized by selfie.