The excellent developers of Steel Bank Common Lisp have posted the latest release of the system. It compiled, passed the extended tests, and installed without issue on both my iMac and MacBook Pro. This release has a bunch of enhancements, some optimizations, and bug fixes. You can get the details at the News page and download it at the Download page. As always, the latest binaries are only available for Linux. If, like me, you’re running some other system, you’ll have to compile from source. Fortunately, that’s easy to do and the Getting Started page has detailed instructions.
It’s amazing that every month, month after month, the developers post a new release that most often has many enhancements and optimizations. It’s a lot of work and they deserve kudos for their hard and excellent work. If you’re looking for an excellent Common Lisp system it’s hard to beat SBCL.
Over at Bytopia, Alex has a beautiful post on using Emacs to work with images. Alex is trying to train an OCR classifier to recognize characters from grocery store receipts. He started by scanning 4 or 5 receipts and breaking the characters into individual images. Next he needed to assign the proper character to each image.
That’s where Emacs comes in. First, he uses
turn-on-iimage-mode to turn a buffer of a directory of image files into a buffer of the corresponding images. A nice thing about this mode is that when the cursor is on an image you can still read the image file name. That and a bit of Elisp allow Alex to specify the character in each image (or delete the image if it’s garbled) and prepend the character to the file name. With a little more massaging, these images are used to train the classifier.
It’s astounding how little code all this takes. Head on over to Bytopia to see how he does it. Once again, Emacs and just a little Elisp easily solves a problem that would take considerable effort if one where to do it with a script or, worse, as a C application.
Posted in General
In a bit of good news, The Hill is reporting that U.S. House of Representatives members are pressing Speaker of the House John Boehner to allow a vote on reining in the NSA. If the members don’t get their vote, they are threatening to attach the bill as an amendment to “must-pass legislation.”
Although Boehner generally supports the NSA, the members have him boxed in and it looks as if the House might see some action. The bill, the USA Freedom Act, was filed by Rep. Jim Sensenbrenner, who, significantly, was one of the authors of the Patriot Act upon which the NSA relies for authority to conduct mass surveillance on Americans.
In July, the House narrowly defeated a bill by Rep. Justin Amash that would have halted the NSA’s mass phone call metadata collection. Despite the opposition of the House leadership and heavy lobbying by the administration, Amash’s bill was defeated by only 7 votes and many members who voted against it are now ready to support Sensenbrenner’s bill.
Meanwhile in the Senate, Judiciary Committee chairman Senator Patrick Leahy is offering his own version of the Freedom Act as an alternative to Senator Feinstein’s “business as usual” bill that supports the NSA’s activities. As I wrote recently, Feinstein’s bill has been voted out of the Senate Intelligence Committee so it’s unclear what will happen. Now would be a good time to let your Congressmen know that you support efforts to put an end to the NSA’s extra-constitutional spying on Americans.
Posted in General
Some word phrases should be hyphenated. For example, you should write “an end-to-end solution” rather than “end to end solution.” If you’re like me, you almost always forget about the hyphenation initially and just type “end to end” without stopping to think about the hyphenation. It’s really a pain to have to go back and add them manually. Sometimes it’s easier to just delete the phrase and retype it correctly.
I’ve done this often enough that I realized it was time to automate hyphenating the phrase after the fact. I wrote a bit of Elisp but it seemed a little too complicated so I simplified things and came up with this:
(defun jcs-dashify ()
"Place hyphens between words in region."
(error "No region specified"))
(replace-regexp "[ \n]+" "-" nil (region-beginning) (region-end)))
Now all I have to do is select the phrase and call
jcs-dashify. As with most extensions like this,
jcs-dashify is simple but helps reduce friction in my work flow. I’m sure you can do this sort of thing with most (decent) editors but Emacs makes it simple and natural. As Magnar Sveen says, one of the great about Emacs is its extensibility.
I recently ran across a fascinating history of T, a Scheme-like Lisp dialect that preceded Common Lisp, over at Paul Graham’s blog. It was written by Olin Shivers who is well-known in the Scheme community and is the founding author of scsh, a Unix shell that runs on Scheme 48.
If you’ve been reading Irreal for a while you know that I enjoy reading stories about the founding of our profession. The History of T begins in the early 1980s. Sussman and Steele had published the Lambda Papers, Steele had written his master’s thesis on the Rabbit Compiler but MIT Scheme had not yet been written. Lexical scope was considered an interesting theoretical construct but completely impractical. Shivers was a junior at Yale.
What really impressed me about this history is how most of the principals were undergraduate/graduate students. Earning a Ph.D. is all about research, of course, but here we see undergraduates and master’s students doing cutting edge research and building state-of-the-art systems.
This is really an interesting and engaging story and well worth a few minutes of your time. Most of it takes place only 30 years ago. Although that may seem like a long time to many, it’s amazing how far our field has progressed since then.
Posted in General
Those of you have been around for a while know I’m a big fan of reproducible research. I’ve written about it here, here, here, here, here, and here. Now Anton Nekrutenko, James Taylor, and Eivind Hovig have a nice article in the Computational Biology section of PLOS entitled Ten Simple Rules for Reproducible Computational Research.
Some of the rules are obvious such as
- Version control all custom scripts
- Always store the raw data behind plots
while others are things you might not think of such as
- For analyses that use random input, always record the random number generator seed so that the exact run can be reproduced
- Generate a Hierarchical Analysis Output, Allowing Layers of Increasing Detail to Be Inspected
The nice thing about the article is that they discuss each rule and offer ways to follow it. If you’re involved in publishing your research (or even if you’re doing research that won’t be published) you should take a look at this article. It will make your life a lot easier, especially since many journals are now requiring some sort of reproducibility documentation.
The article doesn’t mention Emacs but as I’ve written many times, Emacs and especially Org mode provide many tools for doing reproducible research effectively. If you’re not familiar with that, the posts I linked above will give you a few ideas.
Thanks to Jorge Tavares via Jean-Philippe Paradis for the pointer to the article.
Sacha Chua has posted a followup to her interview with Magnar Sveen. It’s basically a set of topic headings that index into the video of the interview. That’s very nice because if you want to revisit a particular part of the interview, you can go right to it rather than having to run through the entire video.
She’s also added audio only links in MP3 and OGG for those who want to listen during a commute. That’s very nice too.
Chua is famously “semi-retired” but the interview and followup represent a tremendous amount of work. We should all be grateful for her taking the time to do this and maybe leave a thank you on the post at her site.
Posted in General
Matthew Keeler has posted a nice introduction to writing YASnippets. Keeler starts with a minimal snippet that simply includes the GPL 3 boiler plate in the file and then moves on to a for loop snippet for C/C++ that uses tab stops.
Finally he presents a couple of complex examples. The first uses mirrored fields to build C++ QT classes. It also demonstrates embedding Elisp code in the snippet. A second example ties everything together to build a snippet for defining a PHP class.
Writing snippets is pretty easy once you’ve seen a couple of them explained. Keeler’s post is a nice way to get started.
Posted in General
Senators Ron Wyden, Mark Udall, and Martin Heinrich have an interesting Op-ed in The New York Times entitled End the N.S.A. Dragnet, Now. In it they say that they believe the NSA’s collection of telephone call metadata is a clear case of an unconstitutional general warrant of exactly the type that the American Revolution was fought to prevent. They further state that the NSA greatly exaggerates the usefulness of the bulk collection and have been unable or unwilling to provide any evidence of its usefulness despite repeated requests for the evidence by the senators.
They also discuss Senator Feinstein’s reform bill, which they describe as business as usual for the NSA, and go on to contrast their own legislation that would prohibit the government from conducting “backdoor searches” of Americans’ communications such as phone call metadata, emails, text messages, and Internet use.
Sadly, the Senate Intelligence Committee has voted out Feinstein’s bill so we can expect to see little help from the Senate. They will, of course, pretend that they’ve solved the problem while the NSA continues to abuse the rights of American citizens and, indeed, citizens of every other country as well. It’s shameful.
Posted in General
Since I tuned up the caching software for Irreal.org I’ve seen a significant improvement in download speeds. Unfortunately, I’ve also seen some problems with client-side caching. After I add a new post and reload the site, I see the previous state without the new post. If I delete my browser history, the problem goes away.
Obviously, that’s not acceptable so I turned off client side caching. I will monitor the performance on my side to see if this helps things but if you see new problems (or, hopefully, improved performance) please let me know.
Posted in Blogging