14 ms·
Why I like Common Lisp
- agumonkey 12y agomobile/light version http://p-cos.blogspot.fr/2014/09/why-i-like-common-lisp.html?m=1 http://p-cos.blogspot.fr/2014/09/why-i-like-common-lisp.html...
- pivo 12y agoI have never been more productive than when I'm developing with Common Lisp in Emacs with Slime. It's a really fantastic environment.
- malisper 12y agoDon't forget paredit, ac-slime, and redshank.
- pjmlp 12y agoStill, I think they fail short from the Common Lisp commercial offerings in terms of the whole package.
- lispm 12y agoTrue, but for most stuff it is quite good. I use Clozure CL with Emacs/SLIME on ARM/Linux systems and it works great.
- _delirium 12y agoIt may also depend on people's background and their language mix. I hear good things about the fully integrated Lisp systems, but I'm so used to how I've customized my text editor, and how it's integrated with various other things I also use, that the bar for prying me away from it is fairly high. If I did 100% CL development it might be different.
- pkaye 12y agoWhat exactly do you develop with Common Lisp?
- mrottenkolber 12y agoI develop everything (typesetting software, compilers, web server, email client, a desktop environment just for me, a sound synthesizer, my invoice generator, IRC bots, full blown web apps, a wiki engine and tons of general purpose libraries) using Common Lisp. My love for the language comes especially from the fact that its so limitless by design. I have DISASSEMBLE and I have DEFUN. I have ETYPECASE and I have LOOP. Lacking a language feature? Add it with ease and incredible performance.
- pkaye 12y agoAre any of these software tools available as open source so I can see the advantage of using Lisp?
- malisper 12y agoNot the parent, but I recently wanted ssyntax[0] in Common Lisp, so I decided to write an implementation for it[1]. In doing so, I created a DSL for defining ssyntax (made up of defssyntax-test, defssyntax-macro, and defssyntax-sym-mac). Just note that my implementation uses a library of utilities I wrote[2] and is not pure Common Lisp. [0] http://arclanguage.github.io/ref/evaluation.html http://arclanguage.github.io/ref/evaluation.html [1] https://github.com/malisper/Clamp/blob/master/experimental/ssyntax.lisp https://github.com/malisper/Clamp/blob/master/experimental/s... [2] https://github.com/malisper/Clamp https://github.com/malisper/Clamp
- mrottenkolber 12y agoSome: http://mr.gy/ http://mr.gy/
- kourt 12y agoPlease tell us about your stack. Which implementation of Common Lisp do you use?
- matrix_nad 12y agoHow long was the learning curve to CL, if you don't mind me asking? I remember learning Lisp and all that reverse polish notation was very unorthodox to me.
- agumonkey 12y agoWhat was the hard part ? the prefixness ? the parens or the language basic building blocks (cons, map*, lambdas) ?
- papaf 12y agoI learnt from the Seibel book: http://www.gigamonkeys.com/book/ http://www.gigamonkeys.com/book/ You can start writing simple programs in a weekend. The learning curve is quite gentle.
- diego 12y agoPedantic comment: it's not reverse, it's just Polish Notation. http://en.wikipedia.org/wiki/Polish_notation http://en.wikipedia.org/wiki/Polish_notation
- wtetzner 12y agoFrankly, arithmetic expressions are really the only part that's unusual. There's not much difference between: println("some text") and (println "some text")
- Chattered 12y agoIn Haskell, I have the luxury of infix arithmetic, but I'll still happily write sum [a,b,c,d,e] when I have a lot of summands. It's just neater, especially when you format as sum [summand1 ,summand2 ,summand3] This is more natural in Lisp. Because of this, I always go to Lisp for things like my weekly shopping budget. For bonus points, I can put my cursor at the end of a close bracket and get Emacs to evaluate the enclosed subexpression, which I do lots to figure out the value of individual terms.
- 12y ago
- csdrane 12y agoNot too long ago I was researching what Lisp to learn. I contemplated Common Lisp, but ultimately chose to learn Clojure. The latter won because the development community seems to have more life to it. Additionally, the fact that one can import existing Java libraries is a huge plus. Very much enjoying everything so far.
- josteink 12y agoI've dabbled in Scheme (SICP), Clojure, Elisp (Emacs) and now Common Lisp. My opinion is that there is value in at least looking at more than one. That way you will see what compromises have been made, and how it affects your program. While Clojure is definitely more a in-thing right now, it's nice to see "the originals", where it all came from. There are several things Clojure does really well, at the cost of other aspects. It's a very opinionated language, and for some, it may be too opinionated. I find idiomatic Clojure-code to be a bit on the too terse side, affecting the clarity of the code. Let's also mention the JVM. While this is often used as argument for Clojure, it can also be an argument against it. Now your application needs a JVM to run. That excludes my Raspberry from ever running it, unless you find 30 seconds+ startup time to be acceptable. I don't. Looking into Scheme, you will definitely appreciate the simplicity of the language. Unlike Clojure, there's no magic behind the curtains. What you see is what you get, and yet it's still so capable. That's quite eye-opening and magic in its own right. Scheme however isn't a standardized language, like Common Lisp. In that regard you cannot guarantee that what works in one Scheme-implementation works in another. With Common Lisp you can do that. And from that point of view, it makes sense to have a good story on modules/packages. And Common Lisp has that. In plenty. In Clojure, with Leiningen, you can easily declare what dependencies you have and have those fetched build-time without any extra work what so ever. Sounds good, eh? In Common Lisp you can do that in ordinary code, runtime, even in the REPL. Your code just declares what it needs, and it's there. Just stop a second and think what that does to extensibility, when software written in CL lets you plug your own code in. All in all, once you know a LISP looking into others is much less work. And as such, you should definitely check out others. Maybe there are other LISPs which suites your needs even better? Unless you look around, you will never know.
- 12y ago
- brudgers 12y agoThis article illustrates one of the hurdles the Common Lisp community often sets before itself when it produces a piece of marketing. It points to resources that are not immediately obtained or that don't directly touch on the large subjects mentioned. For example, one of the important capabilities mentioned in the article is getting close to the metal with profilers and hand tuning code and the runtime environment. Yet none of the links discuss this directly or provide tutorials. The discussion about the wonders of CLOS suggests reading The Art of the Meta-Object Protocol - a $35.00 345 page dead tree tome which Amazon will get to you in about a week if you opt for free shipping. Graham's Ansi Common Lisp is of course even more obscure - it's been out of print for years and from Amazon you're in the realm of individual sellers [my anecdote is that it took about a month to get the copy I ordered - the seller was a nice person but it was a couple of weeks before they read their email from Amazon letting them know someone had purchased their copy]. The author goes on to recommend LispWorks as a platform. It's $1500 for 32 bits in North America and $4500 if you want to use all 64bits that your OS probably runs under. Sure there's a free version, it's 32-bits, not licensed for commercial work, and crippled. Don't get me wrong, the free version is probably fine for playing around with, but this article targets people for whom tuning the heap and GC are appealing, and this tends to be a professional rather than hobbyist market segment. The "early Web 1.0" vibe is unfortunately common when the Common Lisp community attempts to promote Common Lisp. Let's face it, the linked Lisperati site looks a GeoCities page [a good one]. The LispWorks page requires four clicks to get to the price of non-crippleware. The author's own guide links to academic papers and black and blue on white websites. The issue is that the Common Lisp Community is not just sending signals that most of the potential market ignores, it's that it is sending signals that turn the potential market off. I will unequivocally say that crippleware is no longer a viable approach to achieving significant developer mindshare. The landscape is open source and $4500 a seat [and calling it Enterprise Edition] is only going to hit some [potentially profitable] edge cases. Of all the places accessible from the author's post, the only one that looks in touch with the present is the original article on BlogSpot. Everything else screams "This ain't for you" at most people. It makes Racket look hip. And that's hard to do.
- lispm 12y agoI think the hurdles are less than you think, but Common Lisp is probably not for you. But I think that's fine. There is already a lot of stuff for 'most people'. Why does everything need to be built for 'most people'? Why isn't it okay that there are things which are not for most people? Haskell is not for most people, Prolog is not for most people, Coq is not for most people, why does Common Lisp need to be for most people? The article describes why Charlotte Herzeel likes Common Lisp. maybe she is not 'most people'? * you don't need to read AMOP to use CLOS. It's there if you want to know 'MORE'. Much more. Much more than you ever wanted to know about reflective OOP. Alan Kay of Smalltalk fame recommended the book as the best book on objected-oriented technology in a decade. ordering it over your book store is easy. But I don't recommend it to anyone wanting to learn Lisp. Read it if you want to know how CLOS is implemented or extended. A bonus point: it shows excellent coding style. * 'Yet none of the links discuss this directly or provide tutorials.' The LispWorks, SBCL, Clozure CL manuals discuss that. Since there is so much stuff to link to, I recommend to go fully old-school and read the fine manual. * as the starting book most will point you to Practical Common Lisp by Peter Seibel. Free online and available printed. It even explains a lot of CLOS. * 'The author goes on to recommend LispWorks as a platform.' I do that too. Not the free version. The full commercial version. I even have the full 64bit 'Enterprise' version of LispWorks on my Mac. * Web 1.0: Even worse, a comic book about Lisp programming using Common Lisp. http://landoflisp.com http://landoflisp.com * '$4500 a seat [and calling it Enterprise Edition] is only going to hit some [potentially profitable] edge cases.' - well you may want to compare what a commercial Smalltalk, Ada or Prolog system costs... The market is small and lowering the cost would help letting the company survive. Something must be working for them: LispWorks was first released 25 years ago. * 'Everything else screams "This ain't for you" at most people.' - well, Common Lisp is not for most people. For most people there are many simpler options. For those wanting to work on fancy Web X.0 stuff in an easy way, there are better options - and that's totally okay. Common Lisp is not for most people. For those who want to use Common Lisp as free and no-cost software, the article mentions 'Clozure Common Lisp' and 'SBCL'. I'd say that's excellent choices. I use those, too. Still I prefer the commercial and expensive LispWorks...
- yodsanklai 12y agoWhat are the advantages of Lisp over ML (more specifically, I know Scheme and OCaml). My knowledge of scheme is probably incomplete, but for what I remember, Scheme is OCaml without static typing, sum types, pattern matching, module system. Scheme is more dynamic (dynamic types, code as data, symbols) but i find type safety much more important (and in a language with type inference, it comes with little overhead). Am I missing something about Common Lisp?
- davidxc 12y agoCommon Lisp has macros. Paul Graham's book On Lisp is usually pointed to as the best treatment of macros in Lisp. CL also has many more features than Scheme, as mentioned in the other comments here.
- soapdog 12y agoRegarding macros there is also the book "Let Over Lambda"
- jrapdx3 12y agoIt's probably not exactly true that CL has "more features" than Scheme. That is to say, the Scheme "core" language (well, as of R5RS) describes the essential functionality that qualifies as Scheme, but the major implementations have tons of additional/optional utilities, convenience features and extensions. The sum total is that the complexity of CL vs. Scheme may not in practice be all that different. Take a look at newer Scheme standards, R6RS, R7RS, the SRFI's, and implementations like CHICKEN to see what I'm referring to. Still CL and Scheme are different languages, each has its fans. It does seem to imply that the stuff it takes to get the job done is more or less independent of language, whether it's included with the base language, or contained in modules or libraries, the features need to be there somewhere in some form.
- lispm 12y agoThat's basically true. The more advanced Scheme implementations (and there are several) offer a lot of functionality. One thing I still find true: Common Lisp has much more useful functionality in the core. Thus the core and the libraries are often actually using them. Example: by default Scheme has poor argument lists. Thus a lot of code does not use keyword args and the compiler usually does not know about that. Another example: Common Lisp has a standard object system. All implementations support it and some use it extensively. In most extended Common Lisp much of the libraries is using CLOS: conditions are CLOS classes, I/O is based on CLOS, etc.
- TheMagicHorsey 12y agoI'm no expert, but it seems like its easier to get started with Clojure than Common Lisp. There are tons of free Clojure resources and tutorials. There is a great IDE that works quite well (LightTable), and the command line tools with Leinengen are pretty sweet too. I realize that you can probably optimize your Lisp code a lot more than you can your Clojure code since Clojure is on the JVM, but right out of the box Clojure performs as well as naive Common Lisp, so its probably a more attractive Lisp for most beginners.
- eudox 12y agoCommon Lisp has all those tools, what it does lack is a well-designed website that says "Here's how you start". The closest thing to that is probably the common-lisp.net website, and that's just an unfinished barebones Bootstrap example. I've been meaning to design a better one, but that's going to take some time.
- Blackthorn 12y agoA website that both provided a starting off point and a unified reference would be a great improvement to the CL community, on the same level as Quicklisp.
- hvd 12y agocoincidentally I am working through land of lisp, recommend it: http://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/1593272812 http://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/159327... Do I see myself using lisp in production code? Not in the near future. I do think there is value in learning something that exposes you to thinking in different ways, till now what Ive gained is that Python is pretty lispy!
- hcarvalhoalves 12y ago> Python is pretty lispy! Check this out https://github.com/hylang/hy https://github.com/hylang/hy
- hvd 12y agothanks!
- pankajdoharey 12y agoThis same article was published on planet Lisp http://planet.lisp.org/ http://planet.lisp.org/ by Pascal Costanza
- _delirium 12y agoPlanet Lisp is just a blog aggregator, and his blog is one of the ones it aggregates.
- pankajdoharey 12y agoThis same article was published on planet Lisp http://planet.lisp.org/ http://planet.lisp.org/ by Pascal Costanza
- mck- 12y agoWhat I like most about Common Lisp is how it made me a better programmer. The different paradigm of coding trains your brain in different ways which offer perspectives on problem solving that I otherwise wouldn't have considered. Note that for the above effect, it is irrelevant what Lisp you choose. Yes, it also applies to learning any additional language, but because Lisp is a different breed altogether (as opposed to Fortran-derived languages), more value is to be had from the diversity. I used to be a huge fan of Common Lisp (even wrote my own series of blogs on why I love it a few years ago) -- still use it in my daily work -- but I came to realize that it's not perfect. There are many things that Clojure has improved upon, e.g. consistent accessor methods, shared immutable data structures vs copying, and probably many more once I dive deeper -- there's a reason why even pg started recommending Clojure over CL or Arc. I've been coding in Common Lisp for about 3-4 years. Even the algorithm of my startup is written in Common Lisp. There are definitely moments of sheer joy when I switch back and forth between Javascript and Common Lisp. But also moments of annoyance... sometimes certain algorithms are just more naturally imperative, and CL makes it hard not to write recursive. tl;dr learning a Lisp is highly recommended. It does not matter which flavour. Or just go read SICP.
- wirrbel 12y agodo you have a link/source for paul graham recommending Clojure?
- juliangamble 12y agoHe's said its probably your best bet: https://news.ycombinator.com/item?id=4487793 https://news.ycombinator.com/item?id=4487793
- eruditely 12y agoSeconded.
- wtbob 12y ago> CL makes it hard not to write recursive. Say what? Are you sure that you don't mean Scheme? CL has LOOP…
- TheMiller 12y agoI just find it utterly fascinating that these discussions on the merits of (Common) Lisp still draw 100 comments within such a short time. This has been going on for decades, in many different venues. This by itself should clue newcomers in to the notion that the language (family) may be worth examining in some detail. :)
- johan_larson 12y agoAnyone have something better than a wild guess about whether Lisp is getting more or less popular? It was never a very popular language in the first place, having lost out to the spawn of Algol.
- myth_drannon 12y agoYou can check https://www.openhub.net https://www.openhub.net (ex Ohloh) that tracks open source projects. Go to the tools section and compare languages. Lisp has been in decline for a long time, based on number of contributors and projects updated. Scala is doing exceptionally well https://www.openhub.net/languages/compare?measure=contributors&percent=true&l0=clojure&l1=lisp&l2=scala&l3=haskell&l5=-1&commit=Update https://www.openhub.net/languages/compare?measure=contributo...
- lispm 12y agoThe graph does not look very convincing. It talks about 'the number of developers', while the vertical axis is labelled in %. What is it now numbers or percent. If percent, then of what?
- _delirium 12y agoAt least in terms of the open-source community it feels much more lively now than, say, the early 2000s. There are new books like Practical Common Lisp and Land of Lisp, SBCL has matured into a solid implementation, Clozure CL was open-sourced, and Quicklisp has really improved the convenience of using libraries. I don't know whether that translates to more popularity overall, though. If you mean the overall Lisp family, I think it's more clearly on an upward swing, especially due to Clojure's popularity (and if you're willing to stretch, Julia smuggles a Lisp-like language under cover of Matlab-like syntax).
- pnathan 12y agoI love Common Lisp; I've been writing Common Lisp at home for something around 7 years. It's fast, flexible, expressive, and deeply programmable. I won't say it doesn't have its warts: the namespacing and packaging systems are kludgey, and the extensibility of built-in operators is poor. It's a dynamic language to boot, which implies type derivations are often estimates at best (painful sometimes on a poorly tested codebase). But, Common Lisp, above all that, is an integrated development system which allows live and fluid development. I can't stress enough that it is a deep and joyful technology which lets me achieve more faster in it. I only wish there were jobs in it. :-/
- rusabd 12y agohttp://lispjobs.wordpress.com/ http://lispjobs.wordpress.com/
- pnathan 12y agoNot a bad feed, but... Common Lisp has under 10 employers in the US/CA, as far as I can discern: Clozure Associates, Grammarly, 1? 2? defense contractors in the Seattle region, ITA (now owned by Google), a company in Colorado, D-Wave in Vancouver, BC (Canada), and a handful of very small consulting-type shops. Occasionally there are some university jobs that come up, usually in Boston area. I've been monitoring things for a while, and the prospects are dim. Suppose I'll just have to run my own business, eh? :)
- kilon 12y agoI have been coding for fun for 26 years and played around with most popular languages. Common lisp has by far the worst community I have experienced. There is a minority of people that elitist , rude even hostile to anyone that is new to the language. I never gave up a language because of the community but CL community really was very hard to tolerate. Elitism and snobbery is far from uncommon in the coding world unfortunately. I think as a language it deserve the reasonable praise it gets and certainly a beautifully designed language, powerful and yet flexible. I enjoyed very much coding in it and with the help of lispers I was introduced to a language / environment I fallen in love with Smalltalk , Squeak and now Pharo.