14 ms·
Why Lisp?
- mcluck 4y agoInteresting write up but I struggled to read it due to the overuse of emphasis. Just about every sentence has unnecessary italics
- emaro 4y agoWow, I'm currently in Korea and I did not expect Naver to have projects like Lisp implementations at all. Their services (map, search, ...) are very common here, but from the outside it looked more like a boring company. Great write-up. They also mention Tamgu, another language they developed, with native Korean language string support (`ishangul()`, `romanize()`).
- apetresc 4y agoI'm actually pretty fascinated how someone was able to get this project hosted on Naver's Github at all. It's probably not coming from corporate judging by how informal and personal the language is (and also that there's only a French and English version), so it's probably just the passion project of a random employee or contractor. Interesting that Naver lets them host it under their public brand. I can't imagine the Google of the 2020s allowing anything like this in under their public brand.
- clauderoux 4y agoHello, I work in a laboratory specialized in Artificial Intelligence that belongs to Naver (NLE). These two languages are used in many research projects, especially for document processing before applying ML methods. We used Tamgu for instance in Machine Translation and in Sentiment Analysis. We have also published in the past datasets for conference papers, that required the tools to be open source, so that people could reproduce our experiments. This year for instance, we used the Prolog engine in Tamgu to produce a dataset to train a transformer on inference. The process to make them open source was quite thorough and quite painful, but I cannot complain. The case of LispE is little bit different, I created it to have a more flexible platform to experiment with functional features, which I could not do with Tamgu, which is too large now. The blogs are simply a way to make these tools more visible, and since I'm French, I usually write them in English and French.
- apetresc 4y agoAwesome! Thank you for going through whatever red tape was required :) To be clear, my description of the language as "informal and personal" was not meant as a criticism - I love it. It's just so different from the fake-enthusiastic professionalism that is usually mandatory from corporate-branded projects like this. Hats off to you!
- DeathArrow 4y agoI can see why someone would learn Lisp as learning a different paradigm than what you are currently using helps you see thing in different ways and improves your overall ability to solve problems. What I miss is what classes of problems Lisp helps you to solve better and faster. Why use Lisp in production? If you want functional programming there's ML, F#, Haskell and even Javascript. If you want to develop fast, there's Go, C#, Python and so on. I am not trying to denigrate Lisp here or to say something is better, I am genuinely asking what advantages Lisp has, what are the cases for which is it best suited in production.
- lisper 4y agoBecause Lisp gives you all of these things. Functional programming. Fast development. Incremental compilation. Interactive debugging. But the main thing Lisp gives you is almost unlimited malleability. If there is ever anything in the language you don't like, you can change it. It also gives you generic functions and the ability to redefine classes in a live system. No other language has those features.
- DeathArrow 4y agoThanks. Malleability and redefining classes in running code sound like advantages. Can you point to a situation where you might want to redefine classes in live code?
- pjmlp 4y agoIn a game engine, you don't want to rebuild everything just to change a couple of details in the scene. Live++ and VC++ reload are quite far from what Lisp allows. Or to save a space ship, https://thenewstack.io/nasa-programmer-remembers-debugging-lisp-in-deep-space/ https://thenewstack.io/nasa-programmer-remembers-debugging-l...
- TurboHaskal 4y agoThose Smalltalk and Lisp programmers are again at tweaking their running instances in production. Couldn't they just let it crash and relaunch a new ship as is the best practice these days?
- deleted 4y ago[deleted]
- qwerty456127 4y agoWhy not Lisp? I never understood why would people need any other programming/query/markup language syntaxes in the first place. The only part of Lisp that seems ugly are the ending stacks of closing parentheses at the ends of big code blocks.
- tmtvl 4y agoIf you don't like long sequences of closing parentheses, you could try Lisp Butt Mode for Emacs: https://gitlab.com/marcowahl/lisp-butt-mode https://gitlab.com/marcowahl/lisp-butt-mode
- TuringTest 4y agoOr you could use the Readable Lisp S-Expressions [1] project from Wheeler's and Gloria's to use Lisp with Python-like syntax. [1] https://stackoverflow.com/questions/9533139/what-would-clojure-lose-by-switching-away-from-leading-parenthesis-like-dylan-j/17524527#17524527 https://stackoverflow.com/questions/9533139/what-would-cloju...
- tmtvl 4y agoWell, if you are going to mention alternative syntaxes, another possibility may be Wisp: https://srfi.schemers.org/srfi-119/ https://srfi.schemers.org/srfi-119/
- TuringTest 4y agoThanks, I didn't know that syntax. What are the advantages of Wisp over sweet-expressions?
- AnimalMuppet 4y ago> Why not Lisp? If you want to persuade people to use Lisp, "why not?" isn't very persuasive. If you don't have a concrete reason why, and I'm not already using it, I'm going to continue not using it. > I never understood why would people need any other programming/query/markup language syntaxes in the first place. Because Lisp syntax doesn't fit the way everyone's brain works. If it fits yours, that's great. If it doesn't fit mine, well, you may not understand why I want something else, but it's crystal clear to me. Going broader than you and me, it's my perception that most people find Lisp syntax non-intuitive. That's why people need other programming language syntaxes. But, if you're going to extend it to markup languages, I will give you this. Once you have seen S-expressions, XML looks disgusting.
- rich_sasha 4y agoI really wanted to get Lisp. I thought, I can't get onto the pedantic train of Haskell, but maybe I can do for Lisp. Had a play with Common Lisp and Scheme and... Nothing. It's not that I found either to be bad. I quite like the syntax actually. There were some nice things too, I get how macros are neat. But I didn't get that cathartic realignment of magnetic domains. I saw a neat programming language. In fact (gasp) I couldn't see many massive wins over my go-to Python. - yes, lisps are compiled and to some extent statically typed, so that's one - I get the REPL programming experience is better, though somehow it didn't hook me. - Macros... Yes Python doesn't have them, but there's so much introspection that in practice, whenever I saw a macro example, it was clear how to achieve the same thing with Python. I didn't get that deep into it, but every time I was presented with a Eureka moment, it was a bit underwhelming. I can't quite reconcile the promise/hype with my experiebce. Maybe i didn't give it enough time, but then how much is enough?
- danuker 4y agoI suppose the "Eureka" moments were more impressive when Lisp started getting adopted (when the alternatives were to manage your own memory and even routines were not an object). But it still has better compactness than Python, in my comparison full of caveats. https://danuker.go.ro/programming-languages.html#overall-map https://danuker.go.ro/programming-languages.html#overall-map What Python needs 350-400 chars for, you can do in 250-300 in Lisp or Clojure.
- lispm 4y agoThe compactness is more to be expected in mid- to large-size software. Where one uses macros to develop internal domain specific languages, etc. Long ago I was at a talk where a project manager reported that their slightly over 100 people Lisp team could compete with a roughly 1000 people C++ team, both developing a similar product (an enterprise network switch).
- nudpiedo 4y agoalso the state of the art got slowly most of lisp features.. Nowadays it is not rare anymore metaprogramming in the form of macros, introspection or compiler extensions. With lisp is still trivial to make a metacircular editor and bootstrap another language, also to create DSLs, but the industry is not appreciating such things anymore as standarization and tool homogeinity seems to be nowadys much better valued.
- poulpy123 4y ago> toto=10 + a-20 I didn't read the name of the author but this line was enough to tell me he is french (toto, tutu are the foo, bar of the French programming world)
- clauderoux 4y ago:-) You have revealed my true identity... If you have a look on the page, you'll see that I do worse. I also provide a French version (VO) of the article.
- lifthrasiir 4y agoSimilarly, when you see a variable named `hoge` you can safely guess that the author is Japanese.
- hayley-patton 4y agoI had left some comments on this duplicate <https://news.ycombinator.com/item?id=33453020 https://news.ycombinator.com/item?id=33453020>, and am admittedly not sure if I should duplicate the comments here, which seems to have more activity. But in summary - this article really conflates implementation and language; in particular, the "mysterious link between Lisp and OOP" is that you can write the evaluator in an object-oriented way, which you also can in a functional way, procedural way, relational way, and so on.
- raydiatian 4y ago“Considering the space of all possible programming languages, which language yields the minimally-sized parser that targets parsing its own syntax?” IIRC Lisp is the answer to this prompt. As such, it is the fundamental language. This is why lisp.
- tromp 4y agoBinary Lambda Calculus [1] is the answer to that, having a parser included in its 29 byte self-interpreter. [1] https://tromp.github.io/cl/Binary_lambda_calculus.html#Lambda_encoding https://tromp.github.io/cl/Binary_lambda_calculus.html#Lambd...
- raydiatian 4y agowhoops! well, Lisp may not be the optimum but it’s for sure optimal.
- iLoveOncall 4y agoYou claim that Lisp is not dead but is there any proof to that? I mean, beside the few posts on HN praising it. I have encountered hundreds of software engineers over the years and literally not one has ever mentioned Lisp. Could it be that Lisp is not dead because the people that started learning programming when it was popular are not dead?
- skruger 4y agoClojure is pretty sprightly, perhaps even prolific, surely. For example, if you're in any way interested in databases, you will have come across https://jepsen.io/ https://jepsen.io/ who do all their testing using Clojure.
- vindarel 4y agoCL (and Scheme and Clojure) is still used in production, by Big Corps©, small companies, solo devs, for old projets or new ones. https://github.com/azzamsa/awesome-lisp-companies/ https://github.com/azzamsa/awesome-lisp-companies/ https://lisp-lang.org/success/ https://lisp-lang.org/success/ Google (ITA Software, used by travel search engines), Quantum Computing companies (HRL, Rigetti…), Ravenpack (big data analysis), SISCOG (metropolitan planning system), the ScoreCloud app (play your instrument, it writes the music score), Opus Modus (music composition), pgloader (from Python to CL), industrial-grade theorem prover, and so many more… An interview with a small company: https://lisp-journey.gitlab.io/blog/lisp-interview-kina/ https://lisp-journey.gitlab.io/blog/lisp-interview-kina/ (edit) another example, a nice tool and popular website made in CL: https://mathb.in/ https://mathb.in/ & https://news.ycombinator.com/item?id=32950465#32959255 https://news.ycombinator.com/item?id=32950465#32959255
- iLoveOncall 4y agoI'm sure you can provide me a similar list if we replace Lisp with Cobold. But nobody would objectively claim that Cobold is not dead. It's not because some companies have legacy projects or bad CTOs that the language is still actively used.
- 4y ago
- ctrlmeta 4y agoI see a lot of posts justifying why Lisp is nice and should be used. These are good. I agree with them. But I would also like to see posts about actual projects written in Lisp. Compare with Rust and Go. Rust and Go devs write articles evangelizing Rust but that's not all we see. We also see posts about so many useful Rust and Go projects too. How can we see a similar trend for Lisp? And no, it cannot be writing a Lisp in a Lisp or writing a Lisp in your favorite language or writing your favorite language in a Lisp. I am looking for useful projects that do something useful for users who can't give a damn what language the project is written in. I searched https://github.com/topics/lisp https://github.com/topics/lisp but a vast majority of the projects there are not software used by actual users in the wild. Most of them are projects that teach how to make a lisp or documentation about lisp. There are some useful software like browser, editor, etc. in there but they are few and far between. I know Reddit was written in Lisp but it isn't anymore. So that's a bummer. Does Roomba still run on Lisp? I can't find out with some quick searches. HN is written in a dialect of Lisp so that is one example. Can we have more such examples? Even better would be open source examples where any college student can contribute?
- Davidbrcz 4y agoEmacs is the prime example of a lisp project HN itself is (was ?) Written in lisp if I'm not mistaken There is this list https://common-lisp.net/lisp-companies https://common-lisp.net/lisp-companies Racket/scheme are lisp, you'll have to include them as well.
- phforms 4y agoAs a Lisp/Clojure beginner, I don’t find s-expressions any harder to read – in fact, I like how much they take away the cognitive load associated with remembering and applying syntax rules in other languages. But for me there is one exception that often hecks me up: comparative operators `<`, `>`, etc. It might be due to the conditioning of infix notation in math education, but when I write `(< x y)` or `(> x y)` I somehow often manage to get the order confused, while this never happens with `x < y` or `x > y`. I wonder if other Lisp programmers experience the same issue. This is my first year programming exclusively in Clojure, so maybe I just need more time to get used to it.
- thom 4y agoIf it helps, I always imagine a little guy skiing down the top of the sign, > he has to ski to the right, < he has to ski to the left. That's the direction the arguments are going highest to lowest.
- phforms 4y agoI think this might actually help, thanks! Maybe my problem was that when I write `(< a b)` I unconsciously read `< a`, which is where the confusion begins when I don’t explicitly think about the order. But the skiing guy helps to make it clear und easy to imagine what is going on (especially when I keep in mind that the operator is variadic in Clojure) and hopefully this will replace my “autocomplete error” in the long run.
- ctrlmeta 4y agoI don't have the same experience. I find s-expressions more pleasant to read. On the other hand, I find the syntax of C, Python, etc. to be jarring! The syntax of Rust and C++ feels like nails on chalkboard to me. What I find even more uncomfortable about C++ and Rust (and Python to some extent) is that they keep innovating on syntax and the syntax becomes more and more complex as years go by. Compared to that mess, Lisp's s-expression is a breath of fresh air. The brain ignores the parentheses soon (just as the brain ignores the braces in C-like languages) and relies on the indentation to understand the structure of the code. Having said that I do find the prefix notation slightly unintuitive for complex math formulas. Simple stuff like (< x y) is clear to me. No confusion there. But something like the formula for finding quadratic roots feels a bit unwieldy in s-expression syntax. I am sure that is because of years of conditioning of infix notation. Because pre-fix (or post-fix) are purer and unambiguous representations of the mathematical operations we perform. Yet conditioning has made pre-fix or post-fix hard to read for complex math formulas.
- PeterStuer 4y agoI used to love programming in the Macintosh Common Lisp environment. When the Mac moved to the PowerPC architecture there was a gap. Also at that time nouvelle AI labs moved to the PC architecture for access to embodied systems (robotics). Unfortunately on PC Allegro Common Lisp seemed the only viable option. I still think it could have been a great success, but the company pursued a business model at the time with hideously expensive licenses (the intrusive phone sales campaigns didn't help their popularity either). By the time the Lisp ecosystem recovered, many had moved on.
- lispm 4y agoMCL also moved to the PowerPC architecture. But it was later lost when there was the move to Mac OS X and Intel. The Open Source variant Clozure CL lacked the commercial backing and the nice IDE. Today the only really good GUI-based Lisp for macOS is LispWorks, which is expensive - but it is available on the latest macOS and the latest hardware. Clozure CL struggles to find maintainers. The PC with Windows had Allegro CL, Golden Common Lisp, Corman Lisp and LispWorks. Of those Allegro CL and LispWorks are still available, though expensive.
- anta40 4y agoWhat would be the challenge to write OS kernel in Lisp? Just X86, for the sake of umm simplicity, something like xv6: https://github.com/mit-pdos/xv6-public https://github.com/mit-pdos/xv6-public Yes, I've read about Lisp machines. Sounds like a super expensive machine only accessible by big-budgeted research companies. Most of Lisp folks on the net talk about how homoiconic language is elegant, or how REPL makes development faster, or how useful Lisp is for automatic theorem prover etc etc but very rarely I see Lisp folks talk about system programming, unlike C/C++/Rust folks.
- lispm 4y agoMezzano is a recent Common Lisp OS: https://github.com/froggey/Mezzano https://github.com/froggey/Mezzano
- anta40 4y agoGUI-based. Cool. But unlike xv6, I guess skimming the code wouldn't be that easy/straightfoward. And the build system looks unfamiliar, unlike xv6 which only requires 1 Makefile. Let me try it, anyway.
- ducktective 4y ago>OS kernel in Lisp GC is the problem there. Look up Carp-lisp
- hayley-patton 4y ago> GC is the problem there. It is? That didn't stop Genera, Interlisp, Movitz or Mezzano to name a few. Outside Lisp there's also Smalltalk, Oberon and Singularity to name a few operating systems with GC.
- ducktective 4y agoIf an OS has a GC-based kernel, it is automatically inferior to one lacking GC. That's why the cases you brought up are not used in industrial/production environments in modern times.
- keithb- 4y agoNormally I skim these write-ups and then move on, but something about this time finds me exhausted. Enough already. I was a huge proponent of XML and back in the day I would also evangelize its capabilities, its malleability. "What a great language for defining data structures that isn't tied to any physical storage requirements." Regex and enum restrictions on attribute values? Okay cool. Substitution groups? Woah. But then y'all started saying "I can't read this" and "angle brackets are too expensive" and suddenly the XML wave just receded back into automotive and logistics, and the world stopped complaining. I think it is time to accept that the world doesn't need Lisp. It might be your passion. It might just click with your way of thinking. That's all great, but it is still an existential crisis and you need to deal with it. The world is humming along just as well without esperanto and if it completely disappeared from monthly meetups, the world wouldn't notice. Trust me, I have been to the brink of destruction and waking up the next day is hard, but I have lived it and I know: it is possible to leave behind those things that you think define your being, your identity. You will not fade away completely. Instead, you will find that your existence can have meaning in other forms. Oh I see you brought a chess board to a basketball game. Okay cool, but just set that down and let's see if we can still have fun with this other game.
- viach 4y agoStrangely, it resonates to me in the context of finding "The Best Note Taking App" buzz. Whoa, X has backlinks! Yay, but Y is open source! At the end of the day we all open the default system notepad.
- scombridae 4y agotl;dr The parenthesized NPN (aka s-expressions) turns novices off to Lisp but in fact facilitates side-effect-free, syntax-free versatility. The long-winded code snippets author uses are terrible.
- moron4hire 4y agoMaybe, at one time, if you had first-class functions and map/reduce/filter, you could say "hey, this is like Lisp!" But that's pretty much every language now. Saying a language is-a-Lisp in this way is not a meaningful statement. You might as well say C# is a Lisp, or C++. The "big idea" in Lisp is not functional programming. That's nice and all, but CL showed Lisp could be just as good at OOP. The thing that makes Lisp "Lisp" is homoiconicity. And by that measure, we definitely can't call JavaScript a Lisp.
- penguin_booze 4y agoExcuse the digression. The proof is not in the pudding, but in the eating thereof. Thus: "the proof of the pudding is in the eating". In other words, someone having eaten the pudding, presumably without much ill effects, validates that the pudding was of a-OK quality. Thank you.
- bitwize 4y agoFor me, it's gotten to the point where Lisp is one of those "iykyk" things. Why it's so great can't really be put into words. It's a combination of factors, and... it's a feeling of thoughts flowing into code, of bringing a program into existence through dialog with the machine, expanding and refining it through that same dialog. Gerry Sussman once said of Scheme something like "I want a good language to talk about programs with my friends, and that goes for both my human friends and my electronic friends." Lisp is probably for you if that's how you see programming, as a fruitful collaborative discussion with your electronic ally. If you see programming as "translating business requirements into code" or somesuch, you know where to find Java and you will probably be very happy with it. I don't care.
- tabtab 4y agoA write-up describing why Functional Programming never "sticks" in mainstream dev: https://www.reddit.com/r/DilbertProgramming/comments/qg99f0/functional_programming_is_dysfunctional_givvitup/ https://www.reddit.com/r/DilbertProgramming/comments/qg99f0/...
- Koshkin 4y agoWhat I like about Lisp is that, for example, a configuration file can be written directly in Lisp (as opposed to, say, XML or JSON), in which case it can simply execute itself (i.e. without the need to have a separate interpreter to parse the text and to apply the configuration settings) - and it still would look like a configuration file rather than a piece of executable code.