Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #54573

Re: The simplest compiler possible

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.lisp, comp.lang.forth
Subject Re: The simplest compiler possible
Date 2017-01-31 13:17 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2017Jan31.141722@mips.complang.tuwien.ac.at> (permalink)
References <o6ldq2$ev9$1@cherry.spenarnc.xs4all.nl>

Cross-posted to 2 groups.

Show all headers | View raw


albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes:
>The following experimental compiler has an interesting comment
>on the claim that lisp can be defined in lisp.

The issue is not that it cannot, but that the typical meta-circular
interpreter, especially the minimal ones, just inherits so many traits
from its substrate that it does not serve as a specification of the
language, at best of a tiny aspect of the language.  It's almost as if
you said: Look, here's a meta-circular interpreter for a Forth string:

: forth-interpreter ( ... c-addr u -- ... ) evaluate ;

And even the classical user-defined text interpreter just explains
text interpretation, but inherits all the words from the substrate.

The author tries to avoid this issue by using IA-32 machine language
as the substrate, and he tries to use as little literal machine
language as possible.

If you use machine language as a substrate, it's no surprise that the
minimal language is more in the direction of Forth than Lisp or other
math-inspired languages.  You still get some inheritance: E.g., his
compiler inherits the character encoding of the system it works on.
How would a different architecture (maybe one of the ancient ones with
died-out charactersitics like decimal number representation, or
ones-complement arithmetics) affect the result?

With more mathematical substrates, such as a universal Turing machine,
or the combinators S and K, what would the resulting minimal language
look like.

>https://github.com/kragen/stoneknifeforth

Most notable here are

https://github.com/kragen/stoneknifeforth/blob/master/README.md
https://github.com/kragen/stoneknifeforth/blob/master/tinyboot1.tbf1

The first explains the motivations and some design decisions, the
second seems to the the actual source code of the compiler.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2016: http://www.euroforth.org/ef16/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

The simplest compiler possible albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-29 19:54 +0100
  Re: The simplest compiler possible Kaz Kylheku <221-501-9011@kylheku.com> - 2017-01-29 19:18 +0000
  Re: The simplest compiler possible albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-30 18:50 +0100
    Re: The simplest compiler possible rpw3@rpw3.org (Rob Warnock) - 2017-01-31 07:11 +0000
      Re: The simplest compiler possible Paul Rubin <no.email@nospam.invalid> - 2017-01-30 23:17 -0800
        Re: The simplest compiler possible Kaz Kylheku <221-501-9011@kylheku.com> - 2017-01-31 14:32 +0000
      Re: The simplest compiler possible albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-31 11:39 +0100
        Re: The simplest compiler possible Kaz Kylheku <221-501-9011@kylheku.com> - 2017-01-31 14:19 +0000
  Re: The simplest compiler possible anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-31 13:17 +0000
    Re: The simplest compiler possible Barry Margolin <barmar@alum.mit.edu> - 2017-01-31 15:10 -0500
  Re: The simplest compiler possible Gerard Sontag <gerardsontag@gmail.com> - 2017-02-03 01:08 -0800
    Re: The simplest compiler possible albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-02-03 10:23 +0100
      Re: The simplest compiler possible Gerard Sontag <gerardsontag@gmail.com> - 2017-02-03 02:34 -0800
    Re: The simplest compiler possible stephen@mpeforth.com (Stephen Pelc) - 2017-02-03 13:06 +0000

csiph-web