Live data from Hacker News

Why Lisp?

nyxt.atlas.engineer

31–40 of 339 posts

Re: Why Lisp?

#31
post #8

> When you have a running program you can compile functions, redefine classes, etc. all while the program is running. You are changing the internal state of the image. This can surely be convenient in certain cases, however most of the times I find myself playing around with unit tests rather than with a single running process. Unit tests are small and fast so I don't even notice any inconvenience with the traditiona…

I work with clojure and test driven development is not nearly as productive as repl driven development imo.

There's a place for both even with a REPL I think. Sometimes when I'm tracking a bug down or writing a new function against an old one, I find that I'm writing little one-off functions or worse, replicating a function body line by line in a let block to simulate arguments. Once I opened up a project and realized I wanted one of them, but it was lost when the REPL closed. I literally got as far as opening another file to stow these little utilities before I realized I had reinvented bargain-bin testing.

My dream is still to come up with some ergonomic way of blending the two. I want to have tests written, but swap out the thing they test live in the REPL. Or register new one-off tests from the REPL for things I don't think will be useful once things are set in stone. I've heard one of the several billion testing frameworks for common lisp does something like this, but I haven't checked it out yet.

Re: Why Lisp?

#32
post #24
post #13

Earlier quoted context omitted.

Arm, AMD, and Intel are using a Common Lisp application called ACL2 to formally verify their main products. Google Flights' core is written in Common Lisp. It's far from dead.

If you can enumerate some projects using it, and even more so, if you need to, then it's much closer to dead than alive. It's like saying "The Vatican still uses latin, it's not a completely dead language".

probably not the best example because both the Catholic Church and Latin are likely still going to be around when all of us, most programming languages, companies and probably countries are in the dust

peak popularity in the in a domain where most things have a half life of less than 20 years isn't a good indicator for longevity.

Re: Why Lisp?

#33
post #8

> When you have a running program you can compile functions, redefine classes, etc. all while the program is running. You are changing the internal state of the image. This can surely be convenient in certain cases, however most of the times I find myself playing around with unit tests rather than with a single running process. Unit tests are small and fast so I don't even notice any inconvenience with the traditiona…

I work with clojure and test driven development is not nearly as productive as repl driven development imo.

I think that is the reason jupyter is as popular as it is.

Re: Why Lisp?

#34
post #23
post #8

> When you have a running program you can compile functions, redefine classes, etc. all while the program is running. You are changing the internal state of the image. This can surely be convenient in certain cases, however most of the times I find myself playing around with unit tests rather than with a single running process. Unit tests are small and fast so I don't even notice any inconvenience with the traditiona…

> Unit tests are small and fast so I don't even notice any inconvenience with the traditional compilation approach. Depends on the programming language, how much state they need to build up, and so on. And they're still slower than just running the actual live code anyway.

Possibly, but the unit tests are reproducible, committable code. They're like Dockerfiles for your REPL session.

Re: Why Lisp?

#35
post #8

> When you have a running program you can compile functions, redefine classes, etc. all while the program is running. You are changing the internal state of the image. This can surely be convenient in certain cases, however most of the times I find myself playing around with unit tests rather than with a single running process. Unit tests are small and fast so I don't even notice any inconvenience with the traditiona…

I work with clojure and test driven development is not nearly as productive as repl driven development imo.

I'm often wondering how to couple both. Explore freely, extract more invariants and constraints as types/tests. Iterate.

Re: Why Lisp?

#36
post #24

Earlier quoted context omitted.

If you can enumerate some projects using it, and even more so, if you need to, then it's much closer to dead than alive. It's like saying "The Vatican still uses latin, it's not a completely dead language".

probably not the best example because both the Catholic Church and Latin are likely still going to be around when all of us, most programming languages, companies and probably countries are in the dust peak popularity in the in a domain where most things have a half life of less than 20 years isn't a good indicator for longevity.

That's true for the Machu Picchu too. Not exactly a lively city though.

Re: Why Lisp?

#37
post #13

> On the other hand, Lisp code written some 30 years ago will most of the time, without issue, work on a modern Common Lisp implementation. Yeah, just like Perl. Or Latin. No one uses them, these are dead languages that belong to a museum. It can be fun to study them and you definitely should if you want to be well-educated and know the history behind the modern world, but that's it.

Arm, AMD, and Intel are using a Common Lisp application called ACL2 to formally verify their main products. Google Flights' core is written in Common Lisp. It's far from dead.

I wish ITA did some talks because I assume their experience of CL is very different from most. Even at the project management layer, they have deep serious constraints.. it's not just a simple product.

Re: Why Lisp?

#38
post #27
post #8

> When you have a running program you can compile functions, redefine classes, etc. all while the program is running. You are changing the internal state of the image. This can surely be convenient in certain cases, however most of the times I find myself playing around with unit tests rather than with a single running process. Unit tests are small and fast so I don't even notice any inconvenience with the traditiona…

One never notices the inconvenience of not having something one is unaware of. This is the biggest challenge for answering “why Lisp?” It’s different enough from the programming that most people are used to that it rises to the level of a radical novelty, with all the explanatory difficulties that entails. In fact, it’s a defining characteristic of the radical novelty that it can only be understood experientially. An…

It's possible that you have experienced an enlightenment that I have yet to, but ultimately I like lisp because parenthesis are pretty, I hate remembering syntax, keywords/symbols are nicer than immutable strings, and typing out commas makes me sad (not that you'd know it from the way I abuse them in this comment).

I mean, lots of languages have REPLs now- people get that they're really useful! This isn't secret knowledge, the pros and cons are on display. Macros are nice (though of course Ruby has them too), but I'm always surprised by how far people get with method call chaining (hell they have monads over in JS land now). The experience of writing lisp is very similar to that of writing Ruby, or even Javascript- really any dynamically typed language with good enough lambda support. It's by no means as strange as an array or concatenate language. It would surprise me very much if the reason you and I like lisp, or other people don't like lisp, was anything other than taste!

Re: Why Lisp?

#39

i cant even install this program on my system because of common lisp’s insane dependency management so count me as unconvinced

> this program

What program are you talking about?

The article is about Common Lisp, but perhaps you are talking about the Portacle setup mentioned in the article?

Or is this just a general snipe at CL? Is it a problem to use QuickLisp [1]? Or are you talking about deeper problems.

I think you could have something useful to say here, but I don't think that post conveys it.

[1] https://www.quicklisp.org/beta/

Re: Why Lisp?

#40
After learning Python, I wanted to take the next step and find what was better. I looked into a lot of languages reading books on Haskell and Lisp and many others. At least for my use cases (desktop scripting, numerical work... etc) I didn't find Lisp to be superior. Most of what I actually needed to do could be done simpler in Python. Python's REPL isn't near as good as CL, but it's good enough. Then the batteries included was huge. So practically any task I could whip something up pretty quick. There are definitely some areas where Lisp is obviously superior to Python such as performance of plain code or things such as grammarly that would've likely been harder in python. I just think for the vast majority of programmers, enough good parts were pulled from lisp.
Post reply on HN