A Third NSA Leaker?

According to Betteridge’s law the answer should be no but Bruce Schneier isn’t so sure. We’ve heard the speculation about a second leaker responsible for revealing the details of the TAO catalog, X-KEYSTORE rules, and the tapping of Angela Merkel’s cell phone but the latest revelations do not appear to come from either Snowden or the second leaker.

Schneier believes that these latest disclosures represent a separate, third stream of information. If so, perhaps it’s an indication that other insiders are disturbed by what the NSA is doing and taking what steps they can to end it as suggested by Charlie Stross. One can only hope.

Posted in General | Tagged | Leave a comment

Report from the Copyright Front

Rick Falkvinge has another excellent diatribe in his series on copyright and its abuses. This time he examines the common notion that without copyright, artists wouldn’t get paid and would therefore stop producing their art. That’s a powerful argument and one that, unexamined, is very easy to accept. Falkvinge has the figures on how much artists actually get from copyright and who the system is really serving. Definitely worth a read.

There are two other interesting things happening on the front. First, at long last, someone is calling Warner/Chappell’s bluff on their claimed ownership of a copyright on Happy Birthday and is suing them asking the court to return the hundreds of millions of dollars they collected in licensing fees. Almost every expert agrees that Happy Birthday has been out of copyright since the 1920s and, in view of its provenance, was probably never eligible for copyright in the first place. Warner, of course, charges a license fee that is less than the cost of a lawsuit and has been able to persuade users to pay it rather than seek relief in the courts. Those days could be coming to an end and Warner may have to return those fees. Whatever your thoughts about copyright, you’ll have to agree that this is long overdue.

The second piece of good news concerns Sherlock Holmes. All but 10 of the Sherlock Holmes stories have gone out of copyright but Doyle’s estate has claimed that Holmes was a complex character that couldn’t be dismantled into in-copyright/out-of-copyright parts. Author Leslie Klinger sued arguing that the Holmes character was no longer in copyright.

Last June, Judge Richard Posner of the 7th circuit ruled against the estate. This month, Posner ordered the estate to pay Klinger $30,000 in legal fees and described the estate’s actions as a form of extortion. Another excellent result. As I said, whatever your feelings about copyright, there’s no reason to support its abuse.

Posted in General | Tagged | 3 Comments

Gnus Guide

For a long time, I’ve had the urge to move my email processing to Emacs. That would make Email one more function that I wouldn’t have to leave Emacs to handle. I have found three candidate packages for this: mew, mu4e, and gnus.

Most everyone agrees that gnus is the 800 pound gorilla but that it is difficult to learn. Now Chen Bin has published an interesting post entitled Practical guide to use Gnus with Gmail. Even if you’re not using Gmail, the guide is still useful. The main differences are in configuration.

I like that he takes the tack of “here is the 5% of gnus that you need to get started and manage your day-to-day email chores.” That’s especially nice because gnus is built-in and all you need do is configure it to try it out. Of course, that configuration is far from trivial but Bin shows what you need to do to get going with Gmail. If you’re using another service, the EmacsWiki shows you how to configure POP or IMAP.

After covering configuration, Bin demonstrates how to read, send, reply to, and search your emails. If you’ve been thinking about trying out gnus or, like me, looking for a way to handle email from within Emacs, you should take a look at Bin’s post, especially if you’re using Gmail.

Posted in General | Tagged | 3 Comments

Org Mode Links to Git Commits

One of the nice things about writing with the Org-mode mark-up language is the ability to easily add links to external sources such as HTTP links or mail messages. But what about linking to a Git commit? Happily, there’s a Worg article that describes org-git-link.el, a contributed package shipped with Org-mode, that allows you to do just that.

A reasonable question is why anyone would want to do that. The article has an interesting use case. Suppose you are using Org to implement a laboratory notebook and that you have a link to an externally generated graph of some data. You add some notes about some aspect or another of the graph but later update the graph with new data. Now the link points to the new graph and the explanatory note is out of date. To prevent that, you commit the first graph and then link to the commit. Now if the graph is updated, the link still points to the original graph and the notes are still accurate.

The article covers how to form the links and the various formats they can take. It’s easy to imagine additional use cases for this facility so it’s well worth being familiar with it.

Posted in General | Tagged , | Leave a comment

Generating Graphs with Org and Dot

When I want to draw graph-like pictures I almost always use dot from the graphviz suite. The language is simple and it’s easy to generate it programmatically. Still, I don’t do it every day and so I always have to do a quick review of the language to draw my picture.

The other day, while I was looking for something completely different, I came across this wonderful tutorial by Karl Voit on Org’s Worg site. In it he shows how to leverage a bit of Elisp code from Rick Frankel to produce dot diagrams from a couple of tables. The idea is that you list the nodes of the graph in one table and the edges in the other and the code runs dot for you to produce the PNG file.

The examples that Voit uses doesn’t do his tutorial justice because they involve producing flow charts and who wants to do that? Not me, at least. I almost always either want a tree of some sort or perhaps a state diagram. So here are a couple of examples that show how easy it is to use the code and techniques he describes to draw those objects. Be sure to read the tutorial so you can follow along with the examples.

 1: (org-babel-execute:dot
 2:  (concat
 3:   "digraph {\n"
 4:   (when horiz "rankdir=LR;\n")       ;up-down or left-right
 5:   (mapconcat
 6:    (lambda (x)
 7:      (format "%s [label=\"%s\" shape=%s style=\"filled\" fillcolor=\"%s\"]"
 8:              (car x)
 9:              (nth 1 x)
10:              (if (string= "" (nth 2 x)) "box" (nth 2 x))
11:              (if (string= "" (nth 3 x)) "none" (nth 3 x))
12:              )) nodes "\n")
13:   "\n"
14:   (mapconcat
15:    (lambda (x)
16:      (format "%s -> %s [taillabel=\"%s\"]"
17:              (car x) (nth 1 x) (nth 2 x))) graph "\n")
18:   "}\n") params)

I’ve reproduced the code here because I made a small tweak in line 4 so that I can produce both horizontal and vertical layouts with the same code block. With the code in the tutorial you have to uncomment code to get the horizontal layout. To use my code you should change the HEADER line to

#+HEADER: :var nodes=simple-tree-nodes graph=simple-tree-graph horiz='nil

for vertical layout or

#+HEADER: :var nodes=simple-tree-nodes graph=simple-tree-graph horiz='t

for horizontal layout. The horiz variable can be changed in #+CALL statements so that you can have both modes in the same file.

Here’s a simple tree with a blue root, white internal nodes, and yellow leaves.

Table 1: simple-tree-nodes
node label shape fillcolor
a A ellipse blue
b B ellipse none
c C ellipse none
d D ellipse yellow
e E ellipse yellow
f F ellipse yellow
g G ellipse yellow

Table 2: simple-tree-graph
from to label
a b  
a c  
b d  
b e  
c f  
c g  

simple-graph.png

As a second example, here’s the transition diagram for a simple state machine that recognizes C-style comments. It uses the #+CALL statement

#+CALL: graph-from-tables[:file ~/org/blog/state-machine.png](nodes=state-nodes[2:-1],graph=state-edges[2:-1],horiz='t) :results file

Table 3: state-nodes
node label shape fillcolor
start START ellipse green
b1 BEGIN-1 ellipse none
c IN-COMMENT ellipse none
e1 END-1 ellipse none
d DONE ellipse red

Table 4: state-edges
from to label
start start ANY
start b1 /
b1 start ANY
b1 c *
c c ANY
c e1 *
e1 c ANY
e1 d /

state-machine.png

I love how simple all this is. Just include the code (non-exported, of course) into your buffer and write the two tables and you’ve got yourself a nice diagram without having to fuss with the dot language.

Posted in General | Tagged , | 3 Comments

The Emacs *‍Scratch*‍ Buffer

Many people consider the Emacs *‍scratch*‍ buffer mysterious. This is true even though, by default, it includes a message telling you what to use it for. I like it and use it often. Others, not so much.

Despite that default message, I never use the *‍scratch*‍ buffer for notes (I use Org capture for that sort of thing) but I use it all the time for trying out a bit of Elisp or writing a function for my init.el file. It is true, though, that the majority of Emacs users don’t write in Emacs Lisp and really have no use for the *‍scratch*‍ buffer.

Most of us know that you can eliminate or change the message in the *‍scratch*‍ buffer but that doesn’t address any real problems. It is Emacs, though, so of course you can configure more than just the message. Bozhidar Batsov over at Emacs Redux has a nice post that shows you how to configure the default mode of the *‍scratch*‍ buffer. Thus, to use Batsov’s example, if you’re a Ruby programmer you can configure the *‍scratch*‍ buffer to use ruby-mode as it’s default mode.

I’m happy with having the *‍scratch*‍ buffer come up in Emacs Lisp mode but Batsov’s post may help make it more useful to others who aren’t Elisp programmers.

Posted in General | Tagged | 1 Comment

Speaking of Logical Conclusions

Yesterday, I wrote about the logical conclusion of government surveillance in democracies. If you’re wondering what the end result looks like in the large, here’s the answer.

The most horrifying part of the linked story is:

  1. Singapore’s program is modeled on a proposed U.S. program (Total Information Awareness) that was too extreme even for congress. It was aborted in the U.S., although parts were secretly resurrected as other separate programs.
  2. Western security services have traveled to Singapore to study the system and, presumably, mine it for ideas.
Posted in General | Tagged | Leave a comment

Emacs in a Year

Chen Bin, who you may recognize from the Emacs and ErgoEmacs Google+ communities or from his blog, has an interesting essay on GitHub about how to master Emacs in a year. The essay is really the steps that Bin followed when he was learning Emacs. He has a lot of good advice and it’s well worth giving it a read, especially if you’re an Emacs n00b.

Old hands may or may not agree with everything he says but it’s all reasonable advice. He lists some good resources to help the beginner get up to speed. I’m always happy to see articles like this. They spread the word and help beginners learn about the glories of Emacs.

Posted in General | Tagged | Leave a comment

The Logical Conclusion

I’ve been writing, recently, about surveillance abuses in the United States. Just in case my European pals are imagining that this is an NSA problem that mainly concerns America with a few residual casualties in Europe, consider this logical conclusion of an out-of-control surveillance establishment.

The UK House of Lords has issued a report recommending that steps be taken to end on-line anonymity. Forget for a moment how unenforceable and silly this idea is. It represents an end goal—a logical conclusion—for those who believe they have the right to monitor everything everyone does. Just think how much easier it would be if only we could identify any actor on the Internet and monitor what they’re doing. It’s almost as if they hadn’t read the quintessential British warning about such things.

Posted in General | Tagged | Leave a comment

A Medal for Edward Snowden

Jon Evans over at TechCrunch makes the case that America should give Edward Snowden a medal. To many, of course, that’s a non-starter; Snowden is the ultimate traitor doing his best to harm his country. Cooler heads, including Evans, are asking which enemy, exactly, did he aid if he is to deserve the traitor epithet.

How long, Evans wonders, should American authoritarians have carte blanche to do whatever they want in the sacred name of national security? He’s got a point. After a while, all that protecting does more to harm the nation than the enemies we are worried about. Those of a certain age will remember the Vietnam quote attributed to an American officer that they must destroy the village to save it.

In Evans estimation, Snowden’s revelations—even if we stipulate for the sake of argument that we was aiding some enemy—has done far more good than harm. He believes Snowden helped rescue our democracy before the government could destroy it in order to save it. As yesterday’s post makes clear, we have already traveled a good distance down the road of destruction. Our security apparatus apparently feels—in the name of national security, of course—that it is appropriate to spy on the Senate, who are, after all, our elected representatives.

We wouldn’t know any of this if it weren’t for Edward Snowden. I agree with Evans: he deserves a medal.

Posted in General | Tagged | Leave a comment