🥩 Red Meat Friday: A Case For Journalists

In a previous Red Meat Friday post, Irreal pondered whether politicians or journalists are the least respectable profession. It’s still an open question and while most people would probably declare politicians the winners, John Gruber has a post that provides compelling evidence for journalists.

Gruber’s post is a scathing takedown of a Wall Street Journal article entitled Inside Apple’s Spectacular Failure to Build a Key Part for Its New iPhones. The article is pay walled but Gruber’s post tells you all you need to know.

The article is about Apple’s “failure” to have their own 5G modem for the iPhone ready in time for the iPhone 15. The article claims Apple was still testing their modem just months ago. Anyone who knows anything about the Apple manufacturing pipeline, knows that that’s nonsense. Hardware for Apple products are set years in advance, not developed at the last minute.

The journal article has plenty of other nonsense, too. Read Gruber’s post for the details but there are a couple observations that even Irreal can make. First, this is the Wall Street Journal, not some sketchy NetZine. The Journal is arguably the best and most reliable paper in the country and there’s really no excuse for shoddy work like this.

Second, Gruber makes the case that the article is not just wrong but deliberately so. It is, he says, an obvious hit piece with conclusions so silly that no sensible person would accept them.

You all know that Irreal is an Apple shop but this is not fanboyism. It’s not even about Apple. It’s about a serious paper abandoning journalistic excellence and perhaps even ethics. Politicians should be worried: they have some serious competition.

Posted in General | Tagged | Leave a comment

Cybernetic Productivity and Emacs

Victor Dorneanu has an interesting post on Cybernetic Productivity and Emacs. Like Dorneanu, I was unfamiliar with the term but it has, apparently, been around since the early 2000s. It’s a strategy for dealing with your workload in the digital age. The TL;DR is summed up by its four principals:

  1. Automate and Speedup shallow tasks.
  2. Keep the information you need at your fingertips.
  3. Remove friction from communication.
  4. Simplify the extraction of actionable information from raw data

Dorneanu notes that he learned all this from Cal Newport, whose work he follows fairly closely. Newport, though, says the cybernetic productivity approach doesn’t work because, if I understand his argument, we’re too overwhelmed with work to have time to follow the principals.

Dorneanu disagrees and offers his use of Emacs as a counterargument. His post details how he used the four principals—except, maybe, the communication part—to write and publish his current post. The important part is that he did it all within the unified environment of Emacs. He lets Emacs handle the routine parts of publishing a post and uses Elfeed to easily retrieve the necessary required information.

Finally, he notes that the recent integration of Emacs with the various AI/ML services provides a very nice and efficient way of sifting through data looking for the wheat among the chaff. I’d judge that more promise than fact right now but I do take his point.

Posted in General | Tagged | Leave a comment

Using Gnuplot With Org Mode Tables

James Dyer has an interesting post on using Gnuplot to plot data from Org tables. Gnuplot is my go to utility for plotting data but its syntax is, to put it mildly, convoluted and since I don’t use it all that often, it’s always a struggle to get a working graph. Dyer’s method seems less complicated—at least for simple cases—so it’s worth taking note of how he did it.

This post is mainly a note to myself but other occasional Gnuplot users who want to produce graphs from the data in an Org table may find it useful too. The TL;DR is that you specify a #+PLOT: line for the table that lists the parameters for the graph you wish to plot.

As Dyer illustrates, you can also easily produce a bar plot within the table itself with the orgtbl-ascii-draw command. It’s use is pretty much self explanatory from Dyer’s post but it’s also documented at the #+PLOT link.

Dyer’s post is short but has a surprisingly useful kernel. It’s definitely worth taking a look at it if you ever need to plot data contained in an Org table.

Posted in General | Tagged , | Leave a comment

Periodic Reminder: Emacs Bindings in macOS

Once again, as is occasionally the happens, I’ve stumbled across an Emacs user who discovered that some Emacs keybindings work in macOS. This user, sudeenhux, realized that he could navigate in the Apple Mail app with the normal Emacs bindings. He had no idea what was going on and took to reddit to ask what he had done to enable this. When reddit told him this was built in to macOS and worked with all macOS applications, he was overjoyed.

The thing is, of course, that what sudeenhux discovered is only half the story. As I’ve reported many times before—most recently here—macOS lets you configure your own bindings for its navigation commands. That would be a pain if you had to do it piecemeal but the way it works is that you put the bindings in a file and everything happens automatically. Even better, someone has already done the hard part and produced the file so all you have to do is download it and install it in the proper place. All the details are in the above link.

As a bonus, I recently got tired of not having Ctrl+Delete work in all macOS apps so I added an entry to enable it. That shows how easy it is to add your own bindings, assuming, of course, that macOS has a command that supports it.

I’m always surprised that so many people don’t know this so I like to remind everyone once in a while. Some of you may be tired of hearing about it but to those who don’t already know, it’s a revelation.

Posted in General | Tagged | Leave a comment

Navigating In View Mode

Emacs view mode is one of things that might seem superfluous at first glance. After all, you can always just visit a file and use the normal navigation commands to view the file. But there’s a lot to be said for a read-only file viewer—think less, more, or other pager utilities—that let’s you page through the file without worrying about accidentally introducing a change.

The normal view mode protocol is to use Space and Delete to scroll forward and backward like Ctrl+v and Meta+v do. It’s a nice and convenient way of viewing a file that you don’t want to edit.

Charles Choi agrees with all that but wants a richer protocol. For instance, if he’s in an Org file, he’d like the movement to be forward and backward to the next heading. Once you make that leap, you realize that other file types could also benefit from specialized navigation commands. He has a post that explores the idea of file type naviation in view mode.

He presents some code to do this for several file types and it would be no problem to add other file types as well. Even if you don’t know Elisp, it would be easy to follow the cases he presents to add your own.

View mode is an underused feature of Emacs and Choi’s enhancements make it even better. Take a look at his post and see if you don’t agree.

Posted in General | Tagged | Leave a comment

New AWK Book

Long time Irreal readers know that I’m a fan of the AWK language. Whatever OS you’re using, AWK is sure to be available. It’s installed by default on all Unix/Linux systems and may be on Windows as well. Linux systems probably use gawk by default but even it’s usually linked to awk. There is, in any event, at least one version for your system.

A year ago, I wrote about a Brailsford & Kernighan video where they talk about AWK and how Kernighan was updating it to support Unicode [1, 2]. Kernighan mentioned that as part of that effort he was updating the AWK book. The original book was written 1988 and while you can still get it, the price is exorbitant. Now that work is completed and the new book will be released on 2023-10-01. That’s good news for younger engineers who don’t have $100 to spend on the original.

I haven’t seen the new book, of course, but the original was excellent. Towards the front of the book they had a series of AWK one-liners that performed all sorts of useful tasks. Kernighan has said that he, Aho, and Weinberger had imagined that that was the way the utility would mostly be used but it’s been used for all sorts of more complicated programs, often by Kernighan himself. You can see some of those at the book link above.

I think it’s wonderful that AWK, a program dating from the 1970s, is still under development and that there’s a brand new book documenting it and its use.

Posted in General | Tagged | Leave a comment

Batch Mode

If you’re an even moderately experienced Emacs user, you probably know about batch mode. You can write a file with some Emacs commands and run it either by calling Emacs on the command line with a --script parameter pointing to the file or by adding at #! line to the top of the script and running it by calling the script directly.

Emacs Elements has a short video on batch mode that describes a use case I hadn’t seen before. The video is only 5 minutes, 45 seconds so you can watch it to get the details but the TL;DR is that you can use batch mode to check a changed init.el file for errors.

The idea is that you use batch mode to load the modified init.el file. If there are any errors, you get notified but your active Emacs instance is still operable. It’s preferable to just restarting Emacs because if there’s a disabling error, you still have a working Emacs to correct it. Sure, you could always restart Emacs with a -q or -Q option but then you don’t really have a fully operational Emacs to work with. That happens to me a lot when I have an error in my init.el. I can get by, of course, but it’s a pain. With Emacs Elements’ method you still have your familiar and comfortable working environment available.

Posted in General | Tagged | Leave a comment

Live In Emacs Or Die

Today, we have a bit of humor that we can all relate to. Reddit has a post announcing the Web browser NYXT inspired by Emacs. I don’t know anything about NXYT but I did love this comment from noooit:

Comment
byu/evlogii from discussion
inemacs

Those of us who live in Emacs will relate. The rest of the universe will wonder what in the world we’re talking about.

UPDATE [2023-09-23 Sat 15:04]: NXYT → NYXT.

Posted in General | Tagged , | Leave a comment

Kitchen Sink

It’s often said of Emacs that it includes everything including the kitchen sink. Indeed, there’s even an Emacs logo reflecting this sensibility. I don’t know if it was ever an official logo but its use is widespread. Still, it would be easy to dismiss the notion as a bit of Emacs fanboy hyperbole.

Gopar has a short video that provides compelling evidence that Emacs does, indeed, include the kitchen sink and everything else. The video demonstrates two builtin functions. To say that they are obscure and little used would be an award winning understatement.

The first is a function that translates to and from Morse code. Just in case you want to know what “Emacs is amazing” looks in More code, Emacs has you covered:

./--/.-/-.-./... ../... .-/--/.-/--../../-./--.

The second functionality is to render text in the phonetic alphabet. I’m familiar with this from my pilot days, where it can increase clarity in radio communications, but didn’t expect to find it in Emacs core. If you want to know how to spell Emacs in the phonetic alphabet, here you go:

Echo-Mike-Alfa-Charlie-Sierra

Emacs calls this the “NATO alphabet”. I’ve never heard it called that before but whatever you call it, Emacs can render text into it and, of course, go in the other direction as well.

Again, these functions are builtin, not packages. They make the current agonizing over whether or not to add actually useful functionality to Emacs core look positively silly.

Posted in General | Tagged | Leave a comment

Zamansky: Learning Elisp #10

Mike Zamansky has popped in with another Learning Elisp video before he departs on his vacation. He didn’t want to start the next project and leave it hanging while he was away so this video covers some preliminaries. In particular, he covers some Elisp builtin data structures. That includes lists, pairs, vectors, hash tables, and association lists.

Vectors and hash tables have direct analogs in other languages and are probably familiar to all Irreal readers. Lists are simply linked lists and although they don’t have a builtin analog in most other languages, the idea is a common and familiar.

Zamansky explains how lists and pairs (single, unlinked cons cells) are implemented and then goes on to discuss the data structure that he’s planning to use in the next project: association lists. They’re sort of an intermediate structure, a bit like hash tables but lighter weight and not as fast. They’re the ideal key/value lookup method for small tables. It’s \(O(n)\) instead of the \(O(1)\) that hash tables provide but it’s perfect for relatively small lookup tables.

The next project is going to be about inserting emoji into a buffer and Zamansky is planning on using an association list to map the emoji name to the actual symbol. We’ll have to wait until Zamansky gets back from Europe for that but we can consider this video a teaser.

The video is 16 minutes, 16 seconds long so plan accordingly.

Posted in General | Tagged | Leave a comment