Gnus

I am really enjoying mu4e again after fixing the problem that caused it to be so slow. As I’ve said before, I’m very happy with mu4e and don’t have any desire to replace it. Nevertheless, I always find it interesting to read about other mail clients. The gorilla of them all is, of course, Gnus.

Everyone will tell you that Gnus is large and scary but very powerful. You can use it to read and send mail, to follow your RSS accounts, or use it for its original purpose of reading Usenet. I remember being impressed that John Wiegley, the Emacs maintainer and a Gnus power user, set a Gnus keyword flag in Gnus to bring any post in emacs-devel to his attention if it had “John?” in it. You can hear all about that and some of the other ways he uses Gnus in this Emacs Chat with Sacha.

If you’re wondering whether or not to start using Gnus, there are a lot of resources to help you decide. There’s the Emacs Chat a linked above, another Emacs Chat with Wiegley that also discusses Gnus, and, finally, a recent video by Protesilaos Stavrou.

Stavrou has recently moved from mu4e to Gnus. The video discusses how that has helped his workflow but most of the video is a demonstration of Gnus and some of the things you can do with it. One of the really great things about Gnus is its scoring of posts and emails. It brings the most important content to the top of your lists and can even hide threads, say, that you no longer have any interest in.

Take a look at Stavrou’s video to get an idea of some of Gnus features. If you’re still interested watch the two Emacs Chats. Watch them anyway; Sacha’s chats are always worth your time.

Update [2020-09-06 Sun 12:14]: GNUS → Gnus.

Posted in General | Tagged | Leave a comment

Grading With AI

The Verge has a story that is at once hilarious, infuriating, and deeply disturbing. In this time of COVID-19 much education has moved online. Except for scale, this isn’t really new. It’s been possible for many years for children to get their education online. Some students—especially high school students—prefer that option to dealing with all the nonsense a traditional high school education entails.

Now, of course, we’ve had to scale up to include almost everyone and those providing that education are new to dealing with online learning. It’s hard for teachers used to the classroom but not impossible. I have a family member who is a middle school teacher and she has mostly tailored her classes to run through Zoom. Mike Zamansky, of Using Emacs fame, is a university teacher and he, too, has adapted to running his classes online. Neither he nor my family member thinks it’s as good as in-person teaching but they’ve adjusted their teaching to provide the best pedagogy they can.

Sadly, not everyone has adapted as well. The Los Angeles Unified School District, for one, has attempted to automate the teaching and grading of several courses. That’s not necessarily bad but, as the article relates, the “AI” grading of short answer tests involved merely scanning for keywords. Of course, the students immediately discovered this and started gaming the system by simply answering the question with a word salad of any keywords that might be applicable to the question. Sometimes, even just cutting and pasting the question into the answer would work.

The school district has, of course, tried to frame this behavior as cheating but I think it merely demonstrates that the students are way smarter than the school district. If you’re going to test students, then you’re morally obligated to carefully and rigorously evaluate the answers to those tests. When you outsource that to a simple minded algorithm that simply scans for keywords, it’s you who is cheating and you should shut up about students who found you out and responded appropriately.

As I say, it hilarious that the students discovered this and reacted suitably. But it’s also infuriating and disturbing that those charged with educating our children would do so with such an inadequate and immoral system. There are plenty of teachers who are proving daily that we can do much better.

Posted in General | Tagged | Leave a comment

Wireless Charging Problems with the iPhone

Apologies to those of you who aren’t members of the cult but this is another post on Apple products. For the last year or so I’ve been using a wireless charger for my iPhone. I like it because it’s easy to pick up the phone if it rings at night or when I’ve set an alarm. When I used a wired charger I always got tangled up with the cord and ended up flexing the cable.

A couple of weeks ago, the wireless charger stopped working. It was an inexpensive Anker that had worked perfectly for me so I just ordered a new one. Sadly, the wireless charging still didn’t work. My next thought was that it must be the power supply but before I changed that out, I put my wife’s iPhone on the charger. It worked fine.

I spent a day or two wondering what to do when it occurred to me to do what I should have done in the first place: I asked DuckDuckGo. It turns out it’s a known problem as explained here. The TL;DR is that you need to do a hard reset on your iPhone. Apparently, just restarting the iPhone sometimes helps but it didn’t in my case. As soon as I performed the hard reset, everything starting working again.

The only problem is now I have two wireless chargers. I’m sure I’ll find a good use for it. This post will probably be of no interest to most folks but if you were wirelessly charging your iPhone and it stopped working, try a hard reset. Also take a look at the link above.

Posted in General | Tagged | Leave a comment

Finite State Machines in Python

One of my favorite development strategies is using finite state machines. They’re not right for every type of problem but they have greater applicability than you might think. I’ve written several FSM-based applications almost always in C. C isn’t the only possibility, of course. You can write an FSM in nearly any language.

Arpit Bhayani has an interesting post that describes writing FSMs in Python. That language is fairly powerful and offers several possible implementation strategies but Bhayani suggests a particularly nice one: coroutines.

I think of coroutines as being the inverse of generators. Rather than having yield return a value and suspend executions as generators do, in coroutines, yield suspends the execution and waits for other code to send it a value. It’s very much like a blocking read.

Each time the FSM gets a new event, it sends it to the coroutine representing the current state through the send/yield mechanism. The coroutine uses the event to determine the next state and do whatever processing is necessary for the state transition. Bhayani offers several examples illustrating the technique. Take a look at the post for some actual code.

Posted in General | Tagged | Leave a comment

Two Clicks Needed for Menus on macOS

This is another one of those posts that are of interest only to folks using Emacs on macOS. For some time, the Emacs menus haven’t been working right for me on macOS. In previous versions of Emacs/macOS, there would be significant delay before a menu would activate. With Emacs 27.1/Catalina, it requires two clicks on a menu to activate it. I use the menus so seldomly that I’ve never bothered to investigate the matter.

Serendipity intervened, though, and I’ve discovered the cause of this problem and how to fix it. Well, actually, I did neither but st3fan complained on reddit about the problem and MorningtonCroissant explained that it’s a result of the Mac’s privacy control mechanism. The answer is to enable Emacs control of the computer—see the reddit post for the details.

That’s not the end of the story though. I already had this enabled and Emacs (or perhaps macOS) was still requiring two clicks. Onetom commented that it might be necessary to remove and add Emacs from the permission list because the permission might still be pointing at an old copy of Emacs. I did that and everything starting working just fine.

Again, this has low importance for me because I don’t use the menus much but if you are an Emacser on macOS and having problems with the menus, take a look at the reddit post and see if it clears it up for you.

Posted in General | Tagged , | Leave a comment

Typing and Bottlenecks

Today is one of those days when life intervened and I’m late in getting a post out. Life may be intervening tomorrow too so be warned. Today I saw an interesting post by Thorsten Ball that considers the argument that doing things to increase your typing speed or skills is a waste of time. The argument that it’s a waste of time says that as developers we spend a minuscule amount of time typing in code. That typing is not a bottleneck in our workflow.

That’s a beguiling argument especially if you’re not a good typist. What does Steve Yegge know anyway? As Ball points out, we may not spend a lot of time typing code but we do spend a lot of time typing other things: reports, emails, commits, and so on. He concludes that it all boils down to a matter of effort: if it’s an effort for you to type, it will adversely affect your work.

You can check out his post for the details of his argument but, really, we all know that we’re better off and can do a better job if our typing doesn’t get in the way.

Posted in General | Leave a comment

Zamansky 74: Eglot

Mike Zamansky is back with another video in his Using Emacs Series. It’s worth noting that this is number 74. That’s a huge corpus of first rate videos serving the Emacs community. If you’re in NYC and run across Zamansky, be sure to buy him a beer. He’s earned it.

In any event, the latest video is about Eglot, an alternative to lsp-mode. Zamansky was drawn to Eglot because he found lsp-mode hard to configure and, more importantly, too noisy. That mattered to him because he’s using it in his teaching and didn’t want all the popups to distract his students. With Eglot, the configuration was easier and the output wasn’t so busy.

It turned out to be pretty easy to configure for C++ an Python but, of course, Java was more difficult. But not too much more difficult. After a bit of research, Zamansky found an issue on the Eglot repository that resolved his issues with the Java configuration and now he has a consistent interface across C++, Python, and Java.

Take a look at the video to see Eglot in action. If you’re looking for an alternative to lsp-mode, take a look a Eglot. The video is just over 17 and a half minutes so plan accordingly.

Posted in General | Tagged | Leave a comment

Tracking Exercise with Org-mode

Polaris64 has a very interesting post about using org-mode to track his expercising. That doesn’t sound particularly interesting, I know, but read on to find out why I find it worth mentioning. If I wanted to track my exercising, the first thing I’d think of is to enter it into an Org-mode table. For historical or other reasons, Polaris64 keeps his exercise data as part of a more general daily journal.

The top-level heading is the date and under each date there are several second level headings, one of which is “Exercise.” Under Exercise there are third level headings that specify the type of exercise and its “value,” its duration or number of reps, for example. A typical entry looks like

*** Crunches 100

Now comes the interesting part: Polaris64 wanted to summarize the exercising entries into a table. Stop and think for a second how you’d do that. If you’re not intimately familiar with Org programming you’re probably envisioning something involving heavy use of regular expressions and loops. I’m not invoking Jamie Zawinski here; that seems like a reasonable solution but Org offers a better one.

Org has several built-in functions dedicated to parsing Org data and extracting information from it. Polaris64’s post details how to use these to build an efficient solution to his problem. That’s the reason his post is interesting. It offers an excellent go-by for dealing with Org data. If you need Org functionality beyond that provided by the UI, this information is really useful.

Posted in General | Tagged , | Leave a comment

Hyperbole

A while ago, Bob Weiner asked me to take a look at Hyperbole and maybe write a post about it. It’s been in my queue to do that ever since but Hyperbole is a large and complex system and every time I tried, figuring it out seemed too daunting so I kept putting it off. Then Weiner gave a talk about Hyperbole to the NYC Emacs Meetup and I thought the video would be a good introduction and help me figure things out.

The video did help but the system is much like Org-mode in that it does so many things it’s hard to write a short explanation. Indeed, the video is over and hour and ten minutes and still didn’t cover everything. The basic idea—as I understand it—is to provide a mode that manages the display, retrieval, and linking of text across all of Emacs.

The primary active object in Hyperbole is the button. These can link to a piece of text in the same or another file, a Web site, an Info file or many other similarly things. They can also initiate actions. You can, in fact, tie a button to a piece of Elisp and have it perform any arbitrary action. The capabilities are very rich and can be invoked from anywhere within Emacs.

As far as Irreal is concerned, any future posts about Hyperbole will be like those about Org: they will focus on one particular aspect of the system and how it solves some problem or another. Before that happens, though, I’m going to have to read the manual and actually use the system. There’s a lot to learn.

Posted in General | Tagged | Leave a comment

Amazon & Antitrust

A surprising number of people hate Amazon. I say “surprising” because I don’t understand their animus. Sure, they send us a huge amount of what amounts to spam, have an unfriendly attitude towards organized labor—at least as concerns their own labor force—and have effectively cornered the ebook market. But consider: if you’re a customer is their advertising a price you’re willing to pay to have reasonably-priced, needed staples delivered to you door in this time of COVID-19? If you’re an employee, are you happy to have a job to go to, even if—despite Amazon’s precautions—there might be some risk involved? Before you dismiss that question, ask a restaurant worker what they think. My life during the last few months would have been considerably more complicated without them.

Many people are advocating for the DOJ to take antitrust action against Amazon. Byrne Hobart has an interesting article that considers the case for this in his newsletter, The Diff. Such things are not really in Irreal’s purview but I think the article will be interesting to many Irreal readers. Hobart begins with a long section on how Amazon works and makes its money. It’s a lot more complicated than you probably thought. Then he discusses antitrust and why, according to current antitrust standards, Amazon is not a viable target. But, he argues, even though Amazon is completely innocent on paper they nevertheless feel as if they’re violating antitrust laws. The TL;DR is that for Justice to make their case they would have to press a novel interpretation of antitrust and that it’s by no means sure that they’d prevail. Still, Hobart believes that there’s a good chance that the courts might accept the novel antitrust standards and that Amazon might be found guilty of them.

There are two things about this article that I found particularly interesting and that make it worth reading. First is the explanation of how Amazon works. It’s really fascinating and probably not at all what you thought. The section on antitrust mostly discusses predatory pricing and that it’s a lot more difficult to get away with than you think. It’s really interesting even if you don’t care about economics or antitrust theory. Definitely worth a read.

Posted in General | Tagged | Leave a comment