Mathematical Typesetting

I’ve always been fascinated by the typesetting process and have a particular fondness for the old mechanical typesetters such as the Linotype. I wrote about that in this post from a couple of years ago. That post has a link to a wonderful film that describes in detail how the Linotype worked. It really was a mechanical marvel.

Over at Practically Efficient Eddie Smith has a long post that describes the special problems that mathematical typesetting presents. If you think of a reasonably complicated mathematical expression, the Cauchy Integral Formula, say, \[f(a)=\frac {1}{2\pi{}i}\oint_\Gamma \frac{f(z)}{z-a}\,dz\] you can see right away why it was such a problem. There are Greek letters, fractions, and special symbols that can take up either multiple lines or have to be set in part of one of those lines. It was difficult and expensive to typeset.

Smith discusses some of the solutions to these problems but until fairly recently, you had a choice of expensive, essentially hand-set type or something that looked ugly on the page. It was that “ugly on the page” part that provoked Don Knuth to take a decade off from writing The Art of Computer Programming and develop \(\TeX\). I have the original version of Volume 2 of AOCP that was produced with the traditional hot lead Monotype typesetter. I remember seeing the revised edition that was produced by an early phototypesetter in a book store. It looked terrible. That book was the impetus for \(\TeX\).

Now, of course, typesetting mathematics isn’t much harder than typesetting anything else. \(\TeX\) and especially \(\LaTeX\) have made it so easy that many, or maybe even most, authors typeset their work themselves. The publisher may tweak the \(\LaTeX\) a bit but essentially all the hard work is already done.

Posted in General | Tagged , | 2 Comments

Start an Engineering Notebook

Camilla over at Winterflower argues that software engineers should keep an engineering notebook. That’s advice that everybody knows they should follow but that too many of us don’t. We’re busy and we think, “I’ll remember what I just did, I don’t need to write it down.” Of course, a little later we don’t remember and have to go through the pain of figuring things out all over again.

I keep a journal in which I record everything I do and discover but I’ve only been doing this for about 3 years. I really wish I’d started earlier. A good way of making it easier to get started and keep with it is to have a good system for recording things.

Of course, as an Emacs and Org mode user that means I have a built-in infrastructure for such things. One of the things that Emacs and Org mode provide is an easy way of retrieving information from your notebook. Org mode tags provide an excellent way of finding things. For example months ago I revised the way I compile Emacs (which can be a bit finicky on macOS), put it in my journal, and added the tags emacs and compiling. When I want to compile Emacs, I merely type Ctrl+c a m emacs:compiling to find all my journal entries with those tags. Even better, I have the commands in a code block so I can run them automatically by just typing Ctrl+c Ctrl+c in the block. That’s a real win over trying to figure out everything each time I compile a new Emacs.

There’s lots of examples like this, of course, and the more you put into your notebook, the more you can get out and the easier it will make things for you. Of you aren’t already keeping an engineering notebook, you should start. Or at least make a New Years resolution to start. I promise you, you’ll be glad you did.

Update [2017-12-13 Wed 14:48]: comilingcompiling

Posted in General | Tagged , | 5 Comments

Everybody Wants to Get Into the Act

BuzzFeed—I know, I know—is reporting that the Treasury Department is now spying on Americans and their financial data. As the late, great Jimmy Durante used to say, “Everybody wants to get into the act.” This spying is so egregious that even Treasury employees are complaining.

The Treasury’s Office of Intelligence and Analysis (OIA) is gathering and storing financial data on Americans without warrants and apparently without any legal justification. The OIA says that everything they do is legal and that the BuzzFeed article is inaccurate but a senior Treasury official says flatly that it’s domestic spying.

The issues are a bit arcane but the BuzzFeed article does a good job of explaining what’s going on. Basically it’s another case of the Iron Law of Data Collection. In this case, data collected from the banks on money transfers over $10,000 that is supposed to be used to prevent money laundering is being mined and stored by the OIA over the objections of the Financial Crimes Enforcement Network, the agency tasked with collecting the data and preventing money laundering.

It seems that you just can’t be a real government agency without spying on your citizens. Pretty soon, Animal Control will start spying on us. Oh wait, they already are.

Posted in General | Tagged | Leave a comment

Elisp for Configuration

Chris Done has a nice introduction to Elisp for configuration. This introduction is aimed at programmers who are relatively new to Emacs and want to start doing some simple customization.

He doesn’t intend to provide an thorough guide to the Elisp language but rather to give you just enough to be able to use more comprehensive documentation such as the Elisp manual. He assumes the reader has enough programming experience that an “Introduction of Programming” section isn’t necessary.

If you fall into the intended readership, you should give Done’s article a read. It might help you get started making Emacs your own editor.

Posted in General | Tagged , | Leave a comment

Emacs Pretest 1 Is Available

Nicolas Petton has announced the release of Emacs 26.0.90, the first pretest for Emacs 26. I’ve already been reading very favorable reviews, some saying it’s the best release available.

If you don’t mind living on the edge, you can help the developers out by using and testing it. The more feedback you can give the developers, the better Emacs 26 will be and the faster it will be available.

As always, we owe the developers a huge amount of gratitude for their work in continuing to improve Emacs.

Posted in General | Tagged | Leave a comment

C-q and ASCII in Emacs

LigerLearn has a nice video on using Ctrl+q in Emacs to insert arbitrary ASCII (or even Unicode) characters into the current buffer. The video begins with a discussion of ASCII control characters and the “caret notation” used to represent them.

The video goes on to discuss how Ctrl+q can be used to insert control and other characters into the buffer. That’s really handy when you want to insert a character like a newline (^J) that would normally perform an action.

The video is obviously aimed at n00bs but others may learn something useful too. It’s just under 9 minutes so it should be easy to fit into a coffee break.

Posted in General | Tagged | 1 Comment

Bookmarks, Eshell, and Docker

Fuco1 is really good at investigating how Emacs’ systems work and extending them to better suit his workflow. The latest example of this—or at least the latest that I know of—is his work in extending the Emacs bookmark system. The particular problem he is trying to solve is bookmarking Eshell sessions in Docker containers. That’s pretty interesting if you do a lot of work with Docker and you can check Fuco1’s post for the details.

More interesting to me, however, is how flexible the bookmark system is. You can bookmark whatever you want by providing a couple of functions. One of the functions builds an alist containing all the information needed to rebuild the buffer you want to bookmark. The other function uses this alist to rebuild the buffer when the bookmark is opened. Again, you should see Fuco1’s post for the details.

If you’re like me, you probably never thought much about the implementation of bookmarks, but as usual with Emacs, it’s well thought out and very extensible. If you have some special type of buffer you’d like to bookmark, it turns out to be pretty easy to do. Fuco1’s post is worth reading just to see the details of how the bookmark system works. It’s definitely worth a read even if you don’t have an immediate need to make a new bookmark type.

Posted in General | Tagged | 2 Comments

Unix History

The other day I saw a reference to this great history of Unix. It’s Chapter 2 from Eric Raymond’s The Art of Unix Programming. I hadn’t read it for some time and enjoyed it all over again.

Many—or maybe even most—Irreal readers weren’t around in the early Unix days and they should definitely read this history. It’s an important part of our shared heritage and a reminder that before Linux there was Unix and a wonderful culture that went with it.

Posted in General | Tagged , | Leave a comment

Kontra Nails It on Open Offices

He also points to this New York Times article on office design, which describes a movement away from the strict open plan office concept in favor of more flexible arrangements. As much as I hate the open plan nonsense, I’m not convinced that these new ideas are any less a fad.

Posted in General | Tagged | Leave a comment

Org Mode Completion

By far the most useful weapon in my Emacs efficiency arsenal is abo-abo’s Ivy library and associated utilities. Everything from simple string searches with swiper to finding files with counsel-M-x is easier and faster than before. Therefore, when abo-abo suggests a way of improving efficiency, I pay close attention.

In a recent blog post, abo-abo writes about extending completion-at-point for Org mode. It turns out that there is a general purpose command, complete-symbol (bound to Ctrl+Meta+i by default), that will complete the symbol at point depending on context. To do this you need a function that completes symbols in the current major mode. Some modes, like Elisp mode, have functions provided by default but, sadly, Org mode does not have any predefined.

Abo-abo’s post provides three functions that ease his workflow. The first completes ASCII marked-up symbols like this. The second takes care of completing file names and the third handles references. These functions are all pretty simple and offer excellent go-bys if you want to write one to optimize your work flow.

This is a great post and definitely worth the 5 minutes of your time that it will take to read it.

Posted in General | Tagged , | 1 Comment