What Computer And OS Do You Use?

Over at the Emacs subreddit, ll777 wants to know what computer and OS you’re using. He’s a macOS user but is getting into Emacs and realizing that Emacs can do a lot of the things that he uses individual apps for in macOS. He wondering if he should change computers and operating system and asks others what they think.
About a quarter of the Emacs user base is using macOS. As one of those users, I can testify that Emacs and macOS are a great match. The only important thing I miss is support for EXWM, and that’s because macOS doesn’t use X-Windows natively (although it does support it).

I like macOS because it integrates with all my other devices like my iPhone, iWatch, iPad, and home automation system. You can have that in the Linux world too but then you have to use an Android phone and tablet with all the privacy concerns that that brings. And, although it’s a matter of opinion, I think the Apple devices are simply better.

Lot of folks disagree, of course, and for them a Linux system is undoubtedly the right choice. I don’t think it makes a lot of difference. If you like the Apple ecosystem and want to use Emacs, there’s no reason to go elsewhere. Likewise if you like Linux or have strong feelings about free software, you can likewise use Emacs without any problems.

Although there was support for both macOS and Linux in the comments, there was not a single suggestion that ll777 move to Windows. Although Emacs does run under Windows and support for it has gotten better recently, no one I know would choose Windows as a platform just to run Emacs.

What do you say? Would you tell ll777 to do?

Posted in General | Leave a comment

Iterating In Lisp

Joe Marshall has an interesting post on iteration for all you Lisp heads. It’s mostly aimed at Common Lisp and Scheme but a lot of it applies to Elisp as well so even Emacs users will be interested. The mail problem for Elisp is that tail recursion isn’t supported.

I almost always prefer tail recursion for explicit iteration when it’s available but Marshall shows that it’s often better to use one of the built-in functions or mechanisms rather than an explicit loop. For example, the map and reduce functions are a form of implicit iteration that are concise and easy to use.

There are also the more imperative looping mechanisms such as the do, dolist, and dotimes macros that emulate the looping mechanisms in imperative languages. I use these a lot if only for their convenience and the knowledge that their implementations will probably expand into the most efficient code possible. In the absence of tail recursion, they’re a good choice.

Finally, there is the series suit. I’ve never used these so I don’t have any firsthand experience with them. See Marshall’s post for an explanation. You can think of them as a refinement of Map/Reduce that does away with the generation of intermediate lists.

Marshall also mentions the loop macro. Lispers either love it or hate. He, like me, isn’t a fan for all the usual reasons.

If you like any of the various Lisp languages, take a look at Marshall’s post. You’ll enjoy it.

Posted in General | Tagged , | Leave a comment

Sweden Goes Back To Books And Handwriting

I don’t know what to make of this. The TL;DR is that after many years, Sweden is returning to more traditional methods in education, including an emphasis on physical books and handwriting. On the one hand, there is some actual scientific research showing that taking notes by hand rather than a keyboard helps with retention. There are also claims that handwriting helps with cognitive development although I’m not sure the evidence is as strong.

On the other hand, this whole thing reeks of politics having little to do with education or what’s best for children. The claim, of course, is that it is what’s best for children but those words are a sure sign that you should be checking for your wallet.

In Sweden’s case, the change seems largely driven by the ascendance of a more conservative government. This doesn’t mean the conservatives are evil or stupid but they are conservative; They’re resistant to change—or at lease rapid change—and tend to like things “the way they were”. A lot of what they claim seems more nostalgic than scientific.

It is—for me—hard to see how reading a physical book is much different from reading the exact same material on a tablet or computer. Of course, I was a bit surprised that handwritten notes were more effective than typed ones so my intuition is probably suspect.

It is, I think, a valid criticism that doing things digitally just because it seems trendy without considering how it’s going to improve learning is a waste of time and money. As usual it’s the politicos driving that process just as it’s (probably) the politicos driving the current retrenchment.

The wisest path is probably taking the best from each method but that’s so politically unsatisfying. For example, if writing by hand really is better, why not write on a tablet with a stylus and gain both improved retention and all the benefits of having a digital record of your writing?

Posted in General | Tagged | Leave a comment

Where Should Your Configuration Live, Redux

A couple of weeks ago, I published a Red Meat Friday article about the proper place for your Emacs configuration to reside. Like many Red Meat Friday posts, it was tongue in cheek but it got quite a bit of traction. Most, but not all, commenters were against putting it n the ~/.entconfig/emacs directory.

Bozhidar Batsov just published a post in favor of using ~/.config/emacs instead of just ~/.emacs or ~/.emacs.d. The argument is that it reduces home directory clutter by putting all the configuration files in a single place. I don’t find that a particularly compelling argument.

The thing is, ~/.emacs.d contains a lot more than just your Emacs configuration files. There’s all kinds of things in there including random packages, ELPA files, all kinds of state data, and plenty of other things. Sure, you could put that all into ~/.config but that seems wrong. The vast majority of it isn’t configuration data.

The XDG standard provides places for all that other data too, but that’s a non-starter for me. Who wants your Emacs data scattered among many different directories?

The commenters to Batsov’s post seem mainly to agree with him but we here in the Irreal bunker are going to continue putting all our Emacs stuff in ~/.emacs.d. It was hard enough giving up ~/.emacs.

Of course, as I and others pointed out in the original Red Meat Friday post, none of this matters very much because you can always use symlinks to put your configuration wherever you want it and make it seem as if it’s in the same old place. But if you do that, you’ve recluttered your home directory and added a level of indirection to your files.

Batsov says, and I agree, that ~/.emacs.d is probably never going away. He’s sorry about that.
I’m not.

Posted in General | Tagged | Leave a comment

Stories From The Internet

If you’re like me, you love those weird stories about seemingly impossible things happening with computers and the Internet. My favorite is A Story About Magic. Even if you know the story, follow the link to see a picture of the actual switch in one of the comments.

One of the most perplexing stories is The 500 Mile Email. A seemingly impossible tail that turns out to have a simple answer.

And, of course, there’s the famous The Story of Mel, a real programmer. Every computer geek of my generation knew the story and none of us believed it was real but it was. Follow the link above to find out about Mel.

If you love these types of stories, here’s a wonderful reference for you. It’s got links to the stories above as well as many others. I’m keeping it in an open tab in my browser so I can read one or two stories a day. They’re not all as good as the Magic story or as baffling as the 500 mile email but they’re all worth reading and fun for the real geek.

Posted in General | Tagged | Leave a comment

Installing By Default With =use-package=

Bozhidar Batsov has a handy tip in his latest post. He, like me, organizes the package management of his init.el around use-package. It works well for him but he has a complaint. He almost always wants to install the packages by default but has to specify :ensure t for each package that he wants loaded by default. He has, he says, more than 50 packages so this is a nuisance.

There is, however, an easy solution. You can simply set use-package-always-ensure to t and all packages except those with :ensure nil will be loaded by default. Batsov notes that some people don’t like loading packages by default because of version issues but that this has not been an issue for him.

It hasn’t been an issue for me either. But neither has specifying :ensure t for each package. I have, according to a quick check with keep-lines, 70 instances of use-packages. All of them specify :ensure t and I’ve never considered this an irritant even though I know about use-package-always-ensure.

Still, I understand and support the urge to make everything as simple as possible so if you’re an use-package user and want to load all or most of your packages by default, Batsov shows a way of doing that with a little less effort.

Posted in General | Tagged | Leave a comment

Watch Duty

As most of you know, I’m an Apple user so Six Colors, a site dedicated to Apple news, is in my feed. I just noticed this article about Watch Duty, an app that tracks wild fire information and makes it immediately available to those at risk from the fires. The Six Colors article is fairly short but it points to a longer article from The Verge about the app and the people behind it.

Despite being featured on Six Colors, Watch Duty is cross platform and available on both iOS and Android. The entire point of Watch Duty is about protecting people from the fires. It’s not about engagement, tracking users, gathering user information, or making money.

Take a look at The Verge article to see why this app is needed. The fires, often driven by 90 MPH winds, can overwhelm an area in just a couple of minutes. The current government based warning systems often have a 15 minute lag time. The difference can be measured in lives. Watch Duty’s primary objective is to provide useful information in the shortest possible time so that people can make informed decisions on what to do.

Currently all the attention is, of course, on the California wild fires but Watch Duty plans to extend coverage to the entire U.S. and even over seas. It’s a perfect example of what the Web and current technology can and should provide: an apolitical, not-for-profit service dedicated to helping people and saving lives.

There’s plenty of room on the Web for making money too and Irreal’s not against that but sometimes there are more important things. I know this first hand because members of my family lost their house in the California fires. By lost, I mean nothing left but ashes. Happily they’re safe and I don’t know if they used Watch Duty but this is an app that can save peoples’ lives. We should all support it as much as we can.

Posted in General | Tagged | Leave a comment

Class Notes In Emacs: Teachers’ Edition

I’ve written in the past on my astonishment about people who are able to take mathematics class notes in LaTeX fast enough to keep up with the instructor: 1, 2, and 3. Some people who do this use Emacs, some use Vim. In either case, it’s breathtaking to watch them.

Now Matt Maguire takes a look at it from the other side: producing class notes for students. Speed is not an issue here, of course, but getting a workable system involves more than just writing some LaTeX formulas and publishing them.

Maguire has a specific format in mind and has been producing notes in it for some time directly with LaTeX. But as an Emacs user, we wanted to leverage Org mode to simplify the production of the notes.

The nice thing about his exposition is that it’s widely applicable. You may not be a teacher or you may not want to produce notes involving mathematics but if you want to use anything other than the standard LaTeX article class, you have some work to do. Maguire’s post tells you how to set up another class and other custom settings you need for your unique environment.

All this may seem like a lot of work but you only have to do it once. After that, you just write whatever it is in Org as usual. The post demonstrates one of the (many) strengths of Org mode.

Update [2025-01-12 Sun 11:22]: Added link to Maguire’s post.

Posted in General | Tagged , | Leave a comment

Converting Markdown to Org

Charles Choi has a handy tip on converting from Mardown to Org. My first thought was that I don’t care about this because I write everything in Org Mode and never use Markdown. But then it occurred to me that the same is doubtless true of Choi as well and that someday I’m going to want to import a Markdown document into Org.

Choi’s basic process is to cut and paste the Markdown document into Emacs and then use Pandoc to convert from Markdown to Org. But there’s a problem. Pandoc will wrap lines while Choi likes to keep paragraphs as a single line. I do that too because it’s how visual line mode works. The excellent Pandoc has us covered, of course. You need only specify --wrap=preserve to get the desired behavior.

With that bit of wisdom, Choi gives us a handy function that will convert the Markdown in the current region to Org. It’s probably worthwhile adding his short function to your init.el just so you’ll have it when the need arrives. If you don’t like cluttering up your init.el with things you’re not actively using, at least bookmark his post so you’ll know what to do when the need arises.

Posted in General | Tagged , | Leave a comment

🥩 Red Meat Friday: Notepad Vs. Emacs

Of all the pretenders to the Emacs crown, notepad strikes me as the most ludicrous. I am not, apparently, the only one. This cartoon captures my feelings exactly.

The Emacs haters were, of course, out in force trying to deflect your attention from the essential truth but we keepers of the faith were not deceived.

Posted in General | Tagged , | Leave a comment