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: You missed my later work Date: Fri, 31 Mar 2017 19:17:50 -0400 Message-ID: <87fuhtc9y9.fsf@ITSx00.pdp10.guru> References: <87k275jexx.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1491002311 2410 195.159.176.226 (31 Mar 2017 23:18:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 31 Mar 2017 23:18:31 +0000 (UTC) Cc: guile-user@gnu.org, epsilon-devel@gnu.org To: Jan Nieuwenhuizen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Apr 01 01:18:23 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 1cu5oE-0007Wb-3W for guile-user@m.gmane.org; Sat, 01 Apr 2017 01:18:22 +0200 Original-Received: from localhost ([::1]:43224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cu5oG-0006kG-LS for guile-user@m.gmane.org; Fri, 31 Mar 2017 19:18:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cu5no-0006ht-UC for guile-user@gnu.org; Fri, 31 Mar 2017 19:17:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cu5nn-0003tR-5f for guile-user@gnu.org; Fri, 31 Mar 2017 19:17:56 -0400 Original-Received: from itsx00.pdp10.guru ([104.200.30.13]:53317) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cu5nj-0003qL-En; Fri, 31 Mar 2017 19:17:51 -0400 Original-Received: from nnstep by ITSx00.pdp10.guru with local (Exim 4.84_2) (envelope-from ) id 1cu5ni-0008N9-IR; Fri, 31 Mar 2017 19:17:50 -0400 In-Reply-To: <87k275jexx.fsf@gnu.org> (message from Jan Nieuwenhuizen on Fri, 31 Mar 2017 23:48:10 +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:13587 Archived-At: > Aah, okay. That' smart. I got questions why I did not start with forth > or brainfuck. Well now you could have told them we already had the forth https://github.com/oriansj/stage0/blob/master/stage2/forth.s but none of the people in the forth community bothered to build upon it > ...however, for the bootstrap problem we need [almost] a full C > compiler, enough to compile .... Nope, we just needed to get more creative. I could hand assemble a C compiler like https://web.archive.org/web/20160604041431/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c or https://github.com/rswier/c4/blob/master/c4.c in assembly with a couple months of effort but the key is not to keep trying to take huge steps but rather simple ones. For example break up the C compiler problem into pieces, for example have a seperate C preprocessor, a single file C compiler that only produces assembly and just leverage the already existing assembly infrastructure I already made. > On the one hand that would be a very simple bootstrap setup. On the > other hand this still leaves us with a fairly big bootstrap binary. > Possibly using your work as a front end to this removes that issue? I honestly feel that is absolutely something that has to be done. However, you'll have to constrain yourself to what language features in C that you use to make the path from what I have completed to what is required possible. Some questions I have are as follows: 1) Could the C preprocessor componet of Nyacc be isolated and simplified enough to run on stage0's lisp interpreter and solve the C preprocessor question? 2) is cc500 or C in 4 functions good enough to bootstrap mescc or do we need to extend on of them or find/make a different C compiler that could be compiled by one of them which could get the job done? 3) has anyone looked at stripping tcc down to only using integers, structs, bytes and strings and outputting assembly instead of a binary? 4) or have we become too focused on getting C working that we missed implementing another language (perhaps PL/0 or algol w) might end up saving us a bunch of work? 5) Are there any languages for which it would be easier to implement C than assembly or simpler than trying to parse C in S-expressions? 6) Are there any primitives I could implement into my Lisp that would make C parsing trivial? 7) What else could I be missing about this problem? -Jeremiah