Open Access: A Tipping Point

For some time now there’s been a movement within academia for open access to their research results. Many professors, especially those in Mathematics, have pledged not to publish in closed journals. The paid journals, of course, hate this and have been fighting the trend in any way possible including lobbying the government to make open access journals illegal. Some would say that the fight reached its inevitable conclusion with the Aaron Swartz affair (although JSTOR, to its credit, refused to participate in the prosecution). If you don’t know about the open access movement, let the incomparable Jorge Cham explain it to you.

Now, in what could well be a tipping point in the fight, The University of California has instituted an open access policy. The new policy requires that all research from all 10 campuses of the UC system be available to the public without charge via the campus Website eScholarship. You can read the UC announcement here. I’m confident that we’ll soon see other universities following suit.

That’s a good thing. Whatever you think about paid journals and their place in research, it’s hard to argue with the notion that when the public pays for research (as they do for most research) they should be able to see the results without paying exorbitant fees to a publisher.

Posted in General | Leave a comment

Elisp Namespaces

Nic Ferrier has posted an interesting proposal to bring namespaces to Emacs Lisp. His ideas seem both reasonable and doable. One of Elisp’s big problems is the lack of a namespace system. We end up with a bunch of nasty looking identifiers such as jcs/fill-buffer-with-zeros or jcs-make-new-entry to avoid identifier conflicts.

Ferrier’s proposal, which you should read, mostly avoids all that without doing much violence to existing code and packages. It’s worth discussing and I hope that the entire Emacs community will read it and contribute ideas and criticism. Having a decent namespace system would make all our lives easier and, at the same time, give Elisp detractors one less thing to complain about.

Posted in Programming | Tagged , | Leave a comment

An Emacs Timeline

Jamie Zawinski has an interesting old post on Emacs history. It’s a timeline of Emacs versions from Stallman’s, Moon’s, and Steele’s original merger of TECMAC and TMACS in 1976 to Gnu Emacs 22.1 and XEmacs 21.4.21 in 2007.

His original timeline was written in 1999 and then updated in 2007. I wish he would update it again, although the history since Emacs 22 probably isn’t that interesting. In any event, if you enjoy exploring the history of our field and Emacs in particular, you should give this post a look.

Posted in General | Tagged | 5 Comments

Fred Brooks on Computer Science

Someone posted an old address by Fred Brooks, author of the celebrated The Mythical Man-Month, given on the occasion of his acceptance of the ACM Allen Newell Award in 1994. It’s an interesting talk and one that I hadn’t read before.

Brooks posits the idea that Computer Science isn’t a science. Instead it should be viewed as an engineering discipline and in particular that what we are really doing is toolsmithing. Some may chafe at that definition but Brooks makes a good case for it. He says that our value is in the tools that we build for others to solve their problems with.

He illustrates this by describing the work of his laboratory at the University of North Carolina at Chapel Hill. The laboratory takes an interdisciplinary approach and collaborates closely with colleagues in Physics and Biology. He describes some of the tools that they built during those collaborations and how both sides of the collaboration were better off in the end.

It’s a nice talk and well worth a read. You may find yourself persuaded that his definition of “Computer Science” is the correct one.

Update: Nick Higham points out that I neglected to add a link to Brooks’ talk. Silly me. Here it is.

Posted in General | 2 Comments

Troy Hunt on SQL Injection

The invaluable Troy Hunt has an excellent post on SQL injection attacks. We all know the basic ideas behind SQL injection but Hunt shows how attackers actually mount the attacks and why they work. It’s extraordinary that these attacks still work but as Hunt points out they are still the number one exploit in the OWASP Top Ten.

This post is about the SQL injection itself rather than its mitigation. There’s a link to mitigation strategies in the post1 for those who are looking to protect themselves from these attacks.

If you’re writing server side code that interfaces to a database, you should take a look at this post. At the very least, you’ll get an idea of what you’re up against.

Footnotes:

1

The mitigation post is primary aimed at .NET developers but contains good advice for everyone.

Posted in General | Tagged | Leave a comment

Updating to Org Mode 8

I just upgraded Org mode to version 8.0.6. I’ve been holding off waiting for org2blog to fix some incompatibilities. Mostly, the transition went smoothly. By following the commentary in the release notes and the new installation instructions I had everything working reasonably quickly. I thought.

Everything was fine until I tried to rebuilt my agenda. The first time I tried it I got a message saying that org-agenda-archives-mode had a void value. I turned to the manual to see what I needed to do but I could find no mention of this variable in the index or any of the appropriate areas in the body of the manual. Nor could I find anything in the release notes. What to do?

Well, of course, Emacs is famously self documenting so I just looked up the variable with 【Ctrl+h v】 and saw that I could set it to nil and get the behavior I wanted. I tried to build the agenda again and got another error message. This time I just went directly to the built-in manual to figure out the right value. This happened a total of 3 times but after the first I was able to resolve the problems quickly. The TL;DR is that I just added

(setq org-agenda-archives-mode nil)
(setq org-agenda-skip-comment-trees nil)
(setq org-agenda-skip-function nil)

to my init.el and everything was fine.

It’s sometimes easy to forget the power of the built-in documentation. Instead of wasting time looking at the Org manual, all I had to do was look up the problem variables.

Posted in General | Tagged | 8 Comments

Embedded Notes in Text

The other day, I ran across this 2009 Norwescon interview with Vernor Vinge. Irreal readers will be happy to know that he’s an Emacs user and writes his novels with it. The interview includes a screen shot of his work on The Children of the Sky.

One of the things that struck me was that Vinge embeds copious notes in the manuscript. His scheme looks homegrown to me. The story text is indented while each line of the notes starts with a ^. It’s easy to imagine a script or some elisp that extracts the story text from the manuscript. Vinge is, after all, a computer scientist.

That got me thinking. I use Org mode for all my writing and sometimes want to embed notes in the file along with the final text. How can I do the same thing that Vinge does? I sometimes embed a line or two of comments by starting them with a #. When the blog post, say, gets exported the lines beginning with # are not exported. For longer form writing with copious notes that’s not convenient. Click on that screen shot in the Vinge interview and you’ll notice that there are more notes than story text. I was looking for a way of doing what Vinge does with his system.

At first I thought I could use the tangle function but that works only with source code for one of the supported Babel languages. After a bit of research I discovered that you could include comments between BEGIN_COMMENT and END_COMMENT tags like this

#+BEGIN_COMMENT
Some notes
and other
comments
#+END_COMMENT

Sadly, there’s no Easy Template shortcut for it. No problem, I thought, I’ll take a look at the code and maybe advice it or do my own version. Happily, as soon as I started looking I found the answer. You can define your own Easy Templates by adding an entry to the org-structure-template-alist variable:

(add-to-list 'org-structure-template-alist
             '("n" "#+BEGIN_COMMENT\n?\n#+END_COMMENT"
               "<comment>\n?\n</comment>"))

Now I just type

<n

and 【Tab】 to be put in the middle of a comment region. This is a nice solution because, like reproducible research, you have everything in a single file and can export it to any of a number of formats including HTML, plane text, LaTex, and even ODT1. As usual, Emacs provides an environment that makes it easy to solve editing and workflow problems.

Footnotes:

1

I haven’t used the ODT export function yet but it could be useful to authors whose publishers require the manuscript be delivered as a Word document.

Posted in General | Tagged | Leave a comment

Tail Call Optimization in Lisp Implementations

Early on in my Lisp education, I learned Scheme and became enamored with using recursion as a primary iteration strategy. It’s hard to avoid this in Scheme because it doesn’t have any other general recursion mechanisms besides do.

In Common Lisp, iteration via recursion is not an established paradigm. Mostly that’s because, unlike Scheme, Common Lisp does not guarantee that tail recursion will be “optimized.” You can always do recursion, of course, but you risk running out of stack frames. With tail call optimization (TCO)1 that doesn’t happen.

Even though Common Lisp doesn’t guarantee TCO, most implementations do, in fact, provide it. Sadly, it’s hard—or at least I find it hard—to determine whether a particular implementation provides it or not. You can peruse the documentation, of course, but it seems harder than it should be to find the information. Happily, Marc Simpson, who had the same problem, has us covered. He’s put together a nice post that lays out which CL implementations provide TCO and which don’t.

For my part, I’m glad the SBCL does TCO. So does Clozure, the other CL implementation that I sometimes use. If you are a Lisper, you should take a look at this post and bookmark it even if you currently use only a single implementation. It’s a great resource.

Footnotes:

1

More accurately tail call elimination, but everyone calls it tail call optimization.

Posted in Programming | Tagged , | Leave a comment

The Last Word on XML

Jean-Philippe Paradis has a pithy evaluation of XML.

Posted in General | Tagged | Leave a comment

Making My Email Safer

As I’ve mentioned before, I’ve been looking for ways to tighten up my email security and, at the same time, move away from Google to avoid being caught in another nasty surprise like the shuttering of Google Reader. Today’s post is a report on where I am now and what I am planning for the future.

By far the best advice I’ve found for keeping your email secure was given by Drew Crawford in his NSA-proof your e-mail in 2 hours post. Crawford’s recommendation is to run your own mail server. That’s not nearly as hard as you might think and it gives you absolute control over the secure storage of your email. Unless the police come to your door with a warrant (or capture the email in flight) your privacy is assured. Even with a warrant, you know “they” are trying to get your email and can fight the warrant. That’s much better than storing your email on Google and having the government serve Google with a secret warrant to get your email without you even knowing about it.

Of course, there are some problems. You’ll need your own domain and a machine to run the mail server on. Crawford assumes a Linux machine and that’s probably the easiest way to get things set up, especially if you want to follow his procedure. The other thing you’re going to need is a fixed IP address (or at the very least some sort of dynamic DNS setup). Most ISPs are going to make you get a commercial account and charge you more for this so it bears looking into before you start.

Setting up my own mail server is my ultimate goal but while I’m working out the details, I’ve moved all my Google mail elsewhere. I found two excellent services that should work well for me and anyone else wanting to abandon Google. The first is FastMail. If you’re looking for something very similar to Gmail, this seems like a good bet. Max Masnick and workhere.io have both switched and posted informative articles on the pros and cons of FastMail. Both are worth a read.

The other possibility is Lavabit the service said to be used by Edward Snowden. They have an impressive list of features including keeping your email encrypted on their server with a key only you know. If you’re extra paranoid, this may be a good bet for you.

My intermediate solution is to move my Gmail traffic to Lavabit. I’ve already redirected all my mailing list traffic (the bulk of my Gmail activity) and will see what else needs to be moved as emails trickle in. I’m pretty happy with this as a stop gag measure until I can get my own email server up.

Posted in General | Tagged | Leave a comment