From: Jan Nieuwenhuizen <janneke@gnu.org>
To: <Jeremiah@pdp10.guru>
Cc: guile-user@gnu.org, epsilon-devel@gnu.org
Subject: Re: You missed my later work
Date: Fri, 31 Mar 2017 23:48:10 +0200 [thread overview]
Message-ID: <87k275jexx.fsf@gnu.org> (raw)
In-Reply-To: <E1cu39l-0007yL-1z@ITSx00.pdp10.guru> (Jeremiah@pdp10.guru's message of "Fri, 31 Mar 2017 16:28:25 -0400")
Hi Jeremiah!
> I had recently watched your FOSDEM talk https://fosdem.org/2017/schedule/event/guixsdbootstrap/
> Which you seem to have confused my hex assembler as an end in itself,
> rather than the first step in Stage0
Ah, that's why you say `You missed.' Sorry for giving that suggestion.
What I really meant to say I think, is that your self hosting stage0 hex
assembler was one of the things that inspired me to start Mes. I knew
you planned stage0 as a first step but I could not imagine how the next
steps would work out, at the time.
> Basically, I decided to steal a good idea from the C and pascal
> languages (o-code and p-code specificly)
Aah, okay. That' smart. I got questions why I did not start with forth
or brainfuck.
> Define a trivial to implement virtual machine (vm.c vm.h vm_decode.c
> and vm_instructions.c [optionally tty.c and/or
> dynamic_execution_trace.c but neither is required])
> Who's entire instruction set is define in ISA_HEX_Map.org
Found it... https://github.com/oriansj/stage0/blob/master/ISA_HEX_Map.org
> That way all platforms can independently verify every step
>
> Looking at your work, I can't help but wonder if we might be making
> that bootstrap step harder than it has to be.
Yes...
> What if we converted my lisp interpreter into a lisp compiler? Could
> that simplify your initial bootstrap?
Quite possibly...
> Since instead of trying to do the full C compiler in scheme in a
> single step, we could do: Primitive_scheme -> minimal_scheme ->
> full_scheme -> done
>
> What do you think?
What you describe here makes lots of sense. It very much resembles
something that I was aiming to do initially. I wanted to bootstrap my
Scheme from Lisp-1.5 and prototype my Lisp-1.5 interpreter in C, only to
replace that prototype in C later by something in assembly --> and hook
up your stage0 or more.
...however, for the bootstrap problem we need [almost] a full C
compiler, enough to compile Tiny C (tcc). I found Matt Wette's Nyacc,
which is a full C parser in Guile.
Then I got thinking: It could make sense to start a full C compiler
project in Guile? That could be useful also outside of the bootstrap
process. And if we have a full C compiler in Scheme, then maybe having
a Scheme interpreter (or VM?) in C is good enough.
So that's what I have been working towards, I should be quite close to
releasing Mes 0.5 which should be self-hosting: A Scheme interpreter
that can run a C compiler written in Scheme that can compile itself.
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?
What do you think?
Greetings, janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
next prev parent reply other threads:[~2017-03-31 21:48 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 [this message]
2017-03-31 23:17 ` Jeremiah
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=87k275jexx.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=Jeremiah@pdp10.guru \
--cc=epsilon-devel@gnu.org \
--cc=guile-user@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).