unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jeremiah@pdp10.guru
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: guile-user@gnu.org, epsilon-devel@gnu.org
Subject: Re: You missed my later work
Date: Fri, 31 Mar 2017 19:17:50 -0400	[thread overview]
Message-ID: <87fuhtc9y9.fsf@ITSx00.pdp10.guru> (raw)
In-Reply-To: <87k275jexx.fsf@gnu.org> (message from Jan Nieuwenhuizen on Fri, 31 Mar 2017 23:48:10 +0200)


> 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




  reply	other threads:[~2017-03-31 23:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 20:28 You missed my later work Jeremiah
2017-03-31 21:48 ` Jan Nieuwenhuizen
2017-03-31 23:17   ` Jeremiah [this message]
2017-04-27 12:55     ` Jan Nieuwenhuizen
2017-04-27 23:51       ` Matt Wette
2017-05-01  1:02       ` Jeremiah
2017-05-02  6:17         ` Next steps for Mes, stage0+? -- " Jan Nieuwenhuizen
2017-05-02 18:26           ` Jeremiah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuhtc9y9.fsf@ITSx00.pdp10.guru \
    --to=jeremiah@pdp10.guru \
    --cc=epsilon-devel@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=janneke@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).