News for hackers. Stuff that matters.
Re:A curmudgeon tries a language server by dieggsy on Wednesday August 26, 2026 @10:06AM (#49449466)
As a Common Lisp developer, the intro about Lisp strikes me as sort of mostly(?) true.

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.

Re:A curmudgeon tries a language server by jerf on Wednesday August 26, 2026 @10:54AM (#49450255)
I haven't used Lisp but I've used another environment that was heavily image based (Frontier). The runtime ability to modify things sounds super neat but in my opinion it leads to disaster. It is not a weakness that we have a lot of tech built on a concrete specification of the initial state of the system and very careful control over where data and the modified versions of that data live. It is hard-won experience that it is a good way to build robust systems. "Reboot & pray" isn't just an accident, it's a legitimately good way to set up a system.

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.

Re:A curmudgeon tries a language server by dieggsy on Wednesday August 26, 2026 @11:59AM (#49451384)
I don't object to any of this. "Restart this system from initial state" is quite a bit more common than people imagine in CL. I was hinting at it perhaps being even more common than image-based development, though don't quote me on that. I personally don't even really create Lisp images in dev (save for creating executables that I don't then further modify, which are technically images in SBCL).

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.

Re:A curmudgeon tries a language server by sroerick on Thursday August 27, 2026 @04:04PM (#49470456)
Can you explain how you sync back to code, in practice?

In other words - if you modify the run time, are you then able to mirror those changes in your codebase and then reboot?

Re:A curmudgeon tries a language server by dieggsy on Thursday August 27, 2026 @08:26PM (#49472967)
tl;dr you just don't really do that.

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.

Re:A curmudgeon tries a language server by Zak on Wednesday August 26, 2026 @12:11PM (#49451569)
I also found the description of Lisp development weird, as if it's a second-hand repetition of someone else describing watching a Lisp developer in action.

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.

Re:A curmudgeon tries a language server by meindnoch on Wednesday August 26, 2026 @12:13PM (#49451599)
That intro would make much more sense if you replaced "Lisp" with "Smalltalk".
Re:A curmudgeon tries a language server by rjsw on Thursday August 27, 2026 @01:39PM (#49468412)
Even the original MIT Lisp Machine was designed around editing source files, there were "compile the current function" keybindings and menu options in the version of Emacs for it.

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.

Re:A curmudgeon tries a language server by sroerick on Thursday August 27, 2026 @04:05PM (#49470474)
Awesome. Got any more info? Were any of the Lisp Machines image based?
Re:A curmudgeon tries a language server by rjsw on Friday August 28, 2026 @08:53AM (#49477816)
Interlisp-D was more image based.

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...

Re:A curmudgeon tries a language server by sroerick on Thursday August 27, 2026 @04:02PM (#49470433)
I am not a Lisp developer by trade, but I accidentally made an interpreted Lisp as a habitat for LLMs. My research has mirrored exactly what you are saying.

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.

Re:A curmudgeon tries a language server by Jtsummers on Thursday August 27, 2026 @04:25PM (#49470719)
> I think conceptually, Lisp was an interpreted runtime.

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?

Re:A curmudgeon tries a language server by yubblegum on Thursday August 27, 2026 @06:29PM (#49472123)
You are ignoring his "conceptually" bit and that is a reference to R.E.P.Loop which is what interpreters do: they read, they evaluate, they output, and loop.
Re:A curmudgeon tries a language server by Jtsummers on Thursday August 27, 2026 @06:41PM (#49472220)
Conceptually is doing a lot of heavy lifting there, then. The evaluation step of many (I won't say most) mainstream (not academic, and not toys people create in class) lisps will do a compilation step. It is not being interpreted any more than gcc interprets your C code. Describing it as interpretation is often wrong, and leads people to the extremely common (even here on HN) mistaken belief that Lisps are strictly interpreted and never compiled.

No reason to leave a mistake (if it was one) or a confusing statement (if it was meant in your, hah, interpretation) unaddressed.

Re:A curmudgeon tries a language server by yubblegum on Thursday August 27, 2026 @07:21PM (#49472531)
Disagree. Concepually is lifting according to its weight class here. It is entirely irrelevant whether all or most implementations compile. The germinal fact is that a "naive" interpreter implementation of LISP does not in anyway alter the semantics of the language or the code being executed.

> 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.

Re:A curmudgeon tries a language server by sroerick on Friday August 28, 2026 @12:38AM (#49474439)
> Describing it as interpretation is often wrong, and leads people to the extremely common (even here on HN) mistaken belief that Lisps are strictly interpreted and never compiled.

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.

Re:A curmudgeon tries a language server by kazinator on Friday August 28, 2026 @02:40PM (#49482692)
Between 1958 and 1960, it took them a good part of two years to get a compiler going. Little did they know that this costly delay would still have people saying that Lisp is fundamentally interpreted in 2026.

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!

Re:A curmudgeon tries a language server by sroerick on Friday August 28, 2026 @04:24PM (#49483765)
This is just the Wikipedia page for "interpreters" so perhaps this is fake news but

> 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".

Re:A curmudgeon tries a language server by kazinator on Friday August 28, 2026 @05:00PM (#49484196)
I.e. his realization that the Lisp eval function would behave as an interpreter came at the same time as his realization that the Lisp specification of the eval function can be translated to machine language. Though he did that by hand, within a short time, they had code doing that.
Re:A curmudgeon tries a language server by sroerick on Friday August 28, 2026 @12:37AM (#49474430)
Hey, I'm probably punching out of my weight class here - I'm basically a Lisp beginner. But I will say that I don't think the manual for Lisp 1.5 gets as much airtime as the original John McCarthy eval statement, which does describe an interpreter. I do think there's a lot of conceptual overlap between an interpreter and a REPL. And while I've not read SICP my understanding is that they teach a Lisp interpreter. And also I think the author of this article is describing an interpreted language.

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!

Re:A curmudgeon tries a language server by kazinator on Friday August 28, 2026 @02:38PM (#49482669)
EVAL was described in Lisp, on paper first. Steve Russel realized that the Lisp specification of EVAL can be translated to machine language to produce an interpreter. So he did exactly that, by hand, surprising MacCarthy who had only expected his EVAL to be a reference specification, not source code.

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.

Re:A curmudgeon tries a language server by sroerick on Friday August 28, 2026 @04:29PM (#49483831)
> Steve Russel realized that the Lisp specification of EVAL can be translated to machine language to produce an interpreter.

So just to be clear, you are here confirming that the first implementation of Lisp was in fact an interpreter?

Re:A curmudgeon tries a language server by kazinator on Friday August 28, 2026 @05:00PM (#49484206)
The first implementation of Lisp was Steve Russel, hand-translating Lisp written on paper to machine code.