From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.user Subject: Re: on bootstrapping: introducing Mes Date: Tue, 21 Jun 2016 19:07:44 +0200 Organization: AvatarAcademy.nl Message-ID: <87porasc67.fsf@gnu.org> References: <87twgp8mi5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1466528930 26454 80.91.229.3 (21 Jun 2016 17:08:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2016 17:08:50 +0000 (UTC) Cc: guile-user@gnu.org To: Mike Bushroe Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 21 19:08:40 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bFPAE-0002o8-L4 for guile-user@m.gmane.org; Tue, 21 Jun 2016 19:08:38 +0200 Original-Received: from localhost ([::1]:53198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFPAD-0002zF-Tp for guile-user@m.gmane.org; Tue, 21 Jun 2016 13:08:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFP9k-0002z8-Qy for guile-user@gnu.org; Tue, 21 Jun 2016 13:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFP9f-0003e0-D7 for guile-user@gnu.org; Tue, 21 Jun 2016 13:08:07 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFP9R-0003WY-Bq; Tue, 21 Jun 2016 13:07:49 -0400 Original-Received: from peder.onsbrabantnet.nl ([88.159.206.46]:52274 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFP9P-0007jJ-EY; Tue, 21 Jun 2016 13:07:47 -0400 X-Url: http://AvatarAcademy.nl In-Reply-To: (Mike Bushroe's message of "Mon, 20 Jun 2016 10:47:42 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:12679 Archived-At: Mike Bushroe writes: Hi! > I have been quietly lurking for quite some time now, but this stirs up > old memories. Back in college we built a compile for a local language > called 'y' which was very similar to C, and the compiler was written > in 'yacc', yet another compiler compiler.=C2=A0 That's great. Starting this project it seems like old times revisited in a way...bootstrapping was once real important and gains renewed interest. > It sounds like you are moving to a two layer approach, a base layer in > C that would have to be compiler for any new host that would interpret > a minimal subset of LISP, and then a full LISP interpreter that would > support most or all of the language. Ah sorry, not exactly. I intend to write the initial LISP interpreter in binary/hex...the current implementation in C is only intended to be an intermediate stage in the development process, i.e., to figure out what exactly is needed as a minimal interpreter. Experimenting using C is easier than in assembly and close enough to make change to assembly later. > As for the scary part of define-syntax, once you have a tokenizer > written from the getc, ungetc routines, it is fairly straight forward > to use the tokens returned (variable names, numbers, language > commands, math/logic operators, and block/structure symbols) and build > a state machine that walks through each syntax sequence starting with > a new code line and sending out assemble code lines to compile or > executing steps in an interpreter. Using recursion for numeric > expressions and nested block structures. Yes, scary at first but it is > surprising how quickly language breaks down into recursive syntax > structures. Thank you, that's a most helpful encouragement! > Regardless of how you proceed from here, good luck and it sounds like > you are having fun! Sure thing, and I've already learned quite a bit I thought I already knew about intepreting lisp. :-) Greetings, Jan --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20