Hacker News new | past | comments | ask | show | jobs | submit login

Not the OP but would somebody be able to summarize HOW are the lisp REPLs different then to me? I've written limited amount of clojure and common lisp just to play around and I don't recall any difference between Clojure REPL and the REPL I get for say Kotlin inside IntelliJ idea.

Maybe the ability to send expression from the IDE into the REPL with one keybind but I cannot say it's not possible with the Kotlin one right now because that's not what I use it for.




Watch this video on Lisp interactive development approach. I've recorded it especially to answer the question:

https://www.youtube.com/watch?v=JklkKkqSg4c


Thanks, I forgot about this aspect of live program editing. Whether or not it's possible (or how close just quick live reload) is to this it' definitely not a first class citizen like you presented. It also reminds me of Pharo (or maybe just smalltalk, I've only played with Pharo) where you build the program incrementally "inside out".

It does make me wonder how aplicable this way of programming is to what I do at work but that is more because of the technologies and architectural choices where most of the work is plumbing stuff that is not local to the program itself together. And maybe even for that with the edges mocked out it would make sense to work like this.

Again, interesting video that made me think. Thanks.


Yes, Smalltalk/Pharo also support this.

Being able to interactively update code in response to an error, without leaving the error context and being able to restart stack frames (not just a “catch” or top level, as in most languages) is one of the key features that makes REPL-driven development possible. Or at least that’s how I see it.

It’s not something you always need to use, but it can be handy, especially for prototyping and validating fixes.


There's a person above saying that it's about being to able to mutate program state from the repl, which is a thing that's also possible in any repl for a language with managed memory.


Not just from the REPL, but from the REPL in the context where the error occurred, without having to structure the code ahead of time to support this. It’s not always an important distinction, but it’s handy when prototyping or if the error is difficult to reproduce.

There are some other affordances for interactive programming, such as a standard way to update existing instances of classes. I’m sure you could implement this sort of functionality in any language, but this is universal and comes for free in Common Lisp.

CL also has other interesting features such as macros, multiple dispatch, compilation at runtime, and being able to save a memory snapshot of the program. It’s quite unique.


Cl Condition system + repl = godmode. Your software crashes? Do you go back and set a breakpoint? No, because you’re already in the stacktrace in the repl exactly where the crash occurred. You fix the code, reload it, tell it to ether run where it left off, or restart from an earlier point.


Flask and Django have the exact same functionality - I've already said that this thing you guys keep talking is just a matter catching exceptions.

https://flask.palletsprojects.com/en/2.3.x/debugging/

https://docs.djangoproject.com/en/dev/ref/settings/#debug


That is definitely not the same. I write a lot of python code and the interpreter / interactive development is just not as good as it is in Common Lisp.

To my knowledge there’s no real “mainstream” language that goes all in on interactive development. Breakpoints and traceback are all perfectly cromulent ways to debug, but it’s really not the same, sadly.


exceptions unwind the stack in all languages I know except in CL


and Smalltalk ;-)!


good to know! but the point still stands :D


The fact that I’ve never seen a CL lover who can explain this adequately is quite concerning in itself




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: