An Interview With Sacha Chua

Bastien Guerry turns the tables on Sacha and interviews her. It’s about 45 minutes so leave some time. The interview follows Sacha’s usual format of exploring how she (as the interviewee) came to Emacs and how she’s using it now for her day-to-day work.

Like me, she’s a big fan of Org mode and uses it for many of her tasks such as blogging and maintaining her todo list. If you were wondering what all the excitement concerning Org mode is about, this will help you see the point.

As always, Sacha’s energy and enthusiasm are contagious. If you enjoyed her interviews of other Emacs hackers, you’ll probably like this one too. I did.

Posted in General | Tagged | Leave a comment

You Can’t Make This Stuff Up

I guess our secrets are safe now.

Posted in General | Leave a comment

Prism: All Your Data In One Place

After the heavy breathing from yesterday’s post, here’s a lighter touch on Prism.

Posted in General | Tagged | Leave a comment

Can We Please Keep Our Eye On The Ball

Careful Irreal readers will have detected that I’m not much of a fan of the Press. Yes, yes, a free press is vital to a free and democratic society and all that. I just wish they’d do a better job.

Case in point: the continuing scandal over government snooping in Western democracies. This scandal—I consider it a scandal—is arguably the most important story in decades. The snooping raises serious questions and, according to one view, poses grave dangers for our democracies. Others say that this government intrusion is the price we pay to keep us safe. Both are honest viewpoints and deserve discussion and analysis. One would think that the story was worth a little reportorial effort and investigation.

Instead we get Edward Snowden. Is he a hero? A Traitor? Something else? Whole legions of reporters crowded into the Moscow airport trying to catch a glimpse of him and accosted hapless travelers with photos of Snowden on their iPads asking if anyone had seen him. As amusing as it was to watch Snowden leading them around in circles and getting them to board an aircraft he wasn’t on, it’s really beside the point. Even Snowden says he’s beside the point. All this Keystone Kop comedy would be okay if the press were also following the main story but they aren’t. It’s all Snowden, all day.

The mandarins at the NSA must be smiling. Instead of being hounded by the press to explain themselves and justify their actions, they can sit back and watch the press chase after a mostly irrelevant side story. It’s not like there aren’t some serious questions that need asking but the press seems content to swallow whole any claim the government makes no matter how silly. Some examples:

  • Congressman Mike Rogers, an ex-FBI agent who surely knows better, claiming that Americans needn’t worry about the wholesale vacuuming up of their phone call metadata because no names, only phone numbers, are attached to the records. Perhaps he thinks we’ve never heard of phone books.
  • General Keith Alexander, Director of the NSA, claiming, without offering any particulars, that dozens of terrorist plots were foiled through this snooping. Wouldn’t a diligent press demand examples and some details?
  • Atty Gen. Holder saying that the leaks were “extremely damaging” and put the security of the U.S. at risk. Left unexplained was how revealing the perfectly obvious and well known fact that the NSA monitors pretty much all communications damages anything other than their ability to continue extra-constitutional invasions of innocent citizens’ privacy.
  • General Raymond Odierno, Army Chief of Staff, saying that “…it puts American soldiers, sailors, airmen and Marines at risk who are overseas conducting operations.” It’s hard to see what, exactly, those risks are and the General doesn’t say.
  • And perhaps most laughable of all, the oft repeated claim that Al Qaeda has already changed their communication behavior due to Snowden’s revelations.

All of these just beg for followup and investigation—it certainly wouldn’t be difficult—but the press is off chasing Snowden and earnestly discussing whether he will end up in Cuba or Ecuador. Again, this is a serious story with serious implications for us all and an open and serious discussion about it is urgently needed. Instead the press obsesses about Edward Snowden.

Posted in General | Leave a comment

Tasker

As most of you know, I live in the Apple ecosystem so I was a bit jealous when I read this post by Ben Simon. Simon has an Android phone and therefore has access to the excellent Tasker app. One of its nice features is the ability to script tasks, something that I haven’t seen in the Apple App Store1.

Simon has a great story illustrating how useful an app like Tasker can be. Simon was out for a run when he realized that he was going to be late to meet his wife so he stopped to text her that he was running late. As he finished his run he thought that this was a task that really should be automated. He built a script that would text his wife every 5 minutes with his location (obtained from the phone’s GPS) so she would know where he was and could see on a map how long it would Take Him To Get to wherever she was. Of course, no one wants to get a text every 5 minutes so he added a couple of controls to turn it on and off. Now when he’s running late he turns it on and the application automatically keeps his wife up to date on his whereabouts.

It’s a simple, scratch-my-itch type of application and reminded me of what many of us do with Emacs: add a small bit of code to make our life a little easier. It made me wish that Tasker ran on my phone but not enough to make me give up my iPhone.

Footnotes:

1 That’s probably because of Apple’s (almost) universal prohibition of interpretive systems.

Posted in General | Tagged , | 4 Comments

An Elisp Mystery

Over at the Emacs Reddit, wadcann posts a nice idea. The problem is to have abbreviations that touch their surrounding text. The canonical example is punctuation like the em-dash:

Many national security professionals—those in the CIA, NSA, and similar...

You can’t (conveniently) use the normal abbreviation expansion mechanisms here because they expect the symbol to be delimited from the rest of the text by white space.

Wadcann solves that problem with a bit of Elisp. His post is short so you should take a look before continuing. I liked his idea but thought that the Elisp could be cleaned up a bit. Suppose, as Wadcann does, that you use /--- as the abbreviation for the em-dash. The idea is to search backwards to the slash, mark it as the beginning of the abbreviation, return to the original position to mark the end of the abbreviation, and call expand-abbrev to expand it.

That seemed simple enough. Here’s my first attempt:

(global-set-key (kbd "M-\"")
                (lambda ()
                  (interactive)
                  (let ((pt (point)))
                    (when (search-backward "/" nil t)
                      (abbrev-prefix-mark t)
                      (goto-char pt)
                      (expand-abbrev)))))

It didn’t work. After adding some debugging statements, I discovered that the (goto pt) placed the point at one character short of where it should. When I fixed that up, everything worked just fine:

(global-set-key (kbd "M-\"")
                (lambda ()
                  (interactive)
                  (let ((pt (1+ (point))))
                    (when (search-backward "/" nil t)
                      (abbrev-prefix-mark t)
                      (goto-char pt)
                      (expand-abbrev)))))

The problem was I couldn’t figure out why the first solution wasn’t correct. Even though the second solution worked it was really just treating the symptoms, not the problem. So I rewrote it using markers instead.

(global-set-key (kbd "M-\"")
                (lambda ()
                  (interactive)
                  (let ((pt (point-marker)))
                    (when (search-backward "/" nil t)
                      (abbrev-prefix-mark t)
                      (goto-char pt)
                      (expand-abbrev))
                    (set-marker pt nil))))

I don’t like this solution as much because you have to deactivate the marker at the end. Still, at least this solution made sense. I checked the appropriate Emacs code and as far as I can see, the first solution does pretty much what the third one does.

Does anyone understand what’s happening here? I have two working solutions so now it’s just a matter of an annoying anomaly that I don’t understand. If you’ve got a clue, please leave a comment.

Posted in Programming | Tagged , | 2 Comments

Keeping Your Data Safe From the NSA

After another week of seemingly never ending revelations about government snooping into our phone calls and Web activities—you guys in Europe can stop snickering; you aren’t immune either—many of us are wondering how we can regain a modicum of privacy. Realistically, if the NSA, GCHQ, or your particular country’s alphabet agency decide you are of interest for some reason there is probably little you can do. But if you’re an “ordinary” citizen, there may be some hope.

Why care? After all, “you have nothing to hide.” Of course, Irreal readers surely know better than that. In the U.S., particularly, everyone is a criminal with something to hide as Alex Tabarrok explains. Again, those of you in Europe have reason for concern too as Corrie Doctorow demonstrates in his recent Guardian article. On the downside, taking steps to protect yourself might make you pop up on some spook’s radar. On the other hand, if large numbers of us start encrypting everything maybe we can overload their systems. It will certainly be more effective than 【Meta+xspook.

So what can you do? MSN Money has a helpful article on how to secure your communications. The article covers your phone, credit cards, Dropbox, social network, and Web browsing. You probably shouldn’t consider it the last word on these matters but it does serve as a good starting point with suggestions for apps to help you claw back some privacy.

Posted in General | Tagged | 1 Comment

Speculative Problems

Jean-Philippe Paradis tweeted the perfect answer to those who complain about “problems” with Lisp syntax. The tweet was apparently provoked by this post from John Cook that, while discussing symbols in programming languages, remarked that “Lisp’s typographical monotony makes it hard to skim for landmarks.” Paradis’ tweet makes the point that supposed problems with s-expressions are speculative in that they tend to disappear once one becomes familiar with the syntax.

I’m with Paradis on this. Certainly Lisp has fewer symbols than APL and arguably fewer than Perl but I don’t find it anymore typographically monotonous than, say, C, C++, Python or most of the other mainstream languages. I certainly don’t have any more problem scanning it than I do the others. I think Paradis is exactly right: once you use it for a little while, the syntax or lack of it just disappears into the background.

What do the rest of you find? Do you think Lisp is typographically monotonous? If so, does that make it hard to scan for you? I don’t think so but Cook, who is not a stranger to Lisp, seems to believe it is. Share your experience in the comments.

Posted in General | Tagged , | 7 Comments

Lisp Hackers

For some time Vsevolod Dyomkin has been running interviews with Lisp hackers on his blog, Lisp, The Universe and Everything. Irreal has featured many of these in the past. Now Dyomkin has gathered those interviews and assembled them into a book.

The book is available for free from Leanpub. If you enjoyed the interviews or if you missed some of them, you will want to get a copy. As usual, Leanpub makes the book available as PDF, EPUB, and MOBI. You can also read it on-line if you’d rather. As I said, the book is free so there’s no reason not to get a copy if you have any interest at all. We all owe Dyomkin a word of thanks for his efforts and his generosity in making it available for free.

Posted in Programming | Tagged , | Leave a comment

My Solution to the Last Elisp Challenge

The challenge was to convert the output from dstat so that all the bytes values (some of which are given as kilobytes or megabytes) to just bytes. Thus, 2k would become 2048 and 3M would become 3145728. Similarly, dstat outputs bytes with a B suffix so 123B would become 123.

Here’s my code:

(defun to-bytes ()
  (interactive)
  (while (search-forward-regexp "\\([0-9]+\\)\\(B\\|k\\|M\\)")
    (let ((val   (string-to-number (match-string 1)))
          (units (match-string 2)))
      (cond
       ((string= units "B") (replace-match "\\1"))
       ((string= units "k") (replace-match (format "%d" (* 1024 val))))
       ((string= units "M") (replace-match (format "%d" (* 1048576 val))))))))

It makes only one pass through the data so it’s reasonably efficient. Nothing earth shattering but it gives us a chance to keep our Elisp skills sharp.

Posted in Programming | Tagged , | Leave a comment