Settings

Theme

Ask HN: Is Lisp the Linux of Languages?

4 points by krschacht a year ago · 15 comments · 2 min read

Reader

Recently, I’ve been diving deep into Lisp. I re-read all of Paul Graham’s old writing about Lisp to understand his arguments. I want to reconcile for myself: if Lisp really is the most powerful language, why isn’t it more popular with startups? Would my next startup benefit if I used it?

It’s been particularly helpful to examine the HN source code, written in Arc, to better grasp what Paul means by each of his points (e.g., macros, language as data, etc.). I’ve also read through the entire proposal for Bel.

I think I understand the advantages of Lisp. It has a higher barrier to entry due to the parentheses syntax and the functional, non-object-oriented way of thinking. But once you overcome these challenges, Lisp makes it easy to build a new language for your domain, allowing for more conceptual compression. This is what ultimately enabled Viaweb to outpace competitors, implementing new features with such a small team at incredible speed.

It struck me that Lisp’s advantages and disadvantages parallel those of Linux. The “Lisp is the best language” argument lands similarly to the “Linux is the best OS” argument. Is there an opportunity for Lisp to learn from Linux?

The brilliant strategy of OS X when it came out was to build on top of Linux to gain its benefits while addressing the difficulties that made it challenging for novice computer users.

Is there an opportunity for someone to create a Lisp that harnesses all of its power but with an easier learning curve?

Paul argues that the parentheses and Polish notation are inherent consequences of the language’s power. This is one point I still don’t fully grasp. Why can’t the syntax of Lisp be made more approachable (more “reads like English”) while still maintaining its power?

erik_seaberg a year ago

There's a very steep tradeoff between the approachability of a macro and that of its expander code. Look at Rust macro_rules!, or Scala macros, or Template Haskell. A formal grammar can define a strongly-typed deeply hierarchical data structure, but the code to drill in and map to a different deeply hierarchical data structure by hand seems to become a nightmare. Even Scheme hygenic macros are noticeably harder than "take a macro call as a list, use quasiquote to return a list that starts with PROGN" which makes it actually feasible (if risky!) to start cranking out macro expanders.

  • krschachtOP a year ago

    Yes, I’ve been wondering if this is the core tradeoff. Especially as I compare Arc to Ruby. I love the readability of ruby code, but it’s easy for the meta programming to become very difficult to read. The language is quite flexible, but it’s not easy to change in the ways you want. Whereas Arc Lisp’s code is much more difficult to read, but the macro syntax is very elegant for an incredible amount of flexibility.

ggm a year ago

An account from 2009 with karma < 100 suddenly posting somewhat incoherent lines of reasoning. (OSX derived from linux..)

I begin to suspect somebody is feeding Mark V. Shaney in his cage and he's emitting text sequences again.

To (not) answer your last comment, discussions about computer language syntax are often not as useful as semantics, but in the case of LISP this is usally inverted. LISP syntax is a formal construct with unambiguous parsing states when it is well formed and English is a language notorious for having ambiguous parsing states when it is formed well.

  • talldayo a year ago

    Mark hasn't been well lately, Jay Eigh might be taking his place.

    • ggm a year ago

      They say good fences make good neighbours. I'd like to know where I can buy just one fent. I want to use the fent post, in my post production system.

talldayo a year ago

> Would my next startup benefit if I used it?

Who do you want to hire?

For all of MacOS' brilliant strategy, the idea of an Xserve Sysadmin exists solely in fiction these days. Linux is comparatively a blowout success, and a lot of people know it as a result. According to StackOverflow's survey[0], Lisp's popularity among professional developers is lower than the interest in ObjectiveC. It's not the Linux of languages, because Linux is a fundamentally popular.

I don't work with Lisp because the code all blends into each other after a while, and I'm a full-blown Scheme apologist. But look - real-world problems demand real-world solutions, ones that you can reliably scale to 20 or 200 developers. Lisp is a pet language, and you have to live in a world that treats projects like cattle. The real question is mostly how far your personal dedication will go towards making it work.

[0] https://survey.stackoverflow.co/2024/technology#most-popular...

  • krschachtOP a year ago

    I should have said: desktop linux / Gnome. That would have been the clearer analogy.

    But I don’t think it’s as simple as “who do you want to hire.” It’s not that hard to learn a new programming language. I have a hard time believing that if a small founding team picked lisp and got to product-fit, there wouldn’t be a fundamental barrier to them scaling the team.

frankjr a year ago

> The brilliant strategy of OS X when it came out was to build on top of Linux

OS X / macOS has nothing to do with Linux. It's a Mach derivative sprinkled with BSD.

  • krschachtOP a year ago

    Thanks for the correction on this. I always thought BSD and the various Linux flavors were all derived from Unix. But reading up on it, it sounds like BSD is a derivative of Unix whereas Linux was simply modeled off of it.

jarule a year ago

No, lisp is not the Linux of languages. Steve Yegge sums it up "Every single non-standard extension, everything not in the spec, is 'wrong' with Common Lisp. This includes any support for threads, filesystem access, processes and IPC, operating system interoperability, a GUI, Unicode, ..."

And to answer your last question, no, lisp cannot read like English since predicate precedes subject a la Yodaspeak.

  • kazinator a year ago

    Nope; Yoda puts the predicates (verbs) last (or, not quite, see below). This is very similar to Japanese. Yoda is obviously Japanese-inspired, both in name and mannerism.

    Forth and PostScript are programming language yodaspeak, but actually even more like Japanese than yodaspeak, due to doggedly putting verbs last, even in their embedded clauses.

    Lisps actually follow the English S-V-O order.

    For instance "Go home!" is plain English, and it looks like (go home) if transliterated to Lisp syntax.

    Because it is imperative, there is an implicit subject, "you" (you go home); we don't see it and so we are left with V-O.

    Lisps are not special; they are similar to command languages in which the name of a utility serves as the verb, followed by the arguments, which are like modifying phrases, objects and whatnot. Not to mention, Lisp expressions are similar to the function calls in mainstream languages, historic and current. What you usually don't see is subj.verb(obj, ...). In the Common Lisp object system, the leftmost object in a generic function invocation is not special; it is not assumed to be the thing doing the action. So (draw obj canvas) is still "(You, computer) draw the object on the canvas (using the method best suited for those two objects based on the combination of their type)", and not "Object, draw yourself on the canvas (based on a method selected using your type only, which then uses the abstract services of the canvas)".

    Yoda is from an advanced ESL class of pseudo-Japanese immigrants, by the way, and so doesn't reverse everything. For instance, "you must go home" comes out in yodaspeak as "go home, you must". This is grammatical English, which "you, home go, must" (closer to true Japanese order) would not be.¹

    Yoda has a fine command of English grammar; he correctly uses the processes of topicalization and extraposition to imitate some features of his Japanese-like native language.

    --

    1. E.g. あなた、家に帰らなやだめだ。 (Anata, ie-ni kaera-nakyadame-da). Anata is you, ie-ni is home-to, "karea" is a combining for of the verb "kaeru" which means return home, and nakyadame + da is a suffix that adds "must" to the verb, and is itself a verb due to the copula "da". The verbs are doggedly last.

  • krschachtOP a year ago

    My last question is more specific: can a language be designed with a syntax that is not yodaspeak yet still maintain the power of lisp?

    • kazinator a year ago

      Obviously yes, since a given Lisp isn't yodaspeak and has the power of that Lisp.

    • jarule a year ago

      No, as a functional language, the predicate unambiguously comes first.

kazinator a year ago

> functional, non-object-oriented way of thinking

They say Common Lisp was the first OOP language to be ANSI-standardized.

It and its ancestral dialects pretty much all support imperative programming with mutable variables and mutable fields in objects.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection