Email or username:

Password:

Forgot your password?
Andrew Whatson

Announcing the Pre-Scheme Restoration project! Many thanks to @nlnet who have made this project possible.

prescheme.org/posts/announcing

#scheme #prescheme

7 comments
filip

@flatwhatson
What is the desired end-goal bootstrapping story for pre-scheme?

Andrew Whatson

@filip The current project is focused on running the compiler in a Scheme implementation, and generating native code with a C compiler.

The bootstrapping story is really a question of "how much Scheme" and "how much C". I'd love for Pre-Scheme to run on GNU Mes, but that hasn't been investigated yet. I'm in touch with folks in the bootstrapping community who are experts in minimal C compilers, and intend to do a detailed analysis of compatibility at some point. Early diagnosis is that Pre-Scheme isn't very demanding of a C compiler and targeting minimal compilers should be possible.

Beyond that, there's the possibility for adding new backends to the Pre-Scheme compiler. The original compiler described in "Compilation By Program Transformation" emitted m68k assembly. The paper "A Tractable Native-Code Scheme System" describes re-purposing the compiler as a bytecode optimizer, which involved writing a backend to emit Scheme 48 bytecode. I also have colleagues who are very interested in the possibility of a WebAssembly backend.

prescheme.org/references.html

#prescheme #bootstrappablebuilds

@filip The current project is focused on running the compiler in a Scheme implementation, and generating native code with a C compiler.

The bootstrapping story is really a question of "how much Scheme" and "how much C". I'd love for Pre-Scheme to run on GNU Mes, but that hasn't been investigated yet. I'm in touch with folks in the bootstrapping community who are experts in minimal C compilers, and intend to do a detailed analysis of compatibility at some point. Early diagnosis is that Pre-Scheme...

filip

@flatwhatson Running Pre-Scheme with Mes and then compiling resulting C with Mescc sounds like a perfect place to be at some point.

Mirko Hernandez

@flatwhatson @nlnet Reading the s48 refmanual I notice that the numeric types use double and long, and booleans use char. Could this be configurable in a future implementation?, pre-scheme could be an awesome meta programming tool but the current scheme48 implementation seems too restrictive.

Andrew Whatson

@mirkoh Yes, this limitation is one of the first things that will be addressed after the initial porting work is complete. The plan is to expose the full set of signed and unsigned 8/16/32/64-bit integers (stdint.h), float, and double, along with polymorphic arithmetic operators so you can use them together in the same program, as you would in C.

#prescheme

Jamie Jennings

@flatwhatson I am delighted to see that this effort exists! In the early 90’s I built robots that booted to s48. Jonathan Rees made scheme work brilliantly. In the late 90’s I set up a new group of robots with Kelsey’s Kali scheme. On one of my visits to NEC, I asked Richard about pre-scheme.

I think jar called it “a compiler only one person could run”, so I didn’t feel too bad that I couldn’t get it running on my own.

But that’s a story for another day.

I wish you great success!

Go Up