What makes you want to learn Common Lisp? What do you want from it? [closed] - emacs

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested?
What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled together and configured on a Linux live-CD that boots entirely to RAM.
I've now released the result of this; it is available at the Thnake website.

I would include at least cl-ppcre, clx, Hunchentoot, and Weblocks.
I guess that you would have to negotiate with the respective authors, but including "On Lisp", "Practical Common Lisp", and "Successful Lisp" would be a great asset for the CD.
What would be really nice is to use stumpwm as the window manager on your live CD.

Emacs almost prevented me from learning Common Lisp. It took a lot of effort to slog through it. Emacs and SLIME are too much for a beginner and will never be broadly satisfying to beginners. If I want to learn a new programming language, I want everything else to stay out of my way while I learn it. The task of learning Lisp is hard enough without added technicalities and complications of setting up an environment. Isolate the variable.
Set up SBCL with rlwrap or an equivalent. rlwrap supports very basic paren matching and history searching and can even do tab-completion. Not as fancy as SLIME but a beginner doesn't need SLIME. A beginner needs to be able to run hello-world without spending an hour fighting Emacs. Provide Emacs/SLIME as an option but don't require it.

My suggestion is to include an HTTP server like Hunchentoot and a popular web framework. I suspect that most people that want to learn Lisp these days do so because of reading Paul Graham, and wanting to mimic his success at building Viaweb, so being able to easily create and modify powerful web applications would be a strong selling point for your live CD.

Include Emacs, of course, but you might want to have something gentler.
The Lisp environment I found easiest to slip into was Macintosh Common Lisp, with the FRED editor (Fred Resembles Emacs Deliberately). Digitool didn't successfully make it into the current era of Macs, but they open-sourced a lot of their stuff as they folded. Try www.clozure.com or search for "openmcl" on Google.
There was a project to get the Fred environment running on Openmcl, but I don't know the status offhand (I haven't done anything with Lisp in a long time, and haven't been paying attention on the mailing lists).
So, my recommendations:
Ask Paul Graham if you can include "On Lisp". Since he's giving away a download for free, the odds are good that he'll give permission. (His other excellent Lisp book, "ANSI Common Lisp", is apparently still selling, so it's unlikely he'll give you permission there.)
At least check out the MCL stuff to see if there's anything you can find to make it easier. Emacs is a great Lisp environment, but it's a bit intimidating for the beginner.
I haven't looked at the SBCL documentation lately. Is it fairly readable and beginner-friendly? Perhaps somebody could write up some quick instructions on how to get going and how to debug. Emphasize mouse use at first, even if using Emacs.

What would really get me interested in Common Lisp is a modern set of libraries at the level of .net or Java, as well as some really good documentation that isn't gnarly.
In terms of software, a nice gui editor along the lines of notepad++ or jEdit would be good. Emacs/vi & text-based editors always seems quaint and antiquated for serious development.

Reading Paul Graham makes me want to learn Common Lisp. But if I actually sit down to try learning it, the urge subsides.

Everything in clbuild (http://common-lisp.net/project/clbuild) should be a good candidate to be included. Incidentally, all packages in your list except Emacs are also managed by clbuild. I think it'd be good if the collection of projects in clbuild could gather some momentum towards standard-common-lisp-library-hood.

This does:
http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html
Of course I'd also like to learn more Python 3.0, erlang, and F#. I believe that functional languages (not to say that Python is a functional language) provide just a different perspective. The more perspective you have the better solutions you can architect. It is all about using the right tools for the job too, but if you don't at least have familiarity with something you might never think to solve a problem with a particular tool. I guess it goes back to the old saying that to a carpenter everything looks like a nail. I do not want to be hammering C# into everything when there are better solutions available. Also, times change and fads do with them.

Emacs does have a bit of a learning curve, but it is great for serious development -- no pesky mouse-driven gui bling in the way of the (text-based) code.
Out-of-the-box CUA-mode is enabled these days (so C-x, C-c, C-v works "standard"), and there is a menu with file-operations like save, etc, so it shouldn't that hard of a slog, if it's all pre-packaged. But pre-configuring the .emacs file to ensure that CUA mode is enabled, SLIME doesn't have to be configured by the user etc. is a must -- plus perhpas more documentation within for the user for .emacs configs - links to EmacsWiki, etc. (hrm, if this is on a CD, it's unlikely that the user would be configuring it themselves, isn't it....)

I have some interest in learning Lisp, but I don't 'like' most of the resources available. How about extending this project to the creation of some sort of a "community" responsible for providing tutorials or something, in order to make Common Lisp more popular and easier to learn? Bad/weird/useless idea?

I think the idea of including tutorials is an excellent one.
In addition to the ones already stated, there is both the easiest book for newbies on lisp (A Gentle Introduction to Symbolic Computation) and several excellent websites hiding out there on the web that people should know about. Here they are:
A Gentle Introdiction to Symbolic Computation
Learning Lisp
Casting Spels
Learning Lisp Fast

As far as I undertand you are doing Thnake.
Thank you for greate live distro!
I tried it couple of days before and found it rather impressive and interesting.
There are couple of things it obviously lacks, such as LTK since you have already included Common Lisp and Tcl/Tk. And since there is gtk, you can include bindings and documentation for CL and Python.
Also there is a need in Lisp Hyperspec, and preconfiguaration of Slime to use it. (Same for documentation for Python and Tcl) May be it would be better to add emacs-w3m for fast and convenient documentation browsing.

There's always Practical Common Lisp, a book on Common Lisp which is readable in its entirety online. There's also a packaging of Emacs with a CL implementation meant for using along with the book.

You should definitely add Vim too, configured with the RainbowParenthsis plugin.
rlwrap for SBCL is a good idea, and so is (require :sb-aclrepl).
Weblocks should come with cl-prevalence and maybe Elephant/BDB, too.

Related

Lisp language beginner details [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I wish to learn Lisp as I am going towards Artificial Intelligence (AI). Can somebody share some good book names of tutorials which covers good amount of Lisp details?
Just googling it, but didn't find anything good which covers the language in detail.
Also, which software is required for programming (like for .NET languages we usually use Visual Studio to do programming)?
Thanks in advance.
Thank you all for the helpful responses... :)
Paradigms of AI
Really good for learning Lisp, but especially if you're aiming for AI. It covers a lot of the techniques that you'll need and shows how to use them.
In your googling did you see Practical Common Lisp? It's a great starting point.
One caveat about PCL is that it starts out with the most obsolete kinds of constructs, explaining how to create global variables, using property-lists, etc., I was surprised by how it began with all this really gnarly old stuff that had nothing to do with what I wanted to learn. Eventually it does get around to very lucid explanations of macros and multimethods and stuff, so it does get better if you stick with it. But if you want to get into Lisp but skip the nasty old cruft, my advice is go straight to learning Clojure, which is a very recent Lisp built with the idea of supporting modern programmers' needs.
Introductory resources for Clojure:
1) Rich Hickey's presentation "Clojure for Java Programmers", which gives a good overall idea of what Clojure is about.
2) Stuart Halloway's Programming Clojure, which is a good introduction to the language.
3) Fogus and Houser's Joy of Clojure covers more advanced material you'd otherwise have to find by rummaging through a lot of books on Common Lisp and Scheme and sorting out which bits are relevant and which are outdated.
As for software Lisp people (including those using Clojure) tend to use Emacs a lot. However, you can use vi (there's a paren-matching option that comes in handy) and Eclipse has plugins you can use (Cusp for Common Lisp, Counterclockwise for Clojure).
ANSI Common Lisp, Paul Graham is the bible of Lisp, my opinion.
LispWorks is the most commonly used (GUI) IDE (like Visual Studio) to
develop, test, debug, compile your Lisp projects. It is a commercial
product but for individual usage is for free on Linux, Windows and
even Mac OS X. I prefer to use Emacs (nox version) & CLisp on my
Ubuntu OS. I love my console. 8-)
Any text editor will do the job of editing source code--even Windows' Notepad. However, given that Lisp code will have nested parentheses, you will likely want an editor which will help you match open and close parentheses, such as Notepad++ (or if you're a little more Unix-centric, emacs or vim).
I've never gotten more serious about Lisp programming to go beyond using GNU clisp or the Lisp interpreter in emacs for small projects, so I can't really recommend anything more sophisticated. However, this list of Lisp References looks like a good starting point for potential reading material.
The classic text for AI & Lisp is the Paradigms of Artificial Intelligence Programming (PAIP).
On Lisp is a pretty good text as well.
I use emacs + Slime for my Common Lisp work; it's not the most modern, but works quite well. I have never yet felt the need for a commercial Lisp IDE. Others may disagree.
And if you are interested in learning how to program games with Lisp, you can also check Land of Lisp

How viable is emacs LISP aside from editing emacs? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm in my second year of my CS major, and I've only had courses in C (first course and then a polymorphic data structures course), C++ (OOP focus), MIPS assembly, and a compiler course. I worked in WinForms and C# over the summer. I worked through the Little Schemer and I'm really interested in learning some sort of LISP.
Emacs is my editor of choice--Emacs LISP should be a great place to start.
Aside from customizing emacs, where else could I use emacs LISP? Creating an executable out of elisp code seems almost impossible according to link text. What other limitations are there?
Should I learn Scheme or Common Lisp instead?
Emacs is a text editor. Emacs Lisp is - at heart - a text editing language.
Pinnacles of elisp today - IMO - are ERC, the emacs IRC client, and org-mode, a very nice organizing system. There is also an email client for emacs.
So for building text editing plugins, I don't think you can beat elisp/emacs.
For actual standalone application development, Common Lisp is probably your best bet. I favor the CLISP implementation, but SBCL is also very popular. There are a plethora of Lisp implementations. Someone once joked recently that there are more Lisp compilers than there are Lisp-using companies. :-o
As others have said, Emacs lisp contains many primitives for building a text editor.
That said, it's all still lisp, and getting comfortable using lisp (Emacs, common, or scheme) is about the same in all.
You can use the common lisp package to get access to much of the common lisp macros if you want to use them.
You can use Emacs lisp to write shell scripts (see this question), if that's of interest. The inferior process handling is useful if you want do connect to other running processes (see comint).
Find a project you want to work on, and then let your decision flow from that. If Emacs lisp fits well, use it, if common lisp works well, use that.
This is of course subjective, but I think learning Common Lisp or (standard) Scheme is generally more useful, just for the simple fact that you then will not be limited to one compiler. It is hard to foresee everything you might want to do with your code, so why lock yourself down to one implementation?
It sounds like you are looking to learn a lisp. For that scheme is often recommended, and you say you are reading The Little Schemer.
PLT Racket which was formerly PLT Scheme is a very good scheme development and learning environment. The original primary focus of PLT Scheme was didactic, the renaming from Scheme to Racket is a bad pun but is intended to indicate the system is also mature and sufficient enough for productive "real world" use.
Emacs Lisp is more of a scripting language that is specific to the Emacs environment, useful to learn if you want to rival Stallman in your grasp of Emacs or wish to write extensions.
Common Lisp is the de facto standard for Lisp. Scheme is more pedagogical, primarily due to its association with the famous MIT class and book (SICP), although it is powerful on its own.
They are different however. By some regards Scheme is one of the smallest computer languages out there (in terms of the standard library). The language definition is some six pages. Common Lisp is one of the largest computer languages out there.
There are also more interesting examples. A few years back I was playing around with a Lisp dialect that had support for inline C and Python code, as well as importing and using C and Python objects and calling functions from them directly. However, it seems to have faded into obscurity since I can't find a reference to it on Google.
I would reccomend chicken scheme (http://www.call-cc.org) if you're interested in learning some Lisp. It's got very good documentation, is actively developed, works on a variety of platforms and has a great extension system called 'eggs' that contain a lot of libraries for actaul coding that scheme doesn't directly specify.
On the other hand, emacs is a great development environment for learning emacs lisp, which is a very useful for scripting and (obviously) customizing emacs. Having documentation for functions and variables only a C-h f, C-h v and C-h A away makes development a lot easier; that is once you learn some of the more obscure naming conventions that elisp has created over the years.

Which dialect of Lisp should I learn? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I know there are a few different dialects of Lisp. Having decided that learning Lisp would be a new intellectual experience, I would like to know which Lisp dialect to learn, and why.
Is there one which is more popular than the others? Is any one of them more "complete", as in, better documented and supported? What are the pros and cons of this dialect?
You want to look for a balance between simplicity and cleanliness, attractive features, and a platform that will allow you to write interesting and useful software (to yourself) as well as serve as a learning tool. (This last will keep you going and learning for a lot longer.) Here are some possibilities:
Scheme. Probably the cleanest of all dialects. This is no doubt why The Little Schemer was translated from LISP into Scheme. The fifth Scheme standard specification, R5RS, is a wonderful education in and of itself; it may be the nicest language and library specification I've ever read, as well as the shortest that's reasonably comprehensive. The PLT Scheme (now Racket) platform includes a fairly decent interpreter and compiler, is good for scripting, and also has some visual tools that make it excellent for learning.
Common Lisp. Probably the most portable and comprehensive variant, this is most likely what you want if you want to be writing things such as commercial software. The standard defines extensive libraries, and many more are available beyond that, it has CLOS, which will probably teach you more about OO than any OO language could, and some of the compilers are very good. Disadvantages include some warts that Scheme doesn't have (such as having a separate namespace for variables that refer to functions), not being as clean and simple (as is the case with anything that has had to have the extensions and make the compromises necessary for large applications in the real world), not having hygienic macros, and emphasizing recursion much less than Scheme.
Clojure. This runs on the JVM, which may give it a leg up right there for Java developers. It's got a few warts (e.g., you must explicitly ask for tail call optimization, though this may change one day if TCO is added to the JVM). The macros, while not hygienic, do have some features to help you avoid variable capture, so you can capture variables if you really want to, while running less risk of accidentally doing so than in CL. You've got easy access to all the Java libraries; that's probably a good thing for "real world" code, and fairly pointless in terms of learning. It's got a set of libraries for persistent data structures and support for STM, which make it very interesting from a concurrent point of view; this makes it probably your best bet if you're interested in learning more about new methods of dealing with concurrent and parallel programming. It appears as if Clojure is as usable for large, production applications as Java, in the sense that it's going to have the ability to do the "ugly stuff" you do in production apps that you'd rather not do and don't do when you're learning.
Emacs Lisp. In terms of a LISP, this is not one of the better examples out there. One of its biggest faults is dynamic scoping, but there are many others. However, if you're an Emacs user, this may be the most powerful tool you can learn to improve your use of the editor. How much you'd really learn from learning Emacs Lisp, beyond how to extend Emacs, is for me an open question however; I don't know how often interesting techniques such as high-order functions are really used in Emacs Lisp.
2018 Update
It's been almost a decade since I wrote this post and the Lisp family of languages now appears to be gaining significant traction in the general programmer consciousness. Much of this appears to be related to Clojure which has not only become a properly separate dialect of Lisp in its own right, introducing many of its own good ideas, but also now has a near-identical version targeting JavaScript and has inspired many other Lisps targeting other platforms. For example, Hy targets the CPython AST and bytecode, aiming first for interoperability with Python, but using Clojure ideas "when in doubt." (Though from the latest commits, the latter may be changing a bit.)
The big change this brings in your decision-making process is that you should also be looking at whatever Lisps or Lisp-like languages are available for and interoperate with languages or platforms you already use, be it Perl, Ruby, Erlang, Go or even C++ on microcontrollers.
I would say Scheme, solely because of the Little Schemer, which is one of the most mind-blowingly fun yet extremely hard books I've ever tried to read.
I can recommend Common Lisp on SBCL. This combination is fast, powerful, mature and well-documented.
Also Clojure is a gaining a lot of mindshare these days, and for good reason. Great data structures, profoundly good concurrency support (puts Scheme and CL to shame in this regard), and a great community. It's also relatively simple, CL is as at least as complicated as C++.
This isn't to say I don't enjoy CL or Scheme. I learned Scheme with SICP. And CL brought me to Clojure. It all depends on your goals I suppose. If you want to learn a Lisp that is immensely practical go for Clojure. Otherwise CL or Scheme are both great.
I learned Scheme in school. It was a great learning experience and I will never forget the fundamentals of functional programming. It probably doesn't matter which version of LISP you pick up, as long as you understand the core of its usefulness - stateless lambda calculus.
Here's an interesting article on Why MIT switched from Scheme to Python in its introductory programming course.
I prefer CL, since I like object-oriented programming, and CLOS is the nicest object system around.
I would say all of them, at least at first. Eventually you will probably develop a preference for Scheme or Common Lisp, but they both have enough differences that it's best to get a handle on everything that's out there.
Scheme has continuations for example, and it's good to learn about those in Scheme, even though they can be implemented in Common Lisp.
Learning the difference between lexical and dynamic scope is important, and if you learn both Common Lisp and elisp you'll come across the implications of both.
LFE (Lisp Flavored Erlang) would be nice. You can have the lisp syntax on top of the Erlang VM.
Was a kind of "loaded" question to begin with but OP probably didn't know about it. Generally, Common and Scheme lispers are like PC and Apple computer "people", they don't mix. Which one is best is probably not as relevant as which one "works" for you. Really, there is not that much difference. Likely a preference for one over the other maybe influenced by which one you learn first. (To me, an empty list should be "nothing", known in CL as NIL, and that makes me a Common Lisper.) I like the integration of SBCL with Slime using EMACS, but SBCL is not for everyone. For one thing, SBCL is very strict. If you just want to "have fun" the GNU clisp is easy and available for virtually every platform.

In Which Cases Is Better To Use Clojure? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I develop in Lisp and in Scheme, but I was reading about Clojure and then I want to know, in which cases is better to use it than using Lisp or Scheme? Thanks
This question is impossible to answer. You should use Clojure nearly 100% of the time over CL and Scheme, is what I would say. But that doesn't mean you should listen to me. Others can make a good argument that the opposite is the case.
For me, the syntax and function names in Clojure aesthetically pleasing. Certain Java libraries are invaluable for what I do for data munging and web programming and GUI stuff. Functional programming is challenging and enjoyable. Clojure's flaws are unimportant and outweighed by its benefits in my eyes. Certain intolerable flaws in other Lisps are "fixed" in Clojure, because it's new and it can ignore backwards compatibility. It has a novel and arguably powerful approach to concurrency. The Clojure community is vibrant and welcoming and awesome. All of this says as much about me and what I value as it does about Clojure or other Lisps.
There are libraries for CL and Scheme that don't exist in Clojure or Java. There are people who dislike how Clojure uses too much syntax like [] and {} and want to use parens everywhere. If you want CLOS-style OOP or lots of mutable data structures, another Lisp is arguably better. The JVM is heavyweight, maybe too heavyweight and too much baggage for some people. A lot of Java leaks into Clojure (by design) and this offends some people's sensibilities. The STM and immutable data structures have overheads that make certain things (e.g. number crunching) slower or less elegant. Clojure is new and still rough in certain areas, still rapidly changing and evolving in others. Clojure has yet to pass the test of time, whereas other Lisps already have. Clojure is not a "standard" and some people find a language defined by an implementation to be unappealing. And so on. None of these things matter to me, but they may to you.
This is almost entirely subjective. Which language you should use depends on what you already know, what you are willing to learn, what libraries you want to use, what editors and tools you're comfortable with, what language flaws you're willing to live with and work around and what flaws you can't tolerate, and what helps you get your work done faster, more cheaply, more enjoyably, or achieve whatever your goals are.
Basically, whatever makes you feel warm and fuzzy. Learn them all and then make an informed choice based on your own tastes, and use whichever one you like the best. They're all good.
"Clojure runs on the JVM" means you get the whole cornucopia of Java libraries available. You can make pretty GUIs in Swing, use Apache's Web client or server code, connect a ready-built Sudoku solver... whatever you like.
Another big plus of Clojure is its very polished concurrency support, with about 3 different flavors. If you have a compute-intensive, parallelizable task, Clojure can make it easy. Well, easier.
Update: Another argument. Clojure is pretty strongly functional, so it's a plus if you want to force yourself to think and write functionally.
Clojure should be used when
you need to work with existing java code.
you work with people who are allergic to lisp ("boss, i would like to use a java concurrency library called clojue vs. I would like to re-write this in scheme" [1]
you will be programming for a multi-processor system.
Scheme would be better when:
you need to prove your code is correct. Clojures (call out to java) hinders but does not prevent this.
you are working with people who are allergic to java.
you are developing for a platform with no (new enough) JVM
[1] yes this is a bad bad bad reason. such is the world we live in...
When? As much as possible.
Why? Immutable Data Structures - they really are that good. There are plenty of other reasons too.
ABCL (Armed Bear Common Lisp) and a several of Scheme implementations (KAWA, SISC, ...) are also running on the JVM.
Generally Common Lisp is available in different 'flavors' - ABCL is one of them. Other compile to C, to native code, have extensive development environments or specialized extensions like logic languages or databases.
Clojure OTOH is a new Lisp dialect with emphasis on lazy functional programming and concurrent programming. Its author (Rich Hickey) is a very experienced software developer (he has also written Java and .net interfaces for Common Lisp) and did an excellent job with Clojure. Even though there is some hype around the language, it is worth checking out - it is definitely one of the better Lisp dialects developed in recent years (compared to say Newlisp or Arc).
There are lot's of reasons, some mentioned above. My take is:
The pre-existing libraries. This is such a benefit. I just can't praise this feature enough.
The language is more adapted to the
hardware currently available
(multi-core) and the development
paradigms in use today. It is so much easier to reason about concurrency. The functional aspects are nicer too. You can do functional programming in Lisp, obviously, but it is very easy to break the paradigm unknowingly, unwittingly, and unintentionally.
Cross platform. I run identical
programs on Linux, Windows, and the
Mac. There are lot's of native Lisps
that run across platforms, but
support for all features on all
platforms is a bit spotty and you
constantly have to be on the alert
for things that are missing on one
platform or the other. Likewise,the
libraries you need are not always
consistently supported across
platforms. ABCL and some of the
JVM Scheme implementations have this
consistent support as well, but I
still prefer Clojure because of
point 2.
The nature of the language
community. Let's face it, a lot of
the time the Common Lisp community
is just nasty to deal with. That is
not the case with Clojure at all.
It's easy to get useful help without
the condescension and meanness that
often comes with an answer from the
Common Lisp community. As I have
learned for myself several times,
there is no question so stupid that
you won't get a polite and helpful
reply from the Clojure community.
If I had to find one thing to complain about, it would be IDE support. Maybe it's a question of learning new habits, but it is still easier for me to handle the mechanics of Java development than Clojure. I have tried, and use, Clojure Box, enclojure on NetBeas, La Clojure on Intellij IDEA, and Counterclockwise on Eclipse. They all work fine if you are working primarily from the REPL, but for compilation and execution of class files, they all still feel a bit clumsy.
A subset of Clojure can also compile to javascript
Clojure runs on the JVM (and on the CLR), so there is that.
Clojure's design is concerned with accommodating several styles of concurrent programming safely, deliberately making it difficult to mistakenly write the dangerous, rickety, and often broken concurrency-tolerant code in other languages. If your problem domain involves concurrent programming, Clojure's array of integrated tools for managing concurrency may be a better fit than the implementation-specific or lowest-common-denominator libraries available in other Lisps and Schemes.
One of the greatest things about Clojure is the plethora of libraries you can use with it. You have the power of Java with the expressiveness of Lisp, and that is a badass combination. Clojure is more suited for real world development, because it was made for real world development. With Clojure, you have awesome libraries, awesome modern features, and an amazing community of helpful, like-minded people.
I would have to say that Clojure is a better language, all the way around. That is a highly argumentative statement to make, so I will point out here that this is just my honest opinion.
Clojure rocks.
I'm always trying to learn new languages, so I'm interested in learning Clojure. But, aren't SBCL and some other Common Lisp implementations much, much faster than Clojure? Wouldn't you need considerably more than 4 processors (and a reasonably parallelizable task) to make up for the performance difference between a Clojure app and even a single-threaded SBCL version of the same app?
As a general rule of thumb, I tend to favor Clojure over other languages in cases where either of these fit the bill:
(1). The domain model tends to look very recursive and/or graph-like.
(2). There's an opportunity to leverage a multi-core JVM environment (e.g., Elastic Beanstalk)
(3). There's a fuzzy barrier between data and code (think RPN calculator where nodes can be operators or numbers)
These might sound a bit contrived, but a lot of my work involves dealing with graphs and trees of information, whether it's looking at social networks, some kind of constrained-based optimization, or semantic relationship building. I find that my other favorite language, Ruby, cannot give me the mix of expressiveness and raw computing power compared to Clojure, particularly when it comes to quantitative, recursive, concurrent-type problem solving.

What's the best way to learn LISP? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have been programming in Python, PHP, Java and C for a couple or years now, and I just finished reading Hackers and Painters, so I would love to give LISP a try!
I understand its totally diferent from what i know and that it won't be easy. Also I think (please correct me if I'm wrong) there's way less community and development around LISP. So my question is: what's the best way to learn LISP?
I wouldn't mind buying books or investing some time. I just don't want it to be wasted.
The "final" idea would be to use LISP for web development, and I know that's not so common so... I know it's good to plan my learning before picking the first book or tutorial and spending lots of time on something that may not be the best way!
Thank you all for your answers!
edit: I read Practical Common Lisp and was: ... long, hard, interesting and definitely got me rolling in Lisp, after that i read the little schemer, and it was short, fun and very very good for my overall programming. So my recommendation would be to read first the little schemer, then (its a couple of hours and its worth it) if you decide lisp(or scheme or whatever dialect) is not what you where looking for, you will still have a very fun new way of thinking about recursion!
Try reading Practical Common Lisp, by Peter Seibel.
My personal favorite is Abelson & Sussman Structure and Interpretation of Computer Programs.
It uses Scheme, which is a nice and clean dialect of Lisp.
If you like a more practical approach maybe you should pick some Lisp framework for web design
(I have no idea if such a beast exists) and jump right in.
You might want to start with The Little Schemer as a warm-up. It's not a practical book about writing production Lisp programs, but it's a great book for learning how to think in Lisp.
MIT has made available an entire LISP course in DIVX and MPEG format. I highly recommend it.
http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
There is now a book out called 'Land of LISP' that teaches LISP programming through writing 80's style text games. I'm reading it now, and it's very well written and doesn't take itself too seriously, which I like.
There are several options here. First of all, Scheme and Common Lisp are fairly different in rather deep ways (like scoping); you should pick one to start with and stick with it for a while. I'm a Common Lisp fan, but that may be one of those vi-vs-EMACS religious questions.
For Scheme, go for Kent Dybvig's Scheme Programming Language, followed by SICP.
For Common Lisp, as well as Practical Common Lisp, I'd recommend David Lamkins's Successful Lisp. Successful Lisp is also available online for free.
After than, look at Lisp in Small Pieces by Queinnec, and Norvig's Lisp in AI book.
Marty Hall has a nice list at Johns Hopkins.
Updated: I don't mean stick to it forever, just that trying to learn both at once would be confusing.
Pick up The Land of Lisp by Conrad Barski. It is a fun filled introduction to Lisp programming using cartoons and games.
I'd recommend Project Euler as an excellent source of small bite-sized problems you can use to teach yourself any new programming language.
Ansi Common Lisp by Paul Graham is a good book.
I think it might be out of print, so your best bet to get it via Amazon.
I got the book for a "Natural Language Processing" class I took my sophomore year in college.
We had to write the programing projects in LISP, and so I needed to learn Lisp quickly.
The book helped me quite a bit.
Once I had a problem. I didn't know lisp. So I decided to download LISP in a box.
Then I found myself with an Emacs install without any help or documentation.
Then I had two problems.
For serious learners, I'd recommend PAIP from Norvig. It is an excellent resource to learn both Lisp and AI.
Berkeley offers CS61a in podcast format. This is an intro to CS class based around SICP. It's a more modern version than the 1982 videos MIT has available.
I'm working my way through Lisp right now and have come across "the book" to learn Lisp. It was suggested by Rainer Joswig
The book is called Common Lisp: A Gentle Introduction to Symbolic Computation and can be downloaded as a PDF. The author begins with a UML like approach to Lisp in the first chapter and gradually introduces more and more Lisp syntax.
I've also looked at practical lisp and I think that the author glosses over a lot of required information, even for a seasoned programmer. This book doesn't seem to do that (I'm not completely finished, but have found it useful enough to suggest).
one more thing, you'll need an environment to work in. I've found Lisp in a Box to work well. It runs on Windows and Linux and uses eMacs.
I've got attracted to LISP by its JVM dialect - Clojure. Clojure is sort of great LISP, since
it has "simplified syntax", that is less parathensis are required, there is cleverly design set of collections available
it is JVM based, so there is stable, performant runtime underneath, in addition whole Java ecosystem (libraries, e.g. database drivers, build tools, IDEs) is within our reach
Noir is a good web framework, apps can be deployed on Java web and applications servers
In other words, Clojure can be used in production right here, right now.
When it comes to resources, there are at least 4 books and planty online resources:
Books: "The joy of Clojure" - very insightful but can be difficult, so it's best read together with "Programming Clojure".
Online tutorials: Mark Volkmann tutorial is great
see also https://stackoverflow.com/questions/599519/which-tutorial-on-clojure-is-best
4Clojure website contains a number of simple programming tasks, so one can play with Clojure and see other people solutions
I enjoyed reading Practical Common LISP and ANSI Common LISP.
On LISP looks interesting, but at $190 seems a little expensive for a book.
For web development you might want to have a look at hunchentoot, a web server written in common lisp.
I found working through the exercises in "The Little Schemer" really helped hone the recursive, pattern-matching side of my thinking and made working in XSLT considerably easier.
I recommend Gentle Introduction to Symbolic Computation or Practical Common Lisp first, based on your programming experiences. For practicing, I use Allegro CL 8.2 Free Express Edition in Windows. It turns practicing into a lot of fun.
Sort of a difficult question to answer ... I think it all depends on your learning style.
I learned LISP in my A.I. and Expert Systems classes in college, but that's how I learn ... I'm not a great book learner, I prefer to have someone explain it to me in a class setting.
LISP is definitely a unique language and it requires a new train of thought if you're used to conventional C, Java, PHP programming.
Best of luck to you !
I found reading the book SICP really helped me learn. I used Steel Bank Common Lisp (SBCL) and had good success with it.
Good luck
I don't know that there's anything special about Lisp that makes it different from learning any other language. You just need to start using it and trying out its features.
One option might be to try a simple project.
Another option, that's specific for Lisp, would be to write an Emacs extension that assists you in your regular work.
Read these books in order: Gentle Introduction to Symbolic Computation, ANSI Common Lisp by Paul Graham and then move onto Practical Common Lisp. Or skip ACL and use it as a reference while working your way through PCL.