Lisp Debugging with Slime

Rainer Joswig has a nice video up demonstrating how to debug Lisp with Slime. In a sense there’s nothing new here: most Slime users are pretty much aware of the facilities that he uses. Nevertheless, it’s very useful to see someone put them to use on a real problem.

Joswig makes the point that the Emacs/Slime combination is equal to any dedicated Lisp IDE. Not being an IDE user, I can’t verify that from personal experience but I do know for sure that I don’t want to deal with more than one editor. If the only thing you do is program Lisp then by all means use an IDE if it meets your needs. But if you’re like me and use your editor for darn near everything and if, also like me, you are easily confused by multiple editor interfaces, then stick with Emacs and Slime and be happy.

The video is a bit over 15 minutes so it’s easy to fit into a coffee or lunch break. If you use Lisp and Slime this is definitely worth a few minutes of your time.

Posted in Programming | Tagged , , | Leave a comment

The Hypocrisy of Governments

Governments all over the world are sparing no effort to discover and prosecute members of Anonymous. It only makes sense. After all they do patently illegal things like launching DOS attacks against sites they don’t like or have a grievance with. Clearly bad guys who deserve no leniency.

Except, it turns out that governments are doing the same things. Not only are they doing the same things they claim it’s perfectly justified in the pursuit of justice. Why should their hands be tied, after all?

Yes, but they’re going after bad guys so it’s justified. Actually not. There appears to be a lot of innocent bystanders suffering too. This particular case comes from Britain so I’m not as familiar with the legal system but it’s hard to see how they can justify doing things for which they jail others. Just remember this the next time your government is in high dungeon about those criminal hackers sullying our sacred Internet.

Posted in General | Tagged | Leave a comment

State of the Irreal Site

I think I have finally ironed out all the problems with Irreal. Ironically, the latest snafu held the key to resolving all the other problems. WordPress now automatically updates minor versions and although they notify me with an email, it pretty much flies under the radar. After the last automatic update, comments stopped working and after a bit of debugging I discovered that the NuCaptcha plugin was having problems with the Twenty Ten theme that Irreal uses.

Although I keep the WordPress software up-to-date, having learned my lesson the hard way, I didn’t keep the theme up-to-date because I didn’t think it had security or operational implications and because I had made some tweaks to the CSS. That finally bit me in the butt when comments stopped working. I thought. Actually, I think it had significant negative impact long before that.

After I fixed the comment problem by adding a Child Theme with my custom CSS tweaks, I noticed that the latency problem completely disappeared. I disabled the caching plugin and I still had near-instantaneous page loading. It appears that the loading latency problem was somehow related to the out-of-date theme.

I think I’ve finally learned my lesson: keep all your software current. If you’re running a WordPress site, it’s imperative that you keep WordPress and your theme up-to-date. Updating WordPress means you have to (or at least should) backup your database. Updating your theme is even easier. If you want to change the CSS you should do it by creating a child theme. That’s easy and you only have to do it once. Thereafter, you just need to update the theme when WordPress tells you a new one is available.

Please let me know if you experience any problems with the site. It should load quickly and be fully functional. If it falls short in any way, I’d like to know about it.

Posted in General | Tagged | 4 Comments

Final Ruling on the TSA’s Infamous No-Fly Case

I’ve written before, here and here, about the U.S. Government’s scandalous behavior in the case of a woman, Rahinah Ibrahim, placed on the no-fly list. The government did everything they could to make the case disappear, including refusing to grant Ibrahim a visa so that she could testify, placing her daughter, a U.S. citizen, on the no-fly list so that she could not return home to testify, and then lying to the court claiming that they hadn’t done any of those things. They also claimed that publicly available information was a state secret that couldn’t be introduced at trial.

In those previous posts, I wrote that I was objecting to the government’s heavy handed and bad faith actions and that I didn’t know whether placing Ibrahim on the no-fly list was justified or not. Now we know the answer. It turns out that she was placed on the list by mistake. FBI agent Kevin Kelley mistakenly checked the wrong box1 on a form that resulted in her placement on the list. The evidence also suggests that he was filling out the form because he confused Jemaah Islah Malaysia, a Malaysian professional organization composed primarily of those who had studied in the U.S. with Jemaah Islamiyah, an organization on the government’s designated foreign terrorists list.

As I wrote in my second post, the judge initially released only a summary of his findings giving the government a chance to appeal the full decision’s release. Now the (slightly redacted) decision is available. The judge is remarkably even tempered in his remarks. He doesn’t call out the government for their duplicity although he does describe the government’s treatment of Ibrahim as “Kafkaesque” and ordered that the she be removed from all the watch lists she may have been put on and that the government produce sworn depositions that they have complied.

Footnotes:

1

Actually, this is understandable. The form’s instructions call for checking the boxes next to lists on which the subject should NOT be placed. Kelley found no reason for her to be put on the no-fly list so he didn’t check that box, resulting in her being placed on the list. The clumsy wording aside, haven’t these people ever heard of human factors engineering? It would be interesting to discover how often this mistake has been made.

Posted in General | Tagged | Leave a comment

Thinking Outside the Box

Here’s a delightful tale that illustrates the power of non-linear thinking. I don’t know if the story is true or not but it hardly matters. The point is being able to see the value in an undertaking that all the “smart” people considered foolish.

Posted in General | Leave a comment

Comments Reenabled

I’ve updated everything and turned comments back on. As far as I can tell, everything is working correctly. If you have any problems and can’t leave a comment, email me at jcs at the domain of the blog.

While the captcha was disabled, there were several, presumably bogus, user registrations. I’ve deleted all of those but I may have inadvertently deleted a couple of older legitimate registrations as well. If you’re a legitimate user and I deleted you, please accept my apologies. If we ever meet up, I’ll buy you a beer.

Update: except → accept

Posted in Administrivia | Leave a comment

Comment Problems

Yesterday, a couple of readers emailed me that they were unable to post comments. When I tried to comment as someone other than me I had the same problem. After a little investigation I discovered that the problem involved the NuCaptcha plugin. I disabled NuCaptcha and everything started working again. The NuCaptcha plugin provides the Captcha challenge that tries to distinguish people from bots. It doesn’t always work but it’s pretty good at keeping spam off the site.

When I turned off NuCaptcha, I was astounded at how soon the scum spammers struck. In less than a minute after disabling NuCaptcha I had my first spam comment. From about 2:30 until I turned off comments at around 7:30 I had 25–50 spam comments1. As I say, astounding. Irreal is, after all, a small site catering to a small (but select) audience. Nonetheless, immediately after dropping our shields we were under sustained attacked by modern day Romulans.

I think the problem is that I haven’t been updating the Twenty Ten theme. That’s because I have some custom CSS markup in it and I didn’t see any reason to update and migrate my additions. Shows what I know. Later today I will create a child theme with my custom CSS and update the theme. If that doesn’t resolve the problem, I may have to change themes. In any event, please be patient while I resolve this problem. As soon as I have things working again, I’ll turn comments back on.

Also, since I turned off NuCaptcha I’ve almost doubled the number of user registrations on the site. Those registrations are almost surely phony and I’ll be deleting them tomorrow. If you registered in the last couple of days, you have my apologies; please register again after I give you the all clear. None of this would be necessary if it weren’t for the scum spammers and the low lives who employ them.

Footnotes:

1

I didn’t succeed in getting comments turned off last night and awoke to 78 more spam comments.

Posted in Administrivia | Leave a comment

Comments Temporarily Turned Off

I’m temporarily turning off comments. I’ll explain further tomorrow and, with any luck, have them turned back on by the end of Friday. Until then, please bear with me.

Posted in Administrivia | Leave a comment

A Lisp Overview

A few days ago I wrote about Simon Tatham’s overview of C. Today, I want to mention a very nice overview of Lisp. The overview is really a Lisp primer aimed at C/C++/Java programmers (it’s notes from the CSC330 course at Cal Poly meant to serve as an introduction to Lisp for students whose experience is limited to imperative languages).

If you’re a Lisper, it’s easy to nitpick the notes. Some areas you may think important aren’t covered, and others are covered in an idiosyncratic way. Still, it’s an excellent introduction to Lisp and how it’s different from and the same as the C/C++/Java environments.

If you’re curious about Lisp—even if you don’t want to commit to learning it—this is a good document to get a feeling for what it’s like. To be sure, it doesn’t come close to capturing the power and beauty of Lisp but it does give you a reasonable idea of what the excitement is about.

Definitely worth 15 or 20 minutes of time if you have any curiosity at all about Lisp. My own awakening came from a blog post that pointed me to Paul Graham’s Ansi Common Lisp. This may be a lighter-weight introduction to get you interested.

Posted in Programming | Tagged , | Leave a comment

Less Familiar Lisp Functions

A couple of months ago, I wrote about Christopher Neufeld’s series on the less familiar parts of Common Lisp. He’s up to the Fs now so if you’re interested in Lisp, you should check in with his latest posts.

One recent post concerns the fboundp function. You might think that there’s not much to cover. After all, a symbol is either bound to a function or not. But it turns out that there’s some edge cases and Neufeld uses those explore how

(mapcar #'some-function some-list)

and

(mapcar 'some-function some-list)

differ. If you’re like me, the second case is a bit of a surprise. Forms like that are common in Emacs Lisp but, one would think, non-sensible in Common Lisp.

It turns out, though, that sometimes a form like that does make sense and the results can indeed be different from the first. See Neufeld’s post for the details.

Posted in Programming | Tagged , | Leave a comment