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

Covid Origin Phase Two Study Cancelled

WHO has announced that the planned second phase of their study to determine the origin of COVID-19 has been canceled. Exactly no one is surprised by this. The reason given for the cancellation is China’s refusal to provide access to their researchers and records although there are certainly factions in the U.S. with no appetite for exploring the question.

As I’ve said many times before, when I have my scientist’s hat on it’s currently impossible to come to a definitive answer regarding the genesis of COVID-19. If, on the other hand, I put my informed man-on-the-street hat, there’s a lot of cogent evidence pointing to a lab leak from the Wuhan Institute of Virology resulting from the gain of function research that was reportedly being performed there.

The cancellation of the phase 2 study is a further datum providing yet another reason for suspicion. A reasonable person could ask, “What are you afraid of having revealed?” As Paul Graham pointed out, the cancellation itself tells us a lot about the origin of COVID-19:

Again, none of this is definitive but it’s getting harder and harder for a thoughtful person to escape the conclusion that COVID-19 did indeed result from an accident in a laboratory performing gain-of-function research.

Posted in General | Tagged | Leave a comment

The History of Emacs

Over at Linux User Space, Leo and Dan have a short video giving a reasonably comprehensive history of Emacs:

They start with TECO and the infamous tower of Babel that grew out of every developer having their own set of macros leading Guy Steele and Richard Stallman to develop a standard set of Editing MACroS that everyone could use. From there, they trace Emacs’ development from a set of TECO macros to the current day GNU Emacs. Along the way, they discuss Gosling Emacs and its relation to GNU Emacs as well as the Lucid version that eventually became XEmacs.

The video is 14 and a half minutes long so it shouldn’t be too hard to fit in. If you’re freaked out by the warning about leaking your IP address in the Twitter link, just follow the above link and watch it on YouTube.

Posted in General | Tagged | Leave a comment

Org Mode For Project Breakdown and Estimation

Over at In a stream of Random Thoughts .. there’s an interesting post on using Emacs and Org mode for breaking down and estimating projects. The idea is that each new project is given an Org file that breaks down tasks to be performed, progress made on those tasks, and estimates for completing them.

This Org file is populated with Yasnippet to ensure uniformity and placed in a file hierarchy that reflects the state of the project. There are directories for active projects, pending projects, paused projects, and completed projects.

The breakdown in each project file serves as a basis for making estimates. Nothing can make time estimates easy, of course, but having a project broken down into its constituent parts does make it less of a burden.

Take a look at the post to see if some of its ideas could be useful in your own workflow. My takeaway is the advantage of using Yasnippet to initialize each project file to ensure that nothing is missed. By having to “fill in the blanks” you help avoid missing any important details.

Posted in General | Tagged , | Leave a comment

Is VS Code The Spiritual Successor To Emacs?

Vivek Haldar is a Python fan and considers Guido von Rossum “one of the best language designers of our time.” He was surprised, therefore, when von Rossum suggested in a Lex Fridman podcast that VS Code was the spiritual successor to Emacs. For many of us, that’s like lighting a stick of dynamite under our chair but Haldar considers the idea of VS Code being the spiritual successor to Emacs calmly and rationally.

Not surprisingly he disagrees. Von Rossum bases his assertion on the fact that VS Code and Emacs are both structured as an interpretive language engine at the core and the majority of the editor implemented in that language. In Emacs’ case, that language is Lisp. In VS Code’s case it’s JavaScript. Theoretically, that makes them both highly extensible but there’s a difference.

Haldar says that Emacs has two things that VS Code doesn’t:

Barrier-less extension
The idea that you can write some Elisp anywhere in Emacs, mark it, execute it with Meta+x eval-region, and have the effects take place immediately. If you like the changes you can add the code to your init.el and have its action take place every time you start Emacs.
Everything is a buffer
I’ve written about this before. As Haldar says, it basically means that whatever you do in Emacs, it’s in a buffer and subject to the usual Emacs editing and manipulation functionality.

I’d add a third Emacs advantage: Emacs is Free Software and not owned by anyone. I say that not as a true believing ideologue but as someone who’s been around long enough to know how Microsoft operates and to not trust them or their intentions. I worry that Microsoft will eventually revert to type and pull the rug out from under VS Code users.

In any event, Haldar reaches the same conclusion that I do: VS Code is not the spiritual successor the Emacs.

Posted in General | Tagged | Leave a comment

Xcape on macOS (Sort Of)

Yesterday I wrote about T V Raman’s post explaining how he uses the X Windows xcape command to provide extra keys and better ergonomics for Emacs. Raman has some nice ideas about improving the Emacs keyboard interface but they were, unfortunately, restricted to those using X Windows. That’s a lot of people, of course, but about a quarter of those who use Emacs are doing so on a Mac and Raman’s hack wasn’t available to them.

Jeremy Friesen to the rescue. Like me, he was intrigued by Raman’s post but unlike me he decided to do something about it. He had a head start because he’s a Karabiner-Elements user and Karabiner makes it easy to do the sort of thing described by Raman.

Take a look at Friesen’s post for the details. Not everyone will want to do this but if you think your workflow could benefit from overloading modifier keys to provide additional shortcuts and eliminate some chording, it’s nice to know it’s possible for Mac as well as X Windows users.

Posted in General | Tagged | Leave a comment