Where’s Your Emacs Initialization File?

TIL: The Emacs variable user-init-file contains the file path of the current initialization file. (via Daniel Ehrman).

Posted in General | Tagged | Leave a comment

Seriously Paper Free

I’ve written before that I’m rigorous about avoiding paper, pens, and pencils. I’m pretty good about doing everything digitally but nowhere near as good as these guys. Their feat is even more impressive when you realize that they’re doing it in an office setting.

They waged a war on paper and essentially drove it completely from their office. At the end of the day anyone can dispose of any paper they see lying around whether or not it’s theirs. They moved the printer to a location so remote and inconvenient to the rest of the office that people stopped using it and they were able to get rid of it. They have a strict prohibition against signing paper contracts. So strict that the CEO was sentenced to a full day of customer support for signing a paper contract. The company also prohibits taking notes in notebooks in meetings. Instead, they bought each employee an iPad to take notes with.

As you can see, they are serious about doing without paper. So serious that they also got rid of the toilet paper. I’ll let you head on over to the post to see how they managed that.

As I found out when I first started trying to collect all my information digitally, it’s mostly a matter of culture and habit. At first it’s hard and seems limiting but soon you don’t notice the lack of paper and writing implements. Especially since everything is so easy to access and search for and you don’t have a bunch of documents waiting to be filed and taking up room once they are.

Posted in General | Tagged | Leave a comment

Do As I Say…

An almost too delicious piece of hypocrisy.

Posted in General | Tagged , | Leave a comment

What Happens When You Build In Backdoors?

They end up biting you in the butt. Matt Green’s post is a nice explanation of the FREAK exploit. You can read his post for the technical details, which, really, aren’t that interesting except that they show how making it easy for governments to defeat crypto systems will inevitably end badly.

Back in the 90’s the U.S. government classified crypto systems as munitions and prohibited their export. It was entirely unworkable, of course1. Foreigners wishing to download crypto-enabled applications easily skirted the simple checks used to verify they were in the U.S. and domestic companies moved their crypto development off shore and imported the results—the government had no problem with importing crypto. Nevertheless it was illegal to export systems with an effective key length greater than 40 bits2.

That meant that browser makers had to use weak SSL encryption for exported browsers. To handle those browsers, servers could negotiate with their clients to use the weaker encryption if necessary. Eventually, even the government saw the futility of trying to control software-based encryption and relented. The weak encryption option was forgotten and everyone assumed it was just a slightly silly piece of history.

Sadly, lots of servers having the option are still around (36.7% of servers still support it according to a recent scan) and that’s what the FREAK exploit uses in its man-in-the-middle attack. It sits in the middle and negotiates the weak encryption. It’s a bit more complicated but only a bit. Again, see Green’s post for the details.

The point is that this exploit is possible only because the government insisted on a backdoor years ago. Such things always fall victim to the law of unintended consequences and that’s something we should remember when some nosy Parker comes along insisting that the government needs a window into our communications.

Footnotes:

1

Phil Zimmermann, the author of PGP, famously avoided the export restrictions by publishing the source code as a dead tree book, which enjoyed first amendment protections.

2

For browsers, this implies an RSA key of 512 bits. Numbers that size are easily factorable in a few hours and since the keys are often reused for the life of a server invocation, represent very little security.

Posted in General | Tagged , | Leave a comment

Customizing the Ace-Window Selection Face

Abo-abo has made a slight enhancement to ace-window that makes it possible to customize the face of the selection character of each window. Take a look at the example in abo-abo’s post to see what I mean. It makes the character much easier to see and looks very nice.

If you’re trying to squeeze the last drop of efficiency from your key bindings, notice how abo-abo has mapped the selection characters to be a s d f g h j k l rather than the default 1 2 3 4 5 6 7 8 9. That means the selection keys are on the home row and very easy to reach. Another micro-optimization that helps make Emacs use as frictionless as possible.

Posted in General | Tagged | 4 Comments

Reproducible Research with Docker

Karl Voit retweets this

that points to this post from Stacy Konkiel that, in turn, tells us to read this excellent post from Melissa Gymrek on using Docker to do reproducible research.

One of main problems with reproducible research is that even if all the data and computer source code is available, it can be hard to reproduce the environment used by the original researcher. You may have a different version of the operating system, a different compiler, a new version of R or similar tool. As much as we might wish it otherwise, these things can and do affect the results of complex computations.

All of that aside, if you’ve ever tried to understand someone else’s build system, you know how hard it can be to figure out which scripts produce which pieces of the finished product. Things like Org mode can help a lot with that problem but not everyone is an Emacs user and most researchers are more concerned with the actual research than with providing an easy to duplicate environment.

That’s were Docker comes in. The researcher does all his work in a Docker virtual machine, saves away the Docker image, and makes it available to other researchers. Subsequent researchers will then have the same the same build tools and data as the original researcher.

Gymrek has details on how to go about this and I recommend you read her post. There are, as she relates, even repositories analogous to GitHub where you can stash your Docker images so others can get at them. Again, see Gymrek’s post for details. Her post is one of the most useful things I’ve read on reproducible research in some time.

Posted in General | Tagged | Leave a comment

The Emacs Way

Howard Abrams over at howardism.org has a nice post on the The Tao of Emacs. His idea is to compare the Emacs workflow with that of other editors such as Vim. While Vim users have a shell-centric workflow where actions such as editing, compiling and testing are orchestrated from the shell, Emacs users prefer to stay in their editor and run the compilation and testing from there. Emacs, of course, has the tools to do this easily and “never leave Emacs” is a sacred precept for many Emacs users. Certainly almost all proficient Emacs users will perform the entire development cycle completely from with the editor.

Abrams then moves on to considering editing remote files. With Tramp, it’s easy to retrieve a file on a remote server that’s behind a firewall or even a set of firewalls. For frequently used files, this can be configured so that it happens automatically, but even a one-off edit is pretty easy because you can specify the series of hosts to go through in the file path. If you’re using ssh keys, as you should, this will be almost transparent because you won’t be prompted for passwords.

Abrams gives a nice example of something I hadn’t thought about: you can make a call to sudo the last hop in the sequence of hosts in the file path. This allows you to edit file owned by root (or others) on the remote host. See Abrams post for the details. One final thing I didn’t know is that you can bookmark a remote file and access it again very easily by simply invoking the bookmark. Again, see Abrams post for the details.

This is a nice post that makes explicit how the Emacs workflow differs from that of other editors. The bits about using Tramp may teach you things you didn’t know. It’s well worth a read.

UPDATE: Be sure to see Phil’s comment about using sudo at the end of a chain of intermediate hosts.

Posted in General | Tagged | 2 Comments

Yet Another Convert

It appears that org2blog is on track for world domination. At least the world of Emacs and WordPress.

Posted in General | Tagged , | Leave a comment

The prin* Family

This is really a note to myself but I’ll bet many of you are in the same boat. When I want to print something in Elisp, I usually use format but sometimes one of the prin* functions is really what I need. The problem is that I can never remember exactly what they do. What, for example, is the difference between princ, print, and prin1?

This post is meant to be a cheat sheet for the family. Although it’s not really part of the prin* family, I’ve included pp as well because I always forget about it.

  • prin1
    Output a printed representation of the argument with quoting. Output will be readable if possible.
  • prin1-char
    Return a string representation of the argument, which must be a character.
  • prin1-to-string
    Return a string representation of the argument with quoting. Like prin1 but returns the string rather than outputting it. Output will be readable if possible.
  • princ
    Output the printed representation of the argument without quoting.
  • princ-list
    Print all arguments with princ followed by a newline. OBSOLETE: Use mapc and princ instead.
  • print
    Output the printed representaton of the argument with newlines around it. Output will be quoted and readable if possible.
  • print-buffer
    Paginate and print buffer contents.
  • print-diary-entries
    Print a hard copy of the diary display.
  • print-help-return-message
    OBSOLETE: use help-print-return-message instead.
  • print-region
    Paginate and print the region contents.
  • pp
    Output a pretty-printed representation of the argument with quoting. Output will be readable if possible.
Posted in Programming | Tagged | Leave a comment

An Interview with Carsten Dominik

I recently came across an old but interesting interview of Carsten Dominik. The interview was by Randal Schwartz on his FLOSS Weekly Netcast back in September 2010. Despite its age, the netcast doesn’t seem dated at all.

Dominik is a very interesting and engaging guy. He makes you feel that you’d really enjoy sitting down with him and chatting over a beer. The interview is a 53 minutes long conversation (no demonstrations or code perusal) so you can almost feel as if you had that chance to chat.

Schwartz takes Dominik from the beginnings of Org Mode (a personal itch arising from some shortcomings of Outline Mode) up through the export system and finally to Babel. That’s pretty much where Org stands today so the age of the interview doesn’t matter very much.

You can really see Dominik’s enthusiasm for and love of Org Mode in his chat with Schwartz. He says he spends most of his day in it and uses it for just about everything. A few years before the interview Dominik thought that development on Org Mode was pretty much over; everything he could imagine for it was already in it. Then some new ideas came pouring in and they pretty much haven’t stopped.

If you’re not, yet, an Org Mode user, you might enjoy the video and get some idea of what it can do for you. It’s definitely worth an hour of your time.

Posted in General | Tagged , | Leave a comment