Emacs and MacOS Catalina

Last night I upgraded my MacBook Pro to macOS Catalina (macOS 10.15). I’d been holding off to see if there were reports of problems with Emacs on the new OS. That happened last time with the upgrade to Mojave because Apple stopped supporting the old display model and you couldn’t use Emacs in GUI mode until the Emacs devs generated a fix.

This time, there were reports of Emacs not being able to access (any of) the file system. The solution seemed pretty simple. The TL;DR is that Emacs was being loaded by a Ruby script so it was Ruby that needed to be given permissions. I hadn’t heard of the Ruby script before but assumed it was something new in Emacs 27. When I checked the above Stack Exchange entry, though, it said the poster was seeing the problem in Emacs 26.1.

In any event, after the upgrade Emacs worked just fine without me doing anything. I’m using the same binary (Emacs 26.3 compiled from source) as before so I haven’t tried recompiling Emacs yet but the old binary is working as it was previously without having to adjust permissions or anything else. My conclusion is that there’s no reason not to upgrade as far as Emacs is concerned. If you do experience problems with accessing the file system, take a look at the above link. Every report I saw about the problem said that the solution provided by Stack Exchange got things working again.

Added in editing:
Here’s a tweet that also describes the problem. The Stack Exchange link it contains is different from the one above so you should look at it too if you’re having problems.

Posted in General | Tagged , | Leave a comment

The Many Functions of a Smartphone

Remember back in the original Star Trek series how Spock carried around a tricorder? I always wanted one of those. Now, of course, I have something even better: my iPhone. Smartphones are general purpose devices that perform many functions, certainly more than the original tricorder. Today’s smartphones are actually more like the “terminals” from Iain M Banks’ Culture series.

I was reminded of all this by the recent XKCD Cell Phone Functions cartoon. The cartoon is a timeline of present and future functions subsumed by our phones. The most recent function to be assimilated is “car key.” Those functions not yet performed by the smartphones are all jokes: things like dog leash and band-aid.

That got me wondering what else we could have our phones do. They already provide an interface to the world’s knowledge—including things like the current state of the stock market and the weather—so any additions to that category aren’t really new. Smartphones are, of course, really computers first and communication devices second so again any additions to general computing or communication capabilities don’t count (although I can’t think of any communication function they don’t already perform).

The only obvious thing I can think of is suggested by the band-aid joke: health monitoring. Smartphones are already doing some of that and I’m sure we’ll see more such functionality in the near term. We could, I suppose, add some trivial sensors like a thermometer but I can’t think of any major functionality they don’t already have. What about you? Can you think of some plausible function smartphones could perform that they aren’t already doing?

Posted in General | Tagged | Leave a comment

More on Cashless

Surprisingly, to me, my post on the trend to becoming a virtually cashless society generated a lot of interest and comments. Given my nearly unblemished record on being unable to predict how popular a given Irreal post will be, I probably shouldn’t have been surprised. In any event, the interest prompted me to look into the trend a little more.

Back in May, CBS did a report on the backlash to going cashless. It’s not just the politicians. Many customers also object to having an establishment refuse to accept cash even if they do have a credit card. Some of that’s a concern for privacy and some of it’s probably just the typical American crankiness about being told they can’t do something they’ve always done. The biggest complaint, of course, is that the practice discriminates against the poor.

One thing the CBS report makes clear is how big a win it is for the merchants. Even the merchants who have voluntarily returned to taking cash emphasize how much cheaper, safer, and efficient it is to run a cash free business.

As I said in the previous post, it doesn’t matter much to the credit-card-using consumer. Theoretically, someone in front of you paying in cash can slow things down when you’re trying to pay but I, at least, haven’t found that to be an issue in practice. Despite the impression I apparently gave in the original post, I’m not yearning for a cashless society, I just want to be able to pay for things using my iPhone. I’m perfectly happy if others want to use cash.

Keeping cash may even be a benefit. Some of the commenters to the original post point out some of the dangers that come with a cashless society. In the long run, I expect that cash will go away but I don’t think it will happen in the near term. There are still too many problems to solve.

Posted in General | Tagged | Leave a comment

Generating Slides and a PDF From the Same Org File

Karl Voit has a revealing post in his UOMF series that explains how to generate a slide deck and supporting PDF from the same Org file. That has some obvious benefits, not least that it provides a single source of truth so you don’t have to worry about the slides and PDF getting out of sync.

It turns out to be pretty easy to mix LaTeX and HTML source in the same file without having them interfere with each other. For example, anything in a NOTES block will appear only in the PDF, not on the slides.

One of the interesting things about Voit’s method is that he likes to maintain just a few Org files that cover all his work so the slides and PDF are just one node of a large Org file that contains other material. If you like that idea, be sure to take a look at his post to see how he does it.

If your work requires you to give presentations and you like to use slides accompanied by a PDF for a handout that fills in the blanks, be sure to read Voit’s post. It really makes sense to keep everything together in a single file and Voit shows you how to do that.

Posted in General | Tagged , | Leave a comment

Just A Reminder…

…of why I call Steve Purcell an Open Source hero:

As I’ve said before, Purcell lives in New Zealand so most of us won’t have the opportunity to meet him but if you do, be sure to buy him a beer. He’s earned it.

Posted in General | Tagged | Leave a comment

Toasters, New and Old

About a year ago, ESR wrote a post on consumer grade toasters and how, regardless of price, they are all essentially the same, suffer from identical problems, and are basically junk. It’s hard not to sympathize. Here at Irreal headquarters we gave up on toasters some time ago and replaced them with what amounts to a high end toaster oven. It can theoretically cook all sorts of things but I can’t remember ever using it for anything except toasting bread.

The other day, I saw a link to a video about a toaster from over 60 years ago that, the video claimed, is better than the toaster you’re using today. It’s the Sunbeam Radiant Control Toaster. I remember having one of those as a child and marveling at how all you had to do was put the bread in the toaster and everything else was automatic. There was no lever to push down and no timer to set. Just put the bread in.

Automatically lowering the bread is sort of nice, I guess, but it was the lack of a timer that was the killer feature. Modern toasters all have a timer—either implicit or explicit—to determine how long to heat your bread. The Sunbeam used a simple and ingenious mechanism to estimate how brown the bread was and to stop heating and raise the toasted bread when it reached the desired color.

Every bit of this was analog of course but what was really incredible was the mechanism for raising and lowering the bread. There was no motor or electromagnet as I had always assumed. Rather the mechanism depended on a series of levers and the thermal expansion of the heating coil.

The video is 18 minutes long and several of the commenters remarked that they couldn’t believe they’d just spent 18 minutes watching a video on toasters but they all seemed glad they had. Toasters aren’t in the normal Irreal purview, of course, but the site is for and by geeks and I can’t imagine any geek not loving this video.

Posted in General | Tagged | Leave a comment

Swiper and Multiple Cursors

As most of you know, I’m a huge fan of the Swiper/Counsel/Ivy suite and consider it one of my most important packages. I’m sure I use it more than any other package or set of commands. I’m also a fan of Multiple Cursors.

Álvaro Ramírez has a quick post that shows them working together. I think I might have known you could do this at one time but I’d long since forgotten. Abo-abo’s post announcing the integration was in 2015 and I vaguely remember thinking, “Oh, that’s neat. I’ll have to remember to use it.” Sadly, I never did.

Take a look at Ramírez’s post to see it in action. There are a couple of things to know if you want to try it out:

  1. The binding to Ctrl+7 is enabled by default so you don’t have to do anything about that unless you want to change it.
  2. You must add swiper-mc to the mc/cmds-to-run-once list. I messed this up initially and had to fix it by hand.

This is another one of those tricks that you probably won’t use everyday but it’s just perfect for finding and changing every occurrence of some symbol. It’s also handy for making mass deletions in a buffer list as abo-abo demonstrates in his original post.

Posted in General | Tagged | Leave a comment

Ken Thompson’s Password

Many years ago, (the old) SCO released the source for some “ancient” versions of Unix. They did that by releasing a tape dump of the file system. Included in the image was a copy of the password file. The file is from System 3 and well before the introduction of the shadow password file so it had the password hashes in them. The hash was several iterations of DES with some changes to the S-boxes to prevent using hardware to crack them.

From time-to-time people have tried their hand at cracking those passwords just for fun. The DES algorithm is notoriously weak (because of the small key space) given today’s computers so this wasn’t too difficult. One password that no one seemed able to crack was Ken Thompson’s.

For the last week or so I’ve been following a thread on the TUHS mailing list about efforts to find out what that password was. As Leah Neukirchen reports in this blog post, Nigel Williams finally succeeded in cracking his password. It’s p/q2-q4!, which, appropriately enough for Thompson, is an opening chess move.

Looking at it, you can see why it was harder to crack than some of the rest. Whether by design or as a consequence of its being a chess move, it was as hard to crack as it was possible to make passwords in those days. It’s the maximum length and comprises letters, numbers, and symbols. It’s not clear whether or not capital letters were available.

After the result was announced, Thompson posted his congratulations.

Posted in General | Tagged , | Leave a comment

Cashless

Commenting on my Obsolete Tech That Refuses to Die post, Johnathan Mantey remarked that a technology that is having a hard time obtaining traction is cashless transactions and he pointed me to a USA Today article on going cashless. There are two sides to the idea of going cashless. The first side is that of consumers like you and me. We can pretty much be cashless. I haven’t used actual cash in some years. My only “cash-based” transactions are the occasional checks I write to those two small business I mentioned in the Obsolete Tech post. Everything else is Apple Pay or a physical credit card.

The other side is the merchants’. Although I’ve never encountered one, some merchants are refusing to take cash. You can see why it’s an attractive option for them. Beyond the obvious benefit of speeding up checkout, it also means the establishment doesn’t have cash lying around to attract armed robbers, their employees don’t have to spend time reconciling cash balances, and no one has to carry cash to the bank for deposit.

But there is a downside. Some people—mostly poor people—don’t have bank accounts, let alone credit cards. Refusing to take cash prohibits these people from taking advantage of a merchant’s services, whatever they are. Naturally, this created an opportunity for politicians to pander that was not ignored. Rather than find creative solutions to the problem—see the solution used by Atlanta’s Mercedes Benz stadium discussed in the USA Today article—they simply passed laws outlawing the practice.

Really, they needn’t have bothered. Most merchants who tried the cashless option have decided to take cash after all. They feel it’s more equitable and many of their customers—even those who did have credit cards—objected to the cashless policy.

From the credit-card-using consumers’ point of view, it doesn’t matter. I very rarely see anyone using cash at supermarkets or other “everyday” places let alone in upscale establishments. The amount of time I’ve spent waiting in line for someone to pay in cash is negligible. The conclusion, I think, is that going cashless is mostly an advantage for merchants.

That said, there’s no reason we can’t move to a cashless society. The advantages to merchants, and ultimately consumers, are manifest. Sweden has shown that it can be done. We can do it here in the US too. We’ll achieve a cash-free society when we start finding solutions to the problems instead of pandering. So never.

Posted in General | Tagged | Leave a comment

Zamansky 58: LSP Mode

After a long hiatus, Mike Zamansky is back with another video in his Using Emacs Series. This time, Zamansky tells us how he got LSP mode working with Emacs. It’s not as simple as you’d like but it also isn’t overwhelmingly hard.

He’s tried to get LSP running before but there were always conflicts with his configuration so he decided to start over by declaring Emacs bankruptcy and clearing out his .emacs.d directory. He quickly discovered that life in vanilla Emacs was not for him. Like me, he’s a swiper/counsel fan and has integrated it into his workflow so he added that back in. He also added other must-have things like magit and the latest org-mode. Really, what he needed to get rid of was all the language-specific configuration. His old and new configurations are on GitHub so you can see what he did.

In the video, he shows how he got things working for Python and C++. That mostly involved loading the language servers for Python and C++. The details are, unfortunately, extremely finicky and you’ll be glad to have Zamansky’s video to use as a go by if you decide to set it up yourself.

As usual with Zamansky’s videos, there’s a lot to learn. If you’ve been wanting to get LSP mode working, this video is a good place to start. There were a few technical problems with the video but nothing that makes it impossible or painful to watch. It’s good to have him back and I hope he’ll continue making new videos. The video is just short of 15 minutes so it should be easy to fit it in.

Posted in General | Tagged | Leave a comment