Let Over Lambda

Last year, I reported that most of the book Let Over Lambda was posted on the Internet. I recommended that anyone interested in Lisp take a look at it. I still make that recommendation but be warned: you will end up buying the book to read the rest of it. Daniel Higginbotham summed it up best by writing “…holy crap is it exciting to read!”

I agree. As soon as I finished with the on-line parts, I ordered the book despite my resolve to not buy anymore dead tree books. Now I notice that the book is available via iBooks for the bargain price of $13.99. If you have an iPad (or an iPhone and don’t mind reading with the small screen) you no longer have an excuse not to read this book.

While reading Let Over Lambda I had the same feeling of delight and discovery that I felt when I first read Structure and Interpretation of Computer Programs. This is only the second book that’s affected me that way. If you’re a Lisper, you need to read this book. Really.

Posted in General | Tagged | Leave a comment

The Emacs clean-buffer-list Command

Some time ago, I enabled save-desktop-mode in Emacs and I’ve been really happy with it. I generally never close Emacs but sometimes I need to restart it for one reason or another or an OS upgrade requires me to reboot. Since I have a number of buffers that are always open, restarting Emacs was a pain before I started saving the sessions. Now when I restart Emacs, everything is just like it was before the restart. A downside of save-desktop-mode is that the buffer list grows and grows. Every once in a while I run ibuffer to get a list of active buffers and cull the list.

Today, I discovered the clean-buffer-list command that automates the process. The idea is that buffers that haven’t been displayed recently are closed. The meaning of “recently” is, of course, configurable along with other attributes of the process. This is the command that the so-called Midnight Mode uses. My machines are usually asleep at midnight so in order for me to use automatic cleaning I’d have to schedule it for when I’m on the machine and I don’t want to do that.

Happily, I can just run clean-buffer-list when I notice that the number of buffers is getting over large and have the list culled automatically for me. Another win for Emacs.

Posted in General | Tagged | 3 Comments

More On The Death Of DRM

John Gruber over at Daring Fireball has his own take on the Charlie Stross post that I wrote about yesterday. Like me, Gruber thinks it’s a great post and that Stross is right in his beliefs of what it means for publishes but he disagrees that it means the end of DRM. The reason for that is that Gruber thinks old-school media executives are incapable of shaking their belief in the need for and efficacy of DRM.

I sure hope he’s wrong because if he isn’t, I don’t see how publishers can avoid the Amazon Apocalypse. It’s easy to say they deserve it and enjoy a moment’s schaden freude but it will be bad for readers too in the long run. After all, how long is Amazon going to sell their products at loss after they have secured a virtual monopoly on the retail sale of ebooks?

Posted in General | Tagged | Leave a comment

The End Of DRM?

Although the title of this post puts me in jeopardy of having Betteridge’s Law applied, two recent posts by prominent writers lead me to believe that the end of DRM is near. A couple of weeks ago, Publishers Weekly posted an interesting article by Cory Doctorow entitled A Whip to Beat Us With. The article argues that by insisting on DRM, publishers have given retailers like Amazon a whip to beat them with. The idea is that DRM leads to device lockin, which means that a retailer with a large number of ebook customers can demand concessions from the publishers because the readers can’t leave without losing their current libraries and so the publishers’ customers become the retailer’s customers.

All that’s pretty standard stuff and well known to the type of people who read Irreal. Yesterday, Charlie Stross published a post in which he said the meaning of the DOJ suit against Apple and the publishers is that the publishers’ plan B for preventing Amazon from destroying them has failed and that they now have no other option but to open up the market by selling ebooks without DRM. Stross points out that with the current situation, Amazon has the best of both worlds: an (effective) monopoly at the retail level and a monopsony at the wholesale level.

That’s not good for readers in the long run, of course, but it’s deadly for the publishers. If Amazon controls access to a large part of the ebook reader base it can demand crippling concessions from the publishers.

Both articles are interesting and I urge you to spend a few minutes reading them. For the first time I have hope that the publishers will finally abandon DRM. They better; their continued existence depends on it.

Posted in General | Tagged | Leave a comment

Elisp Input With History And Completion

Xah Lee has a nice post up dealing with getting user input with completion and history in Emacs. I usually just use interactive with “s” or possibly “f” or “F” but Lee shows us a better way.

Did you know that there are functions specifically for reading path names and regular expressions? I didn’t but I can already see how they can be useful especially given the completion functionality. In particular, the read-regexp function is useful because the user can enter the regular expression without worrying about double escaping everything:

^\(ab*\.xxx\)$ → ^\\(ab*\\.xxx\\)$
Posted in Programming | Tagged , | 1 Comment

A Note On ace-jump-mode

After watching Episode 10 of Emacs Rocks, I fired up ELPA and installed ace-jump-mode. As I indicated in yesterday’s post, you can get it from Marmalade or github. It works beautifully and I’m already addicted to it but I noticed that I couldn’t pop the mark and return to my starting point as Sveen demonstrated in his video. I looked at the code and there was no push-mark anywhere in it. Then I visited github and looked at the code there. Although both files are labeled Version 1.0, the one on github does have the push-mark.

Therefore, if you’d like to try it, you’re probably better off getting it from github. If you’ve already downloaded it from Marmalade with ELPA, you can fix the problem by adding

(add-hook 'ace-jump-mode-before-jump-hook
             (lambda () (push-mark (point) t))) ;until it's fixed in Maramalade

to your .emacs or init.el file.

I didn’t check the other ELPA sites so perhaps you’ll have better luck with one of them. If you do find the correct version on one of the other sites, leave a comment so people will know.

If you’re an Org mode user, you probably don’t want to use the suggested key binding of 【Ctrl+c Space】 because it is used by Org mode. I’m using 【Ctrl+x Space】, which is currently unused (in 23.3).

Posted in General | Tagged | 6 Comments

Emacs Rocks! 10

Magnar Sveen has Episode 10 of Emacs Rocks! up. This time he demonstrates ace-jump-mode and ido-imenu. Both of these provide fast ways of moving around in an Emacs buffer. They’re really quite impressive as you’ll see when you watch the video.

Ace-jump-mode is available on Marmalade with ELPA or from github. Imenu is part of Emacs but the integration with ido requires a bit of additional code. Georg Brandl has a package, idomenu, on EmacsWiki to do that. It looks as if that’s what Sveen used. There is also some code on EmacsWiki that you can add to your .emacs or init.el file to do the same thing. That code includes pushing the mark so you won’t have to add it as Sveen did.

As usual, this episode is entertaining and full of great information. You should definitely watch it as soon as you can—it’s only 2 minutes, 8 seconds long.

Posted in General | Tagged | Leave a comment

Guile Fail

I have a set of guile scripts that I use to produce a rarely needed report. Today I tried to run the report and guile failed because it couldn’t find libltdl. No problem, I thought, it probably got wiped out when I upgraded to Lion. So I grabbed a new copy and compiled and installed it. Guile still failed because I installed version 5 of libltdl and guile had been compiled against version 3. Grrr. OK, I’ll just recompile guile. Again, no joy. The guile build failed while it was trying to generate the documentation. No amount of fooling around would get it to compile. I downloaded a copy of the latest version (2.0.5) and tried compiling that: same result.

Next, I checked the bug database and sure enough, it’s a known problem. The original bug was filed about a month ago but there’s no fix or workaround available yet. In the mean time, I’m dead in the water as far as Scheme is concerned. I guess I’ll be doing a lot of CL work in the mean time. That’s OK because I’ve been working mostly in CL lately anyway but I hate not having a working guile.

If anyone out there has any wisdom to offer on this problem, please share it in the comments.

Posted in Programming | Tagged | Leave a comment

An Emacs Guide For Noobs

David Röthlisberger has posted a nice Emacs guide for beginners. It covers subjects such as

  • Why you might want to learn and use Emacs
  • Basic editing with Emacs
  • Customization
  • Info
  • Ergonomics

All in all a nice introduction and well worth spending some time with if you think you’d like to learn Emacs but find the learning curve too arduous.

Posted in General | Tagged | Leave a comment

Common Lisp FAQ

Nikodemus Siivola has updated his Common Lisp FAQ. It’s a nice resource for new Lispers and well worth a read. You might also want to check out his home page; he’s got links to many of his projects and some other interesting things.

Posted in Programming | Tagged | Leave a comment