User avatar
Gavinmc42
Posts: 1870
Joined: Wed Aug 28, 2013 3:31 am

Re: A Extended Pascal Implementation : CONCEPT.

Fri Apr 20, 2018 1:04 pm

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.
Add some AI and more recursion and watch it turn into a quantum blackhole or melt your Pi.

Wonder who will write the first and last self-improving compiler?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ejolson
Posts: 1444
Joined: Tue Mar 18, 2014 11:47 am

Re: A Extended Pascal Implementation : CONCEPT.

Sat Apr 21, 2018 10:25 pm

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.

User avatar
Gavinmc42
Posts: 1870
Joined: Wed Aug 28, 2013 3:31 am

Re: A Extended Pascal Implementation : CONCEPT.

Sun Apr 22, 2018 12:10 am

Wow ejolson, thanks for that blast from the past.
I remember those Byte Mag Tiny Pascal articles mainly because I think they were the first Asian named coders I had seen in Byte Mag.
Still got them in a box under the house ;)

G-Pascal with 2D hardware support, sounds very useful.
G_PascalScript for Ultibo?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jahboater
Posts: 2530
Joined: Wed Feb 04, 2015 6:38 pm

Re: A Extended Pascal Implementation : CONCEPT.

Sun Apr 22, 2018 6:54 am

ejolson wrote:
Sat Apr 21, 2018 10:25 pm
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.
:) :) :)
At least on the new Pi3B+ all that only takes about 4.5 hours.....

ejolson
Posts: 1444
Joined: Tue Mar 18, 2014 11:47 am

Re: A Extended Pascal Implementation : CONCEPT.

Wed May 16, 2018 8:04 am

DavidS wrote:
Fri Apr 13, 2018 4:12 pm
It is looking like I may get far enough to begin sharing soon.
Any news or updates on progress?

Return to “Other languages”

Who is online

Users browsing this forum: No registered users and 1 guest