Land of Lisp: Learn to Program in Lisp, One Game at a Time
oreilly.com
oreilly.com
I'm really happy with how it turned out and I hope the new site (which I don't want to launch before the book is truly ready) will entice more folks to learn Lisp!
It would be a pleasure to have you over, Dr. Barski.
It's great to see an author coming out with a new Lisp book, since it is my favorite language that I never get to use at my day job.
Congratulations!
I remember he was also an active contributor when arc was first released[1]. Thanks for all the great contributions. (drcode: I hope you don't mind me posting this info)
The epub and mobi versions tend to lag about a week behind the PDF because of conversion time, but we push those files out to your account as soon as they're ready. (Assuming you pick the book up from No Starch directly: http://nostarch.com/lisp.htm)
For about 6 months in 2006 I made Emacs my default editor. (Xemacs, actually). But I did not learn Lisp, at that time, and there are other IDE's out there that have a nicer GUI. So I started using simple text editors like Kate, and then sometimes NetBeans.
And yet, for years, I've been wanting to work with a fully scriptable editing environment. I often have the need to grab a large amount of text data, transform it in various way, and save the finished product. I kept thinking that at some point I would learn sed and awk, but I never got around to it. Usually, if I needed to make some quick changes to text, I'd write a one-off PHP script to do what I needed.
Then I got interested in Clojure, and through Clojure I got familiar with Lisp's syntax.
Then it occurred to me to go back to using Emacs. So now it is my main editor, again, my default programming environment. I use it for everything. And I've learned Emacs Lisp. Every single day, the combination of Emacs and Lisp helps me be more productive.
Way back in 1999, I started to learn PHP. One thing that made PHP easy to learn, back then, was that I did not need to compile it. I only needed to put it on a server running PHP, and that was most servers. It was an easy programming environment to step into.
Lisp is like that when you are working in Emacs. You can write a line of Lisp anywhere you like, then invoke it with a special key command. You can write quick one-off scripts to move text around inside a file. Or, if you like some code and want to reuse it, you can just save it as a function and put it in your .emacs file and then that function is available to you whenever you are running Emacs.
I have heard of Emacs greatness since at least 1999, and yet somehow, not till this year did I dive deep and learn both it and Lisp. I realize now, everything that people have said about Emacs over the years, it really is true - to have a programming environment where every element of the environment can be programmed and re-programmed using the language of the environment gives you an extremely powerful tool.
If anyone is looking for a simple place to get started with Lisp, I would say, simply, use Emacs. We all need to edit stuff, and so your work will provide you with a practical place to practice your Lisp, everyday.
Those of you who prefer some kind of GUI, look into Xemacs. It can be set up to respond to your mouse-clicks.
Also, if you'd like to learn about Emacs and Lisp, the book that Robert J Chassell wrote is a very good introduction:
http://www.amazon.com/Introduction-Programming-Emacs-Lisp/dp...
I don't want to nitpick here, but the tedious distinction between the "graphically challenged" GNU Emacs and the "some kind of GUI" godness of XEmacs is getting rather old. Precisely, it is around 20 years old, since the debate started somwhen at the beginning of the 90s. Much, much time has passed and much, much has changed since then in GNU/X emacs land.
But otherwise, youre completely right. Emacs feels today what running a Lisp Machine must have been back in the day, and it's wonderful. Your complete environment is written in Lisp, you code, chat, mail, all at the same time in/with Lisp, and you can modify all of it at run-time, all the way down (Well, mostly).
It is a pity that Emacs is stuck with Elisp for the foreseeable future, so although a "Lisp", it cant fully profit from all the available Common Lisp goodies, but for a beginner, it is all more than enough to start. And even if one day he or she might want to move on to Common Lisp, SLIME would be there waiting patiently.
Emacs still has a relatively poor Lisp dialect, no object-orientation in most of its software, no multi-tasking, a relatively poor user interface and so on.
I wish I had a better suggestion for learning elisp, but I mostly picked it up from the Emacs Lisp info file included with Emacs (http://www.gnu.org/software/emacs/manual/html_mono/elisp.htm...). I'd been reading SICP already though, so I already understood the fundamentals of the Lisp family. The best intro I've seen to Lisp is _The Little Schemer_, but keep in mind that Scheme is the "clean and minimalistic" dialect (for better and worse).
This is puzzling. GNU Emacs has mouse support.
http://writequit.org/blog/?p=386
I do not know how it compares to Emacs and Slime, but I'm quite satisfied by it.
If you want to transform text in your editor in a Unix-like environment use the appropriate tool - Acme
http://en.wikipedia.org/wiki/Acme_%28text_editor%29
Then you can program your text transforms in any language you like
I considered options like SDL, but the fact is that there's so many graphics APIs in the world (and in the Lisp world) that I didn't want to force the reader to learn one they might not ever have practical use for.
Knowing how a web browser & HTML5 work, on the other hand, is universally useful.
sounds great, I'm interested.
My favorite programming class was an intro course in python where we generated fractals, programmed maze solvers, built conway's game of life, and had an option of creating a 3D pool game for final project, etc: http://cs.northwestern.edu/~akuzma/classes/EECS110-s10/index...
Although the course is intended for people who have never programmed before, it allows you to do a lot of cool stuff by deliberately not explaining how the libraries used are implemented. I don't think using external libraries in tutorial books is bad, as long as you change\vary the library being used each problemset or chapter. Then no one library is enforced as canon. The student just learns the generalized methodology of hooking in with other people's code and writing a decoupled application, which are essential practical programming.
I think it's OKAY to risk throwing in slightly off-topic components in a learning-by-doing book. The best "django" book I've seen had a chapter all about jQuery\JavaScript.
Games are still always good problem domains for enhancing student engagement even if they are text-based. Having now looked at the sample chapter, I'm sure you did a great job and I'll put it on my to buy list.
The sample chapter that is linked elsewhere uses a graph drawing library that produces png representations of the game state. (This actually builds on the material of a previous chapter, wherein you develop the graph->png utility.)
This is from the perspective of someone who hasn't yet bought the book. I really need to get to that.
Haven't seen that website before- pretty cool.
http://learnpythonthehardway.org/
It's free, you can download a PDF, and you can hit:
http://learncodethehardway.org/
To ask questions if you get stuck.
If you already know how to code it might be too simple for you.
You are an amazing person, however, for releasing all of your hard work for anyone to learn from!
So much nostalgia for the years spent trying to code a killer text-based game in QBASIC... tear
So, Common Lisp is not THE Lisp, but the common Lisp.