Running Emacs in the OS X Terminal

Most of us, these days, prefer to run everything from a GUI. Of course, there are plenty of times when we need to use a terminal. That can be a problem for Emacs users on OS X because there is no way to choose a terminal key for 【Meta】 from Emacs itself. This means that by default you must use 【Esc】 for 【Meta】, which I find clumsy.

Fortunately, Terminal.app has a preference that allows the 【⌥ Opt】 key to be mapped to 【Meta】. That works out well for me because I use 【⌥ Opt】 for 【Meta】 when running Emacs in the GUI.

Lots of people like to use 【⌘ Cmd】 for 【Meta】 though. What can they do? If you’re an OS X user who prefers to map 【⌘ Cmd】 to the【Meta】 key, this post and its comments on the Emacs subreddit has some suggestions. It also explains how to set the Terminal.app preference that I mentioned above. If you’re using Linux, there are also some suggestions to help you with that too.

Posted in General | Tagged | 1 Comment

Scientific Illiteracy

A little while ago I wrote about mathematical literacy and disturbing indications of a lack of it in American life. Now there’s evidence of American’s scientific illiteracy as well. The National Science Foundation recently polled 2,200 people on some basic scientific questions. The poll included a quiz with 10 questions on physical and biological science.

The first piece of bad news was that the average score was 6.5 correct answers. That’s not very impressive, especially given that the respondents were generally supportive of scientific research and favored increased funding. Not everyone can or wants to be a scientist, of course, but if you want a healthy society, its citizens need to know how the world works—at least in general terms.

You’re probably thinking this post is about how many people reject evolution. It’s not, although fewer than half of the respondents knew that human beings evolved from other species. No, this post is about the fact that 1 in 4 Americans didn’t know that the earth revolves around the sun.

At first I thought it was a joke or some writer being ironic. It wasn’t. Only 74% of those 2,200 people knew the fundamental fact of our solar system. It’s like Galileo never existed.

It’s profoundly depressing to find that so many of my fellow citizens are this scientifically illiterate. It’s even more depressing that the fact of our heliocentric solar system is not religiously charged like evolution. It’s merely a quotidian fact that I can’t ever remember not knowing. It’s probably true that this sort of scientific illiteracy occurs everywhere in the world; I just wish I’d hear about it somewhere other than the U.S.

Posted in General | Tagged | Leave a comment

Git Bisect Tutorial

Back in December, I wrote about Randy Fay’s screencast on Git bisect. Now Matt Honeycutt has posted his own tutorial. It’s in the form of a blog post so if Fay’s video moved too quickly for you to follow, you may find Honeycutt’s post useful.

As I wrote before, Git’s bisect command is a really excellent way of finding the commit that introduced an error and it’s very easy to use. You can follow along as Matt zeroes in on the offending commit. If you aren’t familiar with Git bisect, it will be well worth your time to spend a few minutes with Honeycutt’s post.

Posted in Programming | Tagged | Leave a comment

Nanopass Compilers

For the 2013 Clojure Conj, Andy Keep gave a great talk on nanopass compilers. The idea is that rather than having the normal 2, 3, or 4 passes in a compiler, you have several passes each of which does one small task. Each nanopass is basically a rewrite rule driven by a pattern matcher.

The talk is centered around a Scheme-to-C compiler that compiles a subset of Scheme to C. Keep put the compiler together over three days using a nanopass framework. The nice thing is that the compiler and the nanopass framework are available on Github for those who would like to experiment with it. The framework was developed for the compiler class at Indiana University and then used to rewrite the Chez Scheme compiler, a commercial compiler that compiles to machine code. This shows that the nanopass idea can definitely be used to build non-trivial compilers.

The talk is about 40 minutes so plan accordingly. If you like compilers or you’re interested in writing compilers in Lisp this is a video you will want to watch.

Posted in Programming | Tagged , | Leave a comment

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