9 ms·
How Lisp Became God's Own Programming Language (2018)
- Qaphqa 6y agoThe fractal flowers and recursive roots: The most lovely hack I’ve seen.
- deleted 6y ago[deleted]
- dang 6y agoDiscussed at the time: https://news.ycombinator.com/item?id=18225870 https://news.ycombinator.com/item?id=18225870
- lgas 6y agoI thought HolyC was God's own programming language.
- sgt101 6y agoI like the Prolog story "PROably the Language Of God"
- amelius 6y agoLOGO is the Language Of God, and we are His turtles. L: Language O: Of G: God O: Only God knows what the last "O" stands for.
- DonHopkins 6y agoA tail recursive acronym!
- sgt101 6y agoMy first language (circa 1977!)
- lispm 6y agoPROvably the Language of God
- DonHopkins 6y agofalse. https://www.j-paine.org/dobbs/prolog_lightbulb.html https://www.j-paine.org/dobbs/prolog_lightbulb.html
- sgt101 6y agono (joke [1]) [1] http://www.doc.ic.ac.uk/~klc/NegAsFailure.pdf http://www.doc.ic.ac.uk/~klc/NegAsFailure.pdf
- forgotmypw17 6y agoI thought that was Perl...
- atilaneves 6y agoThat would be satan's language.
- thesuperbigfrog 6y agoPerl may be ugly, but it is not evil. Malbolge (https://en.wikipedia.org/wiki/Malbolge https://en.wikipedia.org/wiki/Malbolge) is evil. Perl's unofficial mascot is a camel because Perl is a lot like a camel: a beast of burden that requires little and will get you through the desert, but that may not be as pretty as other languages.
- elteto 6y agoYou forgot to mention the smell :)
- nathell 6y agoObligatory XKCD: https://xkcd.com/312/ https://xkcd.com/312/
- colomon 6y agoWait, isn't this the obligatory one in this context? https://xkcd.com/224/ https://xkcd.com/224/
- nathell 6y agoYes, in the context of the OP. But in the context of someone mentioning Perl, the one that I quoted makes sense. Here's the Frost poem alluded to: https://www.poetryfoundation.org/poems/44263/fire-and-ice https://www.poetryfoundation.org/poems/44263/fire-and-ice
- jhbadger 6y agoI'm surprised that this didn't bring up Paul Graham's "Blub" concept, in which non-Lisp languages are thought to be objectively less powerful than the universal language of Lisp. That's been a lot to blame for the mystical reverence of Lisp in the 21st century. While I'm a Lisp fan myself, and agree that it is more powerful than a lot of mainstream languages, the idea that it is the "most powerful" blinds a lot of hard-core Lisp devotees to things like Haskell that are worth exploring as well.
- goto11 6y agoThe "Blub" parable is really clever because it says that when other people doesn't use Lisp, it is simply because they are incapable of understanding its power - not because of any practical or technical reason to chose another language. So any argument the "Blub" programmers might use to justify "Blub" is automatically invalid. Of course it can be used for any non-mainstream language, and I have seen it used for Haskell, where Lisp is the "Blub" language.
- exdsq 6y agoI’ve had this recently. Was writing Python but missed the ease of concurrent functional programming. Used F# but missed type classes. Used Haskell but missed dependant types. Use Idris but miss the build environment of Python.
- bcrosby95 6y agoYes, once you learn enough languages I feel like you just find yourself constantly wishing you had aspects of another language, pretty much regardless of what language you're using. Sometimes its directly related to the language, sometimes its something like the ecosystem surrounding it. This is why I'm wary of "right tool for the job" when it comes to languages. In my experience usually there isn't a singular obvious right language. Maybe one is 35% right, another is 38% right, and the golden ticket language is actually just 45% right. And sometimes you won't really know until you're halfway through the project. If you wanted a 100% singular obvious correct language, you would have to make a custom language with traits from a dozen different ones. But in the real world, the differences between languages you can actually choose from end up being not that large.
- JetSetWilly 6y agoI would have thought God would write binaries directly in machine code. The only purpose of a language, is to allow creatures of limited intelligence to create abstractions that hide complexity and allow complex problems to be more easily reasoned about. Presumably God does not need to use abstractions, and can reason perfectly with an infinite number of variables, so a programming language would just prevent an Omniscient being from being able to create as perfect a program as it could otherwise (as any given programming language doesn't let you create any binary).
- WJW 6y agoPerhaps the universe is a LISP machine that interprets His code directly? No need to assume x86 derivatives when dealing with the Infinite.
- Communitivity 6y agoIf we're discussing what a divine being might write the universe in, my vote is not for direct code. Instead, imagine writing something as immense as the universe, you'd want the universe to emerge from simple rules such as basic IFS [1], L-Systems [2], or multi-dimensional cellular automata [3]. There is actually some preliminary research findings giving evidence to cellular automata underpinning the creation of the universe, as part of the Wolfram Physics Project [4]. [1] https://www.stsci.edu/~lbradley/seminar/ifs.html https://www.stsci.edu/~lbradley/seminar/ifs.html [2] https://web.cs.wpi.edu/~matt/courses/cs563/talks/cbyrd/pres1.html https://web.cs.wpi.edu/~matt/courses/cs563/talks/cbyrd/pres1... [3] https://mathworld.wolfram.com/ElementaryCellularAutomaton.html https://mathworld.wolfram.com/ElementaryCellularAutomaton.ht... [4] https://www.wolframphysics.org/ https://www.wolframphysics.org/
- 0xebfc 6y agoMachine code is an abstraction, too. In a Judeo-Christian context, God seems to operate in very abstract terms. "Let there be light" is a highly abstract instruction. In some other religions and mythologies, there isn't a single God giving the instructions from outside, so it seems difficult to make the comparison there. Abstraction is like a lever, and by first-order logic there is no way to avoid using an abstraction whenever we communicate, whether internally via vocalized thoughts, via hn or by some really old books. Maybe that's why humans want to believe that abstraction is so powerful. Thankfully, we're not totally wrong. But thank you for making me imagine a world where the "Let there be light" statement has been meticulously explained in as much detail as possible. "Then, He realized that adding an extra electron to Hydrogen was not such a good idea; the entire universe shattered, and, after a brief moment of embarrassment, he comforted himself with the fact that no-one will ever know of his folly. He continued calculating the correct speed-constants for a particle he made called a photon, which wasn't exactly a particle, but it was small and didn't carry a lot of weight, it was everywhere, and it was mostly directional -- so he figured it might be useful for some sort of massively parallel input apparatus, and his creations can use it to understand all sorts of things about their environment and themselves. Eventually, humans will suspect that light is a wave, too; but that wasn't quite right, either. God made is difficult to figure out for copyright protection reasons, but here's a hint, and get your notebooks out: ..."
- blackrock 6y agoIt was Einstein that said, “Everything should be made as simple as possible, but not simpler.” I think the problem with Lisp, is that it violated this principle. It has a lot of strange little constructs. It came from a time when programmers tried to type as little as possible. In doing so, the language adopted all these little quirks. I’m not saying it’s bad, but it’s just different. Whereas the human mind is a simple graphical machine, and we like to see associations. Like, the usage of an equal sign, to see that we’ve made a variable assignment. Maybe this reaches back to our childhood algebra days, where we associate equivalence with an equal sign. Who knows. But Lisp did away with all that. It created its own style. It gave us parentheses to enclose our statements, which is to be honest, actually a nice feature. But it forced us into knowing the specific ordering, sequence, and symbols in order to make a legal statement. Anyways, I like Lisp, and have always been wanting to use it for something. But not quite sure what. It’s great for writing short macros in Emacs though. You can write a multi line function, then compress it back into a single liner, because of the parentheses. This helps keep your config file short. It doesn’t really work for video game programming, as it doesn’t seem to have the libraries for it. It’s not as fast as C for speed critical applications. It kinda lives in that medium realm, where internal business applications can use it for internal business processing, that can run uninterrupted for decades. But, this space is where Python excels at. Anyways, one day, I’ll finally create that programming language idea of mine, and it’ll be some fusion of Lisp and Smalltalk, but can run almost as fast as C.
- gumby 6y agoSome implementations (e.g. Common Lisp) have legacy oddities in them for back compatibility but newer implementations like scheme tend not to. Instead of CAR and CDR they have first and last, for example. Emacs lisp is quite slow but adequate for purpose. You can write very high speed numeric programs in Lisp — another book by Sussman was on HN the other day and it’s all about physics, all written in scheme. The fact that code is data allows lots of complex optimizations that are harder or impossible to represent in c
- Oreb 6y agoI think you got this backwards. Common Lisp does have `first` and `rest` as synonyms for `car` and `cdr`. As far as I know, Scheme does not. I believe you have to use `car` and `cdr` there (unless, of course, you define your own synonyms). I could be wrong about Scheme: My Scheme knowledge is badly outdated, and was always incomplete.
- eternalban 6y agoIt is borderline blasphemous to think God can't handle a little syntax and would use barebones parse trees cum s-expressions. Do you see DNA chains cranking around without a higher layer phenotype? You do not. QED.
- okine 6y agoGerald Sussman, co-inventor of Scheme and author of SICP, was my undergraduate advisor. The last several times I visited his office, he was usually with Jack Wisdom either programming or deep in thought or discussion about differential geometry and the differential geometry Scheme library they were writing. One time when he wasn't so occupied, I brought up SICP, and asked if he was aware that a lot of people think of reading the book as a sort of magical, enlightening experience. He said, "Yes, I'm aware." I asked if he had any idea why. He said, "The main reason is that it tells a good story. It also has a complete, coherent narrative."
- Rerarom 6y agoAm I the only person that read the whole of sicp and didn't feel enlightened in the least? I felt way more enlightened when I read the whole of John Baez's this week's finds. Maybe it's a book which you need to read when you're younger.
- gdubs 6y agoCurious: did you complete all the exercises in the book? Not doubting you in any way, just wondering if that’s a possibility. I know I’ve gone through books without doing the work, while on others I have done the work — and it’s usually a pretty different experience. But, not everyone is gonna connect with everything, regardless.
- jjtheblunt 6y agoI think the impact it has depends on what you're doing at the time, what languages you've seen. For me, I'd done lots of assembly, C, Pascal, and Basic, so it was super fun. 20 years later I re-read parts and remembered the excitement, but, in the intervening years, had used Ruby and Python, and noticed Scheme/Lisp ideas had been imitated more widely, and it felt, in that 2013 context, less invigorating to reread SICP.
- okine 6y agoI love John Baez's writing but have not read any set of his posts as a whole. Are there threads that develop through time and build on one another? I wouldn't say that I felt enlightened by SICP, but I was and still am excited about what it covers. A couple aspects of it that excite me, recursion and homoiconicity, the property of a programming language whose programs look like a data structure in the language, are, in my mind, related to many other topics that I had encountered before SICP such as (in no particular order): paradoxes such as chicken and egg problem, self-replication, feedback mechanisms, quines, fractals, philosophic inquiry into ontology and consciousness, the anthropic principle, Russel's paradox, Gödel's incompleteness theorems, the halting problem and Universal Turing machines, and the list goes on. I initially included Douglas Hofstadter's strange loop in the list, but I think he would say that all of these are tied together by the concept of strange loops. For awhile, I was disappointed with Sussman's answer to why people feel enlightened by SICP. I think I was hoping that he'd fill me in on the secret or give me some clues. I felt like I /almost/ knew why people felt enlightened by it, but couldn't quite put my finger on it. I think what I was really hoping for was an explanation of why SICP and all of these related topics are so exciting to me or that he'd share similar awe or experience and add another piece to the puzzle. Currently, I find a lot of meaning in his statement, "it tells a good story", whether it's the meaning he intended to express or not. The topics excite me because I find relations between them. Finding relations between them is a story that I have created, and it's exciting because the story is far-reaching, and I don't know what character might join the web of relations next...it could seemingly be anything! I think many people feel empowered and enlightened by SICP as a stand-alone entity because the meta-circular evaluator pulls back the curtain on some of the magic behind programming and computing. The exercises show how computers can touch a wide range of topics and can both be molded to how a mind sees fit be and mold the mind in return. Instead of being given a labyrinth of a language created by someone else to learn in an intro to programming course and having to spend a lot of time learning all the syntax, types, tools, etc, Sussman uses a very simple Scheme and shows how to create from scratch a plethora of things encountered in other languages that are useful across many domains in a very flexible way. After accomplishing so much, the reader even creates the magical thing they were given in the beginning, eval. In our world of computing, doing that without much difficulty is empowering and enlightening.
- phoe-krk 6y agoA lot of people, including some prominent faces in the programming world in general, have been writing about Lisp as secret sauce, silver bullet, God's language, source of programming enlightenment, yadda yadda; basically a set of mystic-sounding buzzwords that, other than causing some people to indeed try Lisp, have left a lot of people confused and amused by the wording - or just plain angry and disappointed at the false marketing that I consider the above hyperboles to be. I can see the benefits of the comments that follow the "any publicity is good publicity" rule. In addition, the more-functional-in-approach Lisp dialects certainly follow the "breaking the long-built mental model" scheme that you mention, and so does Common Lisp, since it mixes programming paradigms (including functional one) rather freely. Still, after seeing the effects of the aforementioned hyperbolization of Lisp in the long run, I'm not convinced that its execution went well at all. Lisp is a very good language, but no, sorry, it's not the Magical Silver Bullet of Enlightenment™®© that some people like pg or esr or (to some extent) the author of this post claim it to be.
- reikonomusha 6y agoI think it is a silver bullet of enlightenment of a certain understanding of what programming languages are. It is not a silver bullet for all of your programming tasks or problems. Most people I know who cast off Lisp are people who read the Wikipedia page, didn’t feel enlightened, then began to complain online about how they were disappointed by their Lisp experience. Or perhaps they went a tad further, got upset by Emacs being unfriendly to setup, and proceeded accordingly. In the Modern Age (TM), programming Lisp is unlikely to convince you to change your usual dev stack to it. But if learned properly, it will enlighten you on the structure of a language and how syntactic malleability is a powerful abstraction for solving many kinds of problems. Enlightenment usually comes from realizing that it’s not a feature bolted onto Lisp, but an exposed interplay between many otherwise ordinary aspects of programming languages: syntax, semantics, interpretation, and the runtime. At this point one typically “sees” how this interplay could (and perhaps even opaquely does) play out with other, non-Lisp languages. These kinds of things could in principle be learned in a compiler course, but compiler courses tend to be extraordinarily opaque as to how such a course would help your day-to-day coding. Lisp provides a visceral, hands-on experience of many (though certainly not all) of the same principles. If you happen to be the kind of programmer who likes absolute control over your environment, because that helps you work through gnarly problems more efficiently than duct taping a bunch of dependencies together, then you may actually end up switching to Lisp.
- jankotek 6y agoObligatory xkcd reference: https://xkcd.com/224/ https://xkcd.com/224/
- mellavora 6y agoi was wondering what took so long for this to be posted
- mark_l_watson 6y agoI have never minded using a so-called niche language. Since 1982 I have been very fortunate enough to be paid a good fraction of my time for using Common Lisp - I consider this to be largely good luck and I am grateful for how things turned out. I also like Scheme but literally no one has ever paid me for Scheme development. In the USA, we have a saying that “you dance with the person you go to the party with.” My dance partner has been Common Lisp. I still feel like I am still a student. I started to read Let Over Lambda (a reference to closures) a few months ago which has reinforced my realization that there is so much about a programming language that I have used for 38 years that I still want to explore. All that said, I have often totally enjoyed building systems with C/C++, Java, Python, Prolog, etc. Designing and writing code can be fun in any language.
- neutronicus 6y agoVersion I heard was you dance with who brung ya
- slow_kindjal 6y agoYou dance with the one that brung ya!
- jjtheblunt 6y agoDidn't you work at CCSO back when Prof Kaplan was just down the hall, unless you were in another building...have you read the Guy Steele original papers on Scheme? They're actually awesome.
- mark_l_watson 6y agoNo, that was not me. I do like Scheme (and a long time ago I wrote a Scheme book for Springer-Verlag), but I was just saying that I haven't used the language professionally.
- somewhereoutth 6y agoI would have thought that the Lambda Calculus has a better claim to be 'God's Own Programming Language'. Apparently McCarthy was aware of, but had not studied, the LC. One quote from the article stuck out: "McCarthy invented an alternative, the “true” conditional expression, which returns sub-expression A if the supplied test succeeds and sub-expression B if the supplied test fails and which also only evaluates the sub-expression that actually gets returned." this is how 'true' and 'false' are encoded in the LC, (\x \y x) and (\x \y y) respectively, and the final sentence indicates lazy evaluation. The early (wrong) choice of dynamic vs static (lexicographical) binding, since corrected, suggest the language was far from 'handed down on stone'. Homoiconicity is very nice, though I suspect that the macros it has enabled are often perhaps too powerful a tool.
- at_a_remove 6y agoI have heard for decades how Lisp is transformative, how just having learned it, even if you leave, you will never look at things the same way again. Like having served in the Armed Forces. Every so often I get interested in Lisp, but I always run up against the same conflicts. I look for something that I can run in Windows that has a reasonable set of libraries and then immediately stumble upon the Crusades. You know, the religious wars you saw with emacs vs vi, wars that used to be fought over various Linux distros and window managers, that you will now see about different flavors of agile or whatever. I am quite sure that there are religious wars being fought in the territories of Javascript frameworks that I've never heard of. These wars so often seem to leave the territories barren, the original objectives cloudy, and the participants scarred. What was this good for, again? Anyway, every time I encounter these things I end up asking myself if I have the knowledge to pick a side in whatever war and if joining up is going to actually provide a solution to the problems I wanted to solve using programming, decide I am neither fit nor armed, and back slowly out of the room.
- zaphar 6y agoIgnore the war. Just pick a lisp, any lisp, and then learn it. It's not necessary to pick a side nor does it really matter which lisp you pick. You can pick a side later if you feel the religious fervor sweeping you up. But really Lisp is sufficiently different from pretty much any language you'll have encountered that it's worth taking a look.
- at_a_remove 6y agoNo, I do not worry about feeling fervor. I tend to be intensely repelled whenever I detect that sort of thing in others. I must select a side because I have to install something. The problem I have had with this approach is that, through the clouds of dust and smoke, through the constant shelling and the screams of the dying, I cannot seem to discern which side has that bare minimum set of properties that I want. Namely, can run on Windows without it being a ridiculous exercise in hackery, comes with a robust set of libraries that I can end up using it to solve actual problems I might eventually receive money for solving, and has enough study material to lead me through it. None of these are negotiable to me and as far as I can tell, these objectives haven't even been considered by the various sides in this forever war. And so I will do what I always have done, which is take a peek, observe the chaos, and then wait another five years to see if anything has gotten any better. I did the whole "enlightenment" thing once with Prolog. It ended up not having any impact on anything I wrote. The enlightenment wasn't portable. I could not use it to solve actual problems I had. I could use it to solve toy problems in a toy world, and maybe there are spots where it could have overlapped with a part of the world I wasn't in, but I wasn't going to migrate just to find a way to get paid using Prolog. At the end of the day, I was still chopping wood and carrying water.
- herodotus 6y agoReading "Lisp 1.5 Programmer's Manual" when I was a post-graduate student at Waterloo (around 1977) was a revelation to me. In particular, "Appendix B: The Lisp Interpreter" gives a version of the Lisp interpreter in just 39 lines of code! (The appendix includes notes, and is 3 pages long.) I remember using this code to figure out how Lisp evaluated recursive functions. Until this point in time I had programmed in Fortran, IBM 360 Assembler, Cobol and Pascal. They all required much more documentation, and, in many cases, experiments to figure out what would actually happen in certain cases. I wish the idea of a definitive high-level semantic guide had become a thing. SwiftUI, for example, seems to be wonderful, but learning it, as far as I can tell, requires watching hours of talks, or working through many tutorials. What a contrast with McCarthey at. al's 1985 book.
- ertucetin 6y agoTry Clojure, learn properly then we talk...
- kelvin0 6y agoLisp has many parallels with Ayahuasca: Both are tough to 'swallow' and not everyone comes out on the other side 'enlightened'. No doubt about the potency of both though ...
- tardygrade 6y agoThe responses I see to lisp seem to vary on a huge range from idolatry to dismissiveness. It's interesting that Gerald Sussman's own point of view on lisp seems to be very much more moderate - that different programming styles and philosophies suit different domains, and ultimately, you should choose the right tool for the right job. Lisp is flexible in that it does not bind you to any philosophy, and is good as a general tool insofar there isn't a specialized tool that would fit the problem better.
- Koshkin 6y agoThis, then, is a proof of the multiplicity of gods (there must be at least as many gods as there are Lisps).