Emacs Should Be Emacs Lisp

Back in February at FOSDEM 20, Tom Tromey gave a very interesting talk of how he believes the core of Emacs should evolve. He considers most of the current proposals such as Rmacs, Guile Emacs, and rewriting the core in common Lisp but ultimately rejects them. Emacs, he says, should be written in Elisp, a language that Tromey believes is much better than popularly believed.

He starts by discussing why he rejected the other solutions. The basic problem with them is that they either don’t solve the problems with the C-based core or introduce what he calls impedance mismatches that will introduce bugs and make maintenance harder. Then he notes that Common Lisp implementations are written in Common Lisp and that there’s no reason that Elisp couldn’t be written in Elisp.

Such a step would make solving some of Emacs’ other problems easier to fix. Threading and garbage collection would become much simpler than they are now. Also, packages would be able to affect the core in the same way they affect the rest of Emacs now.

Tromey’s preferred solution is to compile the Elisp into native machine code. He considers a couple of ways of doing that: using a JIT compiler and, my favorite, gccemacs. The benefits of such a system is that you get native code speed while still having the development advantages that he discussed earlier.

It’s a great talk about a future for Emacs that I hope comes to pass: An Emacs that’s faster and easier to hack. What’s not to like? The video is 19 minutes long so it will take some planning but should be easy to fit in.

Posted in General | Tagged | Leave a comment

The Worst Passwords of 2020

We haven’t done this for a while but it’s time, once more, for a survey of the year’s worst passwords. Sadly, the only real question is, as usual, whether 123456 or password heads the list.

This time password has inexplicably dropped to fourth place, leaving 123456 to take the top spot. The full list of 200 passwords reports how many times each password was used, how many times it was exposed, and estimates how long it would take to crack it. It’s interesting to browse through the list. At first glance, some of the more common passwords, like senha at number 10, are not that obvious—although still easy to crack. Senha, it turns out is the Portuguese word for “password” although for some it may refer to a popular Indian actress. Regardless, ten seconds later you’re p0wned. The most “secure” password—estimated to take 12 days to crack—was x4ivygA51F. It’s number 148 on the list and no one knows why it’s so popular (18,267 uses) or where it comes from. There’s some speculation on 4chan if you’re interested.

I know I’m yelling at the wrong group but for the love of Cthulhu please, please start using a password manager that generates long random passwords. And tell your Aunt Millie to do so too.

Posted in General | Tagged | Leave a comment

A Free Blog with Org and GitLab

Ravi Sagar has an interesting video that shows you how to publish a free blog to GitLab using Org-mode. The result is a static Web site, of course, and Sagar’s example is very simple but you can use CSS to build out a prettier result if you like. One of the strong points of his approach is that you don’t need anything but Org-mode and GitLab so it’s a minimal solution and avoids the configuration and maintenance of third party software such as Hugo, Jekyll, or one of the other blogging packages.

Sagar’s process starts with Org-publish. He shows how to configure your blog structure and then to generate the blog itself by simply calling publish. That gives him a local copy of his blog that he can check before pushing the results to GitLab to make it publicly available. To do that, Sagar simply uses git but you can, of course, just move it manually.

If you don’t have any CSS skills, you may find Hugo or Jekyll a better bet because you can choose a prebuilt theme. On the other hand, using one of those packages means you have to configure them too and abide by or work around the restrictions that they impose.

Regardless of your choice, Sagar’s video shows you how easy it is set up an Org-based blogging workflow and post to the blog easily all from the comfort of Emacs.

Posted in General | Tagged , | Leave a comment

Coding Fonts

I like looking at programmers’ fonts. Every time I see one announced or mentioned that I didn’t know about, I have to take a look. It’s rather odd, then, that I’ve been using the Inconsolata font since before I became an Emacs user: probably for about 20 years. I originally switched to it because it was an antialiased font and looked much better than the default font on the xterm I was using at the time.

If you also enjoy a bit of programmer font porn, there are a couple of sites you can check out. The first, Coding Fonts, has a collection of 32 fonts for you to browse and enjoy. It has several ways of displaying the fonts:

  • The set of character
  • In some HTML
  • In some CSS
  • In some JavaScript

The second site, Dev Fonts, lists 30 fonts that can displayed in a number of languages and themes. There’s only a little overlap with the Coding Fonts site so it’s worth taking a look at both sites.

If you’re on the lookout for a new coding font or just enjoy looking at and comparing them, these two sites are definitely worth spending some time on. Both sites have links to the font themselves so if you like one, it’s easy to get it.

Posted in General | Tagged | Leave a comment

A Nineteenth Century Emacs

One of the enduring memes in Emacsland is the picture of a huge pipe organ console labeled, “I finally got my Emacs set up the way I like it” or something similar. It keeps reappearing as n00bs discover it and can get a little tiresome.

Here’s a slightly different and perhaps less stale meme: Emacs as a Swiss Army (like) knife. It’s not really red meat but today is Friday so it seems appropriate.

Posted in General | Tagged | Leave a comment

Sudo by Touch ID on Macs

This post is just a quickie for those of you using a Mac with Touch ID. My latest MacBook Pro has Touch ID and I was surprised at how much I like and use it. It’s especially handy for 1Passowrd where I have a long and hard to type password. One place it doesn’t work is when I invoke sudo. Of course, I’ve never been able to invoke sudo with Touch ID so it’s not like anything has been taken away from me but I still irrationally feel like it’s a deprivation. I know, I know. A first-world problem if ever there was one.

Dan Moren to the rescue. Over at Six Colors, Moren has an article that explains how to enable Touch ID for sudo. It turns out that all you have to do is add a line to the sudo file so it’s easy to do. If you’re a spoiled, first-world, Mac user like me, you should take a look at Moren’s article.

Posted in General | Tagged , , | Leave a comment

Batteries Included

One of the frequent complaints you hear about Emacs—generally from people who don’t know what they’re talking about—is that it’s unusable out of the box. I know that’s not true because when I started using Emacs about 13 years ago it was plain old vanilla Emacs without any packages. My first customization was to change the default C-style from kernel style to (I guess) BSD style and I didn’t tweak it much after that for some time. After a while, all that changed, of course, but I was reasonably productive with vanilla Emacs and only slowly made it mine with customizations and packages (my current init.el is 2312 lines long).

It’s a commonplace among Emacs users that you never learn it all and are always discovering something new. After a decade and a half that doesn’t happen as often as it used to so I was surprised by Karthik Chikmagalur’s post, Batteries Included With Emacs. Chikmagalur agrees with me and lists of some little-known, built-in features that he uses. My surprise stems from the fact that I didn’t know about several of the features he lists.

Have you ever heard of pulse? Or View Mode? Or upcase-dwim and downcase-dwim? I hadn’t and there were some others too. Take a look at Chikmagalur’s post. If you know every feature he discusses, you can count yourself an Emacs Wizard.

Posted in General | Tagged | Leave a comment

Leanpub Publishing with Emacs

I’ve written about publishing with Leanpub before. They have a very nice workflow that allows an author to upload and publish a book with minimum friction. You can learn some of the details here.

Four and a half years after my post, Phil Newton has another post on using the Leanpub workflow to publish a book. He’s an Emacs and Org guy so of course he wanted to use Emacs. Leanpub has its own version of Markdown so Newton used that. There is, as you’d expect, an Org exporter to the Leanpub Markdown so he could have written in Org but this is is first book so he wanted to keep the workflow as simple as possible.

His post discusses his workflow, how he tracks progress and work in progress, and how he manages and publishes changes. The basic Leanpub workflow is to put the chapters of your book in a directory and to upload that directory to Leanpub when you’re ready to publish. You can also do that through Git so Git users will find it particularly easy to manage the source of the book.

There’s also a nice example of using directory local variables to automatically configure each file with his desired writing environment. Like many of us, Newton discovered that his writing life would be easier if he enabled visual-line-mode so he simply set a directory local variable to enable it for all the book’s source files. Take a look at his post to see some of the other directory local variables he uses; it’s informative.

If you’re working on a book or thinking of doing so and like what Leanpub offers, take a look at Newton’s post to see a good workflow for working with them.

Posted in General | Tagged , | Leave a comment

Emacs Indentation

One of the darker corners of Emacs that always seems to cause problems for n00bs and old-timers alike is indentation, tabs, and spaces. When I started, I somehow stumbled onto a configuration that worked for me and I haven’t touched it since. I mostly treat it as a magic spell.

Fortunately, Doug Beney has a post that sheds some light on the matter and that can help you set up your own configuration whether you worship in the Church of Tabs or the Tabernacle of Spaces. Beney prefers tabs and show a complete configuration that enables them for certain types of files but his post explains how to use spaces if you prefer.

He also explains things like how to get backspace to delete whole tabs instead of doing it a space at a time, how to get electric indent to behave sanely, and even getting tabs to behave correctly in Python. Another interesting feature that he implements is displaying a tab as a low-light pipe symbol. Not everyone will like that, of course, but if you think it could be useful, Beney shows you how to do it for both light and dark themes.

Beney’s post is from 2018 but somehow just popped up in my feed. The advice is still good and if you’re looking for a way to finally get indentation the way you want it, take a look at his post.

Posted in General | Tagged | Leave a comment

Asimov on Science and Superstition

I recently came across an old video of Isaac Asimov being interviewed about his thoughts on science, rationality, and superstition. It’s from 1988 but, sadly, still relevant today. Much of Asimov’s discussion concerns his thoughts about religion but that’s not the part that resonated with me. He also discussed the usual new age nuttiness like astrology—which is hardly new—and all the rest of it. Again, that’s not the part that concerns me.

What did resonate with me was his lamenting the rejection of science on the part of some people. You still see some of that from fringe religious groups like the creationists and others. That’s unfortunate but, again, not what concerns us here.

Rather, it’s the rejection of science for political reasons that should concern us. If you’re thinking, “Yeah, those guys on the other side should knock that off” you’re missing the point. Both sides of the political divide are guilty. Some on the right are all too happy to reject science if interferes with some political belief. A recent example is the inexplicable refusal to wear masks during the pandemic despite clear scientific evidence that they protect not just others but the wearer. Even though it’s a life and death issue, they’d rather hold firm to their political dogma than listen to what science has to say on the matter.

Those on the left aren’t innocent either. They’ll happily suppress scientific findings and punish the scientists responsible for them if they believe they contravene the progressive narrative. They take to Twitter to get the transgressors fired and make them unemployable. It’s not that they don’t believe the science, they simply think that it’s dangerous to permit scientific findings that challenge their received wisdom.

All of these people are dangerous and should be excluded from a polite and rational society. It’s too bad we still have to talk about this after Asimov made such a convincing case for embracing the rational.

Posted in General | Tagged | Leave a comment