Where can I read about the technique used to build Medley? #2316
Replies: 9 comments
-
I posted some notes on building Medley but other useful details are in the READMEs of Maiko and the build scripts. The Maiko virtual machine is written in C, the rest of Medley in Lisp. |
Beta Was this translation helpful? Give feedback.
-
Thanks. Those notes seem to be about how a user would go about building Medley in order to then use it. I am more interested in knowing how you can compile Lisp files without having already built Medley, SBCL, for instance requires an existing conforming Common Lisp implementation. …On Tue, Oct 14, 2025 at 8:11 AM Paolo Amoroso ***@***.***> wrote: I posted some notes on building Medley <https://journal.paoloamoroso.com/how-to-build-medley-interlisp> but other useful details are in the READMEs of Maiko <https://github.com/Interlisp/maiko/blob/master/README.md> and the build scripts <https://github.com/Interlisp/medley/blob/master/scripts/README.md>. The Maiko virtual machine is written in C, the rest of Medley in Lisp. — Reply to this email directly, view it on GitHub <#2316 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AALBYQKGKGVTAJVG4FWCFF33XSHYDAVCNFSM6AAAAACJDMBPWWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINRXGIYTQNQ> . You are receiving this because you authored the thread.Message ID: ***@***.***> -- Robert Strandh |
Beta Was this translation helpful? Give feedback.
-
As far as I know Medley Lisp files can be compiled only from an existing Medley environment and the system and user applications have never been cross-compiled with tools other than Interlisp systems. The usual way of compiling Lisp files on Medley is via the File Manager (or File Package, unrelated to Common Lisp packages), a facility that notices new definitions of functions and other objects, tracks what is changed, saves changes to files (these are system-managed code databases rather than manually edited source files), and compiles the changes. Among other things the File Manager has some of the functionality of Unix Make. If you are interested I can go over the main steps of editing and compiling Lisp code on Medley and point to useful documentation. Unfortunately, the whole development process is not documented in a single place. |
Beta Was this translation helpful? Give feedback.
-
I see. So there must be a Medley system present in order to build the Medley system. But then the other question I have is about the relationship between the Medley system that is present from the start, and the Medley system that is being built. Do they share any code? If not, there must be some nontrivial way that the compiled files are combined in order to produce a complete Medley system. The compilation of one file might depend on the execution of another file, for instance. …On Tue, Oct 14, 2025 at 12:20 PM Paolo Amoroso ***@***.***> wrote: As far as I know Medley Lisp files can be compiled only from an existing Medley environment and the system and user applications have never been cross-compiled with tools other than Interlisp systems. The usual way of compiling Lisp files on Medley is via the File Manager (or File Package, unrelated to Common Lisp packages), a facility that notices new definitions of functions and other objects, tracks what is changed, saves changes to files (these are system-managed code databases rather than manually edited source files), and compiles the changes. Among other things the File Manager has some of the functionality of Unix Make. If you are interested I can go over the main steps of editing and compiling Lisp code on Medley and point to useful documentation. Unfortunately, the whole development process is not documented in a single place. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***> -- Robert Strandh |
Beta Was this translation helpful? Give feedback.
-
Since I'm relatively new to Medley I can offer only a very distant, big picture view of the process. Once you make some changes to a current Medley system, to build a new one you run a number of iterations of a set of steps that involve loading an existing or intermediate system image, enforcing some constraints on the order of the steps, loading some more compiled files, and saving a modified image or set of images. The build process, which is automatically carried out by the build scripts, is what I described in my blog post I initially shared. Most of the sources are not compiled during the build process. Many of the compiled files were actually compiled from a few years to a few decades ago. Only now we're experimenting with compiling all the files. What you typically do before the build process is to change part of the system as I described in my other post here, e.g. using the File Manager and the residential environment. Again, this is my understanding as a relatively new user. |
Beta Was this translation helpful? Give feedback.
-
I think that answers all my questions. Thank you! …On Tue, Oct 14, 2025 at 1:41 PM Paolo Amoroso ***@***.***> wrote: Since I'm relatively new to Medley I can offer only a very distant, big picture view of the process. Once you make some changes to a current Medley system, to build a new one you run a number of iterations of a set of steps that involve loading an existing or intermediate system image, enforcing some constraints on the order of the steps, loading some more compiled files, and saving a modified image or set of images. The build process, which is automatically carried out by the build scripts, is what I described in my blog post I initially shared. Most of the sources are not compiled during the build process. Many of the compiled files were actually compiled from a few years to a few decades ago. Only now we're experimenting with compiling all the files. What you typically do before the build process is to change part of the system as I described in my other post here, e.g. using the File Manager and the residential environment. Again, this is my understanding as a relatively new user. — Reply to this email directly, view it on GitHub <#2316 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AALBYQIK3XBKDBRU5N6NNGL3XTONTAVCNFSM6AAAAACJDMBPWWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINRXGUZDMMA> . You are receiving this because you authored the thread.Message ID: ***@***.***> -- Robert Strandh |
Beta Was this translation helpful? Give feedback.
-
A Medley system consists of a machine emulator ("Maiko" - currently in C, implementing the Interlisp byte code machine which was previously implemented in the Xerox D-machine microcode, and before that in PDP-10 assembler), and a memory image (the "sysout" file). Everything other than the machine emulator is written in Lisp. On the D-machines Lisp code also implemented all OS functionality - there was no other OS present. It's a long-lived residential environment - for many parts of the system you can modify the system you're standing on: edit Lisp code within the environment, optionally compiling it in memory, and replacing the running code in place. The file package handles keeping Lisp code/related definitions in external "source" files - though you should consider them to be more like primitive source databases, not externally editable, and the compiler can be directed to compile a source file and store the results on a a compiled file. At any point, from within the Lisp system, you can save the running memory image, exit, and later restart the image. If you want to rebuild the basic memory image you go through the "loadup" sequence, which involves starting with a running system which constructs a brand new memory image (in a separate file) and loads into it the compiled files you have stored externally [in an order defined by the dependencies of the various pieces]. It does this by redirecting various low-level operations to work on the new memory image instead of the current memory image. Once the minimum necessary parts of the system are installed in the new memory image the new image can be started by the emulator and the Lisp system in that image can continue the loadup process adding whatever additional components are desired - we make a minimal but still useful "lisp.sysout", and build from that the "full.sysout", a "notecards.sysout", a demo sysout for online.interlisp.org, and so on. Does this help? |
Beta Was this translation helpful? Give feedback.
-
@robert-strandh - by the way, I looked at the embedded compilation dates and 82 of 231 files have not been recompiled since 25-Jan-1998, and many of the sources themselves dated from years before that. |
Beta Was this translation helpful? Give feedback.
-
Yes, your description was quite helpful. Thank you! …On Tue, Oct 14, 2025 at 6:46 PM Nick Briggs ***@***.***> wrote: A Medley system consists of a machine emulator ("Maiko" - currently in C, implementing the Interlisp byte code machine which was previously implemented in the Xerox D-machine microcode, and before that in PDP-10 assembler), and a memory image (the "sysout" file). Everything other than the machine emulator is written in Lisp. On the D-machines Lisp code also implemented all OS functionality - there was no other OS present. It's a long-lived residential environment - for many parts of the system you can modify the system you're standing on: edit Lisp code within the environment, optionally compiling it in memory, and replacing the running code in place. The file package handles keeping Lisp code/related definitions in external "source" files - though you should consider them to be more like primitive source databases, not externally editable, and the compiler can be directed to compile a source file and store the results on a a compiled file. At any point, from within the Lisp system, you can save the running memory image, exit, and later restart the image. If you want to rebuild the basic memory image you go through the "loadup" sequence, which involves starting with a running system which constructs a brand new memory image (in a separate file) and loads into it the compiled files you have stored externally [in an order defined by the dependencies of the various pieces]. It does this by redirecting various low-level operations to work on the new memory image instead of the current memory image. Once the minimum necessary parts of the system are installed in the new memory image the new image can be started by the emulator and the Lisp system in that image can continue the loadup process adding whatever additional components are desired - we make a minimal but still useful "lisp.sysout", and build from that the "full.sysout", a "notecards.sysout", a demo sysout for online.interlisp.org, and so on. Does this help? — Reply to this email directly, view it on GitHub <#2316 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AALBYQMEIKJXBHDMBXGPNID3XUSE3AVCNFSM6AAAAACJDMBPWWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINRXHA2DINQ> . You are receiving this because you authored the thread.Message ID: ***@***.***> -- Robert Strandh |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I am working on the SICL project which, among other things, contains a novel way of building a Common Lisp
system almost entirely written in Common Lisp. I have also read the paper by Christoph Rhodes about how SBCL
is built. As I understand it, Medley is written mainly in Lisp, and I am interested in understanding how Medley
is built, given this fact.
Beta Was this translation helpful? Give feedback.
All reactions