6 ms·
If Lisp Is So Great (2003)
- Dolores12 11y agoOk lets say i want to program a webcrawler in lisp & c# and cant figure out how to do it. I simple go and google it, right? how to crawl web page in lisp - returns unrelated websites. i still have no clue how to do it. how to crawl web page in c# - second link returns me a solution to my question. So why would i waste my time if i can get things done faster in more popular programming languages? English or Esperanto?
- dman 11y agoTwo roads diverged in a yellow wood, And sorry I could not travel both And be one traveler, long I stood And looked down one as far as I could To where it bent in the undergrowth; ... ... I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I— I took the one less traveled by, And that has made all the difference.
- ubernostrum 11y agoThis poem was actually written satirically by Frost about going for walks with a friend who always complained afterward that they should have taken some other route and acted as if it would have been significantly better... when in reality it would have made no real difference: Frost's biographer Lawrance Thompson is cited as saying that the poem's narrator is "one who habitually wastes energy in regretting any choice made: belatedly but wistfully he sighs over the attractive alternative rejected." According to the Thompson biography, Robert Frost: The Years of Triumph (1971), in his introduction in readings to the public, Frost would say that the speaker was based on his friend Edward Thomas. In Frost’s words, Thomas was "a person who, whichever road he went, would be sorry he didn’t go the other."
- dietrichepp 11y agoI think that makes the poem especially apt, considering how some programmers fret over language choice.
- deleted 11y ago[deleted]
- copperx 11y agoIf you need to create a webcrawler out of pre-made pieces, you need to know what to look for. In this case, it would be a high-level networking library and an HTML parser. I haven't looked, but I'm sure you could find these libraries in Lisp. If you don't know what a webcrawler entails, then you might not be the right audience for Lisp as it exists at the moment.
- undershirt 11y agolisp has many dialects. try searching "webcrawler clojure"
- St_Alfonzo 11y agoIf I don't know how a webcrawler works, I would look at an programming language independent source like Wikipedia. After that I know what components I have to search for. For common lisp, the first thing I would search for is a HTTP Client and a HTML Parser. https://duckduckgo.com/?q=common+lisp+http+client https://duckduckgo.com/?q=common+lisp+http+client https://duckduckgo.com/?q=common+lisp+html+parsing https://duckduckgo.com/?q=common+lisp+html+parsing CLiki.net is always a good resource. If you've finished building a webcrawler, please create a website where you explain webcrawling for (common-)lisp. So the next one will not have the same problem :-)
- mbrock 11y agoIf you want to make your own DSL for crawling web sites, and you know Lisp, you'll probably be able to get it up and running pretty quickly. That's the kind of thing Lispers do for fun. Otherwise, just look at the language and what people say about it and decide for yourself if you're interested.
- hasenj 11y agoI read somewhere recently that YC uses ruby (or something like that) for their internal software, not lisp. EDIT: found the link https://jobs.lever.co/ycombinator/8703c1d9-af67-4826-90e4-74b5067c4dd7 https://jobs.lever.co/ycombinator/8703c1d9-af67-4826-90e4-74... > The YC internal software is mostly written in Ruby on Rails. We also use: JavaScript, React, AWS, and PostgreSQL. Some experience developing web apps would be helpful, but we don't care if you've used Rails before.
- Ygg2 11y agoI think Lisp's power is its greatest weakness. It's easy to make a Lisp, but hard to make them compatible. So you get one language with a billion non-communicating dialects.
- sklogic 11y agoCompatibility is vastly overrated.
- ridiculous_fish 11y agoI think it would be valuable for other commenters to share why they did or did not choose Lisp for their most recent project(s). I chose Go for a recent project, and TypeScript for another. Both languages make getting started very easy: they have straightforward installation, good tooling, and a lot of support for when things go wrong. I did not seriously consider LISP, and I think the main reason is that it's a very confusing landscape. Google "how to install LISP" and you get a page like https://en.wikibooks.org/wiki/Common_Lisp/First_steps/Installation https://en.wikibooks.org/wiki/Common_Lisp/First_steps/Instal... with half a dozen options. It's hard to choose and most of these do not look promising. For example, Steel Bank Common Lisp is one I have heard of, but their binaries are out of date and they use SourceForge (shiver). Arc is another, but their installation instructions do not inspire confidence with disclaimers like "don't use the latest version." My concern is I will spend two weeks diving in before hitting some hard limitation, and I'll be stuck. (Clojure is surely the best known modern LISP, but I do not want to depend on the JVM.) Speaking as an outsider, I think LISP would gain a lot more traction if its community coalesced around a single implementation. (Sorry if that's a clichéd argument). This would allow for investment in areas like documentation, platform support, tooling, etc. The functional language community went through this and the result was Haskell, which is excellent in all of those areas.
- sklogic 11y agoAll the modern lisps are installed just like anything else, whith apt-get install. I've no idea what are you talking about.
- giancarlostoro 11y agoUsually apt-get doesn't feature the most recent up to date release, also you assume everyone uses a Debian derived distribution of Linux, bad assumption. I'm on openSUSE and I'm sure many are on Windows or Mac.
- sklogic 11y agoI meant "apt-get" or whatever else is used in your system - brew, yum, whatever.
- ane 11y agoLisp isn't just a concept, it's also a family of implementations. The two significant branches are Scheme and Common Lisp. The only thing they have in common is using parentheses - they're about as different from each other as JavaScript and C. Scheme is more functional programming oriented, Common Lisp is less so. Scheme is very minimalist, it's most recent standard contains only about 20 syntax definitions! Unfortunately this transformed Scheme into a concept from an implementation. Compare this to CL, which has just about everything and the kitchen sink, and is more of a "concrete" language. To choose a Lisp is to choose an implementation. I'd recommend playing with all of them. Common Lisp, a Scheme (CHICKEN or Guile), or the "recent" ones like Clojure and Racket. Racket is very much a Scheme - it used to be called PLT Scheme - and has a bunch of PLT superstars building really cool stuff with it. Clojure, the JVM-based Lisp, has more in common with Common Lisp than any other, but embodies a strong philosophy about identity and value. It has a lot of common with Haskell in that regard, supporting immutable data structures and STM right out of the box. It also has really cool ideas like transients [1], transducers [2] and protocols [3], features which have since crept into other languages. Clojure is probably the most popular right now, and its ecosystem is growing every day, and can be used for building serious stuff. This doesn't mean you can't build cool stuff with other Lisps! CHICKEN Scheme has a great package ecosystem, so does Racket, Guile lags behind, and for Common Lisp there's a recent "State of the Ecosystem" article[4] that summarizes its ecosystem. "Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot." -- Eric S. Raymond [1] http://clojure.org/transients http://clojure.org/transients [2] http://clojure.org/transducers http://clojure.org/transducers [3] http://clojure.org/protocols http://clojure.org/protocols [4] http://eudoxia.me/article/common-lisp-sotu-2015/ http://eudoxia.me/article/common-lisp-sotu-2015/
- gaius 11y agoI still hope that Thrift will make the language you choose irrelevant, so long as it has bindings. Then we will all be free.
- paulsutter 11y agoI have a litmus question about this assertion that programming in language X is the secret to writing great software (quote from another pg essay[1]): > Our hypothesis was that if we wrote our software in Lisp, we'd be able to get features done faster than our competitors, and also to do things in our software that they couldn't... What were the results of this experiment? Somewhat surprisingly, it worked... We eventually had many competitors, on the order of twenty to thirty of them, but none of their software could compete with ours... It must have seemed to our competitors that we had some kind of secret weapon... We were just able to develop software faster than anyone thought possible. Here's a better experiment: - Take two teams: one with great programmers, and one with mediocre programmers. - Force them to swap toolsets. Question, which team will outperform? If language is the secret, the mediocre team should outperform the talented team. But that's preposterous. Great developers write good software fast. Bad developers do otherwise. All developers work best in their favorite tools. Because they are adept using their favorite tools. [1] http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- sklogic 11y agoGreat team with mediocre tools would work many times slower (and will be more likely to quit due to boredom). You have to compare equivalent teams instead.
- Nicolas0682 11y agoIf you have a set of "great" developpers and you force them to use a crappy toolset you are not an interresting company for them. They will simply resign. It so quite possible the long term productivity will be better with the mediocre programmers team regardless of their tooling. If you have a team of great programmers you also need to give them the possibility to do some interresting stuff. And that's basically that, when the great programmer will come and ask to change tooling or improve you'll refuse. They'll understand you prevent them to do anything efficiantly and so they'll resign as they waste their time here. But even with great tools at their disposal, a mediocre team of programmer will perform averagely. Because you don't just need to have the tool lying around, you have to know how to use it, what is good, what is bad, when to do this or that. if there not somebody behind them to coatch them all the time, they will not leverage it. When for example a person learn design patterns, they want to use them all the time. The great developper know the patterns, understood the key concepts behind and know when to use and not use them. As for the language it is more crutial than you think. It is basically the shared basic knowledge and discussion medium in your company. And your APis are also part of it. If you have high level concepts coming from both your API and programming language and your developper know them they'll think directly in theses high level concepts and will be able to ignore the irelevant details. What make Java more efficiant mostly is that you can forget to think about freeing memory and it is almost impossible to get a core dump. Instead of having to learn and speak the concepts of allocating and freeing memory your developpers will be able to concentrate on other things. And what make C more efficiant than assembly is that you can actually write easily functions, that you can define structures and that the compiler take care to compute the proper shift in memory to access the differents field and so on. But java, especially before version 8 is lacking key concepts like basic functionnal programming. So when a developper want to filter a collection, a pretty common operation, he will just iterate, check the condition of the filtering and return a filtered collection. It will be very specific and the level of expressivity of this code will be quite low. A great developper would at leas isolate that code into a function with meaningfull name or define a generic filter function and pass predicate as anonymous functions. But the lack of proper lambda expression will prevent to fully leverage it. But once everybody is accustomed to functionnal programming they'll just use filter and a predicate. The intent is much more clear, almost self documenting. The more expressive you can be, the more common knowledge you can have, and the more you can concentrate on issue key to your program and the less you can spend time on unecessary details, the more productivity you get. And yes, this start with a good programming language with a good echosystem and a team that efficiant with it. That's why Java or C/C++ are so often used: they are the easiest languages when you need to hire because more people know them. This doesn't mean they are the best language for your problem at hand.
- personjerry 11y agoSo, what about Lisp makes it great? I learned some Lisp in a CS course a while ago, and while it certainly seemed interesting, I didn't feel anything special (perhaps I ought to spend more time with it?). Could a pro give me a short list of the biggest advantages, compared to C or Python?
- Synaesthesia 11y agoThe major advantages are extreme modularity and conciseness - you can write much shorter expressions than competing languages, like C, Python, Java etc. Macros are another big feature, which allow you to generate code easily and lastly the ease with which you can write self-modifying code (Homoiconic code) is often praised. Here are some more good answers to that question in a Stackexchange thread http://programmers.stackexchange.com/questions/9320/why-is-lisp-useful http://programmers.stackexchange.com/questions/9320/why-is-l.... edit: another one - http://stackoverflow.com/questions/2036244/whats-so-great-about-lisp http://stackoverflow.com/questions/2036244/whats-so-great-ab...
- progman 11y ago> you can write much shorter expressions than competing languages, like C, Python, Java etc. Exactly. For instance, consider Clojure, PicoLisp, Racket and Wolfram in http://rosettacode.org/wiki/24_game/Solve http://rosettacode.org/wiki/24_game/Solve.
- erik14th 11y agoI don't think you should choose the tool before you know the problem. Computer programming is a pretty vast domain. Lisp was probably a good tool for pg's startup. It was an ecommerce builder, most lisps are great at metaprogramming and creating DSL's. But his startup also used C and some other languages for different problems. What I think is great about Lisp is its idealistic simplicity. (function parameter1 parameter2) Everything is a list, pretty much everything that doesn't look like a list is just syntax sugar. My opinion is: unless you have a hard requirement, just use the language you already know and like. If you need to squeeze every tiny bit of performance, you might just need to use C++ or C. If your client wants a complete website in a ridiculous short amount of time, going for python,ruby or even php would be a sane choice. If your problem involves DSL's, metaprogramming or impressing people with how alien your code looks, check out some lisps, maybe Haskell.
- raspasov 11y agoTo answer some of the people in the thread that have asked why you might want to choose a lisp, here's an answer. I have chosen a lisp (Clojure) because: - Clojure allows me to write code that is robust, fast, and simple - because it's simple, most Clojure code is easy to reason about, now, tomorrow and six months from now - focus on the data (JSON, html parsing, whatever) and the transformation of it, which is arguably what we do most of the time in modern backend and frontend (React-based) applications - pervasive and strongly encouraged immutability, managed concurrency, discouraged callback hell, etc which makes it hard to write bad code in the first place - I can change functional+dynamic+immutable code faster than any other code, which allows faster experimentation and iteration on features - it works very well for both backend services (Clojure/JVM), and browser applications (ClojureScript/Google Closure compiler), with the language staying 97% the same
- lolo_ 11y agoSadly this article (IMO) is not one of PG's better ones, and I am quite surprised by the lack of self-awareness around it - it boils down to 'if you're clever, you'll use and appreciate this language', when actually there are practical reasons as to why lisp is not so popular. It actually feels really closed-minded - like you've walked into a conceited professor's office and told him you have doubts about one of his ideas and he's looked down his glasses at you and talked about how most people prefer McDonalds to amuse-bouche at Pierre Gagnaire in Paris. How about considering whether there are reasons other than 'it looks foreign so lesser programmers don't bother with it'? If you google around you find there are plenty of people who suggest practical reasons (too many fragmented implementations, hard to debug, etc.) as to why it's not caught on, and in fact a lisp like clojure seems like an attempt to learn lessons about what might work better or not. But no, we have these patronising proclamations and the article is over. Don't get me wrong, I'm not anti-lisp per se, but I've come to think as I've seen more of the programming world (and worked with good developers as well as bad) that language has less of an impact on a project than I previously thought. What I hate is the smug attitude a lot of lispers have, as if it's some incredible magical secret that only smart people can understand and if only we'd all see the light this world of shit code would turn upside down. It's hard to prove anything in the complicated world of programming, and I just don't buy this idea that it's magically better. We should admit the subjective nature of these things, admit that it's really hard to tell what kind of a difference a language makes and instead of smug patronising talk of how wonderful language X is, point out what is unique about the language and stay humble. I much prefer PG's more practical detail-orientated explorations of lisp and what makes it powerful in the first place to this one.
- i336_ 11y agoApparently the "toy benchmark shootout" thingy the article links to has been modernized to being utterly unusable. Here's what I think the article was linking to: http://web.archive.org/web/20051202060638/http://shootout.alioth.debian.org/benchmark.php?test=nestedloop&lang=all&sort=cpu http://web.archive.org/web/20051202060638/http://shootout.al... This is also potentially relevant (the snapshot is noninteractive): http://web.archive.org/web/20070216224601/http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all http://web.archive.org/web/20070216224601/http://shootout.al...
- codyguy 11y agoThis question would be on the lines of : * If you are so smart why aren't you so rich * If your product is so great, why aren't you the market leader already
- Nicolas0682 11y agoGood question. For Paul Graham it certainly worked. By combining a great team of competant people, a small startup environement were you can concentrate on getting thing done and by using powerfull tools they made their software, managed to have it evolving faster than their competitor and then sold it to Yahoo. Ironically since the tool has been brought back by Yahoo its growth stopped and nobody know of it anymore. Is it because of the different people working on it? Is it because they had now a different management structured that cared more of politics? Or was it because they decided to recode everything in C++ ? To me that's likely a combination of all the things. That's the key point. A great programming language and echosystem is a great start. But that's not enough. You also need pragmatic management that make decision for the good of the company and not for politics and you need to have employees that care of their job. At the end, you should know if you are in a model of small efficiant teams or huge average teams. Most company start with the former and end up in the later as they grow. Ultimately that why the next start up has a possibility to beat them. You would never be able to beat microsoft if everybody inside had a startuper mind-set. They would own the world. That why people fear google so much. I'am pretty sure they have lot of politics and are already more in the later phase than the former but they at least managed to keep bright people working for them.
- joesmo 11y agoI definitely agree that the most popular languages, tools, frameworks, paradigms, etc. are by definition not the best. These are popular because they're used by average programmers. They get the job done, though not in the best way, and are popular because of that (see for example Javascript). I found that Clojure (my first Lisp) was the easiest language to pick up that I've ever learned. Partly, that's because I've been doing this a long time, but I also think it speaks volumes to the simplicity of Lisps and Clojure in particular. I have no doubt that I could teach it to programmers and non-programmers alike rather quickly and I really wish it was at least studied, if not used, more so that people would have more experience with functional concepts. Even just a week or two of studying it is quite beneficial and a good contrast to typical OO languages.