Why Indeed?

Posted in General | Tagged | Leave a comment

Cabeldolphin

If you're a networking geek like me or if you write Elisp that uses the network to communicate with external sources, you may find cablesolphin useful. It captures network traffic to and from Elisp processes in a form that can be read and formatted by wireshark or tcpdump.

The data is captured at the application level so even if the network connection is encrypted, you can still see the data. The data is written to a file in pcapng (default) or pcap format. After capturing the data you use your favorite TCP line monitoring software to read it.

Since the data is captured at the application layer, the TCP headers have to be synthesized for wireshark or tcpdump so cabledolphin probably isn't useful for troubleshooting actual network problems. Think of it as an aid in debugging Elisp applcations.

Posted in General | Tagged , | Leave a comment

Emacs Garbage Collection

Bailey Ling over at bling on software has a great post on tuning Emacs garbage collection. Most of us never think about Emacs garbage collection but Ling shows that it can have an effect on performance.

The Emacs garbage collection strategy is pretty simple: once it's allocated a certain amount of memory, it stops and does garbage collection. The default threshold is pretty small: 800 KB. It seems to make sense, given today's systems, to increase this. The problem, Ling says, is that if you increase it too much there's a lot of memory to recover and it can stop things for 20 seconds or more. That's clearly not acceptable.

On the other hand, if it's too small Emacs spends a large proportion of its time garbage collecting, also not optimal. It turns out that the Emacs manual has a solution and Ling has ferreted it out for us. Head over to Ling's site for the details. If you're seeing Emacs delay processing often or for long times, garbage collection may be the problem and you should check out Ling's post.

The garbage collection threshold is a simple variable that is easily changed in your init.el so it's easy to experiment with different values or to try Ling's solution.

Posted in General | Tagged | Leave a comment

Editors Explained

Posted in General | Tagged , | Leave a comment

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 | Leave a comment