A Platform That Molds To Your Needs

Álvaro Ramírez has a nice post that expands on his theme of gluing Emacs functions together. It’s a nice example in part because it’s so out of the ordinary and seemingly impossible from within Emacs. It turns out that Ramírez is learning Japanese and wanted to import some vocabulary from a class handout into Emacs/Org-mode for further processing and eventual export to Anki so that he can employ spaced repetition learning on the vocabulary. I can sympathize. I’m learning Spanish and getting word lists into a usable form is a pain.

The process is instructive. He begins by calling the macOS screen capture utility from Emacs to get the data into Emacs. The he uses his chatgpt-shell that I wrote about earlier to get the data into an Org table. Once you have that, you can do almost anything.

In his case that means exporting it to Anki so that he can have it on his iPhone. He uses a function, org-table-get-field, that I didn’t know about to extract data from the rows of the table. Take a look at his short code snippet to see how it works.

Ramírez’s post is a great example how you can import the most improbable of work flows into Emacs by using just a bit of Elisp as glue code. Most of us aren’t gong to need to do what Ramírez is doing, let alone use Chatgpt, in our workflows but his post is a great example of how to do whatever you need doing from within Emacs.

Posted in General | Tagged , | Leave a comment

🥩 Red Meat Friday: Stop Forcing Dark Mode On Us

As you all know, we here at the Irreal bunker are not fans of dark mode. Of course, if you’re a benighted soul who likes dwelling in the dark on your own computer, I may shake my head in bewilderment but it’s your business and I would not presume to interfere.

Where I do feel the need to object is when you foist this abomination on others. Let me be honest: although I prefer light mode, I don’t really object to dark mode that much so long as the contrast between the text and the background don’t make the text unreadable. What I hate are things like dark blue text on a black background that make it virtuously impossible to read. You may think I’m exaggerating but believe me, examples abound. Again, if this is your thing, have at it but please don’t subject the rest of us to it on your blog or other Web sites.

Vishnu Haridas has a post that echoes my feelings. In his case, low contrast dark mode sites mess with his eyes and even afterwards he sees artifacts induced by the dark mode text. He also finds high contrast text unreadable although that doesn’t bother me. I just need the text to stand out so I can distinguish it from the background.

Haridas notes that there are, in fact, standards about all this. Although he doesn’t find them completely satisfactory, at least they help make text readable. Of course, all this could be avoided if folks would only embrace the light and eschew the loathsome dark mode.

Posted in General | Tagged , | Leave a comment

Escape From Walled Gardens With RSS

I am not on Facebook. I’ve never been on Facebook. I’m not on Twitter/X. I’ve never been on them. My entire social media profile consists of Irreal. I’ve always had an aversion to things like Facebook and Twitter without really understanding why. Even after it became clear that that they were mainly about harvesting your information for advertising purposes, I didn’t really think much about my initial aversion.

Taliesyn Walker has a nice post that helps explain some of this. The problem with Facebook and the others, he says, is that they’re walled gardens that curate the information they show you in such a way as to increase your engagement and influence you in various ways. The problem is that you have no control over what you see and what you don’t see.

The answer, according to Walker is RSS. He describes it as a distributed information system that lets you choose whatever content you’re interested in without any intermediaries filtering it for nefarious reasons. I agree with all that and have, in fact, said much the same.

If, like me, you’re already convinced that RSS is the way to get your content, Walker’s post is still very valuable. One of the supposed downsides to RSS is that it’s harder to discover content. Walker shows lots of ways of doing that and to do things like follow YouTube feeds without having to actually subscribe to YouTube and deal with Google.

Finally, there’s the issue of RSS readers. Walker has many suggestions but neglects to mention the best RSS reader, Elfeed. I’ve been using it for a few years and it’s just perfect for me. I can customize what I see in a number of ways and, of course, the source code is right there if I need it to do something completely new. It runs under Emacs, of course, which is another benefit.

Lots of folks say they use Emacs just to get Org-mode or Magit and I’d add Elfeed to that list. It’s that good. In any case, take a look at Walker’s post. It’s well worth a read.

Update [2025-01-25 Sat 11:08]: Majit → Magit. Thanks to Andrés Ramírez for the heads up.

Posted in General | Tagged , | Leave a comment

Reliability

We often see claims that such and such an application has \(99.\cdots\) reliability. That seems pretty definitive but what does it really mean? Here’s the answer. The difference between 99.9% and 99.99% is significant. By the time we get to 99.99999%, we’re essentially at zero downtime.

We see these types of numbers all the time but it’s nice to see what they really mean in terms of downtime.

Posted in General | Tagged | Leave a comment

Exporting Tables To LaTeX

A week ago, I wrote about Matt Magire’s use of Emacs and Org mode to prepare notes for the students in his mathematics classes. In his post, Magire mentioned that Org mode was especially useful for producing tables for export to LaTeX.

In a new post, Magire talks a little about how to produce really nice LaTeX tables with Org. Many, many years ago when I was first starting to use Org, I watched a video by Carsten Dominik giving a talk at Google about Org mode and the host mentioned in his introduction how Org made it particularly easy to produce nice tables in HTML. The same thing applies to LaTeX. If you’re familiar with LaTeX you know what a pain producing tables can be. Org simplifies the process considerably.

As a first approximation, you can simply build a table in Org using its excellent table editor and then export it to LaTeX but, as Magire shows, you can do a lot better. Using the tabularray package it’s very easy to provide small tweaks to your table that makes the final exported product much nicer.

The secret is just specifying the necessary parameters in the #+attr_latex: parameter for the table. You can color certain cells, specify alignment on a column basis, and even create empty cells when it make sense. Take a look at Magire’s post for the details.

Most of us are happy just to take advantage of the benefits Org gives us out of the box but with a tiny bit more effort, you can produce really nice typeset tables.

Posted in General | Tagged , | Leave a comment

Helping To Read Old Cursive Documents

It’s been a long time since I’ve addressed one of my favorite hobby horses: cursive handwriting. I have a long record of writing about it—search for “cursive” on Irreal—and if you’ve been around for a while, you know I think it’s a ridiculous anachronism that should be eliminated forthwith.

One of the silliest arguments in support of cursive is that if we don’t teach it students won’t be able to read important historical documents, such as the Declaration of Independence (to give a parochial example), in the original.

Now the Smithsonian has a program that addresses this concern. Because, in fact, the ability to read cursive is disappearing, the Smithsonian is calling on those who can read it to help digitize historical documents. They already have more than 5,000 volunteers working on the project.

There are several conclusions one can draw from this. The first is that those championing cursive were right and already people can’t read these documents. Of course, that’s facile and ridiculous. The average person can’t read ancient Greek either but that doesn’t stop us from enjoying, say, The Illiad. What’s happening here is that the Smithsonian is crowd sourcing the effort to make these documents available to everyone in easily readable form. I can read cursive and even I had a hard time deciphering some of the sample documents.

The better conclusion, it seems to me, is that efforts are underway to make sure that these documents—even the less important ones—will be available to everyone, not just the experts who will always be able to read them. One could, I suppose, object that this just proves the original objection: people won’t be able to read these documents in the original but as I said most of us can’t read the Illiad in the original either but we can still enjoy and learn from it. And note even that argument has a false premise. Any English speaking person can read the Declaration of Independence in the original, the only difference is that it’s legible instead of in barely decipherable cursive.

Posted in General | Leave a comment

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