Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Bootstrapping Date: Sat, 05 Dec 2015 21:02:01 -0500 Organization: Aioe.org NNTP Server Lines: 38 Message-ID: References: <5016c629-9407-42ae-80c0-eb2c1c178f83@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:44096 On Tue, 01 Dec 2015 17:08:24 -0500, Chris Curl wrote: > I feel like I'm making decent progress on my latest implementation, > an indirect threaded Forth written in C. > > Might someone have a Forth bootstrap script that assumes (some number > of) primitives are already defined? Ideally, such a script could build > a working Forth by building on the primitives that are hand coded > into the system. > > Then an implementer could focus on the basic system and use the script > to get off the ground. A nice feature of that would be that it could > also be a smoke test for ANS compatibility. Each system build from primitives uses a different set of them. You could also look at fig-Forth. Much of it is listed as high-level Forth code. Discard the Forth words no longer in use, or which were dropped by later Forth standards, e.g., Forth-79, Forth-83, ANS-Forth. eForth has already been mentioned. This is the Forth renowned for the technique of building up Forth from low-level primitives. I implemented many words in C first, then slowly rewrote them in high-level Forth. Most of this was easy, but some of them were difficult because high-level C is so much more powerful than high-level Forth, especially things like pointers to pointer to an element of an array, etc., which must be rewritten in terms of very basic address manipulations, e.g, fetch @ and store ! . Rod Pemberton -- How to kill Facebook. Tell a bunch of fourth graders that only old people use Facebook. Wait eight years.