Ask HN: Why is everyone here so obsessed with Lisp?


Many comments mention the merits of Lisp. That’s all well and good, but I think they miss the largely historical reasons that Lisp is so popular here:

Paul Graham wrote Ansi Common Lisp and On Lisp. Both are great books and were used in university courses in the 90s and 00s.

Paul Graham cofounded a startup called Viaweb, implemented in Lisp, that sold to Yahoo.

Paul Graham wrote a bunch of essays about tech startups at paulgraham.com. These essays frequently extolled the virtues of Lisp and other high level languages, citing it as a major factor in Viaweb’s success.

Paul Graham, in his essays, strongly encouraged skilled, motivated programmers to build startups instead of working at large companies.

Paul Graham created Y Combinator, betting his time and money on the growth of startups that he predicted and promoted, popularizing startup incubators in the process.

Paul Graham created Startup News when Reddit started going mainstream, predating the existence of subreddits. Startup News provided a real-world application to inform the design and development of Arc, a Lisp language.

Paul Graham renamed Startup News to Hacker News. And here we are.

===

As someone who has been here for 12½ years, I view the Lisp sentiment as echoes of HN’s past, inextricably linked to the Lisp enthusiasm of HN’s founder: Paul Graham.

While I agree with many comments here that Lisp is a language worth learning, I think they miss the mark as to why Lisp continues to come up on Hacker News. The majority of the original Startup News members were Lisp enthusiasts.


…and wrote a couple of classical common lisp books. He has obviously contributed a lot to HN’s culture.

I personally found out about both reddit and HN by means of deeping further into lisp in the internet, beyond his “ANSI Common Lisp” book which I used in university.


That essay sent me down the functional language paradigm. I never did a lot of lisp but have done a lot of Haskell since.

I don’t get to do near as much these days, but the lessons I’ve learned have made me a better developer for sure.

Type safety and pure functions make debugging and refactoring an entirely different beast


It’s elegant. It’s (relatively) easy to write a basic parser. LISP code is readily expressible in the same basic data structures provided in the language so you get meta programming almost for free and thus extending LISP is (relatively) easy too. Whereas C feels like an abstract machine language, LISP feels like an abstract ‘mathematical computation’ language. It’s, like all languages, a different way of thinking about computation in the same way that human languages also seem to be (at least marginally) different ways of representing or expressing thought.

And once you’ve come to appreciate it, jokes like “HAVE YOU READ YOUR SICP TODAY?” will be funny to you.

In terms of ‘getting shit done’, it’s not so ‘good’, not that one can’t get shit done with LISP, but that it’s not necessary nor, given all likely real world constraints, particularly that much of, if at all, an advantage relative to other (families of) languages.

It’s also historically important so there’s a benefit in knowing about it and being familiar with it too. And knowing the history helps understand why people still love it, even as a lot of what was once unique or special about it can be found much more widely.


Lisp is like the Latin of programming languages. Powerful, archaic, well-thought, elegant, venerable.


In what way is Latin powerful, compared to other languages? Or elegant?

I’ve had to learn a little Latin, because it’s the root of half the English language, and I would not describe it this way at all. It’s overly complex and arbitrary. The https://en.wikipedia.org/wiki/Latin_spelling_and_pronunciati… article is full of tables of exceptions. Over its lifetime, they not only couldn’t agree on pronunciation, but whether it had lower-case letters, whether to put spaces between words, or which direction to write it.

C is Latin. It’s revered because of its age and the the works written in it. It was in the right place at the right time. half the world who came after tried to make their own improved version, and those improved versions are the languages that are actually popular today.

What spoken language is powerful and elegant? When I was in college, a friend was taking a language (I think it was Swahili but don’t quote me on that) that was so simple students learned all of the grammar in the first semester. Everything after that was just learning vocabulary and getting comfortable with it. Turkish has a completely 1:1 mapping of letters to sounds, and perfectly regular conjugation. Korean also has an extremely consistent writing system. Any of those seem more Lisp-like to me than Latin.


> a language that was so simple students learned all of the grammar in the first semester.

Natural languages tend to be similar in complexity, which tends to increase to the bounds placed by a child’s ability to learn. Languages with simpler grammar often have eg. more complex phonetic systems. For instance, mandarin is “simple” in that it doesn’t have conjugations or tenses, but it’s complex in that it has tones. Likewise, Turkish has vowel harmony.

> Korean also has an extremely consistent writing system.

Not only that, but the gylphs actually represent the mouth movements necessary to make the sounds. It’s like that because Hangul is a relatively new writing system that was designed with discoveries in linguistics in mind, unlike English and French that have things like vestigial spellings (eg. “through”). So I’d say that Korean would be like an up-and-coming like, uh… Rust. Of course, writing systems aren’t really part of a language itself: you can write any language in IPA.


I think the general consensus is that it’s great for “getting big shit done” – in other words, it’s hard to beat for creating large, complex programs, but relatively crap for scripting or smaller tasks. I’m still kind of amazed how difficult it is to create a Lisp program that isn’t hundreds of MB in size.


Most of the Schemes (Chicken, Gambit / Gerbil, Chez, Racket at least) have a way of distributing executables that are small.

I’ve used Chicken in the past to create static binaries that were on the order of hundreds of kilobytes.


> I’m still kind of amazed how difficult it is to create a Lisp program that isn’t hundreds of MB in size.

That’s not true IME. No doubt SBCL binaries are large, but they start around 70 Mb and grow from there. The growth depends partly on how many shared libraries are loaded when the image is created. Commercial Lisps are supposed to be better, but I haven’t used them so I can’t really say.

For smaller tasks SBCL (and possibly others) support scripting using a “shebang line” of “#!/usr/bin/sbcl –script”.


Sure, I’m not saying these things can’t be done, just that you get the distinct feeling that it isn’t how Lisp was made to work. I might have been exaggerating about size, but 70 Mb is pretty damn big for a program that might not do all that much! I haven’t ever used commercial Lisps, either.


One thing not mentioned in the current set of responses is the REPL style and interactive coding style that you can have with a LISP that is different than what a traditional compiled language gives you in the edit-compile-run-edit loop or a dynamic language gives you in the edit-run-edit loop. When you are using a REPL you can poke and push at any part of the system like a debugger but the system is still alive. Without that interactive nature sometimes you end up doing print/debugger work to understand some quirk of a datastructure but in a LISP/REPL it’s plainly visible and you don’t have to think about it.

If it’s integrated with an editor you can load functions or different versions of the function and see how each work with live data, you can slurp new data in, and all sorts of flexible dynamic things that let you find the program you want (which always helps when using third-party or unfamiliar code). This is more a feature of all kinds of REPL languages and not wholly specific to LISPs.

One of the basis of a LISP/Scheme language is that it is constructed of very few basic primitives that are assembled into a greater system and that greater system is part of your program instead of being things you don’t touch (like libc), and you are (generally) welcome to touch them, alias them, or manipulate them to help your goal and program. This allows things like being able to temporarily hook a function call to add some debug information and then unhook a function call via a REPL and carry on. I find that pointing to people to r5rs https://schemers.org/Documents/Standards/R5RS/HTML/ and focusing on sections 4, 5, and 6 help show off how little is required to describe the basics of the language.


I am not a programmer by profession, so I can chose my own poison. Scheme is just too much fun! I never liked python,ruby,c# etc. What scheme gave me was a smallish set of well-chosen primitives that compose well. Simple syntax together with macros so that I can abstract away any boilerplate that any eventual language designer forgot to foresee in a way superior to any other language. Lisp macros really are superior. I know enough haskell to know that “we don’t need macros because we have typeclasses/an expressive typesystem/template haskell” is only a half true.

Guile scheme is my scheme of choice. Not the fastest scheme (that would be chez), but it is a bliss to write things in.

I have this idea that if you are a “programming language searcher” that can never really be satisfied with what they have you either end up in the ml camp or in the lisp camp. I myself would love a lisp/ml lovechild, which is why I am following hackett closely!


Ooh man this thread will be very interesting.

It would help to get a better idea of your current context with regards to programming. What’s your experience so far? That will help frame the discussion.


I’m a software engineer that mostly works on the front end of things, but from school and various jobs I have experience in:
C, C++, Python, C#, Java.

Mostly object oriented (distributed systems and game dev), and some embedded development.


I’m not a Lisp programmer, and I probably never will be, but I respect the language and here’s why:

As Alan Kay said, Lisp is the “Maxwell’s equations of software” https://queue.acm.org/detail.cfm?id=1039523

> These were “Maxwell’s Equations of Software!” This is the whole world of programming in a few lines that I can put my hand over.

It’s elegant.


Lisp is the red pill to programming. A mind-blowing out-of-the-box experience. An alien technology. — Lisp has a so called “no turning back point”, true lispers cannot bear other dialects after experiencing it. From scientists in underground military bases to rich tech VCs: everyone obeys Lisp here..


Try writing some larger programs in a modern Lisp.

Lisp causes you to think in different ways. It allows for metaprogramming in ways other languages don’t allow. It is endlessly reconfigurable.


> modern Lisp.

I’ve never heard this before. Modern C++ sure, but I thought most of the “modernization” in lisp was done in descendant languages (i.e. racket).


I’m not sure there’s anything now that ‘LISP’ could refer to beyond the family of languages, of which Clojure, Common Lisp, and even Scheme are all ‘modern’ dialects.


Because as a language it has some nice properties that make it conceptually easy to do otherwise complex.

The sad truth is that beside that, it’s severely lacking in real-world-usable libraries, there are a number of implementations with none of them gaining a majority share if users and, last but not the least, a kind of distance from the operating system that make it non-obvious to reason about the usual stuff (“ports” instead fo file descriptors, vm memory dump to disk as a form of binary executable generation, etc etc).

So lisp has some cool things but will never likely become a mainstream language, hence the perpetual hype.


Lisp is a very simple thing that allows you to make very complicated stuff. You can write your own interpreter and then write a program to solve your problem with reasonable effort.

If that bothers you, it could be worse: we could be addicted to FORTH! 😀


> Lisp is a programmable programming language.
— John Foderaro, CACM, September 1991

Often times programming languages are designed with a particular use case in mind. (E.g. JS: web, Perl: scripting, Erlang: telephony, etc.) LISP was made to think about computation, and it acts well as a programming language work with programming.

One of the goals of Racket (a dialect of LISP) is to make it easy to create your own languages.

> Racket is the second best programming language in the world—the first best one is the one you build in Racket.


Lisp is the light saber of languages : an elegant weapon for a more (mumble) age. Blasters and death stars are more effective.

Nobody builds anything important with it, but it feels more pure to build toys with it than more practical languages. Some people make big toys.

Nobody is expected to understand anybody else’s code, so you can indulge any kind of whim, and it is easy to make any whim work well enough. Meanwhile, the mathematical bedrock of computation outcrops more frequently, so that programs can resemble theorems if you like that.


Check out https://xkcd.com/224/ . Many of us Lispers go through this phase where the universe appears to crystallize around Lisp concepts. Like Forth or APL and other languages built around a unifying theory there is a conceptual elegance which is mind-opening. Eventually most of us come back down to Earth but it is a fun ride.

There is also a mystique around the powers of Lisp. I do believe it is a massively expressive and powerful language in the hands of a master. But part of it is historical. During the heyday of Lisp it was the language of choice for the best hackers in the land and certainly was vastly more powerful for individuals/small groups than the existing alternatives. Today that talent base is just spread across so many other choices.


– you can make your own domain specific language in Lisp (e.g. imagine that you want to create a custom ‘for’ statement, or some kind of a new pattern matching operator)

– you can easily write programs that edit themselves


I see both of those things a lot. The problem is if you aren’t already familiar with those idea, the statements mean literally nothing. They basically don’t make sense.


These examples aren’t so far out there. DSLs exist in other languages. Statements exist in other languages. A programmer who has never used macros can imagine being able to create these, even if they have no idea what exactly that would look like in a Lisp program.

That issue is also true of any game-changing technology you haven’t used yet. If you hadn’t used a personal computer, we could enumerate the features and advantages, but you probably wouldn’t be able to truly appreciate it until you used one yourself.


For context, I’m a C++ and Python developer in my day job. I’ve been writing code for about 20 years and create a lot of small projects based on my interests (simple games, 2d/3d graphics, automation, web services, algorithm exploration, etc.). In the past I would use C++, Python, Ada, Haskell, and Ruby for those projects, as well as briefly looking at OCaml, Prolog, Mercury, Dylan, Nim, and some others.

For the past few years I’ve been using Common Lisp (almost) exclusively for these projects, and even some scripting at work. I have a couple projects in QuickLisp (a latitude/longitude <-> UTM converter and an STL file reader), I help maintain st-json (though I’ve only merged one changeset ;-), and I’ve written bindings to Blend2D and ZBar (both on GitHub but not in QuickLisp yet).

For me, Lisp hits a sweet spot between high level features, performance, and interactive development that I haven’t found in any other language.

Here are some things I like about it:

* Interactive development

The Common Lisp mode for Emacs is fantastic. There’s a REPL in the editor and it’s super easy to send code back and forth. It’s very convenient to play with a function as you’re writing it – it’s like an interactive unit test. When the function’s working, the test code can be copy/pasted from the REPL into the unit tests.

Code navigation is also great. Alt-. will jump to the source code for the function under the cursor, and since SBCL and all of the libraries I use are open source, it works for everything, even things that would be language keywords in other languages.

Other languges have REPLs, but Lisp emphasizes it much more than the others. Haskell and Python have REPLs (ghci and Idle) but it’s rare for software written in them to include a REPL, shipping Lisp software will often have a REPL available – I can connect to the StumpWM REPL, for example.

* The syntax

Some people get hung up on the parenthesis, but I like them. The syntax is consistent, it’s easy to indent, it’s easy to navigate in the editor, and there aren’t punctuation marks all over the place.

* High level with good cross-platform performance

I’m too lazy to post evidence right now, but IME unoptimized Common Lisp is 15-20x faster than Python using the same algorithm, and maybe 1/2 – 1/10 the speed of C or C++.

With simple optimizations (adding type/function type declarations, etc.) the Lisp code can be 30-50x faster than Python, and near the speed of C++. Usually the optimized Lisp is almost exactly the same as the slower code, but has a few type declarations and (declare (optimize (speed 3))) added in.

* Libraries and Community

The CL community is pretty small, and most libraries are created by people scratching their own itch. They’re not always perfect, but they’ll usually get the job done. If not, most maintainers are happy to get pull requests. I personally like that, but it may not work for people who want “off the shelf”, supported libraries that work in every situation.

I’ve found the community generally helpful and easy to work with. Getting libraries added to QuickLisp is quick and easy.

Interfacing with C code is really easy. For small libraries or a function or two using CFFI is dead simple. For larger projects cl-autowrap can wrap whole libraries easily – it uses llvm and clang to autogenerate the entire binding.

* Lots of books and references available

Lots of smart people (Guy Steele, Paul Graham, Peter Norvig, etc.) have used and written about Lisp, and there are some really unique and interesting books about it. “The Art of the Metaobject Protocol” and “Let Over Lambda” are two examples that really ighlight what makes Lisp unique.


Well we software developers have the right of a culture of our own, just like plane pilots like to talk endlessly about old war birds, and fly gliders.

For me, Lisp is akin to a Concorde or a P-51, it is not the aircraft of choice today but helped to shape everything that came next.


1. Novelty. We get bored easily at our jobs, and Lisp is different (but not Haskell different), so we’re naturally pulled towards learning about it.

2. Nostalgia. A lot of people here have enjoyed Lisps for years or even decades (myself included) and we have a natural bias towards preferring Lisp-based blogs or articles or projects, partly in the hopes that something is new in the land of Lisp (it never is).

3. Chain effect. When one topic comes up that’s very interesting, people often want to know more about that topic or similar topics. People who want more points are eager to submit related links.

4. Propaganda. Some people have bought into a certain Lisp full-scale, and really want to help spread it in the industry. There’s even a full-time job title for this called “evangelist”.


I personally am not a big lisper, but know others who are. It’s not as cool among young people, but there’s a certain segment of those, mostly over 50, who will swear by lisp and build some pretty cool things in it.

1. It’s got a minimal core and is easy to implement. This means it runs in many places.

2. Very, very easy to extend due to its treating code as data. You can assemble your own language on top of the base you’re given with macros. This is why it’s often recommended for building your first compiler. By the time you’ve written a lisp program, you’re basically writing in a different dialect.

I think some people also use it for a challenge, or to make themselves think. It’s very different from your normal C programming, or OO, or even other functional languages (even though it influenced many of them). There’s a certain family of languages such as lisp, scheme, ocaml, ml, etc. which seem to appeal to those with a more academic bent and so some interesting stuff can be written in them.


Because we are computer scientists, and Lisp allows for the specification of abstract concepts directly and efficiently without syntax getting in the way.

See also: Forth.


Have you tried it, just a beginner tutorial or something? But if you do, please use an editor that puts paired parens in for you automatically, otherwise there’s a risk of thinking that it is painful.


I tried it years ago, but I think I had too little experience to understand the use case back then. I hadn’t ever done any functional programming at that point so it kind of went over my head.

I still hate Haskell. But maybe I would like Lisp? A lot of people here seem to love it so that’s why I made this thread 🙂


OK I’ll have a go, but others will be able to do a better job than me!

Yes, you might like lisp and I definitely think it’s worth trying. You often hear people saying “lisp has no syntax” and that’s one of the main things about lisp. I think a good first step is to understand what people mean by that. You know the way a compiler or interpreter, after tokenizing and parsing, transforms code into an intermediate data structure representation called an “abstract syntax tree”? What they mean is that lisp is like jumping straight in at the AST stage. You’re literally programming with data structures, instead of programming with syntax that gets turned into data structures. People find that a very rewarding intellectual/mental experience. It really teaches you that the words “statement” and “expression” mean different things. And it shows you a way of programming without a lot of “state” — just expressions feeding into other expressions, without as much use of “local variables”. More deeply, this is directly connected with formal ideas in mid-20th century theoretical computer science (in particular the “lambda calculus”) about the minimal programming constructs needed to create a Turing complete language. In lisp it leads also to very powerful and somewhat mind-bending “macros” — since code is data structure, you can very naturally write code to transform code, so the “final” code that is executed is partially the product of an initial execution phase where code is just working on code creating other code.

Having no syntax (or minimal, languages like clojure introduce a bit with square and smooth parens etc) means you basically just write expressions grouped by smooth parens. It’s very beautiful and minimal experience to write. Just, seriously, do it with an editor/IDE that inserts paired parens for you, it promises to be a great experience with that, but without it a lot of people just give up saying why do they have to keep writing so many parens, which is missing the point entirely — The parens are the fabric of the program!


Obsessed? Or you just like it. I think obsession is a bit too strong in this context. I also pretty much like Lisp even though I cannot use it day to day because everybody else works in Java, Python, Go and most developers do not consider any of the Lisp languages production ready.


Obsessed in bashing it? 😉

Really though, the majority of comments I have seen in every Lisp thread is about Lisp not giving you any advantages over the mainstream languages for “real world business apps”, a common example mentioned is reddit switching to Python from Lisp. Also that stuff like the language ecosystem is more important.


It’s a great excuse to claim a label of ‘programming genius’ without having to explain why you haven’t written anything useful or groundbreaking.


Just be glad there’s not three dozen HAVE YOU READ YOUR SICP TODAY? posts everyday.