Live data from Hacker News

Why is Common Lisp not the most popular programming language?

daninus14.github.io

141–150 of 339 posts

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

#141
post #68
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'm trying to understand why lists matter. Yes, there are some oddities where some base constructs don't play as well with hashmaps as they do with lists, but it is far from difficult to work with a hashmap. Or an array. What difficulty are you talking about, specifically? (Genuine question.) Biggest difference I know of, off the top of my head, is the LOOP macro having constructs that care which one you have. Curiou…

O(1) access to the nth item turns out to be more important than O(1) insertion.

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

#142

Earlier quoted context omitted.

> But idiomatic Lisp code really does use linked lists extensively, Idiomatic python code uses lists extensively. In my (somewhat limited) experience, they're the default data structure to use for a lot of algorithms. Slightly more accurately, a lot of stuff in python uses sequences extensively, which are implemented by a number of types - but the default sequence is a list. And strings are lists. Yeah, if a list doe…

> And strings are lists Eh, not really. Lists are mutable, strings are not. Strings are iterable and sliceable, which makes them usable in many similar ways to lists, but they're not lists.

[deleted]

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

#144

Another aspect that perhaps has changed in the years since - when I was playing with Common List many moons ago, the community in comp.lang.lisp was the place to go, but also rather easy to bounce off. I mean, amusing flames, but yeah, asking a genuine question, the fucking manual read beforehand to ensure not already answered in Hyperspec, often led to rather unpleasant replies. Erik Naggum was particularly abrasive…

I remember Erik Naggum. He was always worth reading, but yeah—incredibly abrasive.

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

#145
post #78

Earlier quoted context omitted.

What do a-list/p-list have to do with sharing structure? If you want shared structure of lists in Python, use `itertools.chain`. If you want key-value mappings, use a dict. Order is preserved by default nowadays, and conversion to/from an iterable of 2-tuples is trivial.

> If you want shared structure of lists in Python, use `itertools.chain`. That would involve zero shared structure. itertools.chain is just an iterator that iterates one iterable and then, instead of declaring that it's done, goes on to iterate another one. Shared structure between lists means that two lists refer to some of the same regions of memory.

And multiple `itertools.chain` instances pointing to the same list chunk(s) also use sharing.

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

#146
post #116

Earlier quoted context omitted.

Agreed. And why I love Ruby and hate Python. But yes.

Ruby is "perl-esque" in syntax, and of course TIMTOWTDI is opposite to the 13th item of the Zen of Python, so it's understandable some dislike to an express design decision. But hate ? Really?

I personally really do hate python.

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

#147
post #68

Earlier quoted context omitted.

I'm trying to understand why lists matter. Yes, there are some oddities where some base constructs don't play as well with hashmaps as they do with lists, but it is far from difficult to work with a hashmap. Or an array. What difficulty are you talking about, specifically? (Genuine question.) Biggest difference I know of, off the top of my head, is the LOOP macro having constructs that care which one you have. Curiou…

O(1) access to the nth item turns out to be more important than O(1) insertion.

You'd be surprised how many exponential loops are in successfully run stacks. :)

But yes, when it matters, it matters. Luckily, it isn't hard to use appropriate data structures. Also luckily, a surprising amount of code will linearly process data.

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

#148

Earlier quoted context omitted.

I'm not sure if Rust is a good comparison though. Rust is a lot closer to C, it is a language influenced by C, and current popular programming languages tend to also be influenced by C. So while there is a lot different with Rust, a lot of knowledge from, lets say, a C developer can carry over. Say your a C developer, or C++ developer and I am a Rust developer trying to sell you on Rust. You have to learn a new langu…

I'd argue Lisps are worse today. They encourage a thing that's generally discouraged in C: macro programming and typedefs. You're coding in Lisp, but you're actually coding in your own dialect of Lisp, eventually, with lots of idiosyncratic code that's difficult to reason about. That doesn't scale well in collaborative environments, where many people are touching a vast codebase (which I don't think was really a thin…

I think a domain-specific dialect is the best way to unlock the potential of a team of handpicked experts, but a lot of companies seem to hire an army of devs they don’t trust enough.

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

#149
post #135
post #74

You want to learn programming. Lets get started - how long does that take to bang out 10 exercises? Order the estimated results from quickest to slowest. Here's my estimates (don't like them, show yours! It'll be interesting): - Scratch - python/perl/ruby/javascript - C/Java - Swift/Rust - Anything else running on the jvm - - a whole lot of daylight - - common lisp. And many if not most will fail to get to the first…

I am curious about the reason you put Swift so low in the list. Like to me it's as easy to output a program in Swift as it is to make one in JavaScript. (except if you count compile times, last time I used it I already thought they were way too slow)

mac only. iirc you have to install xcode too. Compare to perl & python already installed on a mac and relatively easy to set up on windows.

But I'd still call it very high on the list relative to common lisp, which is the point.

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

#150

Earlier quoted context omitted.

> But idiomatic Lisp code really does use linked lists extensively, Idiomatic python code uses lists extensively. In my (somewhat limited) experience, they're the default data structure to use for a lot of algorithms. Slightly more accurately, a lot of stuff in python uses sequences extensively, which are implemented by a number of types - but the default sequence is a list. And strings are lists. Yeah, if a list doe…

I love Python's list comprehensions. When I first discovered them I had a kind of "mind blown" moment. They look like this, for anyone who doesn't know: squared_div_by_3 = [i**2 for i in range(10) if i % 3 == 0] Without using a list comprehension, this is equivalent to: squared_div_by_3 = [] for i in range(10): if i % 3 == 0: squared_div_by_3.append(i**2)

I've not used python much but is that not the same/similar to the unfold function in functional languages?
Post reply on HN