Live data from Hacker News

Why is Common Lisp not the most popular programming language?

daninus14.github.io

311–320 of 339 posts

Re: Why is Common Lisp not the most popular programming language?

#311
I haven’t used Lisp in a long time. But I used to, and also implemented my own mini Lisp more than once in a panic to get some functionality working in a quick and dirty way.

Something I have not seen here is the advantages of type (dynamic or static) for channeling consistent library symbol use.

For instance, one of the undersung benefits of class style object oriented code, or any type dispatch, is how it helps enforce the right set of functions to use on some data (i.e. the methods of that object).

This cohesiveness between a bucket of symbols related to a data type makes coding and sharing easier. In whatever form this takes, across languages.

Lisp’s flexibility doesn’t provide this kind of namespace modularizationthat I recall?

Am I out of date or forgetting something?

This kind of helpful context sensitive symbol organization is a big factor for simplifying code sharing at the “syntax” level. Reduces mistakes, narrows choices (in a productive way), etc.

Without it, adopting a lot of outside code is much harder.

Re: Why is Common Lisp not the most popular programming language?

#312
post #189

Earlier quoted context omitted.

Nup. Not the language. See how long it takes you to set up a Common Lisp implementation from scratch. Eg steel bank. Better yet, watch a kid try it on for size. Land of Lisp isn’t all bad but they can’t limit themselves to just one! Brackets are beside the point.

Why would a professional judge the quality of their tools by the experience of children? If a 3 year old has trouble using a hammer, you wouldn't conclude that hammers are difficult to use.

This is a discussion of why common lisp is not particularly popular. I observe most professionals can't program in it (it's not popular). Then look at why. The very first hurdle: epic fail. Pretend it doesn't matter?

On the other hand if you don't care that's perfectly reasonable and there's not much to talk about.

Re: Why is Common Lisp not the most popular programming language?

#313
post #302

Earlier quoted context omitted.

apt install sbcl sbcl —script hello.lisp

Try it. Point someone at trying to learn programming at sbcl. What percentage do you think have any clue what you just wrote let alone run a debian based distro or even know what that is? Compare that experience to choosing python. Forget the actual language just all the overhead. It's not a close run thing no matter how angry common lispers get about it. This is my exact experience of common lisp. People aggressivel…

I don't understand, is installing and running python easier than running an install command?

Re: Why is Common Lisp not the most popular programming language?

#314
post #194

Earlier quoted context omitted.

> I'm pretty sure it's the people. Glass house?

> I'm pretty sure it's the people. > Glass house? A sympathetic reading of that might be: “I’m pretty sure it’s the a-collaborative go-it-alone culture of many of the practitioners”. Lisp’s famous strength at enabling coding styles tailored to every specific domain, may also be its weakness with regard to low friction code sharing & adoption. That, and the distance between Lisp’s high dynamic flexibility vs. more res…

Is that something you had heard or guessed? Did you attend a Lisp conference and talked to the people, where they were coming from (companies, universities, research labs, ...) and in what domain they were working on?

Let's say, ACL2, a theorem prover written in Common Lisp. Unless what Mr. Urban tells you about Lisp users, they have a github repository. They have user/developer meetings. They even presented their stuff at Lisp conferences (I have attended one myself, where I saw a talk about it), wrote books about it, published hundreds of research reports, ... The user group shares > one million lines of Lisp code ( https://github.com/acl2/acl2/tree/master/books ), with many more lines of code developed by users.

https://github.com/acl2/acl2/

Workshops:

https://www.cs.utexas.edu/users/moore/acl2/workshops.html

How does that fit into your theory and what Mr. Urban wants us to believe? Here we have a shared large Lisp code base used at companies like Intel, AMD, ARM, ... where people collaborate over the Internet... how does that fit into your "go-it-alone culture of many of the practitioners" theory?

Re: Why is Common Lisp not the most popular programming language?

#315
post #306
post #301

Earlier quoted context omitted.

It's possible to build teams in the low hundreds. Example: https://www.youtube.com/watch?v=hMVZLo1Ub7M Siscog, company is 37 years old, 130 employees, 1.7 Million lines of Lisp code. In the planning/scheduling domain for railway companies. Other example ITA Software, bought by Google for $700 Million dollar. 100+ Lisp developers.

> Siscog This is really cool! Had not heard about them. Thanks! Nice, so looks like low hundreds of developers may be possible given the right environment. That said, I don't feel it disproves my impression. If the company is 37 years old, still privately held and still has less than a hundred developers then it is clearly not a company looking to grow fast above all else. So feels like a nurturing environment for Li…

> looking to grow fast above all else

They may also not need to. They may have enough people working in a productive environment. If you add a Lisp feature to a large code base, it may not take a lot of time to do so, given the possibility of an incremental development style with Lisp (-> changing running applications incrementally).

Re: Why is Common Lisp not the most popular programming language?

#316
post #292

Earlier quoted context omitted.

How is the idiom of linked lists foreign to modern devs? You create a list of items. You can add/remove elements to the start, end, and even the middle and even indexing is just as easy with the `nth` function. From a programmer perspective linked lists are universally better. That is to say that if a computer could perform operations on a linked list as quickly and with as little memory as it could for an array, nob…

> if a computer could perform operations on a linked list as quickly and with as little memory as it could for an array, nobody would ever choose to use arrays You can start from a false premise, and draw any conclusion you like. If a computer could perform operations on a linked list as quickly and with as little memory as it could for an array, purple unicorns would be grazing on my lawn right now. :)

My assertion is that linked lists map BETTER to the human and WORSE to the computer. The thought experiment is simply a way to prove that fact and is not a premise let alone a false one.

If arrays and linked lists had the same performance characteristics, we'd pick linked lists every time because they map better to how humans think about problems while arrays map better to how computers think about problems.

Thus we can conclude the exact opposite of the assertion I was responding to. People naturally gravitate toward linked lists then get forcibly re-educated to use arrays because that's what makes the computer happy.

Re: Why is Common Lisp not the most popular programming language?

#317
post #316

Earlier quoted context omitted.

> if a computer could perform operations on a linked list as quickly and with as little memory as it could for an array, nobody would ever choose to use arrays You can start from a false premise, and draw any conclusion you like. If a computer could perform operations on a linked list as quickly and with as little memory as it could for an array, purple unicorns would be grazing on my lawn right now. :)

My assertion is that linked lists map BETTER to the human and WORSE to the computer. The thought experiment is simply a way to prove that fact and is not a premise let alone a false one. If arrays and linked lists had the same performance characteristics, we'd pick linked lists every time because they map better to how humans think about problems while arrays map better to how computers think about problems. Thus we…

My assertion is that linked lists map BETTER to the human

That's your assertion, but you didn't back it up by anything other than saying you can insert into the middle of a list (which is rare to need and can be done with a sorted map).

Thus we can conclude the exact opposite of the assertion I was responding to

You can't conclude anything from someone making the same assertion with no evidence over and over.

Pragmatically what people use over and over are arrays and hash maps. There's a reason perl, python, lua and javascript all thrived by having arrays and hash maps built in to the core of the language.

If you want to loop through something or index by an offset you use an array. If you want to access by key, you use a hash map. In the rare scenario you need to insert into the middle of a specific order, use a sorted map. Modern programming has no place for basic linked lists of granular data and they aren't missed in any sort of real scenario.

If can back up what you're saying with any sort of evidence or a specific scenario, go ahead.

Re: Why is Common Lisp not the most popular programming language?

#318
post #107

Earlier quoted context omitted.

I didn't see mentioned in the thread (maybe missed it) the #1 reason, IMO, that Lisp can't be popular in companies. Everyone should take the time to learn Lisp and do a handful of personal projects with it. It'll help your growth as a software engineer. Just do it! But that doesn't make it a great corporate language. Lips is infinitely flexible, you can mutate it to be what you want. That's cool and feels awesome. Al…

In companies, most languages have some kind of system to enforce style guidelines and restrict which dependencies can be used. Companies already restrict the flexibility of the languages they are already using. So flexibility is not the reason Lisp is unpopular among companies.

And what's the point of having Lisp if you can't use it? Unpopular opinion alert: Bigger companies want programmers to be replacible resources which means they need to have huge talent pools. If you choose your tech stack for the fact that you can retain your people for only 12 to 18 months, you can't effectively use any of the advantages Lips languages offer to you.

Re: Why is Common Lisp not the most popular programming language?

#319
post #298

It's the learnability of the language. Remember BASIC? You could show someone a FOR ... NEXT loop and they would completely understand. After a couple more 10 line programs and you can safely hand over the keyboard and handle the "how do I?" questions You had to show very little before they understood. Now try Lisp ... M: This is a list S: What can I do with it? M: By itself nothing but trust me it is important. This…

(set x (list 1 2 3 4 5)) (for item in x (do stuff to item)) Now try to explain BASIC, but do it by first explaining how to create and manipulate a block of memory. You are conflating language differences with the real argument which is the decades-old debate about whether introductory courses should be practical or rigorous.

But that is my point. When trying to teach Lisp they would teach you all about the 100 ways to chop up lists without showing you why you would even want to. Your example would not have appeared until the 4th or 5th lecture and would have required the definition of a recursive function (two lectures on recursion alone) to achieve the same thing

And as for BASIC why would you need to "explaining how to create and manipulate a block of memory". This is not something that the BASIC programmer needs to know to write a program

This is just the sort of elitist crap that gatekeeps becoming a programmer. You can drive a car with only the most superficial understanding of how a car works and it does not affect your ability to get from A to B effectively

The answer to this decades old debate is simple, after each lecture the student should be able to do more than they did before they entered the room. At the end of the course they should be capable of teaching themselves from the available resources

Re: Why is Common Lisp not the most popular programming language?

#320
post #107
post #7

It's the lists. No, not the prefix notation, parenthesis, what have you, although that doesn't help. The lists themselves. In Lisp, code is data, and data is lists. Yes, of course, there are hashmaps, arrays, strings. But idiomatic Lisp code really does use linked lists extensively, it's an entire style of programming. Even if you'd prefer to use different data structures (and again, Common Lisp does support this ),…

I didn't see mentioned in the thread (maybe missed it) the #1 reason, IMO, that Lisp can't be popular in companies. Everyone should take the time to learn Lisp and do a handful of personal projects with it. It'll help your growth as a software engineer. Just do it! But that doesn't make it a great corporate language. Lips is infinitely flexible, you can mutate it to be what you want. That's cool and feels awesome. Al…

> The anti-Lisp is something like Go. Simple, not very flexible, everyone does it the same way mostly, you can plug & play developers like scrum demands we do.

This has not been my experience with Go. The only areas where Go actually enforces consistency is that gofmt has no configuration surface, and Go Modules conclusively won the dependency management war. Other than that, it's still a lawless wasteland.

Foreword: Go is not bad, far from it. It does a lot of things right and you can do a lot worse. But myths around its simplicity, idioms, best practices, etc. have created a generation of monstrous tech debt hiding behind tidy syntax.

One of the worst myths is that it's easy to see the right way to do something in Go, because now when everyone does things their own batshit ways, they each think they did it the obviously right way.

* Go has no build system, and you'll need one for anything but the most trivial projects. Many use `make`, but some people insist that `just`, `ninja`, etc. are worth people having to install extra dependencies. The worst is when projects use straight shell scripts, having all of the platform compatibility problems of make with none of the benefits.

* Go has no macros. Do you use reflection, code generation, or write everything out by hand. You can't even parse some JSON without being forced to make a choice here. (The standard library option, `encoding/json`, is the worst by far. It's also the most popular because of course it is.)

* Even when you're done with that, you still have to choose a way to validate that input, because e.g. Go doesn't even have a concept of a value being "required" so you'll be introducing that somehow. The "validation" frameworks (sigh) that have an opinion on this still do it inconsistently for different builtin types, and often silently do nothing for custom types. Good luck being consistent even within a project let alone between projects and teams.

* Go generics are very limited, and how you work around those limitations can vary greatly, e.g. do you use receiverless methods to simulate associated constants/functions or do you go back to reflection for those. There's still no solution for associated types, you either make do without them or abandon the type system altogether and use reflection. (In a LISP thread it might be hard to imagine just how bad this can get, because there's dynamically typed in a language that's built for it, and there's dynamically typed in a language pretending to be statically typed)

* Channels, mutexes, and atomics all have their place, but most people never understand their tradeoffs properly (and community myths do more harm than good), so not only do they architecture projects around different options, but often the wrong options for their requirements. People will make performance arguments with no measurements, and correctness arguments with no proofs, etc. and when you join an existing project you'll be sifting through its uniquely crafted wreckage to figure out what invariants can even begin to hold.

* The Go community has a lot of vitriol against testing frameworks, but Go has no useful functions for comparing values of non-trivial types, so you either use a test framework after all or reinvent one badly. You can't even define equality in Go recursively through pointer, slice, or map types -- strings compare by contents, pointers compare by address which is almost never useful, and maps and slices cannot be compared at all. It's not even consistent among builtin types. It's very common to use reflection here, see above, this is its own special hell.

* Go has no sum types, pattern matching, or enums. (No, multiple value returns are not enums, they are not a type you can use as a map key, they cannot nest, etc). You'll be reinventing these somehow with structs and interfaces and switches which have to choose to panic or ignore unexpected branches. Many projects, knowingly or not, create unenforceable sum types where different records use different subsets of fields of a struct. It makes C look modern and high-level, because at least C has unions.

I could go on. Go gets far more credit here than it deserves. Again, it does a lot right and it can be used well, but you should not expect quality or consistency from a broad range of programmers just because it's Go. Management that banks heavily on this myth generally pays for it dearly.

Post reply on HN