Parentheses, Elisp, and Other Things That Aren’t Going Away

It appears that I’m temporarily at the end of the Internet: I can’t find anything interesting to write about today. Instead, here’s a rant.

I’ve written before that the Lisp Community’s well-known crabbiness with n00bs is probably the result of having the first thing said n00bs do when joining the community is to suggest some scheme or other for doing away with parentheses. If you’re a Lisper, you know how quickly that gets old. If you’re not a Lisper, you can take my word for it.

Sadly, I recently noticed a parallel offense on the part of Emacs n00bs. Many of them come to Emacs, notice that the extension language is Lisp, and suggest that we rewrite Emacs in a “modern” language such as JavaScript, Python, or Ruby. Here’s a recent example that inspired this rant. As you can see, the poster has no idea of the architecture of Emacs or why things are the way they are. That’s alright: he’s a n00b and no one expects him to understand that stuff out of the box. That said, it’s a good idea understand a subject before you start agitating for wholesale changes.

Here’s a bit of truth for all the n00bs out there: Parentheses, Elisp, and plenty of other things you don’t like or understand aren’t going anywhere. You can make whatever suggestions you like but if you want to be received cordially and have your suggestions treated with respect, take some time to understand the community and whatever it is the community was formed to support.

Postscript: I’ve mentioned this before but it bears repeating. Notice how gentle and respectful those responding to the poster were. The Emacs community really is a friendly and welcoming group of people.

Posted in General | Tagged | Leave a comment

Multics Emacs

Back in 1979, Bernard Greenberg wrote a long document about Emacs on Multics. If you’re interested in the history of Emacs and how it evolved, you’ll probably enjoy reading through the document. It’s fairly long and detailed but all that detail is revealing.

It’s hard today to appreciate how difficult it was to implement Emacs—or any video editor—on a large mainframe like the H6000 system that Multics ran on. The problem was that the hardware didn’t really support per-character input and processing—let alone echoing the characters to the display—so special effort, including patching the OS, was necessary to make it work.

Multics was written in Multics PL/I, which despite being a complete, well designed language was not suited to incremental development. It was, therefore, a poor choice to implement Emacs with its extensibility. Instead, the controversial decision to use Lisp was made—remember that the original ITS Emacs was built as a set of macros on top of the TECO editor. That fateful decision with its profound effect on Emacs extensibility is still with us today. It’s success should give pause to those suggesting alternative languages such as Python, JavaScript, Ruby, or whatever as the Emacs’ implementation/extension language.

By reading Greenberg’s account, you see why Emacs is the way it is today. Although the text representation was different from today’s gap buffer, many of the original implementation details can still be seen in the current versions of GNU Emacs.

As I said, it’s a long document but worth reading if you’re interested in Emacs’ history and beginnings.

UPDATE [2019-01-19 Sat 15:10]: Goldberg –> Greenberg

Posted in General | Tagged | Leave a comment

The Loneliness of the Lisp Programmer

This struck me as funny. And all too true.

Posted in General | Tagged | Leave a comment

Parsing Org Files

Xah Lee has a new and useful tutorial out. It’s about the APIs available for parsing Org files. None of the information is new—it’s all documented somewhere—but it’s very useful to have everything in one place. As Lee discovered, it can be hard to get a complete picture.

Of course, most of us won’t need these APIs for our everyday work with Org-mode but if you want to deal with Org files programmatically, his tutorial will be a real help. He considers three APIs:

  1. The Mapping API
  2. The Property API
  3. The org-element API

Lee gives examples of their use and shows the output you can expect for some of the functions. He also gives pointers to the official documentation in case you want more details. It’s a nice tutorial and worth bookmarking if you think you may need to write some code that deals with Org files and their structure.

Posted in General | Tagged , | Leave a comment

Detangle

For some reason I haven’t been following Yisrael Dov’s Emacs is Great series of videos on Emacs. That was definitely a mistake and I’m going to start paying more attention from now on. In the meantime I’d like to mention his video on detangling.

What’s detangling? You probably already know that Org-mode will let you tangle parts of an Org file in the Literate Programming sense. The common example is to write a literate Emacs init file in Org-mode and tangle the actual Elisp into an init.el file for Emacs to use during initiation. Dov shows how you can use the :comments keyword to insert comments in the generated file that are Org links back to the places in the source Org file that produced the Elisp in the generated file. You may or may not think that’s useful but the :comments keyword also enables the capability to make changes in the tangled file and have them inserted back into the source file. Hence detangling.

I had no idea this capability existed but I can see how it could be useful. Dov suggests that you can use it to help debug your init.el file if you keep your configuration in an literate Org file. Take a look at the video for the details.

The video is only 8 minutes long so you can easily watch it during a coffee break.

Posted in General | Tagged , | Leave a comment

Zamansky 54: Org Tables

Mike Zamansky is back with another video in his Using Emacs Series. This time it’s about Org tables and their spreadsheet capabilities. One of Zamansky’s duties as a Hunter professor is to evaluate Macaulay Honors College applications. Like many of us, his first idea was to set up an Org table to help with the processing.

His input is a list of names and ID numbers. He began by importing the list into an Org table and then adding columns for the various rating criteria. He needed an average for some of the columns and a total score column to capture a summary of each student’s rankings. As Zamansky says, you could do this with a spreadsheet but Org tables have extensive spreadsheet capabilities built in so there’s no reason to leave the comfort of Emacs1.

The built in functions for Org tables are from the Emacs Calc utility and are quite extensive. However, sometimes you need something that’s not provided. Being Emacs, it is, of course, easy to do. You can evaluate Elisp in place of the built in functions and Zamansky shows how to do that.

As usual, the video is definitely worth your time. It’s 12 minutes 45 seconds long so it should be easy to find time to watch it.

Footnotes:

1

My record keeping and workflow uses several spreadsheet-like tables but I never fire up an actual spreadsheet. Everything is done in Emacs with Org tables.

Posted in General | Tagged , | Leave a comment

Inbox Zero, Inbox Infinity

Karl Voit has an interesting post on email management and the concepts of inbox zero and inbox infinity. You probably already know about inbox zero. It’s the concept that you don’t let emails pile up in your inbox. You read each email once and act on it either by deleting/archiving it, responding to it, or adding it to a TODO list. You never leave it in the inbox.

Less well known is the inbox infinity concept. The idea is that you accept that you have too many emails to handle and just don’t respond to (some of) them. That strikes me as rude and a good way to get fired. As Voit says, if you’re getting too many emails to handle, that’s a sign that something else is wrong.

Voit outlines his method of dealing with emails; it’s pretty much what I do. I stole my method from Ben Maughan’s post on how he uses mu4e. It’s basically the inbox zero method with one important addition: all email is either deleted or archived to a single folder. Decent mail clients like mu4e have powerful search facilities that make it easy to find any given email. It’s also easy to add a TODO item to my agenda and link the email to it with mu4e.

I do cheat a little by having a temporary folder for email need to keep for a short time. Emails from Amazon saying that they’ve shipped some order is an example: I save it until the order comes and then delete. I could, of course, save those to my main archive folder and add a TODO item but the temporary folder seems easier.

Voit includes a great video of a Google Talk by Merlin Mann on dealing with email and using the inbox zero method. It’s just short of an hour so you’ll have to schedule some time but it’s worth your time. In particular, he explains why a single archiving folder is superior to a complicated taxonomy of folders for saving your emails.

Posted in General | Tagged , | Leave a comment

Bozhidar Batsov’s Year End Emacs Review

In my continued atonement for failing to produce a year end Emacs review, here’s an offering from Bozhidar Batsov. Batsov has done a lot of interesting work—including Prelude, CIDER, and Projectile—so his take on things is worth noting.

Oddly, he finds most of the changes introduced by Emacs 26.1 don’t affect him at all. He’s excited by the advances in concurrency but, of course, it’s still early days. He expects that it will become more important as package writers start taking advantage of the capability.

He makes two further points that I agree with. First, he says that MELPA has become the only repository that matters. Sure, there’s a couple of packages in GNU elpa that we all need and, of course, there’s the Org repository but, really, MELPA is the place to go.

The other point involves GNU elpa. He says that he’d like to see more of the packages that are built in to Emacs core—Org, for example—moved to GNU elpa and the core be dedicated to providing the best possible editing experience. That would have the advantage that the packages could be updated more regularly and, of course, make Emacs more configurable.

Batsov’s post is interesting and worth a read.

Posted in General | Tagged | Leave a comment

Mobile Carriers and Your Location Information

If you’re a fan of cop shows and the like, you undoubtedly know that the police can ask your mobile carrier for a record of your location information. Mostly, they’re supposed to get a warrant but often the phone companies will hand over the information without one. Regardless, this is something most of us know and accept as normal law enforcement activity.

It turns out, though, that the carriers have been selling your location information to “data aggregators” who in turn sell it to anyone willing to pay. They’re getting the information from cell towers so it doesn’t matter what phone you’re using or what apps you use. The article at the link provides an example of how the reporter was able to pay a bounty hunter $300 and get the location of a random phone. The carriers for their part swear they only sell it to “legitimate” users and reselling it to those not entitled to it is strictly against their policies. The truth is that everyone in the industry knows this is going on but they don’t care because it provides a revenue stream.

Except that after the Motherboard article the carriers are falling all over themselves to clean up their act before the regulators get involved. Already AT&T is promising to stop selling the data to anyone and the other carriers are jumping on the same bandwagon. We here at Irreal have a deep and abiding cynicism about almost all government action and would be normally be the last to suggest they get involved but, really, the carriers are out of control and this needs to be made illegal. Otherwise as soon as the outrage dies down, the carriers will be right back to selling our information.

Posted in General | Tagged | Leave a comment

Moving from C++ to C

I’ve written before about not being a fan of C++. I know it’s an unpopular opinion but I think it’s a terrible language that removed most useful aspects of C while keeping C’s problems. Partly, I suppose, that’s because I’m also not a big fan of Object Oriented programming in general but if I have to use it, I’d much prefer to use something like Common Lisp’s CLOS. C++, it seems to me, has everything backwards.

All of that is a lonely position, of course, and sometimes it can seem as if I’m a single lost voice shouting into the night. It turns out, though, that I’m not alone. Nick Walton has a short video in which he announces that he’s moving from C++ to C in 2019. His reasons aren’t particularly profound—he simply doesn’t like C++ and fails to see the utility of its conventions—but he does mention something that is probably obvious but that I hadn’t thought about: many C++ users would rather use C but feel that they must use C++ for “cultural” reasons. He has a clip from Mike Acton making that point.

There’s nothing in the video that’s going to change your opinion—whatever it is—and Walton says at the outset that that’s not his intention. He’s merely explaining why moving to C makes sense for him. Likewise, I’m not trying to change your mind. I’m just enjoying not feeling alone in the world on that particular question.

Posted in Programming | Tagged , | Leave a comment