Remote Code Blocks

As Irreal readers know, John Kitchin, a Chemical Engineering Professor at Carnegie Mellon, produces virtually all of his group’s journal articles in Org mode. Those articles typically contain a lot of figures and graphs. In his latest post, Kitchin shows us how to put the calculations for those graphs and figures into code blocks that reside in other files. That makes it easy to reuse those code blocks in other papers or situations and to organize the article source and supplemental information in an orderly way.

The remote code blocks turn out to be really easy to do. Basically you just use a #+call: statement in your main org file that points to the remote code block by name and file. See Kitchin’s post for the details and an example. In the example, the calculations and graphing are performed by a Python program of about 40 lines. Everything is contained in a code block that resides with the supplemental information for the paper.

It’s an impressive technique that makes reproducible research easier and more natural.

Posted in General | Tagged , | Leave a comment

Looking for Emacs?

Here you go:

Posted in General | Tagged | Leave a comment

Query

Is anyone else having problems loading twitter.com and pages linked with its url shortener t.co? (This is with a browser, not a twitter app.) What I’m seeing is that sometimes the load will hang. If I retry it a few times or wait for a couple of minutes it works again. Sometimes I get a message like

Safari can’t open the page “https://t.co/RXqLfv94n2” because the server where this page is located isn’t responding.

after which I can load the page. Other times it just starts working.

Looking at it with a line monitor, it appears to hang during the TLS negotiation. It’s acting like the server is hanging and then restarting or maybe recovering from a resource exhaustion.

This is with a Mac running the latest OS X with a standard install. Google finds a few similar complaints but I can’t tell if the problem they’re reporting is the same one I’m experiencing. If you’ve seen this problem, could you leave a comment so I don’t spend time trying to solve a problem that’s not under my control?

Thanks.

Posted in General | Tagged | 2 Comments

Bad Idea of the Year

We’re always seeing a lot of—sorry I can’t think of a more apropos term—stupid ideas for Emacs: let’s get rid of Elisp and make Javascript the extension language; let’s make it more like Notepad+; and so on. Here’s my nomination for the worst idea of the year: let’s make it run on the JVM.

I don’t know where to start so I won’t. I’ll just let you bask in the comfortable knowledge that no matter how bad some idea you once had was, it wasn’t the worst.

Posted in General | Tagged | 1 Comment

How to Securely SSH into Your Home Network

Karl Voit shares a nice trick with us. Suppose you want to SSH into your home server. You may be loath to open a port in your firewall and your ISP may assign you a temporary IP address that can change at any time. These problems can make accessing your server difficult.

Voit has just the solution: access your server through TOR. The trick is to run a TOR hidden service. Sure, that’s what all sorts of shady enterprises do but so do Facebook and other legitimate enterprises. It turns out that it’s really easy to do this; see Voit’s post for the details. Once you’ve got it set up you can securely access your server even if you have a dynamic IP address.

Posted in General | Tagged | Leave a comment

Ogbe on Why He Uses Emacs

Last week I wrote about how Dennis Ogbe uses Org Mode to Blog. While I was on his site, I looked at some of his other posts and found one about why he uses Emacs.

The post was written fairly early in his Emacs use so it has the air of discovery that we all feel when we start. It’s a nice post and something worth pointing prospective Emacs users to. If someone asks you why they should use Emacs, this is a good explanation of some of its benefits.

The main features Ogbe found compelling were

  • TRAMP
    Ogbe is a PhD student and does a lot of work on remote machines. Before Emacs, he was using SSH and Vim to edit files remotely. With TRAMP, he simply opens the remote file like he would a local one but with a filespec that includes the remote machine’s name.
  • dired
    One of the things that Vim users are always doing is dropping into the shell to run an ls to find the name of a file to edit. With dired, you can do all this without leaving Emacs. Of course, you can also perform the common file operations—renaming, copying, changing permissions, etc.—that you might otherwise do in the shell from dired too.
  • Org Mode
    At this point in his Org mode use, Ogbe was using it mostly for writing READMEs and taking meeting notes. You can see in his later posts that he started using more of his potential, including using it to publish his blog as I wrote about previously.
  • mu4e
    Ogbe discovered early on the benefits of moving as much as he could into Emacs. He uses mu4e to handle both his school and personal email. Like Ben Maughan he found that mu4e brought speed and simplicity to his Email chores.
  • MATLAB
    Ogbe is in Electrical Engineering and does a lot of work with MATLAB. He doesn’t like their GUI app and used to run the MATLAB shell in a separate window with tmux. Now he just uses matlab-mode and keeps everything in Emacs.

Those of you that have been around Irreal for a while know that I like reading about how other people use Emacs and integrate it into their workflow. If you’re the same way, you’ll probably enjoy reading Ogbe’s post.

Posted in General | Tagged | 1 Comment

The Piper Sends its Bill to the NSA

The NSA has been playing fast and lose with its duty to secure our communications by arranging for backdoors to be inserted into our cryptographic protocols. Everyone familiar with the situation is convinced that the NSA diddled with the Dual_EC_DRBG random number generator, had it vetted by NIST, and then pushed to have it deployed as widely as possible.

Recently, it became known that

  • Juniper Networks used the Dual_EC_DRBG RNG in its products but changed the constants that constituted the back door.
  • Someone had replaced the Juniper constants with other values presumably opening another backdoor.
  • These Juniper devices are widely used throughout the US Government.

As things stand now, someone—believed not to be the NSA—has a backdoor into scores of government networks. This is possible because the NSA valued its ability to spy on everyone more than their duty to help us and the government secure its communications. How does this advance our national security?

There’s a lesson here for everyone who thinks encryption backdoors should be inserted into our communication products. They have a way of circling back and biting you in the butt. Someone always find a way to exploit them and turn them against whoever installed them in the first place.

The NSA and GCHQ internally trumpeted their ability to break into Juniper devices. I bet they’re not high-fiving now.

UPDATE: GCHG → GCHQ

Posted in General | Tagged | 2 Comments

A Magit Tip

A nice tip from Wilfred Hughes for Magit users:

Posted in General | Tagged , | Leave a comment

More Backdoor Silliness

Benjamin Wittes over at Lawfare has posted a particularly silly idea for forcing vendors to install encryption backdoors: simply withdraw CDA §230 protection from any company that does not provide an unencrypted copy of any data they carry. The CDA (Communications Decency Act) protection Wittes is talking about is the law that says a service that merely carries data from third parties can not be held civilly liable for that content. Why shouldn’t the government, Wittes asks, condition its ‘great gift’ to service providers on their willingness to assist the government with decryption?

In the first place, it’s hard to see how saying “you’re not responsible for what someone else does” can be characterized as “a great gift from the government.” Secondly, it shows an astounding ignorance of who the players are and how they depend on §230.

Robert Graham has a splendidly entertaining rant explaining why this is just nonsense by someone who doesn’t understand the Internet or crypto. Graham certainly knows about the Internet and crypto but maybe he’s wrong about the law.

But no, not even Wittes co-bloggers are buying his ideas. Nicholas Weaver takes to Lawfare to describe in detail why Wittes is wrong and his ideas won’t work. Companies like Apple—one of the major targets of those pushing for backdoors—carries virtually no third-party data and does not depend on §230. Companies like AT&T that do depend on it have nothing to do with the encryption that law enforcement is concerned about.

Sadly, Wittes’ argument is typical of those advocating backdoors: it reveals that he doesn’t understand crypto, how it’s used on the Internet, or by whom.

Posted in General | Tagged | Leave a comment

Magit: Staging All Files Including Those Untracked

A nice tip from Xah Lee that I didn’t know about

Posted in General | Tagged | Leave a comment