Live data from Hacker News

Lisp Machine Manual (1984)

hanshuebner.github.io

121–130 of 165 posts

Re: Lisp Machine Manual (1984)

#121
post #2

There seems to be plenty of people who think Lisp is awesome. If so, then why hasn't it become "mainstream"?

Asbestos suit on. There are many positive things you can say about Lisp. However, many day-to-day developers, and their managers, believe that Lisp's syntax creates nigh-unreadable programs. For example, there's no built-in infix syntax, as opposed to practically all other programming languages, and many modern programmers today expect infix as minimum table stakes for a language. Lisp syntax is extremely simple , bu…

>However, many day-to-day developers (...) believe that Lisp's syntax creates nigh-unreadable programs (...) Very smart people will disagree with that opinion (...) it's a fact many people believe (...) trying to convince people that Lisp is "advanced", even though it doesn't support basic capabilities like infix out of the box, is a losing battle.

But note the use of the "believe" word. As you point out, it's all beliefs. There are also programmers that know Javascript but believe that programming in Python must be hard (true story). Beliefs.

Then there are people, like myself, that once they use Lisp enough, feel that almost any other language would be torture compared to used Lisp. And i love the parentheses.

The problem, and this is a problem in all aspects of programming, is that people like to "believe" things about something they don't know enough to have a reliable opinion of.

So the parent question was something like "if Lisp is so good, why isn't popular?". Are good things always popular? Are popular things always good?

If really really good music must be popular as well, then you would turn on the radio (or MTV, or VH1 on the TV) and all music would be Bach, Beethoven, Debussy, Stravinsky... you get the idea. Or if you are a rock or jazz fan, include in that list the very best of the genre (i.e. John Coltrane, etc.)

If popular music must be good as well then perhaps Justin Bieber and Shakira are masters of music and we should revere them.

In my view, the reason Lisp isn't popular today starts with the Unix becoming popular and mainstream. Unix ran fast on cheap hardware (minicomputers, PDP-x). Little by little C became accepted as a standard for systems programming.

So by early 1980s C becomes mainstream; operating system APIs are then majorly written in C, even more so in the 90s (i.e. Windows API), thus the next popular languages are modeled on C: C++, and then Java which holds the same syntax and is quite influenced by it. Afterwards cue all the other languages made for overcoming some of Java's drawbacks, like C# and others.

Meanwhile Lisp was simply let behind in terms of popularity. But at the same time during the 90s and 00s it was used for important, complex stuff: air travel reservation, aerodynamics simulation, credit card transaction checking, auto-piloting the deep space one spaceship for days...

It wasn't forgotten, since Lisp never stalled from evolution, it has kept evolving since 1958, it has never stopped; the enthusiasts are still creating more good tooling, more libraries, even really nice stuff like Portacle that makes installing a complete Lisp programming environment a one-click operation.

So, it all depends on beliefs of the people versus actual usage. Some of the beliefs and myths held by people, besides the parentheses thing, are for example (my example is biased to Common Lisp)

    1. Lisp is slow
-> Lisp is generally at the same speed level as Java on current Oracle JVM, and can be done, with tricks, to perform in the same speed as C or Fortran. In any case it is still 10x to 100x faster than most other popular languages out there like Ruby or Python.

    2. There's no good IDE available
-> You will find that many Lispers love using SLIME on Emacs for hacking on Lisp. It provides high productivity.

    3. Since there are few users, there is little 
    support (forum topics covering your issues) or manuals or guides.
-> There are a ton of books on Lisp and most of them are very good, some of them outstandingly good. The reference documentation (CLHS) is really well written. Since this is a language that has endured for decades, the amount of articles or posts written about doing X in Lisp is enormous.

    4. There aren't enough libraries
-> Not many libraries if we compare with say, Java libs; however so far I've found everything i need for my purposes. And while i wouldn't bother to dive into a Java or C++ library to modify it or understand how it works, usually Lisp libraries (actually "systems" made of "packages") are easy to understand and modify at your will. It also helps that usually Lisp requires few lines of code for achieving something, compared to C++ or Java.

    5. Lisp doesn't have static typing.
It does have it. But it is optional and depends on the implementation. However the most popular implementation, SBCL, has very good support by it. On the other hand, many Lispers use it for performance reasons rather than safety reasons. Lisp is a very strongly typed language.

    6. Lisp doesn't support 
In theory, Lisp can support any programming paradigm, and in practice it supports most programming paradigms out there.

    7. Lisp produces unreadable, garbled code.
Some of the cleanest code i've seen in my whole 20+ years of programming was Lisp libraries.

    8. Lisp can't work for complex or large codebases
    since it's so hard to read
As pointed out, very complex, millions-of-LOC Lisp systems have been created successfully, some of them used today (like aero simulation software).

-----

Now, something that is true is that Lisp is hard to learn: If you use Lisp, a very powerful language, then you ought to use the full power of Lisp. And for this, you would need to be familiar and handy with all of the most popular programming paradigms (procedural, imperative, functional, OOP, declarative), AND you would also need to understand and know how to take advantage of metaprogramming (macro programming). For many programmers, this represents a challenge. Even if they already know OOP, they don't really know OOP the Lisp way, since the object system (CLOS) is different and more powerful than the typical OOP facilities provided by Java or C++.

But those "pre-requisites" are in fact the "pre-requisites" for any programmer to become a really good programmer, regardless of the language....

Once these "pre-requisites" are met, learning Lisp itself is rather easy, since the syntax is easy and most features are orthogonal to the language.

Re: Lisp Machine Manual (1984)

#122

Earlier quoted context omitted.

Some things stay "true" even long after they are not. Lisp is also unbearably slow... as compared to C on 1979 microcomputers.

Lisp is pretty slow in comparison to C, that's acceptable. As a quick self test stand up a C http server using gnu microhttp, hit it with AB or Wrk. Next stand up a http server in sbcl (e.g. using wookie) and do the same AB or Wrk load test. If you are expecting common Lisp to come close to C or even JVM you will be quite disappointed. I know I was. I love Lisp but it's a unwise to compare it with C on performance.

> Lisp is pretty slow in comparison to C, that's acceptable.

It is not. (Common) Lisp can be made as fast as C if you really need it, by using tricks...

By the way, for a while, the fastest HTTP static server was one written in Lisp, "teepeedee2", 2009. Fastest in the world.

Re: Lisp Machine Manual (1984)

#123
A not-so-close approximation to using a Lisp Machine these days is to use the GuixSD distro. It features a package manager, init system, and initial RAM disk all written in Scheme. Combine that with Emacs, the guix-emacs extension, and, if you are so inclined, a Lispy WM like StumpWM and you have a system where a large number of critical components are implemented in Lisp.

Re: Lisp Machine Manual (1984)

#124

Earlier quoted context omitted.

Criticising lisp was a mistake, and I should have already ripcorded my way out of this discussion thread already, but you make some good points, so I'll respond at my own peril: I didn't suggest you implied that lisp isn't written without indentation. Yes I have coded with lisp, and I know they use other syntax than just parens. Parens serve an important purpose with lisps, just like the semi colon does in c language…

> Yes I have coded with lisp, and I know they use other syntax than just parens... I would argue (again at my peril) that if it was optional in a lisp-style language as well, that would be great. The reason you are getting downvoted is not just because you are criticizing Lisp, it is also because you are posting a bunch of BS without understanding the difference between a context-free and a context-sensitive language…

Well, there was SRFI 49, which wasn't very popular but was supported by Matthias Felleisen.

Re: Lisp Machine Manual (1984)

#125
post #37
post #2

There seems to be plenty of people who think Lisp is awesome. If so, then why hasn't it become "mainstream"?

Excellent languages like Lisp, Haskell, Ada, etc., maybe also Rust and Nim, will likely never be mainstream since they offer a lot of features which require a lot of discipline by the programmer. Companies want mediocre developers for mediocre languages (Java, C++, C#, etc.) because mediocre developers can be replaced easily, and because they get lower salary due to great competition. Mediocre languages are just good…

If an excellent language doomed to obscurity is one that offers "a lot of features which require a lot of discipline by the programmer," and for the mediocre-only mainstream languages "all their features are comprehensible by mediocre developers," then I think C++ is pretty clearly a counter-example to that, not a supporting example.

Re: Lisp Machine Manual (1984)

#126
post #113
post #107

Earlier quoted context omitted.

Lisp had a different purpose. It wasn't developed as a systems programming language and wasn't used much as such. Though it had been used for some very specialized machines from the mid 70s to early 90s, see the Lisp Machine Manual. But if you read the manual. you'll see that it was initially developed for a very narrow group of people: high-end personal workstation users in research&development. This required very d…

The hardware that ran the software described in this manual didn't have tagged memory or garbage collection support in hardware and the real instruction set was similar to any RISC CPU. Somebody could have produced a workstation on conventional hardware that just ran Lisp but they didn't. Maybe Tektronix would have been a good candidate as their 4400 series wasn't sold to run UNIX, they ran either Smalltalk or Franz…

> The hardware that ran the software described in this manual didn't have tagged memory or garbage collection support in hardware and the real instruction set was similar to any RISC CPU.

Then you should check the architecture of those machines some time: MIT CONS, MIT CADR, Symbolics LM-2 (a repackaged CADR), Symbolics 3600, LMI Lambda, ...

http://www.bitsavers.org/pdf/mit/cons/TheLispMachine_Nov74.p...

Page 5: 1 GC bit, 1 User bit, 2 cdr code bits, 5 bits data type, 23 bit pointer.

Looks to me like a tagged CPU architecture...

The MIT CADR Lisp Machine was a stack architecture with 24bit data and 8 bit tags. Six bits for data type encoding and 2 bits for compact lists. The CPU does type checks on operations, ...

It was nothing like a RISC machine, which were researched for Lisp (Symbolics, Xerox, SPUR, SPARC, ...) mid/end 80s. A full decade later after the architecture of the MIT CONS Lisp Machine.

Re: Lisp Machine Manual (1984)

#127
post #126
post #113

Earlier quoted context omitted.

The hardware that ran the software described in this manual didn't have tagged memory or garbage collection support in hardware and the real instruction set was similar to any RISC CPU. Somebody could have produced a workstation on conventional hardware that just ran Lisp but they didn't. Maybe Tektronix would have been a good candidate as their 4400 series wasn't sold to run UNIX, they ran either Smalltalk or Franz…

> The hardware that ran the software described in this manual didn't have tagged memory or garbage collection support in hardware and the real instruction set was similar to any RISC CPU. Then you should check the architecture of those machines some time: MIT CONS, MIT CADR, Symbolics LM-2 (a repackaged CADR), Symbolics 3600, LMI Lambda, ... http://www.bitsavers.org/pdf/mit/cons/TheLispMachine_Nov74.p... Page 5: 1 GC…

I am well aware of the architecture of the MIT CADR, LMI Lambda and TI Explorer, Symbolics lispms less so but they are not the subject of this thread. I have written CADR microcode recently.

None of the features you list are constrained by the architecture of the hardware, they are just conventions of the software VM running on it. Would you suggest that the X86 is a tagged CPU architecture just because SBCL or a JVM use tags ?

>Page 5: 1 GC bit, 1 User bit, 2 cdr code bits, 5 bits data type, 23 bit pointer.

This is not true for the software that matches this version of the manual. System 99 used 25 bit pointers, there wasn't a GC or user bit. The change from the earlier word format was possible because this was not fixed in hardware.

The CADR microinstruction set is load/store with regular opcode fields, it is very much like an early RISC.

Re: Lisp Machine Manual (1984)

#128
post #4
post #2

There seems to be plenty of people who think Lisp is awesome. If so, then why hasn't it become "mainstream"?

A big part, especially back in 1984 was that LISP tended to be slow on traditional PC hardware. Also somewhat memory hungry, which was a definite problem back in the 80s when memory was expensive.

That's correct. The microprocessor CPUs were not that good at running Lisp. A boost came with the 68020+MMU and the 68030 with integrated MMU. Those had large enough address spaces, were fast enough and had good performing GCs.

Memory was very expensive. The 1984 Mac started with 128kb RAM... A 1988 Mac IIx with 8MB was usable.

Re: Lisp Machine Manual (1984)

#129
post #127
post #126

Earlier quoted context omitted.

> The hardware that ran the software described in this manual didn't have tagged memory or garbage collection support in hardware and the real instruction set was similar to any RISC CPU. Then you should check the architecture of those machines some time: MIT CONS, MIT CADR, Symbolics LM-2 (a repackaged CADR), Symbolics 3600, LMI Lambda, ... http://www.bitsavers.org/pdf/mit/cons/TheLispMachine_Nov74.p... Page 5: 1 GC…

I am well aware of the architecture of the MIT CADR, LMI Lambda and TI Explorer, Symbolics lispms less so but they are not the subject of this thread. I have written CADR microcode recently. None of the features you list are constrained by the architecture of the hardware, they are just conventions of the software VM running on it. Would you suggest that the X86 is a tagged CPU architecture just because SBCL or a JVM…

If the X86 would provide SBCL with such instructions and data, it would be a tagged architecture, but it doesn't. The SBCL compiler outputs conventional X86 instructions.

The Lisp Machine compiler OTOH generates instructions for a mostly stack machine, which runs on the CPU in microcode.

Re: Lisp Machine Manual (1984)

#130
post #128
post #4

Earlier quoted context omitted.

A big part, especially back in 1984 was that LISP tended to be slow on traditional PC hardware. Also somewhat memory hungry, which was a definite problem back in the 80s when memory was expensive.

That's correct. The microprocessor CPUs were not that good at running Lisp. A boost came with the 68020+MMU and the 68030 with integrated MMU. Those had large enough address spaces, were fast enough and had good performing GCs. Memory was very expensive. The 1984 Mac started with 128kb RAM... A 1988 Mac IIx with 8MB was usable.

My memory is that in 1988 8MB was a luxurious amount of RAM, that machine would cost 2 to 4 thousand dollars. Most people were still using machines with memory measured in kilobytes. Even serious business users were usually limited to 640KB.
Post reply on HN