From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jeremiah@pdp10.guru Newsgroups: gmane.lisp.guile.user Subject: Re: Next steps for Mes, stage0+? -- Re: You missed my later work Date: Tue, 02 May 2017 14:26:26 -0400 Message-ID: <87a86vcdyl.fsf@ITSx00.pdp10.guru> References: <87h9134wbi.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493749629 1932 195.159.176.226 (2 May 2017 18:27:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 May 2017 18:27:09 +0000 (UTC) Cc: guile-user@gnu.org, epsilon-devel@gnu.org, matt.wette@gmail.com To: Jan Nieuwenhuizen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue May 02 20:27:05 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5cVt-0000Q0-6g for guile-user@m.gmane.org; Tue, 02 May 2017 20:27:05 +0200 Original-Received: from localhost ([::1]:60525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5cVy-0003QE-W6 for guile-user@m.gmane.org; Tue, 02 May 2017 14:27:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5cVW-0003Oq-23 for guile-user@gnu.org; Tue, 02 May 2017 14:26:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5cVU-0001Mz-Vg for guile-user@gnu.org; Tue, 02 May 2017 14:26:42 -0400 Original-Received: from itsx00.pdp10.guru ([104.200.30.13]:60849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d5cVQ-0001Bf-ET; Tue, 02 May 2017 14:26:36 -0400 Original-Received: from nnstep by ITSx00.pdp10.guru with local (Exim 4.84_2) (envelope-from ) id 1d5cVG-0001O4-AU; Tue, 02 May 2017 14:26:26 -0400 In-Reply-To: <87h9134wbi.fsf@gnu.org> (message from Jan Nieuwenhuizen on Tue, 02 May 2017 08:17:05 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 104.200.30.13 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13663 Archived-At: > 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 , , 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 forward. 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? https://en.wikipedia.org/wiki/META_II 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? http://piumarta.com/software/maru/ https://github.com/darius/ichbins > 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 or 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 fast. > 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 -Jeremiah