13 ms·
Lisp Comes of Age (1980)
- jascii 7y agoThroughout the years, it has always been an inspiration to read up on Stephen K Roberts adventures! If you haven't yet, I strongly recommend exploring the rest of his website: https://microship.com/ https://microship.com/
- slifin 7y agoSomething they don't tell you when you start learning lisp is the sense of calm it brings It's such a elegant thing, it ruins me for doing "professional" programming
- agumonkey 7y agofew other good languages have had that said about them: ml prolog apl forth they all 'ruin' your life by showing you everything's wrong about daily realities. oh, and smalltalk PS: if I missed some, tell me
- SaxonRobber 7y agoc
- pjmlp 7y agoHardly, "Allen: Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem after another. When C came out, at one of the SIGPLAN compiler conferences, there was a debate between Steve Johnson from Bell Labs, who was supporting C, and one of our people, Bill Harrison, who was working on a project that I had at that time supporting automatic optimization...The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it. That it was really a programmer's issue.... Seibel: Do you think C is a reasonable language if they had restricted its use to operating-system kernels? Allen: Oh, yeah. That would have been fine. And, in fact, you need to have something like that, something where experts can really fine-tune without big bottlenecks because those are key problems to solve. By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. This is one of the reasons compilers are ... basically not taught much anymore in the colleges and universities." -- Excerpted from: Peter Seibel. Coders at Work: Reflections on the Craft of Programming "A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980 language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law." -- C. A. R. Hoare, Turing award lecture in 1981,
- SaxonRobber 7y agoThere are only two kinds of languages: the ones people complain about and the ones nobody uses.
- hugi 7y agoThis sentence has been used to justify so much evil in the world.
- SaxonRobber 7y agoI know C++ is a vile, but Bjarne only had the best intentions. Cut him some slack!
- pjmlp 7y agoThere is a third one, the ones that cause billions of monetary losses in fixing security exploits. It was a big mistake from US government to have forbidden Bell Labs to be able to sell UNIX on its early days. C only got widespread because it had a free beer compiler and OS to back on.
- SaxonRobber 7y agoToo bad the other dinosaurs didn’t catch on until it was too late and they died. (Or became zombies)
- pjmlp 7y agoYou mean like all modern C compilers are actually written in C++? Or that C hardly has a place on Windows, ChromeOS, iOS, macOS, Fuschia, Android, beyond legacy Win32/POSIX APIs?
- AnimalMuppet 7y ago> C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. So C caused everybody to get a lobotomy? C caused all the existing literature to disappear? How did C do any such thing as this quote is saying? The only way the quote makes any sense is if C made people to decide that automatic optimization, automatic parallelization, and automatic mapping of a high-level language to the machine were not actually the direction that we should be going in. I deeply suspect the "We're on the right path; all those others are fools who have been led into temptation" view of the history of computing. Just because of how comforting it is to those on the minority path, it is suspect.
- hhas01 7y agoC is not good. At least, not in the way parent means “good”. C is this brilliant awful crazy-successful hack, yak-shaved into existence just to bootstrap an entire brand new OS (UNIX) in record time; subsequently Peter-Principled into domains it really has no business being in (basically anything userland). This is why, fifty years on, we’re still fighting memory corruption and security holes and generally doing an awful job of parallel computation and everything else C is not very good at. Everyone should learn C, if only to understand where we’ve come from, where we are now, and where we should be trying to go in future. Languages like Lisp and Forth and Smalltalk are fundamentally different beasts to Algol’s descendents. Most developers, having being raised in a pure C/Algol culture, give no thought to the base complexity and limitations inherent in those languages; they just assume that is how computation is. What the Lisps do is reveal all that complexity and limitations to be artificial constructs, imposed by the designers of those languages, whether as convenience to implementation (as in C, where features like flow control statements map closely to underlying machine instructions) or simply because that’s what they’re already used to (c.f. 90s scripting languages like Python and JavaScript, born on the back of mature, ingrained C culture). .. Here’s a question to get you thinking: Why do Algol family languages have hardwired flow control statements? Not because that’s how programming needs to be, but because that’s how they’ve always done it. Often there’s some special-case behavior involved, e.g. deferred evaluation of operands, as in the case of conditional (`if`) statement bodies, and hard-wiring that particular special-case into the language guts is a quick way of addressing that need. Heck, even traditional Lisps (1 & 2) are guilty of hardwiring hackery (don’t let its uniform syntax fool you: Lisp is ridden with special forms, including conditionals). You have to go to something like John Schutt’s Kernel language to see that problem solved correctly, by extracting the special-case behavior (lazy evaluation) into a general, reusable feature. Schutt calls it “vau”, but it’s just a way to dictate how and when arguments should be evaluated at the language level, instead of baking that behavior into the language implementation where it can be neither modified nor reused. What’s the upshot? Well, first, you realize that 90% of what Algol languages treat as core features aren’t “core” at all. They can be pulled out, generalized, and expressed as plain old composable functions. Suddenly your “core language” collapses from something big and complicated, with dozens of special-case features baked in, each with its own special syntax and behavioral rules, down to something ridiculously simple: an evaluator, a mechanism for composing behaviors (functions with vau support), and maybe some primitive datatypes to get you started (although even those can be pushed out into libraries if you want), … and that’t it. It is the mother of all refactorings, and it reveals the simple truth. All those features and complexity the Algols had us believe were essential prerequisites to computation and programming… all gone, pushed out to external libraries which the user can freely import, modify, replace, or ignore as they need. Once you realize how small, simple, and elegant computation can (and should) be, you’ll wonder what the hell all that vast intricate pomp and ceremony is really for, and who it really serves. Programming languages are big and complicated not because that’s how they need to be but because nobody tries to make them small and simple. But as Tony Hoare said: “There are two methods in software design. One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.” So if a language already falls in the latter camp, then Dog only imagine all the software subsequently written in it! This is where C falls outwith its original purpose, and it’s telling that subsequent popular attempts to fix it have done so by adding even more complexity on top, e.g. C++, Java, Swift. (It’s only recently with the likes of Rust that trend has started to reverse, but Rust is still a Complex language compared to a Forth or a Smalltalk.) .. Now, there is a tendency in Lisp circles to rave about macros as if they’re the True Revelation, but they’re not. The revelation is when you realize you have the ability to reshape a language you are given into the language that you need; a language that precisely and concisely expresses the concepts and behaviors that are of interest and relevance to you in your particular problem space. Lispers describe this as “bottom-up programming”, but the term hardly does it justice. Find yourself writing “if not TEST do ACTION” a lot? Extract that out into your own first-class “unless TEST do ACTION” command and use that going forward. Want to evaluate commands non-sequentially according to your own [e.g. priority-based] rules? Done. Don’t want loops? Leave them out. When you write an “Algol” program, the language always controls how your program is evaluated. If you don’t like the way it does it, tough. When you write a “Lisp 3” program, you get to control how your program is evaluated. You aren’t stuck with a fixed language-level set of first-class flow control statements that may or may not meet your needs, plus a weak second-class user-level mechanism for kind of creating your own (C-style functions, with their inherent limitations). There’s only one level: everything is a first-class feature, whether it’s provided by the language or added by you. .. We often think of C as a “general-purpose language”, but I think this is wrong and unhelpful. We should really think of C as a DSL, one created specifically for bit-twiddling and crude algorithmic number crunching (which is what it’s good at). The true general-purpose languages are the meta-languages, because they have the power to be whatever we want them to be. Working in C, you always speak in C. In a “Lisp 3”, you can speak in any language you like; you just have to grow that initial minimalist foundation of key building blocks into the language you want, and then off you go. It is the difference between Algorithmic Thinking and Compositional Thinking. Yes, algorithmic thinking has achieved a lot in the last 50 years, but the software we’ve built that way has a lot of problems—safety, reliability, scalability, learnability, verifiability—that I strongly suspect are inherent to that approach. We really need to try compositional thinking to escape that trap, but we can’t even start to do that while the languages we commonly use (Algol family) are themselves fundamentally crap at compositionality. -- Lastly, I think Nile (https://news.ycombinator.com/item?id=19844088 https://news.ycombinator.com/item?id=19844088) requires an honorary mention in parent’s list; not because of the language itself but because of how it’s constructed: not only is it a composed language, but the language it’s written in is a composed language too. If that doesn’t melt your mind at the possibilities, nothing will!
- pjmlp 7y agoIf you want to see your life ruined, watch this deep dive into Mesa/Cedar environment. :) https://www.youtube.com/watch?v=z_dt7NG38V4 https://www.youtube.com/watch?v=z_dt7NG38V4 One of the first workstation OSes written in a memory safe systems programming languages, early 80's at Xerox PARC.
- TurboHaskal 7y agoCan we go back in time and kill UNIX?
- pjmlp 7y agoNo need to kill it per se, it would have been enough to allow Bell Labs to sell it at the same price as VMS, OS/360 and other competing mainframe OSes, instead of distributing its source code for symbolic price.
- maire 7y agoThe most that would have happened is Bell Labs would have shut down the clones. There were already Unix clones in 1979. I worked on Cromix at Cromemco before I worked on Mesa/XDE at Xerox. If I remember correctly nobody outside Xerox used Mesa or Cedar or any of the other amazing things at Xerox because Xerox never sold them. You must have worked at Xerox. I went to Apple after Xerox and programmed in C++ using a pretty bad development environment. I certainly missed Mesa's exception handling and development environment. Mesa was missing garbage collection as did C++ at the time.
- pjmlp 7y agoYeah, garbage collection came into Mesa via Cedar, with reference counting alongside a cycle collector, hence Mesa/Cedar, the replacement for XDE. Had UNIX been a commercial product from day one, there wouldn't be any clones to start with, as they were mostly bootstrapped by the free beer source code that was taken via backup tapes from Bell Labs into a couple of collaborating universities.
- goto11 7y agoI have seen this said about almost any non-mainstream language from Haskell to Perl. I think it comes down to these languages are mostly used by enthusiasts on their own projects, without the daily realities of evolving business requirements and a legacy code base built by mediocre developers.
- _bxg1 7y agoI think there's a lot of truth to this bias
- deckard1 7y agoPerl has never been non-mainstream. It's possible the average age of HN is too young to be aware of this today, but Perl powered the web during the 1990s and early 2000s. There are plenty of legacy Perl code bases out there, even ones that have nothing to do with the web (think data munging and ETL).
- pjmlp 7y agoI met some of a couple of times, rewriting production Perl and bash scripts into Groovy and Java, shortly after being assigned maintenance roles for them, because "it is better" (aka "I have no idea and only know Java").
- draegtun 7y agoI would add Rebol & Erlang.
- namelosw 7y agoThis effect is real for some people, despite a lot of people don't like it. It's like some post-war syndromes where people feel the hollowness and pointlessness when seeing other people living a normal, meaningful life, or have to go back to the village from large cities. It's like a red pill, it always bugs me like "I wish I have macros here", or "type classes here", "Erlang process here", "Hindley-Millner or structural typing here"... Actually those languages are not that outstanding, however, it defeats the motivations to make small in-box-improvements like "I'm going to use some OO pattern to make this more SOLID". You can also try hard to slowly push the industry forward but it's still tens of years to be "professional" based on the history you have read, which sound very defeating for mortals, too. Imagine yourself has been throwback to an early 90s project where the mantra is still "if it ain't broke, don't fix it", and everyone endlessly patches everything while rejects new technologies because no one else is using them.
- krapp 7y agoSome people have a psychological or emotional reaction to code, similar to the way others do to poetry or prose, and sometimes the shape and structure of code gives people a sense of order and centeredness, in a similar way to OCD. The relative simplicity of Lisp compared to other languages probably makes these effects more acute. I don't know if that's necessarily a trait of the paradigm or of some of its adherents. I've felt that same calming effect but with other languages - and honestly I've found lisp code to be masochistically terse and opaque a lot of the time, although I've only messed with Arc and dabbled with Clojure and Racket. I guess that just means I haven't found enlightenment yet.
- deleted 7y ago[deleted]
- 3fe9a03ccd14ca5 7y ago> Some people have a psychological or emotional reaction to code, similar to the way others do to poetry or prose, and sometimes the shape and structure of code gives people a sense of order and centeredness, in a similar way to OCD. The relative simplicity of Lisp compared to other languages probably makes these effects more acute. I would really dislike to work with such people in a professional setting. Can you imagine having PR with someone who thinks code should inspire an emotional response? You know what’s beautiful? Simple and effective things, even if you can’t fall in love with the way they look.
- oldlispfan 7y agoI fear this good feeling may be misleading Lisp fans into liking the language more than it deserves. Personally, I find that the more feverish I am, the more attractive I find Lisp. It’s one of the first signs that I am coming down with a cold.
- zackmorris 7y agoThis happened to me too. The more I learn about alternative programming methods, the more my brain constructs elegant solutions that completely go around the problem at hand, or even the conditions which led to the context of the problem. I've reached the point where I mainly do data-driven and declarative programming with low-code or no-code in spreadsheets or GUIs. I feel almost physical pain now when I have to write traditional imperative or object-oriented code, because 95% of it feels like a waste of time to me. As in, most of the effort expended by a programmer is in initial setup, remembering mutable state, poorly-architected class hierarchies/interfaces, and rapidly breaking dependencies that only last a few months at most now. Less than 5% of what I do is the "real work" of solving the actual problem. Not really sure where to go with this, but I found that getting away from programming for 6 months or so this last year has really helped my psyche.
- MrLeap 7y agoI remember in college, there was a point while learning scheme where I felt like a cracked through to another reality. I went from feeling like "eh I can finish this assignment" to "holy shit, I can build _anything_". I've never written lisp professionally, but every few years I try to get back to it to see if the feeling is still there -- only to get pulled away from the endeavor by life stuff before I can dig the same depth.
- smabie 7y ago"APL has been compared to a diamond, which cannot be made into a larger diamond by the addition of a second one. LISP, in this context, is a ball of clay." I couldn't have said it better myself. I've come to think that APL and Lisp represents two diametrically opposing philosophies about structuring programs. Right now I'm leaning toward the opinion that the ball of clay approach has run its course and is no longer (or maybe never way) viable. The thousands of layers of abstraction is no longer viable, for both performance and productivity reasons.
- zdkl 7y agoYour conclusion may well be correct but I must reject your reasons : 1) we have more (cheap!) hardware capacity than we can shake a stick at so sub-optimal performance is very tolerable and 2) depending on how you measure productivity, i'd argue high level/many layers of indirection languages let you deliver features and value faster than non ball-of-clay languages at the cost of weaker confidence in the code. Which can be mitigated to some extent by more clay :) Personnaly, give me mud over diamonds any day.
- thrw34234 7y agoErm.. I think it's a bit overrated TBH. Don't get me wrong - lisp is quite simply magical (and very ahead of the curve). However, when you look back at code, those written in Python just seem much nicer. The AIMA/PAIP code in Common Lisp, for instance, are ugly as hell, while that in Python (for AIMA) is far far elegant. No doubt this stems, in part, from CL's legacy, but I haven't found things to be much better in Scheme land either.
- pjmlp 7y agoWith the small difference that the code written in CL runs blazing fast versus pure Python.
- garmaine 7y agoThis is a matter of subjective opinion. I see Python code and I think "ew.. this has got 10-20 bugs or mis-handled edge cases I just haven't found yet." Lisp isn't my favorite syntax, but a piece of Lisp code is much less likely to have hidden gotchas.
- esjeon 7y agoPython isn't elegant. It's just more pragmatic and to the point with little waste. Lisp is definitely more elegant, but no one knew (and still don't know) how to tame the beast. We know it's a powerful language, but don't know what school of thought can utilize it safely. That's why Lisp has many horrible messes.
- lispm 7y agoPersonally I think the PAIP code is very well written. The AIMA code probably slightly less. These are pedagogical programs. Actual production code may look different, sometimes very different.
- flavio81 7y ago>those written in Python just seem much nicer >The AIMA/PAIP code in Common Lisp, for instance, are ugly as hell perhaps it just means you are familiar with python, not lisp. I have 3 years of experience with both and let me tell you, there is nothing elegant in Python: there's nothing elegant in having to deal with one-line lambdas, global interpreter lock, 30x-50x longer execution times than Lisp, distinction between statements vs expressions, mutability everywhere, a flaccid OOP system, no interactive development features, and horribly written libraries.
- ncmncm 7y agoMost instructive would be to identify how reality turned out to be so different from the breathless ideal presented, and how to recognize when the next breathless ideal turns out to be similarly unable to be realized.
- ph2082 7y agoWhat app someone should build in 2020 to find and show it's true prowess?
- jmeister 7y agoSomething which uses a DSL to describe the business domain, like Viaweb by PG in the late 90s
- dig1 7y agoI'd say any app that will do any kind of (more than simple) data manipulation. If you plan to support more and more data formats, things will get exponentially worse. One domain where I'd go with Lisp/Clojure/Scheme any day are banking/financial switches - software used to communicate between banks, card providers, POS devices, even ATMs. These programs usually has to support tons of weird binary protocols (among other things), designed in 70-ties and 80-ties. To make matter worse, bigger banks adds own "juice" to those protocols, making hybrid monstrosities. And usually, you can't find documentation about those protocols, unless you are deeply in banking business.
- caleb-allen 7y agoWhy not use a language which supports Session Types instead?
- nikofeyn 7y agoi would think elixir and erlang suit that better. they both have beautiful binary pattern matching built in, and are perfect to wrap up disparate pieces that talk to each other. they also share some commonality with common lisp that a lisper should like.
- slifin 7y agoI'd probably recommend a full-stack SPA, use Clojure's Fulcro with Datomic to get a peek into what's coming next in other ecosystems
- walkingolof 7y agoWhen reading these old computer-related articles, it's like reading about a parallel universe, slightly different, but very recognizable.
- dreamcompiler 7y agoThere's a Star Trek TOS episode "Errand of Mercy" where the simple primitive inhabitants of Organia are caught in the middle of a war between the Federation and the Klingons. Kirk is baffled because the Organians refuse his help to defend them against the Klingons. Finally when the Organians have had enough they simply make all the guns disappear, revealing themselves to be a much more advanced species than either of the fighting races. Lisp reminds me of the Organians. It seems simple and kind of boring until you try something you know is impossible and it just works. It spoils you for other languages.
- DannyB2 7y agoImpossible might not be the right word. When I was much younger, I would describe it as seeing things done easily in Lisp that I had no idea how to do at all. Lisp could easily express ideas that I didn't know how to express in other languages. Just as Pascal had made it possible for me to express ideas that I had no idea how to express in BASIC. Lisp gave me new tools. Just as earlier Pascal had given me new tools. The Organians told Kirk and the Klingons that they would one day be friends. And rise to their level. Ironically, languages in the 90's and 2000's borrowed more and more from Lisp. Starting with most languages of the last quarter century having Garbage Collection.
- _bxg1 7y agoI've only written a little bit of it, but it brings me anxiety. Any language without static types brings me a certain degree of anxiety, thinking at all times about all the ways a given piece of code might be misused and go terribly wrong. But in Lisp you add another layer: that anything looking like a function call could actually be a macro, further blowing open the door of possibilities for what an unfamiliar piece of code might do. Of course, parsing Lisp is an exercise in tranquility ;) It's all about the programmer's personality, I think. Graydon Hoare expressed my feelings: "Basically I've an anxious, pessimist personality; most systems I try to build are a reflection of how terrifying software-as-it-is-made feels to me. I'm seeking peace and security amid a nightmare of chaos."
- ninkendo 7y agoI’ve never written in lisp, and my lack of knowledge of it always makes me feel a bit of respect towards people who do. Like maybe it’s this amazing thing that if I was smart enough to understand, I would achieve transcendence, or something. But the biggest thing I look for in a programming language, is “how many bugs can it stop me from writing”, and a lack of any compile time checking is what keeps me from even bothering to look at it. I’ve spent many years programming in perl, then ruby, before finally using Go and then Java and then Typescript and now Swift, and I feel like the period of time where I would tolerate a lack compile-time type checks is gone. It’s just table stakes at this point. Maybe lisp is the end game for non-type-checked languages and it’s the best a dynamic language can hope to be. But I just don’t care at this point, because that whole category of languages seems to be a broken idea to me at this point.
- _bxg1 7y agoI wouldn't say it's a broken idea. It's just an idea that doesn't scale. Working in a dynamic codebase - especially a Lisp one - basically means you have to be familiar with how everything you're using works. You can't rely on interfaces; you have to fully hold everything in your mental model. When this is feasible - usually meaning that you or a small cohesive team wrote all of it yourselves - the tradeoff is a huge amount of expressiveness. The barriers between the program in your mind and the program in the code get very small, and you can just make things, concisely, unhindered. This is all well and good, but expressiveness tends to be at odds with constraints, safety, and team communication. Lisp is just one extreme of that spectrum. Personally I feel better having some of those constraints even on throwaway solo projects, though that might not be perfectly rational. I will also say that Clojure's heavy focus on immutable data helps somewhat with this problem. You can at least count on functions not having side-effects. Usually. Hopefully.
- invalidOrTaken 7y agoLisp is very good at teaching you that you're not as good a programmer as you think you are, and that you don't understand the domain as well as you think you do. These sound like negatives, but it's better to learn these things up front.
- timonoko 7y agoLisp-programmer does not count brackets, but visualizes the linked list world in some other way. My world consists of brown and red LEGO-bricks. They are clued together in pairs and brown bricks are things and red bricks abstract links. These greasy fake bricks were only playthings we had in the cheap-ass post-war daycare center 1957. Anyways it would interesting to see 3D-environment where this Lego-paradigm is implemented. I sometimes think about it, but do not find really beautiful way to name things, except tags with letters on them.