Before learning CL I was a fairly decent, C, C++ and Perl programmer. Did assembly, Pascal, TCL and Awk. Up to that point, I always had to pause a for a minute when starting a new project/script, think about its scope, and choose a language based on the necessary performance, development speed, expressiveness, available libraries, etc. (and whether whoever was going to read the code afterward knew the language; C was often a natural choice for code shared with others on Unix, C++ for MFC/COM, Perl for sysadmin stuff, and TCL and Awk for my own tools.)
I learned Lisp in over a month, to spite someone (I dared a notorious troll I would write an AI bot of his choice if he stopped spamming us, youthful bravado for sure, and I lost the bet) While researching "AI" I came across Winston and Horn's "Common Lisp", then the hyperspec, then a few more books over the course of a month. I sat down with SICP and did the exercises on my break, while I was in school and waiting tables.
After I learned it however, specially with CLOS, there was no contest. Three months after buying Sonya Keene's CLOS book it was fair to say I forgot all other programming languages. There were no more "projects"; I no longer had to sketch out designs on paper or do "requirement analysis" (something I was told in school was necessary for all software.) For once, the great ideas in my head were a new emacs buffer away. I could write code faster than I would in Perl, Awk or TCL, it ran as fast as C++, and it was more expressive than the English in my head. I could type "commands" into a shell get a dialog embedded in my window, a few more commands and it would move to the upper right corner, I could change its name property and add text to it, then I could fold that dialog box into a menu-item named "Help" in the menubar and call that dialogbox "About". Amazing.
I went on hacking like this for about year when I realized I was doing the "wrong thing". You see, I have been using CMUCL with its builtin editor and writing GUI applications in Motif (it was 2001 and Motif wasn't open source yet, so I got the hang on Lesstif and learned its quirks.) Right around this time, Linux GUIs were maturing and people were being snobs about their Enlightenment themes and dissing each other over their choices of Windows Manager. So I was peer-pressured into learning DHTML and Web Design. I read comp.lang.lisp and those too were snobbish condescending idiots who flamed everyone, specially competent programmers whose work I admired (including Scott McKay and Robert Fahlman (the very people who gave me my CMUCL.))
It was really hard to be a Lisper for a while, specially a young impressionable one who read cll uncritically; news of corporate giants coming with new tools and programming languages to enslave humanity were abound. First C++, then Java, then XML, and finally .NET. You literally had to pick your battles and choose a corporate sponsor or you would have no future in computing! (you think I am kidding?) cll is all doom and gloom, and of course, there is the obligatory stabs at Lisp vendors by Open Source proponents, and stabs at Open Source for people alleging it's killing our beloved vendors. Every once in a while there was news of a Lisp dialect that's going to kill Common Lisp (Smalltalk, Dylan, and the ancient religions of Mesopotamia.)
Fuck, that was painful.
All the while I was following this 4-year long intellectual funeral, becoming ever more "hardcore" and learning mathematics, there was a small group of "Yobos" silently kicking ass and churning out great software. CMUCL got forked to SBCL, added unicode support and threads, not to mention easy building, SLIME was a new Emacs mode better than anything before and since, Cliki was launched, C-L.net, and the #lisp IRC channel was born and hit puberty overnight. Perfect ecosystem.
Today, Lisp is nothing like what it was 8,7,6, even 2 years ago. It's not just "good" in the well-explored text book fashion; no, it's _good shit_. Get work done good. Think, hack, ship, bill for it good. 2-3 products per month good. You still have to know where things are, who is working on what, what's maintained and what's obsoleted by what. Sure. But there is absolutely no lack of libraries.
Come on, man. If you're doing something worthwhile, it likely takes 2-3 months (if you're lucky) to just understand the problem. Common Lisp is an amazing language and development environment, but it won't help you actually solve the problem any faster, only to implement the solution. No silver bullets and all. I love Common Lisp, but the whole "code this in a weekend" thing has got to stop. Good software takes a damn long time to develop in any language, because the language isn't the bottleneck.
Right, however don't forget there is a continuum of software types. The great majority of the code I write is customization of previous software for a new client. If you write enough business software, you will find out there are about 5-10 main components that they all have, and each new project differs only in how they're assembled, and the per-client business rules used to orchestrate them.
For example, it took me months to implement a decent RBAC system in CLOS; prototyping it literally took hours, just reading the wikipedia page. However, I had to refine that after every client, not just customizing it for the client, but iterating over it to make future customization unnecessary.
Billing, accounting, collaboration, knowledge management, human resources, lead management, CRM, inventory, etc. Do web-based implementations of those for a year and you will end up with the core necessary to ship any business software product in a very short time, assembling from your own repo. Augment that with web APIs (which I happily pay for) and you're there.
Another thing that I have become expert at is using other people's software. I am a hopeless cliki addict, mainly because I rarely code to scratch an itch; I have been writing Lisp code for years now, and for the last year, that's what I did full time :-) I have come to know huge libraries so intimately, including their quirks, that I can patch together something fairly quickly and get it out of the door.
That first 80% always takes only 20% of the time, and that's the first month for you. Some languages seem to let you do that month of work in three weeks, or two weeks, or with a framework it might take a week. But that last 20% is the part that always takes 80% of the time, and it often seems like whatever language you use, there are always the same, small, insidious errors and tweeks that need to be done.
Sure, there's some hyperbole in his post… but don't underestimate the ability of good technology and a REPL to aid you in actually understanding the problem, or the available technology, or how you might solve it.
As a recent example, I find Clojure's REPL to be invaluable when wrapping my head around Java libraries. The features of a Lisp make sketching and exploring easier, and that's part of understanding the problem.
I forget the exact quote, but it's something like "I never learned to see properly until I tried to draw". Pertinent.
I worked 8 months on a small-business management package in MFC/C++ using the "RAD" Visual Studio 6. That was the last piece of major code that I have written in something other than Lisp. Immediately after that, I wrote a similar package in CL with a web-based interface, using the free allegro serve; this one took me about a month, though it was functional after the first week.
I know what you're thinking; the previous project gave you the hindsight necessary to implement the second so quickly. Well, not really. The stuff I did in Lisp where things that have been on my requirements for the first project but was never able to implement without huge investments in time. MFC is the most brittle, most fickle and fidgety POS of all time; it generates the boilerplate for you and it expects to you to use its skeletons just the way they are. It took me months to experiment with the various data access APIs, ADO, DAO, and ODBC, moving from one to the next as problems arose, and each change of backend requiring a complete code overhaul.
Now I write database code in native idiomatic code; I can change the backend with a feature. I would sometimes forget to #+postgres on deployed code and find everything working but not see any change in the postgres logs, just to realize I have :sqlite3 pushed into my features ;-)
Heh, funny you learned from the Winston & Horn book - that was my first too.
The biggest philosophical problem I have with Lisp (and a lot of dynamically typed languages) is the lack of compile time safety-nets (it really bites me when I'm trying to work with a large, distributed team). I miss interfaces/abstract-classes, type checking, etc. I know they aren't necessary - but I'm human and make more than my share of stupid mistakes (and I prefer my mistakes be caught at compile time). Unit testing/etc alleviate the pain to the degree - but it requires a lot of discipline to maintain good coverage.
The real trick is that I'm probably faster in Lisp than anything else, but I've met Python and Haskell hackers who are just as fast as I am - so it must be possible to use those languages well (you might argue that they'd be even better in Lisp ;-)).
What is was it about CLOS that made you feel it was a killer language feature? Many seasoned Lisp programmers do not even consider it or OO in general particularly useful.
In the last two years? Clozure Common Lisp at least: an open source multithreaded Lisp implementation with unicode on Win32. Before then it was all Unix. Lisp platform independence is so good, I hack on win32 all day and when I am ready to deploy on Linux, the only warning I get is from git telling me it's converting line endings to Unix style.
The staggering number of new and maturing infrastructure libraries; bordeaux-threads, usocket, CFFI, ASDF, Closure family of XML tools, etc. Lisp-World interop has become trivial. It's not their existence that's new, but their universal adoption by the community. Few years ago you couldn't just download a random lisp library and expect it to work; you had to read the sources and figure things out. Now dependency libraries get downloaded behind the scenes.
I have to second this. I switched from CL to Python years ago because of problems with the infrastructure, but now I'm in the process of switching back, largely due to Clozure becoming really ready for prime time, and tremendous improvements in the stability and usability of available libraries. The situation is still not perfect, but it vastly improved and getting better all the time.
As a beginner to lisp, I have always been bothered by the lack of standardization - especially in terms of libraries.
For example, a couple of weeks back, there was an article about a python-based tool on HN (I forget which). There was a lot of opinion, however was generally about BeautifulSoup vs lxml.
Coming to CL, I dont even know where to begin for XML parsing (http://www.cliki.net/XML). Which is why, it seems like black magic when people make amazing software (quantz, postabon) .
I just get too intimidated on where to begin... it is similar to the javascript library fights that keep erupting on comp.lang.js : you ask about one and are made to feel like you should have chosen another.
As a beginner just grab the XML lib which is easiest to install and looks comfortable to use. If it doesn't work out try another one.
I really don't get all the complaints in this thread about the lack of a central library repository. How hard is it to use Google? Libraries aren't suddenly bad because they're not from Lib Grand Central.
In other languages, Perl specifically, I've tried libraries from CPAN that were total shit and then I googled around and grabbed a better one from someone's homepage.
Perhaps it's possible to get lucky and find good libraries using nothing but Google and patience, but I'm baffled that anyone would deny the value of something like CPAN.
CPAN's structure enforces good practices: (e.g., tests, docs, bug tracking).
CPAN provides not one but two excellent search pages. It also contains many reviews, and makes it trivial to see the source of any library or app before you download it.
it goes beyond CPAN - it would have been nice to have a "batteries-included" version that packs in most useful libraries (like Python's Image, lxml, etc libraries).
The very argument that choice > standardization is something I dont get - even in Rails, you have the choice of not using the default templating engine, JavaScript framework, etc. But it doesnt mean that they dont package it in anyway. This accelerates adoption, since it gets out of your way - and later when you mature as a developer, you can of course customize it wildly.
It may or may not also have the happy side-effect that the quality of the packaged libraries increase, because of a much larger user-base. I'd much rather that people fork mature libraries than hack the one-millionth version of an XML library that just does 2 things.
I'm not denying the value but I do think too much value is put in it. I certainly wouldn't use the lack of something like CPAN as an argument not to learn an otherwise fine language.
CCL is supposed to have nice bridge to Objective-C and Cocoa on OS X. It also compiles very fast compared to SBCL and supports threading on Windows (which SBCL does not).
> I could write code faster than I would in Perl, Awk or TCL, it ran as fast as C++
Was that GUI code (as the rest of your post seems to imply)? CL is not competitive with C++ in terms of raw speed, in my opinion. Without type declarations, it's close to Perl.
Right, the specific code that he wrote he claims ran as fast as C++. What type of code is this? Benchmarking program language speed is a very, very tricky thing because it is so multidimensional.
- Were they both multi-threaded or Single-threaded?
- What libraries were each one using?
- Was it mostly IO, network, or user interaction?
- Is he measuring load times, processing times, run/wait ratios?
- What level of compiler optimization where they both using?
Yes, there are several reasons it's called the benchmarks game and although you can read it the way you have, it's more to do with having a lot of spectators and some regular players, and more to do with a weariness with fatal shootouts.
"it's _good shit_. Get work done good. Think, hack, ship, bill for it good. 2-3 products per month good. You still have to know where things are, who is working on what, what's maintained and what's obsoleted by what. Sure. But there is absolutely no lack of libraries."
I'm not disagreeing, but to be fair, "common lisp" is often referred to as "lisp" or "CL". So the phrase is good for (down)trends, but not for comparisons.
I wouldn't put too much faith in the popularity of languages on Google trends when they have names which are commonly used in english. For me, the headlines on the right hand side say it all:
Jeff Ruby asks OJ to leave business
Ruby on Rails 2.0 Released
JFK Documents Include Reported Ruby, Oswald Conversation
23-foot python found basking in sun
Former Olympic champion Ruby dies in climbing fall
This could also mean that there is neither an opera named "common lisp", nor a comedy group, nor a gemstone fo the same name ... and well perl's fame is waning or fewer people misspell pearl.
Before learning CL I was a fairly decent, C, C++ and Perl programmer. Did assembly, Pascal, TCL and Awk. Up to that point, I always had to pause a for a minute when starting a new project/script, think about its scope, and choose a language based on the necessary performance, development speed, expressiveness, available libraries, etc. (and whether whoever was going to read the code afterward knew the language; C was often a natural choice for code shared with others on Unix, C++ for MFC/COM, Perl for sysadmin stuff, and TCL and Awk for my own tools.)
I learned Lisp in over a month, to spite someone (I dared a notorious troll I would write an AI bot of his choice if he stopped spamming us, youthful bravado for sure, and I lost the bet) While researching "AI" I came across Winston and Horn's "Common Lisp", then the hyperspec, then a few more books over the course of a month. I sat down with SICP and did the exercises on my break, while I was in school and waiting tables.
After I learned it however, specially with CLOS, there was no contest. Three months after buying Sonya Keene's CLOS book it was fair to say I forgot all other programming languages. There were no more "projects"; I no longer had to sketch out designs on paper or do "requirement analysis" (something I was told in school was necessary for all software.) For once, the great ideas in my head were a new emacs buffer away. I could write code faster than I would in Perl, Awk or TCL, it ran as fast as C++, and it was more expressive than the English in my head. I could type "commands" into a shell get a dialog embedded in my window, a few more commands and it would move to the upper right corner, I could change its name property and add text to it, then I could fold that dialog box into a menu-item named "Help" in the menubar and call that dialogbox "About". Amazing.
I went on hacking like this for about year when I realized I was doing the "wrong thing". You see, I have been using CMUCL with its builtin editor and writing GUI applications in Motif (it was 2001 and Motif wasn't open source yet, so I got the hang on Lesstif and learned its quirks.) Right around this time, Linux GUIs were maturing and people were being snobs about their Enlightenment themes and dissing each other over their choices of Windows Manager. So I was peer-pressured into learning DHTML and Web Design. I read comp.lang.lisp and those too were snobbish condescending idiots who flamed everyone, specially competent programmers whose work I admired (including Scott McKay and Robert Fahlman (the very people who gave me my CMUCL.))
It was really hard to be a Lisper for a while, specially a young impressionable one who read cll uncritically; news of corporate giants coming with new tools and programming languages to enslave humanity were abound. First C++, then Java, then XML, and finally .NET. You literally had to pick your battles and choose a corporate sponsor or you would have no future in computing! (you think I am kidding?) cll is all doom and gloom, and of course, there is the obligatory stabs at Lisp vendors by Open Source proponents, and stabs at Open Source for people alleging it's killing our beloved vendors. Every once in a while there was news of a Lisp dialect that's going to kill Common Lisp (Smalltalk, Dylan, and the ancient religions of Mesopotamia.)
Fuck, that was painful.
All the while I was following this 4-year long intellectual funeral, becoming ever more "hardcore" and learning mathematics, there was a small group of "Yobos" silently kicking ass and churning out great software. CMUCL got forked to SBCL, added unicode support and threads, not to mention easy building, SLIME was a new Emacs mode better than anything before and since, Cliki was launched, C-L.net, and the #lisp IRC channel was born and hit puberty overnight. Perfect ecosystem.
Today, Lisp is nothing like what it was 8,7,6, even 2 years ago. It's not just "good" in the well-explored text book fashion; no, it's _good shit_. Get work done good. Think, hack, ship, bill for it good. 2-3 products per month good. You still have to know where things are, who is working on what, what's maintained and what's obsoleted by what. Sure. But there is absolutely no lack of libraries.