They Don’t Want to Return

CNBC has an interesting article about large-organization CEOs’ frustration at trying to get their workers back into the office. Workers have little interest in returning. Part of that is fear of COVID-19, of course, but many, having experienced the freedom and increased productivity of working from home, are in no hurry to return to the more constrained environment of the office with its meetings and micromanagement.

The obvious observation is that maybe the CEOs are asking the wrong question. Most of them have spent their whole working lives in a well defined, perhaps even regimented, system in which of course employees came into the office to work. How could it be otherwise? But perhaps the right question is, “How can we get our jobs done with a remote work force?”

Meanwhile, over at Medium, CodeX says that the office exodus is a movement. This article is specifically about developers but the same principals probably apply to other disciplines. Senior developers are leaving companies to go out on their own. Those who are staying are demanding remote work as a sine qua non.

Managers who believe or hope that things will go back to the way they’ve always been are probably kidding themselves. COVID-19 will be with us for a while longer and even afterwards people are going to be loath to return to their cubicle farm—or worse, open plan office. The smart CEOs will be asking themselves how to best take advantage of the new reality.

Posted in General | Tagged , , | Leave a comment

Magit 3.3 Released

Tarsius (Jonas Bernoulli) has announced the release of Magit 3.3.0. The link takes you to his GitHub repository Change Log that has a detailed list of changes. If you want the TL;DR, you can check out his blog entry about the release.

The last link also has pointers to various ways of supporting tarsius’ work. If you’re a Magit user, you should really consider chipping in a few dollars to keep the goodness coming.

Posted in General | Tagged , | Leave a comment

Kitchin on Elisp Data Structures

John Kitchin has another video up on his Scimax Channel. This time, it’s about elementary Elisp data structures and their manipulation. He considers

  • Strings
  • Lists
  • Vectors
  • Alists
  • Plists
  • Hash tables

Strings aren’t really a data structure in the sense of the others but they are, in effect, character arrays and it’s possible to extract or insert data into a string.

The premier Lisp data structure is, of course, the list. After all, its name appears on the marquee. Kitchin describes the need and use of quoting and quasiquoting and various ways of accessing list elements. I’m not really a Lisp old-timer but I’ve been at it long enough that I still prefer the car and cdr primitives to the newfangled inventions such as first, tail, cl-first, and all the rest. If I need an element after the third or fourth, I’ll use nth or elt. Kitchin likes the cl-* constructs and as usual Emacs lets you have it your way.

Like me, Kitchin doesn’t use vectors very often and doesn’t have much to say about them but they are simple and easy to use.

Alists and plists are two variations on the same theme. They’re both lists of key/value pairs differing in their representation and access means. A good argument can be made that we don’t need both but they exist for hysterical raisons and Lispers tend to use them both.

Finally, there are hash tables. The idea is pretty well known by now although they are commonly called dictionaries in other languages. They are, again, key/value pairs but have a generally \(O(1)\) lookup time while alists and plists are \(O(n)\). That doesn’t matter for small lists but with hundreds or thousands of items the \(O(n)\) can add up so hash tables make sense for that case.

Even if you’re familiar with using hash tables in Elisp, you may not be familiar with using “reader notation” for initializing a hash table. It really makes sense only for small hash tables—or for writing out and then later reading in a hash table.

The video is just short of 26 minutes so plan accordingly. As usual with Kitchin’s videos, it’s well worth the time to watch it even if you’re an experienced Elisper.

Posted in General | Tagged , | Leave a comment

Inspired Python

All Irreal readers are, I’m sure, familiar with Mickey Petersen who, in addition to his excellent Emacs site, Mastering Emacs, is also the author of a book by the same name. The articles on his site are among the best you’ll find dealing with Emacs. The same is true of his book. If you don’t yet have it and you’re an Emacser, you should definitely get a copy.

Now Mickey has a new site, Inspired Python. Here’s his Twitter announcement:

I haven’t written in Python for some time but I read a couple of the articles and, of course, they’re up to Mickey’s usual high standards. If you’re a Pythonista, be sure to check it out.

Posted in General | Tagged , | Leave a comment

Emacs 28 Is Drawing Near

Eli Zaretskii writes that he’s cut the release branch for Emacs 28.1 in preparation for the upcoming pretest. He asks that everyone tracking Emacs development switch to the new branch so that it can get as much testing as possible.

Eli is anticipating that the first pretest will be released in a few weeks. If you’re like me, you want it right now but the reality is, as I’ve said before, that Eli and the other developers are working hard to give us the best possible release and in the end we’ll be glad we waited. In the mean time, you can help by compiling and using the release branch to help with the bug squashing.

Posted in General | Tagged | Leave a comment

REPL Driven Programming in Python

As many of you know, I’ve long been fascinated with interactive or exploratory programming—what some call REPL driven programming. It’s the idea that you write a bit of code and try it immediately by executing it to see what happens. You keep adding to the code and soon you have a function and then a program. The very best example of it that I know of is Kris Jenkins’ video on building a Spotify client for Emacs. If you haven’t seen this video, I urge you to take a look; you won’t be sorry.

When I think of interactive programming, I usually think of it in terms of a Lisp-based language such as Scheme, Common Lisp, or Elisp. There’s no reason, though, that you can’t bring the method to bear on any language that supports a REPL. David Vujic has an interesting post on applying the method to Python programming.

He starts by explaining what he doesn’t mean by REPL driven programming and moves on to what he does mean. The TL;DR is that he’s not talking about typing in a Python expression from the shell; he’s talking about interactive use from within an editor. If that doesn’t make sense to you, take a look at Jenkins’ video to see it in action with Elisp and Emacs. He spends the rest of the post explaining his setup and workflow. If you’d like to try out interactive programming but don’t know any of the Lisps, perhaps Vujic’s post will help you get started.

Posted in General | Tagged | Leave a comment

Org-mode 9.5 Is Out

Bastien writes to tell us that Org-mode 9.5 has been released. The big thing about the release is the new citation engine but there are lots of other changes too. You can see what’s in the new release by perusing the Change Log.

Org really is a jewel. The next time someone tells you that Emacs is old, dead technology, ask them why, then, all those other editors are so busy copying Org-mode and trying to port it into their own products.

Posted in General | Tagged , | Leave a comment

Make Scripts Executable Automatically

Bozhidar Batsov has a splendid tip over at Emacs Redux. I’m pretty sure he’s mentioned it before but it’s so useful it bears repeating. The tip is how to make scripts executable. “Scripts” means a file that has a shebang line. That is, a line that starts with #! followed by an application to execute.

The usual workflow is to write the script, save the file, and then change its permissions to make it executable. But it turns out that Emacs provides a better—or at least easier—way. The trick is to use the executable-make-buffer-file-executable-if-script-p command. It checks for the shebang line, makes sure that no execute bits are already set, and if not sets the execute bits respecting the umask.

The usual procedure is to call executable-make-buffer-file-executable-if-script-p from a hook function as described by Batsov in his post. If you’ve every written a script and tried to run it only to discover that it’s not executable, this tip will save you some time and frustration.

Posted in General | Tagged | Leave a comment

Easy Draw

The other day, I wrote about line drawing tools in Emacs. For those who like interactive systems, I mentioned ditaa, which takes an ASCII art diagram and turns it into a pretty PNG file. AKIYAMA Kouhei (misohena) has a project that offers a true visual drawing tool that runs in Emacs. Here’s a demonstration.

I haven’t tried it out yet but it looks pretty nice. The project is called el-easydraw. It’s not on MELPA and misohena doesn’t say whether he plans to add it but all the code is available on GitHub.

If you’re looking for a visual drawing tool for Emacs this is something you should definitely take a look at. It’s still early days for the project so it will be interesting to see how it evolves.

Posted in General | Tagged , | Leave a comment

Spanish Punctuation in Org-mode

The other day, I saw this tweet from John Cook’s TeX Tips Twitter account:

I was vaguely aware of this but had never thought much about it. Still, I do occasionally have a need for ¿ and ¡ so I wondered if it would work in Org-mode.

It turns out that it does if you use the TeX input method. I usually have that turned on for my blog posts so that the mapping --- \(\mapsto\) — works correctly. It turns out that it works in any text buffer, not just Org buffers. Now if I want an exclamation in Spanish, I can use !` to start it. ¡Perfecto!

Posted in General | Tagged , | Leave a comment