Hi George, thanks for the reply! I work a bit with hardware, but I'm not terribly good with assembly. I know enough about hardware to know how hard this must be to get working - but it does interest me a lot. The more I learn, the more respect I have for the tools available.
I guess for self-hosting, there are a couple of examples I could look at (raco exe, chez-exe, etc). I had considered working through Build Your Own Lisp <http://buildyourownlisp.com>, Lisp in Small Pieces, Scheme from Scratch or something similar. Attempting self-study of the dragon book <https://suif.stanford.edu/dragonbook/>, or perhaps a lighter introduction if anyone has one they like. On Tue, Nov 24, 2020 at 11:26 PM George Neuner <[email protected]> wrote: > > On 11/24/2020 7:34 PM, Tim Meehan wrote: > > Some Schemes allow you to compile to a (self-hosting?) executable (Chicken > {via C}, Chez, Racket, others?). Some do not (Guile, others?), but compile > to bytecode. > > Why would a group of developers choose one over the other? Or is the end > result not that different in either case? > > > The reason for creating stand-alone executables is to be able to run > programs in environments where the language tools are not, or cannot be, > installed. For security reasons, many companies do not permit installing > programming tools. > > However, creating stand-alone executables is rather unrelated to what the > compiler produces. There are a number of language implementations - Racket > included - which can embed their bytecode (as static data) into a native > "runtime" program which executes it. > > Is there a book/paper that I might read on this? > > > Unfortunately, language implementation is a very large subject area. If > you want to understand why things are being done a certain way, you need to > understand the ways that they *could be* done and what trade-offs are > involved in using various methods. > > Little understood fact: all languages actually are defined by a *virtual* > abstract machine. This is the reason that languages can be implemented on > many different real-world CPUs: it is the abstract machine that defines > the language's behavior, and it is the abstract machine - not some CPU - > that is the *real* compilation target. > [For those about to object: yes, Scheme has a formal denotational > definition in contrast to the many languages that are operationally defined > by (relatively) informal description of behavior combined with a > "reference" implementation. Consider that Scheme's denotational spec is > describing the behavior of an abstract machine, and that Scheme > implementations are realizations of the machine.] > > To get a sense of what is going on under the hood, you need to learn a bit > about hardware, and a lot about compilers and interpreters. Particular > language features often can be implemented in multiple ways, and the > choices made for various features often affect how harmoniously they can > coexist. > > If you really are serious about learning this stuff, I'm sure we can keep > you busy reading for a while. > > Cheers, > Tim > > > George > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CACgrOxLR%2BYRaG8BuUh54cuykfqDNKvzW-YuQ7CHCNr-1xHYe_w%40mail.gmail.com.

