WiFi In The Rain: An April First Story

I may have mentioned before that I always dread April Fools Day. The web is inevitably full of silly stories that start off making a bit of sense but quickly degrade into farce. Predrag Gruevski brings some welcome relief with his April Cools feature. It’s an April 1st feature that tells a typical April Fools Day story with the twist that it’s true.

This year’s story is about a WiFi connection that only worked when it rained. At the time of the story, Gruevski was a student who had come home between semesters to spend some time with his parents. When he got there, the Internet wasn’t working. When he asked his father about it, his dad told him that the WiFi only worked when it was raining. The story gains interest when we discover that his father is not some geezer with a flashing DVR clock but is, in fact, an engineer with extensive networking experience.

Gruevski solved the problem with a flash of inspiration. You’ll have to read his post to find out what was going on but it’s a good story and worth a couple minutes of your time.

I love stories like this. It reminds me of the 500 mile email limit. They’re unbelievable stories that you immediately write off as the ravings of the technologically illiterate but which turn out to be true.

Gruevski’s April Cools feature is a welcome respite from the usual April 1st nonsense. It’s almost enough to make me stop dreading the day.

Posted in Blogging | Tagged | Leave a comment

Compiling

I’m an old guy and I’ve been programming for a long time. Virtually all of that programming has involved using a compiler or an assembler. Until I dabbled in AWK, Perl, and Python and started using Giuile, my only use of an interpreted language was some early recreational use of BASIC.

From my very first programming language—FORTRAN (gasp) as an undergraduate Math student—I have been fascinated with compilers and the compiling process. In my career, I’ve implemented a bunch of little languages and even worked on a large scale compiler.

It would, therefore, never occur to me that any programmer would not understand what a compiler is or does. Not how they work—that’s a bit of a dark art—but just what they are and what they do. Apparently, in this as in so many things, I’m wrong.

Nader Naguib says that he’s seen a lot of beginners who don’t know about compilers so he published a short video on what they are and what they do. It’s doubtful that any Irreal reader is confused on the matter but if you have a junior colleague who is, this is a good two minute introduction. The video is biased towards the C/C++ languages but really applies to any language even if it doesn’t need a preprocessor.

Posted in General | Tagged | Leave a comment

The Reddits

As many of you know, I’m a big fan of Paul Graham. He’s the guy who got me interested in Lisp and, by extension, Emacs. There’s a bit of irony there considering that Graham is a Vim user and his writings are the proximate cause of me leaving Vim for Emacs.

These days, he apparently thinks of himself primarily as an essayist. You can check out many of those essays here. I just ran across another of his essays/posts on Y Combinator. It’s a sort of history of reddit as told from the Y Combinator point of view.

It’s an engaging tale. One surprising aspect of the story is that Y Combinator hated the first proposal from the two founders, Steve Huffman and Alexis Ohanian, and rejected it. But both Graham and his wife really like them and encouraged them to come up with another idea. Graham apparently suggested the reddit idea because of his experience with Delicious, a site that was a distant cousin of what reddit would become.

The rest, as they say, is history. Within a matter of weeks, reddit starting gaining users who regularly returned to the site. If you have a couple of minutes to spare, reading Graham’s post would be a good use for them. As I say, it’s an engaging tale.

Posted in General | Tagged | Leave a comment

More On Pangrams

Back in 2020, I wrote a post about the New York Times Spelling Bee puzzle. The TL;DR is that you’re given a list of seven letters, one of which is special. Solving the puzzle involves finding as many words as possible using the letters, possibly repeated. Longer words score higher and using the special letter gives you a bonus.

I didn’t have time to search for all the words but I did like to find the pangrams: words using all seven letters. I could usually do that fairly easily but I hated puzzles where I couldn’t find any pangram. So naturally I invoked my inner nerd and wrote some Elisp to find them. You can check the above post for the details.

In the meantime, the Times had stopped sending me the puzzle so I’d pretty much forgotten about it. Now Bill Mill has revisited the puzzle. He was interested in finding any pangrams that would get you to the highest scoring level all by itself. Unfortunately, he didn’t have enough information to solve that problem so he he decided to find the lowest scoring pangram instead. He wrote some Python to solve that problem. You can read all about it in his post.

Later, he discovered some of the missing information he needed to solve the original problem and wrote another post about it. Amusingly, with the new information it turns out that the worst—i.e. the lowest scoring—pangram is “fuckwit” but he was also able to find the best scoring pangrams. See Mill’s posts for the details.

None of this matters at all, of course, but it is fun to see how Emacs and Elisp (or in Mill’s case, Python) can be brought to bear to investigate the problem.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: Multiple Editors

Today’s topic is using multiple editors. There’s no reason this should be a red meat topic but it is. People on both sides of the issue think those on the other side are weird.

I’ve written about this before and those of you with long memories will know that I’m firmly in the single editor camp. There are two reasons for that. First, Emacs does everything I need so why would I bother with another editor and all the overhead involved with maintaining it? Second, I have muscle memory issues trying to use more than one editor. I know from previous Irreal discussions that many users don’t have that problem but after 17 years I still find myself trying to use Vim bindings so the last thing I need to do is introduce another editor into the picture.

A couple of months ago, PetriciaKerman asked on the Emacs subreddit if anyone else found it weird that some engineers used two or more editors. It’s interesting to read through the replies. After filtering out the ankle biting we’re lefts with two—equally legitimate—viewpoints.

There are those, like me, who say you should find an editor that works for your workflow and spend your time mastering it rather than investing in—and never mastering—multiple editors. deaddyfreddy put it nicely: “It’s not weird, it’s dumb. People are willing to spend time learning shortcuts/setting up multiple apps for doing the same task – text editing.” The other point of view is that you should choose the best tool for the job at hand. As one commenter pithily put it, “Ever notice plumbers use different kinds of wrenches?”

As I said at the top, none of this should be controversial. People should do what works for them. But, of course, it’s always fun to dine on red meat.

Posted in General | Tagged , | Leave a comment

Visualizing Data With Emacs And Gnuplot

I really like Gnuplot. It can produce most of the types of graphs that you’d actually want to produce and it’s reasonably flexible. That said, I hardly ever use it. It’s sort of a chicken/egg problem: on the one hand, I don’t use gnuplot very often because I can’t remember how to use its (semi-arcane) command language. On the other hand, I can’t remember the language because I seldom use it.

I just ran across a very short video from Anand Tamariya that shows the user selecting a rectangle of data, calling gnuplot-rectangle, and having a graph of the data be rendered by gnuplot. The video is only 35 seconds and doesn’t have any explanation. I was bitterly disappointed because it seemed like an easy way to use gnuplot for many of the cases I care about.

Serendipitously, I had another tab open in my browser by the author of the video that showed the code for gnuplot-rectangle and explained how to use it. There’s not much to do. You have to have gnuplot installed on your system, of course, and you also need to have the Emacs gnuplot package installed. That package is available from the Melpa and NonGNU elpa repositories so it’s easy to install. If you’re like me, you probably already have them installed.

The final piece is the gnuplot-rectangle function that Tamariya gives in his explanatory post. I haven’t had a chance to try it yet but it seems just perfect for folks like me that don’t need to draw graphs often enough to learn the intricacies of gnuplot.

Posted in General | Tagged | Leave a comment

An Explanation Of The Mark Ring

Arialdo Martini has a very informative post about the Emacs mark ring and how it works. On the surface, it’s pretty simple. The mark ring is a ring buffer that records positions inside a buffer—or several buffers in the case of the global mark ring—and allows you to return to or otherwise use those positions.

When you dig a little deeper, you find that there’s a lot more to it. For example, the mark helps define a region in an Emacs buffer and that fact can be leveraged to perform all sorts of useful tasks.

The mark ring actually stores markers to a given position so they are automatically adjusted if the absolute position of a place changes. Thus, you can, for example, push a position onto the mark ring, add text above that position, and still jump to where the mark was set even though its absolute position has moved.

In addition to allowing you to push positions onto the mark ring, Emacs will also record positions for you. For example, if you jump to a new position, your old position is pushed onto the mark ring. That allows you to do things like search for a symbol and then jump back to where you started. The exact rules for when Emacs pushes the mark onto the mark ring or global mark ring are a bit complex. This Irreal post discusses a video the explains some of those complexities.

The simple mark ring mechanism enables all sorts of useful functionality. Take a look at Martini’s post for some examples.

Posted in General | Tagged | Leave a comment

Casual: A Porcelain For Calc

Those of you who have been reading Irreal for a while know that I’m a huge fan of Emacs Calc. It’s tremendously flexible and comprehensive and it’s built into Emacs. But that comprehensiveness comes at a price: it’s very hard to learn its commands and they always prove evanescent if you don’t use them regularly. I’ve been through the manual a couple times and I still can’t remember how to use most of Calc. I almost always bring up the cheat sheet when I need to do anything more than the basic calculator functions.

Charles Choi to the rescue. We haven’t heard from Choi for a while and now we know why. He’s been busy building a porcelain for Emacs Calc. It’s a transient menu that helps you remember many of the esoteric Calc commands. When you get stuck, you can bring up the menu and navigate your way to the proper command.

Choi says that he’s not trying to provide full coverage of the Calc commands, just the most—for some value of “most”—used commands. You can read about his goals and non-goals at his post.

The package is on MELPA and although Choi doesn’t give the use-package recipe for installing it, here’s what I used:

(use-package casual
  :ensure t
  :bind (:map calc-mode-map ("C-o" . 'casual-main-menu)))

I just installed it so I don’t have a lot of experience with it yet but so far I really like it. The menu doesn’t appear until you invoke it and it disappears after you choose a command so it doesn’t get in the way. I can see this package making Calc more approachable and increasing its usage. If you’re a Calc user or would like to be, you definitely want to take a look at Choi’s post.

Posted in General | Tagged | Leave a comment

Emacs 29.3 Is Available

Eli Zaretskii writes to tell us that Emacs 29.3 has been released. It’s the first time in a long time—or maybe ever—that I can recall Emacs releasing a security update. It’s an editor, after all, what security issues could it have. The problem is that Emacs is not just an editor: it’s a complete operating environment and some of those files it works on can have active elements.

You can read about the specific issues that the update addresses in the NEWS file but they’re just what you’d think they would be. The fixes mainly tighten down on existing safeguards that prevent Emacs from executing possibly malicious Elisp.

As I always say, thanks to Eli and the other developers for their work on this release. It’s not the type of thing that gets a lot of notice and hosannas. It’s a simple security update: boring but nevertheless vital. That makes it all the more worthy of our thanks.

Afterword

Ihor Radchenko announced that there’s a corresponding update to Org mode so be sure to update them both.

Posted in General | Tagged , | Leave a comment

Prot On Note Taking

Protesilaos Stavrou (Prot) has published an excerpt from a conversation he had with someone asking his advice on Emacs and note taking. The TL;DR is that his correspondent is a Vim user who is considering changing to Emacs for the advantages it offers for note taking. He is asking Prot how to proceed.

Prot’s advice is eminently sensible: Start slow. Use Org mode to begin with and add other packages only when you find you need them. Specifically, he advises using a single notes.org file with a heading for each note. Each note can have, or accumulate, additional subheadings as required. He also recommends setting the file to open with only the headings displayed. Folding is one of the strengths of Org mode and helps keep you from being overwhelmed by the available information.

His best advice—in my opinion—is to concentrate on the notes themselves rather than on the mechanics of taking them. He encourages note takers to spend time on writing purposeful and coherent prose so that when you read them later you will understand what they’re about and what your thinking was at the time. He also suggest linking new notes with previous notes where it makes sense. That, of course, is the basis of the Zettelkasten method, which Prot says he hasn’t studied and doesn’t necessarily recommend unless you, too, are genius workaholic like Niklas Luhmann. Better, he says, to start slow and find a system that works for you.

If you take notes, in Emacs or elsewhere, you should definitely take a look at Prot’s post. It has a lot of good advice without insisting that you use a particular piece of software.

Posted in General | Tagged | Leave a comment