Page 2 of 2
Posted: Thu Mar 29, 2007 2:49 pm
by anon19287473
Posted: Thu Mar 29, 2007 3:51 pm
by mystran
I suggest you implement your Lisp in Lisp, by having a compiler capable of compiling to native code. That'll make your life much easier.
It also means you'll then able to compile code at runtime. This has nothing to do with rewriting at runtime. The important thing for rewriting at runtime is having extremely late binding, such that you rely on basicly one hard-coded thing: resolving symbols. Even that can be made latebound after the system has started, by simply having closures carry references to the other closures they need to call.... which in case of eval and compiler would include the symbol resolver..
The biggest pain with the whole thing then is garbage collecting code. There's nothing theoretically very hard, but if you want to compact the area where your code lives, you need to have your code relocatable by your garbage collector, and you need to be able to fix your stack to reflect those relocations.
...
I've got the start of a project that's kinda supposed to do that, though I'm at the stage of having my compiler compile my Lisp dialect, the compiler itself running in MzScheme, outputting GAS (there's no integrated assembler yet) and missing 99% of all runtime..
ATM I'm doing more conventional OS dev though.
Posted: Thu Mar 29, 2007 8:37 pm
by anon19287473
Posted: Thu Mar 29, 2007 8:42 pm
by ~
My kernel has 16Kb and the more advanced features it has is incipient disk partition detection, as well as the basic keyboard, timer, floppy, an incipient memory manager and other miscellaneous things.