Golden Keys and the Four Horsemen of the Infocalypse

Recently, The Washington Post published an editorial suggesting that Apple, Google, and other smart phone manufacturers provide a golden key to allow law enforcement access to locked phones. “Golden Key,” of course, is just a euphemism for a backdoor. It’s unlikely that any Irreal reader will fail to understand the implications of that but here’s some ammunition for talking to Aunt Millie.

Chris Coyne has an excellent post that details the problem with this proposal. As he says, increasingly our phones store our digital lives and in the near future will be a transcript of our lives, even our non-digital lives. Coyne’s major point is that once there’s a backdoor, others will find and use it. That could be foreign powers, rogue government agents, or criminals.

Corey Doctorow makes the same point in The Guardian and says that we can be sure that corrupt public officials will sell us out just as they have before:

“The same forces that led to bent cops selling out the public’s personal information to Glen Mulcaire and the tabloid press will cause those cops’ successors to sell out access to the world’s computer systems, too, only the numbers of people who are interested in these keys to the (United) Kingdom will be much larger, and they’ll have more money, and they’ll be able to do more damage.”

This is the same point I made in a recent post: law enforcement will always abuse any surveillance power they’re given. The only way to protect ourselves is to not give them those powers.

Law enforcement, of course, claims that if they can’t break into our phones they will no longer be able to investigate pedophiles, kidnappers, terrorists, and drug dealers. Bruce Schneier puts the lie to that nonsense. He recounts several instances where law enforcement has made these claims and were later found to be lying and notes that of the 3,576 warrants issued for communication intercepts in 2013, exactly one involved kidnapping. He also notes that far from “going dark,” this is the golden age of surveillance for law enforcement. Schneier’s post has lots of links to more background material and you should definitely read it.

Posted in General | Tagged | Leave a comment

Burritos and Monads

Ahh, now I get it

Posted in Programming | Tagged | Leave a comment

Almost There

The release candidate for Emacs 24.4 will appear on Friday. If all goes well, the official release will be on the subsequent Monday.

Posted in General | Tagged | Leave a comment

The End of Emacs 24

Bozhidar Batsov reports that after the release of Emacs 24.4, we will move to Emacs 25.

Actually, in the future the point releases will be reserved for bug fixes and all major releases will get a major version bump.

Posted in General | Tagged | 2 Comments

The Greatest Keyboard Ever Made

The Verge has a splendid article on the King of click: the story of the greatest keyboard ever made. That, of course, is the IBM Model M. I’ve written before about how much I love this keyboard. Even Xah Lee, who won’t use any keyboard that’s not ergonomic, has nice things to say about it. His article on the Model M has an animated gif that shows the buckling spring mechanism in action.

I used to have an actual Model M but foolishly left it at a previous employer when I left. That doesn’t matter too much because Unicomp acquired the rights to the Model M and is still selling them.

It turns out that there is still a vigorous market for the original Model M. Brandon Ermita rescues old Model Ms, restores them and resells them at ClickyKeyboards so if you have a hankering for one, it’s still possible. As one gamer said,

Those bastards are the ORIGINAL gaming keyboards. No matter how much you abuse it, you’ll die before it does

The Verge article has a nice history of the Model M and the keyboards that came before and after it. If you’re looking for a keyboard, I can’t recommend the Model M enough. Why not get the best? Unicomp has them for $79.

Posted in General | Tagged | Leave a comment

Context

Jessica Kerr makes a good point.

If you have a heavily customized Emacs configuration, using someone else’s Emacs could feel like using a completely different editor.

Posted in General | Tagged | Leave a comment

Debugging Emacs Lisp

Nic Ferrier has posted a nice video tutorial on debugging Elisp. Ferrier covers the basics of instrumenting your code, stepping through it, setting breakpoints, and other edebug functions.

He also demonstrates macrostep, a package that allows you to expand and step through your macros as well. The whole video is just under 11 minutes so it’s easy to find time for it. If you write Elisp and aren’t familiar with edebug, you should definitely watch this video.

Posted in Programming | Tagged , | Leave a comment

Emacs Screen Shots

I really enjoy looking at Emacs screen shots (I know, I know. I’m seeking help) so I was happy to see this from the estimable Bastien Guerry.

Posted in General | Tagged | Leave a comment

Atabey Kaygun on Common Lisp Memoization

Atabey Kaygun is a mathematician who likes to experiment with various (mostly mathematical) algorithms using Common Lisp. Many times, a function is most naturally implemented via recursion but this can lead to disastrously inefficient implementations. The canonical example is the Fibonacci sequence. Its definition is \[\begin{equation*} fib(n) = \begin{cases} 0 & x = 0\\ 1 & x = 1\\ fib(n-1) + fib(n-2) & x > 1\\ \end{cases} \end{equation*}\] so a natural implementation is

(defun fib (n)
  (cond
    ((zerop n) 0)
    ((= n 1) 1)
    (t (+ (fib (1- n)) (fib (- n 2))))))

But when we run

(time (fib 45))

we get

: 1134903170

Evaluation took:
  60.287 seconds of real time
  60.217115 seconds of total run time (60.163250 user, 0.053865 system)
  99.88% CPU
  132,297,562,672 processor cycles
  0 bytes consed

What’s going on here is that the same values are computed over and over. I wrote about this and various other, more efficient implementations here and gave some timings (although for Scheme not Common Lisp) here. The times for the other implementations are too small to measure with a 100 Hz clock. As explained in the first post, calculating \(fib(45)\) recursively makes 3,672,623,805 calls to \(fib\).

For this reason, the recursive implementation is never used and serves mostly as a warning to n00bs about the dangers of blindly using recursion. Still, the recursive implementation is natural and in many other situations the only reasonable solution. That’s where Atabey comes to our aid. He provides a Common Lisp macro, mem-defun, that implements memoization, a technique where previously calculated function values are cached so that subsequent calls to the function for the same argument are retrieved from the cache rather than being recalculated.

The mem-defun macro is a drop-in replacement for defun. Head over to his post for the definition. When we use his macro

(mem-defun fib (n)
  (cond
    ((zerop n) 0)
    ((= n 1) 1)
    (t (+ (fib (1- n)) (fib (- n 2))))))

and rerun the test

(time(fib 45))

we get

: 1134903170

Evaluation took:
  0.000 seconds of real time
  0.000018 seconds of total run time (0.000018 user, 0.000000 system)
  100.00% CPU
  37,477 processor cycles
  0 bytes consed

a clear win. It’s probably not as fast as one of the alternative implementations but when you need to use recursion, it can be a lifesaver.

Posted in Programming | Tagged , | 1 Comment

Emacs for (Non-Programming) Text Processing

Om Prakash Singh is fairly new to Emacs and wanted to increase his skills and knowledge so he accepted the Emacs 30-day challenge. I found Day 7, Commands for Human Languages, particularly interesting. I use Emacs for a lot of writing as well as programming, so I’m always interested in picking up new tips. I don’t use any “word processing” programs so everything I write I write in Emacs1.

Singh’s post is really a recapitulation of the commands and modes that are useful for writing text. But even if you’re experienced, you may find some useful commands. I learned a couple of things about fill prefixes that could come in handy. The post is well worth taking a look at. If you’re a n00b, you definitely should take a look.

Footnotes:

1

I mean that more literally than you might think. For several years I have avoided pen and paper and tried to capture everything digitally.

Posted in General | Tagged | 2 Comments