jahboater wrote: ↑
Fri Apr 20, 2018 12:47 pm
When you install gcc, the build is done twice.
First it compiles itself using the existing compiler on the machine.
Then it does it all again using the new freshly built compiler.
This 1) tests the newly built compiler, and 2) ensures the new compiler is as fast as possible because it is built with the latest code generation.
With gcc it is a three stage process where the third stage is to compile the compiler again using the compiler compiled by the compiler compiled by the original compiler to obtain a compiler compiled by the compiler compiled by the compiler compiled by the original compiler.
In the context of making something simple and fun to use for the Raspberry Pi, an interesting compiler to look at might be the Commodore C64 version of G-Pascal
. This language was designed for writing games and has built-in support for hardware based 2D graphics and sound. Source written in 6502 assembler is now available.
It would be interesting if the P-code VM could be adapted to Raspberry Pi in a way that preserved the built-in graphics and sound. If so, the resulting programming environment might be more appealing to some children than Scratch for making games. It would definitely allow for an easier transition to general purpose programming languages later.