Jonas Bernoulli Needs Our Support

When people talk about the killer apps of Emacs, they always mention two: Org Mode and Magit. They’re both uniquely Emacs apps—even though Org is seeping into other environments—and an essential part of the Emacs experience. For the working developer, Magit is a must-have. These days, Git is the default VCS and the absolute best interface—porcelain in Git-speak—is Magit.

Magit is maintained, and constantly improved, by Jonas Bernoulli (tarsius) who, unlike many open source developers, has no other job other than supporting his open source projects and who is completely dependent on community support for his livelihood. Due to a change in policy from GitHub, he is losing many of his supporters and is desperately in need of our assistance.

There are several ways of supporting him. He prefers, of course, a continuing pledge that you can arrange here but if you feel more comfortable with a one-time contribution—especially if you want to use PayPal—take a look at this page for some of the options.

It’s a scandal that large organizations that depend on Magit don’t step up to provide Bernoulli with a living wage but the majority of them don’t so it’s up to us. Most of us can’t afford significant recurring donations but we can make a one-time contribution even if it’s minimal. If you’re able, try to do that.

Posted in General | Tagged | Leave a comment

Is Remote Working Bad For Developers?

We here at Irreal strive for equanimity and maybe even a laid back attitude but sometimes the silliness just gets to be too much to bear. Case in point: Is Remote Working Bad For Developers? I’ve written many times that remote work isn’t for everyone and that some people really, really don’t like. I know some of those people and although I don’t understand it, I accept it as a fact.

But choosing not to participate in remote work is a lot different from claiming it’s harmful for all developers. Ben Hosking, in the above linked post, comes perilously close to making that exact claim. After listing the benefits of remote work—most of which are either scientifically measurable or at least involve asking actual developers—Hosking moves on to the “problems”. Some of them are just silly like the claim that remote work leads to a hamster wheel life of eat → sleep → code → repeat instead of the office work cycle of eat → sleep → commute → code → commute → repeat cycle.

A more substantive set of objections involve not leaving time for human interactions. That argument reminds me of the angst-ridden whining of the new Luddites about smartphones. The answer is the same: pull on your big boy/girl pants and show a little discipline. If you need time after work to decompress, there are other answers besides a commute. You could, for example, take a walk, pick up the kids, or stop into the local bar for some R&R.

Every hacker knows that if you want to get real work done you have to have uninterrupted time to do it without meetings or listening to Bob’s story about last night’s date. That’s why in the past—before remote work—they so often worked odd hours when other people weren’t there and now embrace remote work.

Most folks feel the need for contact with other people but, again, it’s just a matter of a little discipline. Arrange to have lunch with some friends or colleagues or even just hang out at the mall. Believe me, your life is not going to made better by a commute.

None of this is to beat up on Hosking who often posts interesting articles. It’s just that Irreal is over articles on remote work that sound like they were written by middle managers desperate to preserve their jobs.

Posted in General | Tagged | Leave a comment

Debugging With Org-babel

Wade Mealing has an interesting article on using org-babel for the analysis of Linux kernel bugs. Mealing is a Red Hat engineer and involved with tracking down problems in the Linux kernel. He has a more-or-less fixed procedure for doing this that is captured with Org-mode. The skeleton of the Org file is set with a template ensuring that he doesn’t forget anything and that the solutions to any past problems with the format of the file are carried forward.

His process reminds me of Howard Abrams’ Literate DevOps process (post, video) in that they both use an Org Babel file to capture both a narrative about the issue as well as the (executable) commands used to investigate/fix/implement whatever problem is being addressed.

Mealing’s problem is that each problem he investigates is tied to a particular Red Hat release and version so things like the file locations and build parameters vary between problems. Using a standard Org file helps him track all this, set the parameters once, and have their values propagated throughout the file automatically.

This is another great example of how you can use Emacs Org-mode and Babel to capture repetitive processes and, at the same time, document them, and make them exactly reproducible. It’s beneficial even for personal use. When you investigate how to do something complicated, you can document it as well as make what is in essence a script to repeat the process when the need arises again.

Posted in General | Tagged , | Leave a comment

Emacs Startup Time

FreeAd7233 has an interesting reddit post on Emacs startup time. He’s recently moved from Doom Emacs to his own configuration and is amazed at how quickly Emacs loads. It’s less than a third of a second on his local (Apple M1) machine and less than three quarters of a second on a VPS. That’s fast enough for all but the most anal but as I’ve said before, for me, at least, it doesn’t matter.

I was a long time Vim user and followed the usual procedure of invoking the editor whenever I wanted to work on a file. When I moved to Emacs many years ago, one of the hardest things for me was adapting to a new way of working: rather than start Emacs when I needed it, I simply left it running and switched focus to it when I needed it. Later, as Emacs became more central to my workflow, this wasn’t even an option. Of course I left it running because I was almost always in it.

So the point of this post—if there is one—is why should I care how long Emacs takes to start? I do it only once when I start my system or possibly when I upgrade my packages. You can even make this part of the boot process if you like but I’ve never felt the need.

Still, not everyone has my workflow. FreeAd7233, for instance, treats the idea of leaving Emacs running as a sort of strange idea practiced only by aliens. Even those folks who want to start Emacs on demand have a way of accomplishing that. Of course they do. It’s Emacs. You can simply start Emacs in demon mode and invoke emacsclient to popup a “new” instance when needed. Of course, it’s not really “new” because it still has your previous state remembered so it’s even better than a fresh start.

The takeaway is that there’s really no reason to obsess about Emacs startup time but, of course, folks still will. It’s just that it’s not a reason to avoid Emacs.

Posted in General | Tagged | Leave a comment

The Mark Ring

Vernon Grant over at Discovering Emacs has an interesting video on using the mark ring. Most Irreal readers already know about the mark ring but its exact operation is a little mysterious. That’s especially true about the global mark ring. When, exactly, are locations put on the mark rings?

Grant discusses these and other issues involving the mark ring. He gives his understanding of when entries are added to the global mark ring—a definitely mysterious set of rules—and some of the most usual events that cause them to be added to the mark ring.

Most of us know that you can visit the locations on the mark ring with Ctrl+u Ctrl+Space and the global mark ring with Ctrl+x Ctrl+Space. What I didn’t know is that by setting set-mark-command-repeat-pop to non nil you can type the first Ctrl+u Ctrl+Space or Ctrl+x Ctrl+Space for the first entry and then simply hold down the Ctrl key and press Space to cycles through the other entries.

The video is only 7 minutes, 14 seconds long so it’s easy to find time for it. Unless you’re already a mark ring expert, it’s definitely worth your time.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Props For Elon

Say what you want about Elon Musk but Irreal holds him in special regard because of a whimsical decision he made for SpaceX. Most observant folks know that Irreal is an admirer of Iain M. Banks’ Culture novels. Indeed, the name “Irreal” is from an idea in one of those novels as the banner at the top of every post hints. Those stories are about an advanced interstellar civilization in which “human beings” and sentient AI have equal status. There are several levels of AI intelligence, ranging from the barely sentient robots that performed routine chores to the super-intelligent “Minds” that ran the day-to-day operations of the Culture.

The Minds lived in—or perhaps had as their bodies—giant interstellar ships. The Minds, like Musk, had a whimsical sense of humor and gave their ships/bodies/selves quirky names such as So Much for Subtlety and Unfortunate Conflict Of Evidence.

One of SpaceX’s innovations is the ability to recapture and reuse their launch vehicles. The recapturing of those vehicles is accomplished by landing them on drone ships. Here’s a video of a recent recovery:

As you’ll notice, the drone ship is named Of Course I Still Love You. That name, like those of the other drone ships, was taken from the Culture novels. Take a look at the Wikipedia article on the drone ships for the other names. Musk has never made a big deal about this; he just named the ships and let those who knew where the names came from appreciate the humor.

For this alone, Musk deserves props from the tech community.

Posted in General | Tagged | Leave a comment

Leaving Deft for Vanilla Emacs

The title almost doesn’t make sense. After all, if you’re using Deft, you’re ipso facto using Emacs. James Dyer explains it in a way that makes sense. The TL;DR is that although he has been using Deft, he’s decided to use Org mode instead. He lists several reasons for this, which you can see in his post. The thrust of his post is that there’s nothing wrong with Deft but Org mode and the other built-in Emacs capabilities are a better fit for his workflow.

The reason I’m writing about this is Dyer’s last sentence:

“I think this is an example of over time learning that emacs has a lot of what you want already built in and with org mode it gently nudges you to organise files in a more coherent manner leading to a more simple agnostic digital way of life.”

That is, I think, a great point. Emacs has a multitude of packages that provide a huge amount of useful functionality but many times, everything you need is already there.The great thing is, when you need more, there’s almost certainly a package to give it to you. As always, Emacs has your back.

UPDATE [2023-02-26 Sun]: Added link to Dyer’s post.

Posted in General | Tagged , | Leave a comment

Webdriver

One of the most useful capabilities I have on my computer is the ability to capture the URL of the current page in my browser. That doesn’t sound too exciting but I use it many times a day when I’m writing blogs posts or annotating code, or doing anything else where I want to reference a Web page.

This is particularly easy on macOS as I’ve previously recounted. Since then, I’ve tried to find ways of doing this in other OS environments. None of them are as easy as macOS but I’ve recently come across something that may solve the problem once and for all. That something is emacs-webdriver.

It’s a way of controlling your browser from Emacs which is what Applescript allows you to do on macOS. If you’re an Emacs user and often want to incorporate a URL from your browser this is a real boon. You can, of course, switch context to the browser, capture the current URL in the title bar, and switch back to Emacs but it’s a lot easier to simply invoke an Emacs command with a key shortcut.

Webdriver is a general API that’s not restricted to Emacs and can do much more than simply capture the current URL or title of the current Web page. Even if you don’t need all its capabilities, just being able to grab a URL from your browser is a useful capability. Again, I use this capability everyday in macOS and it’s something you may want to enable it on your own systems.

Posted in General | Tagged | Leave a comment

EKG

No, not electrocardiogram, Emacs Knowledge Graph. It’s a small project by Andrew Hyatt that is best thought of as light weight Zettelkasten sort of like the popular Emacs applications Org-roam and Denote.

Take a look at the GitHub README for an explanation of the project. There’s also a shorter description of the application on reddit but the best explanation is this video on ekg that demonstrates the app and discusses the design. The video is just short of 46 minutes so you’ll need to schedule some time.

One way of thinking about the project is that it’s Hyatt’s attempt to overcome the limitations imposed by Org’s “everything is text” principal. A practical consequence of this is that explicit forward and back links get replaced by tags. This makes linking notes essentially automatic: if two links share a tag, then they’re linked and discoverable from each other. To make this idea more useful, tags can be multiple words. Everything, even the note text, is stored in an sqlite database so searching is fast and effortless.

The project is still fairly new—although it is in Melpa—and Hyatt is still struggling with some of the concepts but he’s been using it at work for several months and hasn’t found any problems. All of this is explained in the video and if you have any interest at all in the package, you should spend the time to watch it.

This looks like an interesting project and it’s one I can see myself adopting. It seems like an excellent way to keep a set of notes: it’s easy to add notes and to find them later.

Posted in General | Tagged | Leave a comment

Using Lisp

Anurag Mendhekar has an interesting post about why he uses Lisp and thinks you should too. He uses several different Lisps—Scheme, Common Lisp, and Racket—but boils down their essence to, “An s-expression based, dynamically typed, mostly functional, call-by-value λ-calculus-based language.”

Most of his post is an explication of each of those characteristics, including their advantages and disadvantages. Mendhekar takes a pragmatic view on each of them. While he believes they are generally the right thing, he understands that sometimes you want to violate them. He illustrates this most clearly, I think, in his discussion of statically typed versus dynamically typed languages.

Mendhekar is an advocate of dynamically typed languages and contra conventional wisdom makes a good case for them. That basically boils down to static typing seldom really helping make better programs but always getting in the way by enforcing rules that are so general that they often don’t make sense. The power of Lisp is that although it’s generally dynamically typed, you can make it statically typed when you need to. Take a look at Mendhekar’s post for a more nuanced explanation.

He also discusses how s-expressions eliminate many of the syntax related annoyances of “conventional” languages. There is no associativity or precedence rules to worry about. Everything is either a list or an atom: that’s all there is.

As many of you know, I spent most of my career hacking C but once I discovered Lisp, I didn’t want to program in anything else. If you’d like to explore Lisp, I think Scheme is the best place to start. Some folks recommend Clojure but Mendhekar avoids it for reasons he explains in his post. In any event, take a look at Mendhekar’s post for a good discussion of why you should be using Lisp.

Posted in General | Tagged | Leave a comment