Here's an article about writing a Forth compiler for RISC architectures - which turns out to be harder than you'd think, given the simplicity of Forth.
Here's an up to date URL for the article listed above: http://kestrelcomputer.github.io/kestrel/2015/09/15/bspl-compiler
The source of the complexity is that RISC is literally *too* simple for Forth. CISC and accumulator architecture machines often have instructions which are favorable to Forth-style stack management. RISCs rarely have hardware managed stacks, so have to be done in software, which robs both performance and memory compactness. To regain both, you need more sophisticated code generators, rivalling those found in C compilers.
I guess I'm not the only one that doesn't like cron much (except, you know, the part about how it always works). Alternatives for many purposes appear to be in the category of job queuing systems, so that should probably be examined at some point under the "system architecture" rubric.
Also, here's a Python job scheduler inspired by this article. ("Job scheduling for humans.")...
Here's an up to date URL for the article listed above: http://kestrelcomputer.github.io/kestrel/2015/09/15/bspl-compiler
ReplyDeleteThe source of the complexity is that RISC is literally *too* simple for Forth. CISC and accumulator architecture machines often have instructions which are favorable to Forth-style stack management. RISCs rarely have hardware managed stacks, so have to be done in software, which robs both performance and memory compactness. To regain both, you need more sophisticated code generators, rivalling those found in C compilers.