Live data from Hacker News

The Liberating Experience of Common Lisp

ds9soft.com

11–20 of 126 posts

Re: The Liberating Experience of Common Lisp

#11
Having programmed professionally in 36 languages, I must agree with this. I am having so much fun with Lisp, that I am not likely to go back.

> Often developers say how you can make a mess of a Common Lisp codebase because of such freedom it provides. But isn’t that the same with any language?

There is a story about the code behind the terminal interface for Tops-10 for the PDO-10. It had been tweaked over the years adding various features, such as using control-T to see what was happening in the running program. Many attempts were made to rewrite it, but it was so intertwined, that whoever tried fixing it gave up.

Three things are killer features for me with the slime+emacs running sbcl. First is that you can see the underlying source for anything down to the lisp implementation, e.g. the definition of 'macrolet'.

The second thing is if there is an error, it displays the stack with the ability to see what the local variables are in any function on the stack.

The third thing is that one can patch a running program, either once a breakpoint ('break) is encountered, or by doing control-C at the repl. And then resume it.

It is also fun that SBCL is unreasonably fast. It compiles itself in 2m15s. I am pretty sure that gcc/clang/llvm take longer than that and also likely Rust.

I have developed a habit of using s-expresions for lots of things, such as configuration files, and web page representations. I blame paredit and lisp for this tendency. See https://github.com/wglb/configuration-r

Re: The Liberating Experience of Common Lisp

#12
Apologies for donning my grumpy old man hat.

I like CL as much as the average dev who's dabbled with it on weekends but can't find anyone to pay me to use it, but...this essay really adds so little to the conversation about it. There's not an awful lot explicitly wrong in it per se, but people have been writing these little puff pieces on their blogs about Lisp for (at least) twenty years now. This checks all the usual boxes: "it's so powerful and liberating", "working in an image on a living system is amazing once you try it you'll see", "critics are wrong you can write unmaintainable code in any language", etc.

OP hasn't even really used Lisp in anger, yet: "my next project is being built with it". I'd be much more interested in seeing a postmortem after that - "Ten Years Building a Major Piece of Software in Lisp" - with some actual self-reflection, rather than just a regurgitation of the usual talking points.

Re: The Liberating Experience of Common Lisp

#13
> How long before Copilot is able to write all the code any Go developer now writes by hand?

A long time ago I read someone saying "Lisp is the only language where I spend more time thinking than typing". Recently, when I was telling ChatGPT what logic I wanted written on what data structures, I realized the same was true about having an LLM write any other language.

Re: The Liberating Experience of Common Lisp

#14
post #2

I can relate. I read Graham's book on Common Lisp more than 20 years ago and was entranced. But opportunities to use it in the day job are few and far between, and I would have qualms about recommending it, in most contexts. For a lot of purposes, its libraries are just nowhere near as good as Python or JavaScript or Java. And some of its superpowers (macros!) can also be used really, really badly. There was an essay…

> Lisp being a "language for smart people"

But doesn't autocad have lisp as a language behind the scenes and I would guess that autocad is used by folks who aren't full-time programmers?

Also, I always found a way to use lisp, even when I was CSO. But admittedly these were side projects.

Re: The Liberating Experience of Common Lisp

#15
post #12

Apologies for donning my grumpy old man hat. I like CL as much as the average dev who's dabbled with it on weekends but can't find anyone to pay me to use it, but...this essay really adds so little to the conversation about it. There's not an awful lot explicitly wrong in it per se, but people have been writing these little puff pieces on their blogs about Lisp for (at least) twenty years now. This checks all the usu…

> OP hasn't even really used Lisp in anger, yet: "my next project is being built with it". I'd be much more interested in seeing a postmortem after that - "A Reflection of Ten Years Building a Major Piece of Software in Lisp" - with some actual self-reflection, rather than just a regurgitation of the usual talking points.

I should probably write that post, though about "a Lisp", not strictly about Common Lisp. I've been using Clojure to make a living for the last 10 years or so, quite successfully and I can't see anything else that would fit my needs better. I came to Clojure from Common Lisp.

Re: The Liberating Experience of Common Lisp

#16
post #7

Two books, for beginners and experts: - A Gentle Introduction to Symbolic Computation. Get both the book and the figures. https://www.cs.cmu.edu/~dst/LispBook/ Paradigms of Artificial Intelligence Programming https://github.com/norvig/paip-lisp https://unglueit-files.s3.amazonaws.com/ebf/59f74a93bbc1435c... Get SBCL as the compiler/interpreter, it's the fastest FLOSS one. Portacle has everything to begin with minus t…

This is cool.

Re: The Liberating Experience of Common Lisp

#17

Lisp really is an eye-opening experience when learning to structure programs and computations. Stumbling on Lisp in college was a fascinating experience for me in particular because I had been raised around C++ and Java, and my programming life up to that point had been a struggle understanding how to abstract a program into objects and how to build those objects' interfaces. Once I started down the path of functiona…

> Maybe because it's easy to decouple data from operations on that data, even if stateful You can use objects in C++ and Java without mixing code and data (by having data-only and code-only classes for example). I haven't fully read it, but there's a book from a clojure developer about about this: https://www.manning.com/books/data-oriented-programming The book itself uses Java, not Clojure.

I know Java programmers use static-method classes, which are just like modules in newer languages. Which just further illustrates the point. It's a hack on top of a language that requires everything to be defined inside of a class. That layer of abstraction on top of things that could be much simpler kills understanding. It massively complicates answering the question "What even is a class?" for a learner. I also realize C++ has simple structs, and classes can be avoided entirely, but that's definitely not the way the language is taught.

Maybe I needed to "git gud", but learning Lisp enabled a career building valuable products currently in production. Java and C# were a roadblock on the way to my current productivity.

Re: The Liberating Experience of Common Lisp

#18
post #12

Apologies for donning my grumpy old man hat. I like CL as much as the average dev who's dabbled with it on weekends but can't find anyone to pay me to use it, but...this essay really adds so little to the conversation about it. There's not an awful lot explicitly wrong in it per se, but people have been writing these little puff pieces on their blogs about Lisp for (at least) twenty years now. This checks all the usu…

Blog post author here: True. But there's no reason not to write when you are in anger about other languages that you do use every single day. I guess I was just venting and also reaffirming my intention to use CL. I have used it before in a previous job for a quick tool and I know it can be used for more complex stuff, which I have already started building.

I haven't been writing a major piece of software in Lisp for 10 years, so I can't write about that. But I can compare how it feels to write software in other languages vs Common Lisp.

And also, Lisp is a blip compared to Rust or Go right now, so I don't know why it's so terrible to talk about it. People will keep talking about the things they like as much as the things they don't like. And it's fine.

Re: The Liberating Experience of Common Lisp

#19

Lisp really is an eye-opening experience when learning to structure programs and computations. Stumbling on Lisp in college was a fascinating experience for me in particular because I had been raised around C++ and Java, and my programming life up to that point had been a struggle understanding how to abstract a program into objects and how to build those objects' interfaces. Once I started down the path of functiona…

The OO patterns are still quite popular in enterprise software, where people mostly work in large teams. Hiding implementation details is terribly annoying for a single developer, but can be a great way to reduce complexity for other team members.

The same consideration applies to other powerful constructs, such as static typing, garbage collection, operator overloading, and macros.

Whether you work alone or in a team can significantly influence how one appreciates such features.

Re: The Liberating Experience of Common Lisp

#20
post #2

I can relate. I read Graham's book on Common Lisp more than 20 years ago and was entranced. But opportunities to use it in the day job are few and far between, and I would have qualms about recommending it, in most contexts. For a lot of purposes, its libraries are just nowhere near as good as Python or JavaScript or Java. And some of its superpowers (macros!) can also be used really, really badly. There was an essay…

I write Go for a living. I run Emacs. I read the first part of the article, thinking about how Lisp used in a personal project makes so much sense because you can build the meta-language to your liking and not make something so weird you confuse your coworkers --

and then I got to the section on Go and I thought wow! This guy really doesn't get it!

>On average, most shops have average people

Yes, hello, that's me! I don't want to figure out some genius's Lisp code. Instead, Go forces the geniuses to write code that I can understand.

>There was an essay about Lisp being a "language for smart people" that captured some of what would give me pause

I think about this a LOT. There is a LOT of this blindness in software philosophical thinking. Just look at FOSS: everyone should be able to view and edit source code. Well that sure made a lot of sense when "everyone" was MIT students because they were Richard Stallman's audience.

But it stops making sense to expect users to inspect source code when users aren't all MIT students. Likewise, use your smart person language on your personal project -- I'm sure it's great. I'll keep using the dumb people language.

And get replaced by an LLM, I guess. But if an LLM can generate Go code (like the author surmises) and not Lisp then it might as well just emit machine code and put us all out of work so I don't know why he thinks Lisp is a moat

Post reply on HN