From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Can Guile be bootstrapped from source without psyntax-pp.scm? Date: Thu, 06 Jul 2017 21:42:47 -0400 Message-ID: <87inj5f2eg.fsf@netris.org> References: <87d19dr3kx.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499391826 23099 195.159.176.226 (7 Jul 2017 01:43:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Jul 2017 01:43:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-user@gnu.org, bootstrappable@freelists.org To: Alex Vong Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jul 07 03:43:41 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 1dTIIw-0005S2-0w for guile-user@m.gmane.org; Fri, 07 Jul 2017 03:43:34 +0200 Original-Received: from localhost ([::1]:54022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTIJ1-000101-CA for guile-user@m.gmane.org; Thu, 06 Jul 2017 21:43:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTIIe-0000yR-Tj for guile-user@gnu.org; Thu, 06 Jul 2017 21:43:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTIIZ-0001hL-Q9 for guile-user@gnu.org; Thu, 06 Jul 2017 21:43:16 -0400 Original-Received: from world.peace.net ([50.252.239.5]:43372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTIIZ-0001aX-Lh for guile-user@gnu.org; Thu, 06 Jul 2017 21:43:11 -0400 Original-Received: from pool-72-93-34-106.bstnma.east.verizon.net ([72.93.34.106] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dTIIN-00010c-MC; Thu, 06 Jul 2017 21:42:59 -0400 In-Reply-To: <87d19dr3kx.fsf@gmail.com> (Alex Vong's message of "Thu, 06 Jul 2017 23:24:14 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.252.239.5 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:13900 Archived-At: Hi Alex, Alex Vong writes: > Recently, I've read the chapter on Macros in Guile's manual. The manual > says that Guile's expander originated from that of Chez Scheme's and > that version was portable to other schemes as well. So I search the > Internet and find it[0]. The website states that the expander needs an > expanded version of itself for bootstrapping, i.e. psyntax.ss needs > psyntax.pp for bootstrapping. > > After playing for awhile, I realize the relationship of Guile's > psyntax.scm and psyntax-pp.scm is exactly analogus. One needs an > expanded version of psyntax.scm, i.e. psyntax-pp.scm for bootstrapping. > > Does this mean Guile is not bootstrappable from source only? That's correct. psyntax-pp.scm is not source code, and it is needed to bootstrap Guile. However, I made an effort some years ago to make psyntax-pp.scm far smaller and more readable than the corresponding file from upstream psyntax. See: https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=72ee0ef71b9a0514874976cdcf3ea9d5333db4b1 https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=1af6d2a717f499564fbbc297c79e00ac14b0dcf9 At this point, I believe it would be quite feasible for a single hacker to audit our psyntax-pp.scm and compare it to psyntax.scm within a reasonable time frame. Furthermore, when we make local changes to psyntax.scm, the corresponding changes to psyntax-pp.scm are localized and quite easy to audit as well, so the full audit need not be repeated. Having said this, I agree that it would be better if psyntax.scm were written in such a way that it could be bootstrapped without the use of itself. Maybe some day we'll rewrite it to make it so. Mark