[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Next steps for Mes, stage0+? -- Re: You missed my later work

From: Jeremiah
Subject: Re: Next steps for Mes, stage0+? -- Re: You missed my later work
Date: Tue, 02 May 2017 14:26:26 -0400

> Ah, and this is what you would need a separate cpp for?
It would certainly simplify the task of implementation

> Thanks for the pointer, I missed that.  I have looked into that
> yesterday.  There are 55 tests and Mes has two obvious reasons why none
> of them work: we need to supply some headers <stdio.h>, <string.h>, and
> they are using printf in all tests.
> I am curious to see how far Mes will get :-)

We can just implement stubs to move ahead and flush them out as we move
Having seen your work, I am certain Mes will go far :-)

> It's good to hear my plan makes sense to you (see below).  What's the
> META II compiler compiler?
One might think of it as an early parser generator, which what actually
was used to create the first B compiler.

> Indeed, that would be great!  Writing mes.c in Scheme fairly easy of
> course; I've done almost that a couple of times already.  Being able to
> compile [some] Scheme to native code would be very nice in itself too,
> not just for bootstrapping.

Especially since, the lisp compiler would allow us to save most of the C
bootstrapping steps and simply improve the lisp side of the equation
until implementing a C compiler in lisp becomes a solved problem.

> I was hoping for that, I still need some inspiration here.

How is this for inspiration?

> Yes, thanks a lot!  When I started Mes it looked like an almost
> impossible task and what needs to be done can still look daunting.
> Questions are great, but some balancing with answers is very helpful.
Given first hand experience, my answer is as follows:
Lisp infrastructure seems like the correct course of action.
Which implies the following tasks:
1) add a lisp compiler that only supports the bare minimuim required for
useful work.
2a) Flush out MES C compiler as the most important Lisp program it needs
to compile
2b) leaverage minimal Lisp compiler to bootstrap full featured Lisp
compiler written in Lisp, which is then used to compile MES C compiler
and thus reduce implementation restrictions placed on MES C compiler.
3) Use the MES C compiler to compile tcc, make and other essential
bootstrap programs to finish the trusted compile path.
4) Extend and enhance Stage0 lisp to include cell compaction and thus
optimize garbage collection performance.
5) Cooperate to select what primitives would be implemented to allow the
stage0 lisp interpeter would need to get the first lisp compiler running

> Yes, I see.  That's the knowledge that must somehow regain.  It's
> probably a good thing that not everything works well :-)
certainly saves us from the estimated 4,400 Man-years spent
implementing the first algol compiler...

> Hmm...It would make sense to write this lisp compiler in lisp, of
> course.  No need to write it in C.  Hmm.  I wonder if someone would want
> to help transforming the mes.c interpreter into a mes.scm compiler?
It might take me a little bit to get up to speed with your code base but
I am always willing to try to help.

Sounds like we are going to have lots of fun together :D


reply via email to

[Prev in Thread] Current Thread [Next in Thread]