Sudo via Touch ID on the Mac

A couple of years ago, I wrote about using Touch ID to enable sudo on the Mac. Someone just posted a link to the original article on Six Colors. It turns out to be incredibly simple—a single line added to the sudo file—and I really did mean to enable it but I didn’t add it to my TODO log so of course I forgot about it. The new mention reminded me and this time I added it before I had a chance to forget. I’m happy to report that it works fine (I’m running the current version of Monterey).

None of this would be worth writing about again—especially since it’s Mac specific—except that I tried it out with Emacs. First I used it from a vterm session and it worked just as you’d expect. Then I tried reopening the sudo file with Ctrl+x Ctrl+f /sudo::/etc/pam.d/sudo and, again, it popped up the dialog telling me to use Touch ID or enter my password.

Since, as many of you know, I’m a bit paranoid about security, I have a long and complicated password on my laptop so having to enter it is a bit of a pain. Using Touch ID instead is a real win for me. If you’re a Mac user—especially a Mac Emacs user—you should spend the 30 seconds it takes to enable Touch ID. You won’t be sorry.

Posted in General | Tagged , | Leave a comment

Rich Stevens

One of my heroes, perhaps my greatest hero was Rich Stevens. The other day, someone posted a link on reddit to a Salon article about Stevens published a year after his death. It made me remember my huge debt to him.

Throughout my career, I’ve been known as a networking guy and most of what I know about the field I learned from reading Stevens’ books. If you’re interested in networking and haven’t read the 3 volumes of TCP/IP Illustrated, your education is incomplete. When you finish the series, you will have a thorough knowledge not just of the theory, and the API calls involved but of how things actually work. You’ll understood the actual code behind the protocols because that’s what the books are about. As you read the BSD networking code, you’ll see the results in the form of TCPDUMPs of the resulting packets on the wire.

But more important, I learned two other things from him. The first was an appreciation for the aesthetics of beautiful typesetting; of how to produce beautiful documents and books. Stevens’ mechanism for that was the Unix Troff typesetting system and he inspired me to learn and use it myself if only in a pale imitation of his mastery. I’ve since moved on to using LaTeX through Org-mode but the principals remain the same.

Second, he showed me what great technical writing is supposed to look like. My two books are explicitly modeled on his. Again, I never achieved his mastery but he gave me a goal to strive for.

I remember, vividly, the day I learned he’d died at the shockingly young age of 48. Fortunately, his wisdom lives on through his books and his Website that’s still maintained. If you want some great advice on producing great looking documents, take a look at what he has to say about it on his Website.

Posted in General | Tagged , , | Leave a comment

Elfeed-tube

As regular readers know, I’m a huge fan of RSS and of using elfeed to read and curate my feeds. If you’re an Emacs user and not using elfeed, you’re really missing out. It’s the absolute best feed reader I’ve ever used.

You may not know it but you can add YouTube channels to your elfeed feeds. If you follow one or more channels on YouTube, elfeed is a nice way of keeping up with them without a lot of fuss. Things just got a lot better.

Karthink has a new package, elfeed-tube, that makes following YouTube channels even better and easier. The package is so versatile that I won’t even try to cover everything it does; you should head over to the elfeed-tube GitHub repository for a long and thorough description of everything it’s capable of.

I found the link to elfeed-tube on reddit. The comments were uniformly positive, saying among other things, that the package “just worked” out of the box. This looks like a really great package for Emacs users who follow YouTube channels.

Posted in General | Tagged | Leave a comment

How To Create A Missing Directory

If you’ve been around Emacs for a while, you probably know that Emacs has you covered if you call find-file (Ctrl+x Ctrl+f) and specify a path with a missing directory. You simply get asked if you want to create the missing directory and give your assent with a simple Return Return.

That’s pretty simple and convenient but Bozhidar Batsov is committed to eliminating as much friction as possible and doesn’t want to have to do anything to create those missing directories. He just wants it to happen. Of course, being Batsov, he made it happen. It turns out to be pretty easy and he gives two solutions for doing it.

Almost every time I get the missing directory error it’s because I mistyped the path. That means that automating the creation of missing directories would almost always be a fail for me. But that’s me. Others, like Batsov, view it as a win. If you fall on Batsov’s side of the question, take a look at his post to see how easy it is to do.

The final, obvious, oft repeated, but mandatory observation is how easy Emacs makes it to fine tune it to each individual user’s workflow.

Posted in General | Tagged | Leave a comment

Spaced Repetition

One of the things that I wish I’d known during my school years is the technique of spaced repetition. The TL;DR is that it’s a method for learning and remembering material that’s much more efficient and reliable than other common methods, especially cramming. The basic idea is that you revisit material based on ever increasing intervals determined by how well you remember it.

As Ali Abdaal says, there are rigorous studies that show the effectiveness of the method. Adaal has a whole series of videos that explore spaced repetition and other strategies for effective learning. Those videos are the easiest way I know to explore the method. He recommends using active recall in conjunction with spaced repetition for maximum benefit.

There are, of course, numerous applications—including Emacs packages—that implement the space repetition technique. If you’re still a student or otherwise need to learn a collection of facts, spaced repetition is almost certainly your best bet.

If you want a quick and easy introduction to spaced repetition, Nicky Case has a cartoon based explanaton of the method that’s easy and enjoyable to read. Case’s post is from 2018 but is still relevant today. Take a look at it and see how easy learning things can be.

Posted in General | Leave a comment

Apple Passkeys

At WWDC, Apple just announced Passkeys, their implementation of the FIDO protocols that aim to replace passwords. In Apple’s case, this capability will be available with iOS 16 and macOS Ventura, probably this fall. The other vendors are doubtless planning similar releases in a similar timeline.

Dan Moren from Six Colors has a post that gives a nice explanation of Passkeys and its operation by endusers. If you’re an Apple user with some or all of your passwords stored in the Apple iCloud Keychain, nothing much will change: you’ll authenticate with a fingerprint or face ID and a cryptographic exchange takes place between your device and the remote site to verify you. You can even use one device to log into another. Take a look at Moren’s post for the details.

The Passkeys mechanism will do a lot to improve security. If nothing else, there will be no more 123456 or password vulnerabilities floating around. Of course, the scammers will still be out and about trying to get your credentials but it’s going to be much harder for them. At present, there’s no way to share a key other than through AirDrop so it will be harder to scam victims into giving up their keys especially since that from the user’s point of view, the key is their biometric information. Doubtless the scammers will find ways to probe the system but it’s going to be more secure than passwords.

Posted in General | Leave a comment

Red Meat Friday: Who’s Next?

As most of you have probably heard by now, the Atom editor is being discontinued in December. That’s sad, of course, especially for Atom users but there are some lessons to be drawn.

Eric Fraga has the TL;DR:

It’s a good point. You devote considerable effort into mastering an editor and perhaps
writing extensions for it only to have it jerked out from under you. Fraga says that with Emacs he doesn’t have to worry about that. Bozhidar Batsov explains why that is in his Forever Emacs post. The short version is that Emacs is a community driven open source project1.

The demise of Atom shows that open source is not enough. After all, Atom was open source too but it wasn’t community driven. It was, rather, commercially driven by GitHub and GitHub, like every commercial entity, is mostly concerned with pursuing projects that they perceive will benefit them. Apparently, they no longer felt that Atom was a worthwhile investment in time and resources.

Now for the red meat. As the post title suggests, a natural question to ask is, “Which editor is next?” A reasonable candidate is VS Code. Like Atom, it’s an open source, commercially driven product. Furthermore, Microsoft has historically shown itself more than willing to dump any product that they felt was no longer meeting their needs.

If your PDF reader is discontinued it might be a little annoying but, really, who cares? There are plenty of them out there and they all work pretty much the same. If your editor goes away, it’s a much bigger deal. Most of us have put considerable effort into mastering our editor and making it an integral part of our workflow. If Microsoft does decided to sunset VS Code, what will all those users who flocked to it do?

Footnotes:

1

Yes, yes. Of course I know that Emacs is Free software. I’m merely making the point that the same principal applies to the larger universe of open software.

Posted in General | Tagged , | Leave a comment

Proced

Bhaskar Chowdhury has a nice video on using proced in Emacs. He covers many, but not all of the things you can do with it. As Chowdhury says, proced is best thought of as a top substitute built into Emacs. I don’t think it’s quite a full blown top substitute but it does have many of the same capabilities and does move us closer to never having to leave Emacs.

As most of you know, I do most of my work on my MacBook laptop and for a long time proced didn’t really work on a Mac. But at least since 2018 it’s been working fine on the Mac. After watching Chowdhury’s video, I fired up proced to see if I could find any shortcomings—I couldn’t. Everything that Chowdhury showed worked fine on my MacBook.

Proced is perfect for a quick check on things when you don’t want to have to context switch out of Emacs. It’s just another example of how Emacs provides a nearly complete operating environment. It is as I’ve often said a light weight Lisp Machine. Most of us will never have to opportunity to work on a Lisp Machine but Emacs does provide a hint of what it was like.

Proced gives you top-like information in an Emacs buffer. That’s nice because you can use all the usual Emacs searching and navigation commands in that buffer. You many not use proced all that often but it’s perfect when you need it.

Posted in General | Tagged | Leave a comment

Emacs Buffers

Mickey from Mastering Emacs has a post, Why Emacs has Buffers, that considers why Emacs makes the buffer concept one of its signal concepts. After all, he says, the natural construct when a programmer thinks of an editor is the string. The lines that you see on the screen are just strings and (text) files can be viewed as just a collection of strings.

Buffers, on the other hand, seem more abstract and unnatural. Mickey says they don’t evoke the same familiar associations as terms like “file” or “document” do. Of course, that’s a little overwrought. Any Emacs user, let alone programmer, who has a hard time with the concept of a buffer probably needs to find another occupation. Still, it’s worth considering why bringing the buffer concept to the forefront instead of burying
it in the internals as most editors do is the right thing and that’s what Mickey does.

One of the things the “modernize Emacs” nebbishes want to do is replace buffers with tabs. Not because tabs are better but just because they’re used to them. Of course, buffers are a much more general concept that includes things that are not files. You could, I suppose, make a tab for each buffer but that’s not want the nebbishes want: they want one tab per file just like they’re used to. I know I’m waving my cane at the kids on my lawn but—really—if you aren’t willing to put in a little effort to learn the Emacs way, please go away. If you are willing to put in that effort, welcome. There are plenty of people here willing to help you learn.

As always, any post from Mickey is worth spending a few minutes reading. Spend a few minutes to check it out.

Posted in General | Tagged | Leave a comment

The iOS Builtin Flight App

This post is a bit specialized—to iOS—by Irreal standards but it’s so useful to those who have an iPhone that I’m going to write about it anyway. I’m not sure if this is new or has been in iOS for a while but it turns our that the iPhone has a builtin flight tracker.

Everything I know about it is in the above post so you should definitely take a look at that but the TL;DR is that you can enter a flight number into the Safari or Spotlight search bar and get all the information about the flight that a dedicated App will typically provide. It also works if you click on a flight number in a text.

This is really nice. Like most of you, I haven’t done much traveling in the past two years but it’s nice to know I can track any flight I’m on or that a family member or friend is on. It’s perfect for knowing when to leave for the airport.

It’s actually easier to use than my dedicated app, which requires me to add a bunch of information before it will tell me about a flight. All I have to do here is enter the flight number. Take a look at the post for the details.

This isn’t about iPhone triumphalism—I’m sure Android has something similar—but rather a celebration of how much easier our digital age makes our lives. Just consider this app. You don’t have to download or buy anything or plan ahead. All you have to do is enter a flight number and you get all the information. Splendid!

Added before publication

Here’s a tweet that makes the same point:

Posted in General | Tagged , | Leave a comment