Some of you may object to the idea that we are super careful with data and modifications to it. I know where you are coming from... however, compared to an image-based system, the modern world is in fact super careful! To the extent that you think we are still not careful enough, that leads you even farther from wanting an image-based system.
If you conceive of a system as the full state space of everywhere it can go, the vast, vast, vast majority of systems have pathological places in it. It is very hard to get them all out. It is advantageous to have a button that says "restart this system from the initial state", and to push it often to make sure it continues to work, even if you're not thinking of it this way. By contrast, image-based systems have the tendency to either 1. get into a bad place in the state space and then the user has no way back out or 2. accidentally create a scenario in which there is no way to bring the system up from scratch anymore, which includes things like "giving the system to someone else to start their own work up".
Sure, it's a good idea to minimize the need to hit the reset button. But you don't really want to give it up entirely.
There are a variety of ways of improving the image-based system. Most, perhaps all of the practical ones, involve basically removing the image-based nature of it and moving closer to the systems we all work with today.
Incremental runtime modification is great for development, but I very frequently restart (from sources) every so often, and certainly at least before deployment to verify everything is working as expected. Sometimes because it's completely necessary, sometimes for my own sanity.
For production, I think it's a very "neat" thing to be able to do and I've heard some great stories (no personal experience), but it's definitely a foot gun if not used very carefully.
In other words - if you modify the run time, are you then able to mirror those changes in your codebase and then reboot?
99% of the time, you simply write the code or change in the sources first, then compile/run it in the runtime.
If you're modifying the runtime directly at the REPL without having sources, good luck? or you don't really care about persisting those changes. CL has pretty good introspection, so you could look at the source expression of a function defined at the REPL for example, if you really wanted to recover something (and happened to put the change in a function first), but this isn't always reliable.
The workflow I always use is to write code in my editor and use a keyboard shortcut to evaluate it. Typing directly into the REPL is for one-off state updates, inspection, experiments, and similar throwaway code.
You could also type an individual function into the repl then pretty-print it to a file but that typically expands out any read macros that you may have used.
You could type something in to the repl then add it to a file later.
There was a structure editor that worked on the s-expression of a function, including any comments as they were represented as a special form within that structure.
(* This is a comment)
See section 7 of the introductory guide [1].[1] https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/xe...
I think conceptually, Lisp was an interpreted runtime. However, the combination of chasing efficiency with compilation and perhaps "everything is a file" consuming mindshare, interpreted Lisp seems a largely academic pursuit.
It's really great for running agents, though.
This is a strange statement. The manual for Lisp 1.5 describes a compiled language. Lisps have been compiled for over 64 years now using just that version as a baseline. Why do you think Lisp was meant to be interpreted instead?
No reason to leave a mistake (if it was one) or a confusing statement (if it was meant in your, hah, interpretation) unaddressed.
> No reason to leave a mistake (if it was one) or a confusing statement (if it was meant in your, hah, interpretation) unaddressed.
Look buddy, I'm not here for snarking others. I am here to learn and exchange ideas.
Well, I literally said in my post that basically all Lisp was compiled. And I was replying to a guy saying that I thought all lisp is compiled. So hopefully I'm not contributing to that misconception.
Delaying the publication of key papers in major journals until 1960, and loudly mentioning Lisp compilation as the first application of Lisp, didn't help; too late!
> The first interpreted high-level language was Lisp. Lisp was first implemented by Steve Russell on an IBM 704 computer. Russell had read John McCarthy's paper, "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I", and realized (to McCarthy's surprise) that the Lisp eval function could be implemented in machine code.[3] The result was a working Lisp interpreter which could be used to run Lisp programs, or more properly, "evaluate Lisp expressions".
So I don't think I'm over my skis here. But I appreciate your clarifying point! I've not read the Lisp 1.5 manual but I probably should!
In other words, before there was an interpreter, a manual compilation step already took place with Lisp being translated to code. Several years later, they had code doing that, and it was mentioned in the 1960 paper "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I":
> The LISP programming system is a system for using the IBM 704 computer to compute with symbolic information in the form of S-expressions. It has been or will be used for the following purposes:
> 1. Writing a compiler to compile LISP programs into machine language.
> 2. Writing a program to check proofs in a class of formal logical systems.
> 3. Writing programs for formal differentiation and integration …
> 4. [...]
Conceptually, the specification of EVAL is a kind of term-rewriting system which indicates what is to be calculated from what, without asserting how.
So just to be clear, you are here confirming that the first implementation of Lisp was in fact an interpreter?
I would say in my experience we do actually "compile and execute" code, we can just do this incrementally and with less context switching because of the described workflow. But quite often there are in fact separate compile and run steps, it's just not at the whole program level (say, compile a function and run it or a calling function).
And despite how often it's shown off as a strength, redefining code during actual execution isn't quite that common, I think. Yes, it is done sometimes, but lots of programs don't really fit that paradigm in the first place. It can work well for e.g. some games or long running servers.
As for working in an image without source code: this seems like a terrible idea. You might do this for trivial, one off experiments, but in general you benefit from writing out and organizing your code early. I'm not even aware of a particularly easy or clean way to write out source code from an image as described. It could be done, but all the ways I can think of sound like more of a pain or mess than anything. Could just be my experience or I'm missing some neat feature of a commercial Lisp or something.