Two Stories on the NSA

This week there were two stories that can’t make the NSA happy. In the first, Rick Falkvinge reports that Brazil, upset over NSA spying, ditched their plans to buy Boeing jets and went with Gripen instead. This despite the fact that the JAS 39 Gripen-NG jet is still a prototype and not yet in production. Gripen is a division of the Swedish company SAAB. The loss of the Brazilian contract will cost Boeing and America 4 billion dollars.

The second story concerns the meeting between President Obama and several tech leaders. Although the official purpose of the meeting was to discuss ways to improve healthcare.gov, the tech executives viewed it as an opportunity to express their dismay about NSA spying and the blowback that American tech companies are experiencing as a result. During the meeting, one of those executives, Zynga founder Mark Pincus, pressed Obama to grant Edward Snowden a pardon. The NSA, of course, considers Snowden the ultimate traitor deserving of the harshest of penalties.

Obama would not, of course, commit to a pardon but it is clear that more and more Americans—and not just us nerds—are coming to see Snowden as a hero deserving of a pardon and more. That’s a fact that’s got to give the NSA heartburn.

Posted in General | Tagged | Leave a comment

The Five Word Tech Horrors Meme

Via Jean-Philippe Paradis, I was led to the Twitter meme/thread/hashtag #FiveWordTechHorrors. The idea is identify an especially egregious tech issue in five words. Some of my favorites:

  • It’s a standard, like Windows
  • We emailed you your password
  • Congress is drafting Internet legislation
  • I just fixed Lisp’s problem!
  • I made an infix reader-macro

Those are some that Paradis has retweeted but there’s a bunch more so be sure to follow the link. If you’re on Twitter, you may want to contribute. Fun for all.

Posted in General | Tagged | Leave a comment

The Real Edward Snowden

When speaking of Edward Snowden, the government can’t seem to make up its mind. Sometimes he’s a high school dropout and misfit who couldn’t pass elementary computer classes and cheated on his NSA entrance exam. Other times he’s an evil genius who used extraordinary hacking skills to defeat the super-secure protections that prevented unauthorized access to NSA secrets. The characterization changes to fit the narrative of whatever story the government is trying to float at the time.

Now, Forbes has an article that tells us what one of Snowden’s colleagues at the NSA has to say about him. This colleague paints Snowden as very smart and talented, a “genius among geniuses.” One indication of that is that Snowden was offered, but turned down, a position in the elite Tailored Access Operations that develops exploits to access computers surreptitiously.

As to how Snowden was able to access all that data, the answer is simple: he was given access because he was so valuable and could do things others could not. His colleague explains that he was given virtually unlimited access to all of NSA’s data. He had no need to forge credentials, as the NSA has sometimes claimed, because he already had access. Of course, that fact doesn’t fit any narrative that the NSA would care to make public so this is the first we’re hearing of it.

Meanwhile, John Gruber of Daring Fireball also has something to say about Snowden: that it’s getting harder and harder to see Snowden as anything but a hero. That’s something that many of us have believed all along.

Posted in General | Leave a comment

NSA Phone Metadata Collection Ruled Illegal

In a bit of good news a federal judge has ruled that the NSA’s collection of phonecall metadata violates the fourth amendent. This is by no means the end of the story. The ruling is at the District Court level and is sure to be appealed. Even the ruling was less than definitive. The judge wrote that the collection “quite likely violates the fourth amendment.”

Still, the judge found little evidence that the program was effective and completely dismissed the government’s contention that those filing had no standing. The standing issue is important because previous challenges to the program have been dismissed on the grounds that the complainants couldn’t prove they were being harmed. As a result of the Snowden revelations, it’s now clear that every American with a phone has standing so the issue will be heard on its merits rather than a hyperlegal technical argument.

It’s not as good as the Supreme Court dropping the hammer on this nonsense but it’s a start. The ruling addresses the weak points of the program: constitutionality, standing, and effectiveness. This can’t be letting the NSA mandarins sleep well.

Posted in General | Tagged | Leave a comment

A Problem with Magit

Two or three weeks ago I noticed a problem with Magit. When I executed magit-status, I no longer got a list of the untracked files. That meant that I couldn’t add new files to a repository with Magit. The thing was if I switched to Eshell and called git directly, everything worked correctly. “Well, no problem,” I thought, “the latest commit must have broken something. They’ll get it fixed soon.” In the mean time, I just added the new files by calling git directly. But despite almost daily updates to Magit, the problem didn’t go away, so I asked DuckDuckGo what it knew about the problem. Answer: nothing. Nobody else was having the problem so it must be something local. I hadn’t changed anything in my init.el or messed with the Emacs or git configurations in any way so I decided to jump into the code to figure out where I was failing.

Initially I thought I would run the debugger but it was pretty clear from the code that the problem had to be in magit-insert-untracked-files, which in turn meant that magit-git-lines was failing. The magit-git-lines function just calls git with the specified parameters (via process-file) so it looked like git was failing but it worked fine when I called it with the same parameters that magit-insert-untracked-files was using.

There are two points to this post. Here’s the first: Because Emacs is a Lisp machine-like environment, I could make the same call to process-file that magit-git-lines was making by typing 【Meta+:】 and entering the call in the minibuffer. That call failed as expected but I was able to play with the parameters to git to see where the problem lay. The actual call that was failing was

git --no-pager status --porcelain -u

and by eliminating the parameters one by one I discovered that it was the --porcelain parameter that was causing the problem. That parameter asks git to output the results in a machine-parsable format that is guaranteed to be backward compatible. Just what you need for an application like Magit.

It became pretty clear what the problem was. There must be an old version of git that didn’t implement the --porcelain option on my machine. I checked that by changing the parameter to the git call to --version and discovered it was calling version 1.6.5.7. When I called

git --version

from Eshell, I got 1.8.3.4.

So here’s what happened. These days git is either included in the OS or gets loaded with Xcode but that didn’t use to happen so I built my own version and installed it in ~/bin, a directory where I keep my executables. Because I add ~/bin to (the head of) exec-path, Emacs was finding the old version. Eshell doesn’t use exec-path so it was finding the newer version. That brings me to the second point: I’m telling you all this in case you experience the same problem. Just get rid of the old git executables and you’ll be fine.

It’s worth reiterating the first point. The wonderful Emacs Lisp environment makes it easy to debug problems like this. You can just try executing code until you find where it’s failing. No recompiling, no reloading, just try it and see what happens. Think what it would be like solving this problem if it were a C program.

Posted in General | Tagged | 5 Comments

Obama and the NSA

Over at The New Yorker, Ryan Lizza has a fascinating article on the history of the NSA’s latest extra-legal surveillance on Americans. These programs all started under the Bush administration as a reaction to 9-11 and, significantly, over the strenuous objections of senators Barack Obama and Joe Biden. Since assuming the presidency, Obama has been steadfast in his support of the NSA and its spying on Americans.

The article is lengthy but well worth your time. You’ll learn, among other things, how the FISA court nearly shut down some of the programs because of the NSA’s violation of the court’s restrictions and their deceptions to the court. The hero in this story is Senator Ron Wyden of Oregon who has fought this nonsense for years despite being legally forbidden to discuss the reasons for his concern.

Wyden is currently battling with his friend and fellow senator, Dianne Feinstein over how (or, indeed, whether) to rein in the NSA. Both have offered bills to “fix the problem” but Feinstein’s bill is generally considered ineffective and lets the NSA continue their spying. At this point, neither bill has the requisite 60 supporters to force a vote. In the meantime, Americans and non-Americans will have to get used to life under the microscope. The NSA has been clear in its desire to expand their programs.

Posted in General | Tagged | Leave a comment

Uncommon Lisp Functions

Over at WordPress on cneufeld.ca, Christopher Neufeld is writing a nice series on the less familiar Common Lisp functions. The idea is to give Lisp beginners an idea of how to leverage the power of some of the less commonly used functions. It’s meant particularly for those with a C++ background. All the posts so far are here.

As I write this, he has posts on

  • acons
  • add-method
  • adjoin
  • adjust-array
  • allocate-instance, and
  • block

These are interesting posts and unless you’re an expert Lisper you’re sure to learn some things you didn’t know.

While you’re there, you might want to check out his other posts on Lisp.

Posted in Programming | Tagged , | Leave a comment

Your Government at Work

Here in the U.S. we have something called the Federal Register. It’s the official journal of the U.S. Government in which are published public notices and other routine publications of the various government agencies. It’s published daily except for holidays and is also available on-line.

None of that would be of much interest to Irreal except for this fact: The agencies that publish in the Federal Register submit their material on floppy disks. It wouldn’t surprise me if some Irreal readers have never used a floppy disk. Certainly, I haven’t seen a new computer with a floppy drive in years.

It gets worse. The agencies must submit the material on paper with original signatures. They can also submit it on floppies and CDs that are delivered each day by courier to the Register’s Office. It’s bad enough that the government is using sneaker net to get information from the agencies to the Federal Register but they can’t even use flash drives or SD cards—it’s not permitted.

The final chapter of this unhappy story is that the agencies can use secure email but many do not because, they say, Public Key Infrastructure software is expensive and they have not yet upgraded to it. I’m pretty sure that every Irreal reader could implement such a system for a dollar ninety five or less. This whole thing with healthcare.gov is beginning to make sense.

Posted in General | Leave a comment

A Simple EmacsGolf Challenge

We haven’t had an EmacsGolf challenge for a while so here’s something simple that was suggested by Xah Lee based on a Stack Overflow question. The Stack Overflow questioner wanted a solution in Vim so the whole thing fits right in with our never ending quest to solve problems more efficiently in Emacs. The best answer at Stack Overflow using Vim was 53 keystrokes. Let’s see if we can beat that.

The starting buffer is 10 lines each beginning with a time in minutes:seconds as shown.

05:16 more line 1 text
06:32 more line 2 text
13:50 more line 3 text
27:36 more line 4 text
33:07 more line 5 text
33:12 more line 6 text
41:03 more line 7 text
48:22 more line 8 text
51:05 more line 9 text
57:58 more line 10 text

We want to change the time into seconds

316 more line 1 text
392 more line 2 text
830 more line 3 text
1656 more line 4 text
1987 more line 5 text
1992 more line 6 text
2463 more line 7 text
2902 more line 8 text
3065 more line 9 text
3478 more line 10 text

There are a couple of ways of doing this. One uses query-replace-regexp and works with stock Emacs. The other uses Magnar Sveen’s terrific multiple cursors in a way similar to his last example in the multiple cursors video. Using multiple cursors takes me 22 keystrokes. Can you do better?

Posted in General | Tagged , | 6 Comments

Mickey on Magit

As many of you know, I’m a long time user of Magit and really like it. I’m not, however, a power user and haven’t bothered to learn all the details. It’s hard to find documentation that describes how you go about actually using it in your day-to-day work.

Mickey to the rescue. Mickey always does a good job, of course, but Part 1 of his Magit tutorial is especially good. He approaches the topic from the point of view of integrating it into your work flow. That’s just what was missing from the current documentation.

In Part 1 he covers the basics: the status window, staging/unstaging files, committing, and history. If you’ve been thinking of trying out Magit but were put off by the difficulty of learning to use it, you will want to rush over to Mastering Emacs and read this excellent post. While you’re there, take a moment to look around the site. Mickey has lots of really good articles on using Emacs. I’ve learned a lot from his articles and I’m sure you will too.

Posted in General | Tagged , | 2 Comments