Common Lisp Reader Macros

Chaitanya Gupta has posted a nice introduction to reader macros. The conventional wisdom is that reader macros are ripe for abuse and many experts recommend avoiding them. Still, there are times when they solve a legitimate problem1 and in those cases they provide a powerful tool.

If you want a detailed explanation of reader macros, the best places to find it are still Paul Graham’s On Lisp and Doug Hoyte’s Let Over Lambda. Gupta’s tutorial is an excellent introduction and enough to allow you to write your own reader macros. If you’re a Lisper and don’t know about reader macros you should definitely spend a few minutes on Gupta’s tutorial.

Footnotes:

1

That is, a problem that doesn’t involve trying to make Lisp look like Python or something similar.

Posted in Programming | Tagged , | Leave a comment

Me Neither

Posted in General | Tagged | 4 Comments

Sauce for the Gander

I don’t understand why they’re so upset. After all, if they have nothing to hide

Posted in General | Tagged | Leave a comment

Fixing the Emacs distnoted Problem on OS X 10.9

With Emacs 24.3 (and possibly earlier versions) under OS X 10.9 there is a nasty problem that causes distnoted, the OS X distributed notifications daemon, to periodically suck up processor resources and basically tie up the machine. Sometimes it recovers on its own, sometimes you have to restart Emacs. That is particularly apt to happen after waking up from sleep mode.

The problem is fixed in the 24.4 release and I’ve been ignoring it while I waited for the new release. The other day, though, I ran out of patience and hunted up a patch I’d seen for it some time ago. If you build Emacs from source, it’s trivial to apply it: just follow the instructions in the patch commentary1.

After applying the patch and rebuilding, everything worked normally again and I haven’t had anymore runaway distnoted problems. Actually, the whole system seems snappier after I installed the patch. That’s not too surprising given that Emacs is always running on my machines. If you’re running Emacs on OS X 10.9, you may want to rebuild Emacs with the patch. As long as you have a C development environment, that’s easy. I don’t know if Homebrew and the other package systems have applied the patch or not.

Footnotes:

1

For some reason that I’ve long forgotten, I don’t have to do the

make bootstrap

step. If you get a fatal error on the

make install

step, just start over but omit the

make bootstrap

step.

Posted in General | Tagged | 6 Comments

HTML as an STD?

The LA Times has a surprising revelation about Americans’ beliefs. You might find their views extreme but are they wrong? As far as HTML is concerned, maybe they’re on to something.

We geeks live in our own cocoon and sometimes forget that the everyday terms we use are mysterious—or, apparently, downright nasty—to the rest of the population. I tagged this entry as humor but maybe it really isn’t that funny. How can 10% of the population not know what HTML is? As I say, a cocoon.

Posted in General | Tagged | Leave a comment

Dual_EC_DRBG Expalined

Irreal readers are doubtless familiar with the broad outlines of the NSA’s insertion of a backdoor into the NIST Special Publication 800-90A elliptic curve random bit generator but may be unfamiliar about what was actually involved. Now Mother Jones has an excellent article about mathematician Edward Frenkel. The article is mostly about the beauty of Mathematics and how the teaching of it is terrible. I like that, of course, but the thing that will be interesting to most of you is a video interview with Numberphile in which Frenkel discusses the Dual_EC_DRBG algorithm.

He gives a simple and very accessible explanation of modular arithmetic, elliptic curves, how the Dual_EC_DRBG algorithm works, and how the NSA was able to insert the backdoor by the judicious choice of some parameters. It’s an amazing explanation because while Frenkel keeps the explanation well within the capabilities of a high school algebra student, he nevertheless gives a mathematically accurate description of what’s going on. If you have the slightest interest in the elliptic curve DRBG and the how it can be subverted, you’ll enjoy this video. It’s only about 11 minutes so you can enjoy it with your morning coffee.

Update: Frenkel talks further about the deplorable state of Mathematics education in this LA Times story.

Posted in General | Tagged | Leave a comment

Why You Shouldn’t Trust the Government to Collect Information About You

This is why you shouldn’t trust the government to build databases about their citizens. At the link, Charlie Stross talks about the growing scandal in the UK concerning the NHS medical records of every citizen in the United Kingdom.

Read Charlie’s post and see if you’d be comfortable with your government having this sort of information on you. Oh, wait. If you’re a UK citizen (and soon, a US citizen) they already do. The same, I’m sure, is true of most other developed nations. Remember, the scandal isn’t that there aren’t laws and regulations forbidding this sort of thing; there are. The scandal is they didn’t do a thing to stop it.

The NSA assures us that the private information they collect about us (wherever “us” happens to live) is closely guarded and safe. Except when it isn’t. What does it take to get people angry about this?

Posted in General | Tagged | Leave a comment

Outage

And, we’re back. Sorry for the outage. Apparently my hosting provider had a series of drive failures that overwhelmed their RAID system. One of the servers affected runs the database for Irreal. My provider is very proactive and has been working to resolve the problem since 4am on Sunday. If you’re looking for an inexpensive and reliable (current problems notwithstanding) hosting provider that can also handle your domain registration, be sure to give IXWebhosting a look.

Barring any further problems, Irreal should be back to business as normal.

Posted in Blogging | Tagged | Leave a comment

SBCL 1.1.16 Released

The latest monthly release of Steel Bank Common Lisp is out. As usual, I had no problems building and installing the new release. You can download binaries or source at the usual place.

After last month’s major enhancement of the register allocator, this release was mostly bug fixes. You can see the exact changes in the NEWS file. One interesting thing about this release is that at least part of the process was performed in the air. Christophe Rhodes talks about that in this post about the release.

Posted in General | Tagged , | Leave a comment

A Sunday Treat

This really tickled me:

Oddly, I was all set to click but I couldn’t find a link.

Posted in General | Tagged | Leave a comment