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

The Biggest Problem with Org-mode

Here’s a pithy, yet accurate, take on the primary downside to Org-mode:

Posted in General | Tagged , | Leave a comment

An Advantage of Emacs Centrism

The technical side of the Internet is all atwitter about macOS suddenly refusing to launch non-Apple apps. The more excitable elements even suggested some dark plot on Apple’s part:

The truth, of course, was far more mundane. Apparently the rush on the part of Mac users to upgrade to Bug Sur, the Mac’s new OS, overwhelmed Apple’s IT infrastructure causing large delays in verifying the trustworthiness of third party apps:

As suggested in Johnson’s Tweet, the solution is to simply prevent your system from trying to connect to http://ocsp.apple.com until things settle down. The easiest way to do that is to blackhole it in your hosts file. You can find examples of doing that in Johnson’s thread.

I was surprised when I read this because I wasn’t having any problems at all. Then I realized that I very seldom use any third party apps (other than Emacs, of course). Since my Emacs runs virtually all the time, I didn’t have the need to launch it. The TL;DR is that since essentially all my work is done in Emacs and Safari I didn’t realize there was a problem. Yet another reason to put as much as you can into Emacs.

Posted in General | Tagged , | Leave a comment

Lean and the Mathematical Library of the Future

Over at Quanta magazine, Kevin Hartnett has an interesting article about using computers in the service of Mathematics. That’s nothing new, of course, but this isn’t about numerical methods or LaTeX, it’s about using computers to help develop mathematical proofs.

Even that notion isn’t new. There is, for instance, Coq, which has been doing the same sort of thing since 1989. What is new is that Mathematicians are trying to capture within another theorem prover, Lean, all known mathematics, or at least all of undergraduate mathematics. That’s a huge undertaking and they’re still only about half done. The hope is that with that knowledge, Lean will know enough to start help proving theorems.

According to the latest Mathlib Statistics, there are currently 19,305 definitions and 41,552 theorems in the system. You can, yourself, play with the system if you like. There are instructions for installing it on all of the usual operating systems or even for running it in a browser, although that will be much slower than a regular installation.

If, like many of us, you come from a Mathematical background, you’ll probably find the article interesting and may want to try the system out.

Posted in General | Tagged | Leave a comment

Weather Alert

Just a quick note that Hurricane Eta is in the area of the Irreal bunker and may interfere with posting. The current path calls for Eta to come ashore a bit north of Tampa as a tropical storm so we’re not expecting any real problems. Nevertheless, we will definitely see tropical storm winds and may lose power so don’t be surprised if I miss a post or two.

Posted in Blogging | Leave a comment

Adtech and Bad Data

If you aren’t in Marketing, it’s really easy to hate Adtech. It turns out that even if you are in Marketing, you should still hate it. The fact is, the numbers that Adtech produces are pretty much worthless. Although that’s sometimes mentioned in articles lamenting Adtech, it doesn’t get emphasized enough.

Jacques Corby-Tuech has a splendid rant on how marketers are addicted to bad data. Adtech is, he says, built on fraud and bad data. Corby-Tuech lists some of the reasons for that belief but, more importantly, he gives links supporting them. Of course, most Irreal readers don’t need convincing about all this but if you’re in marketing, his post might convince you to ask yourself what exactly you’re paying for.

Posted in General | Tagged | Leave a comment

Mu/Mu4e on Linux

It’s no surprise to anyone at this point that I really like the Mu/Mu4e mail client. It runs in Emacs, has excellent search capabilities, and is fast and easy to use. I run it on top of macOS and get my mail from my Apple and Irreal accounts but it’s really an Emacs app and should run on any system that can arrange to download email from an email server.

Emad Elsaid decided that he was tired of depending on the Gmail Web interface so he decided to handle his mail locally with Mu. He’s a Linux user (Archlinux) so his setup may interest other Linux users who want to move to Mu.

It’s sad, for the reasons described in my The Trial post, that Elsaid hasn’t abandoned Gmail altogether, just their Web interface. On the other hand, using Mu means that he has a local copy of his mail so even if Google accuses him of bad think™ and freezes his accounts, he still has all his mail and email addresses and will only have to deal with letting his correspondents know his new email address. My point, here, is not (just) to relitigate the lessons of The Trial post but to offer yet another reason for moving to Mu or other local mail client option.

If you’re a Linux user with a Gmail account and would like to switch to Mu, Elsaid’s post gives a nice configuration for doing so. He uses offlineimap to retrieve his mail from Google. It’s a bit easier to configure than the faster mbsync and is used by lots of folks so it’s a reasonable choice, especially for an individual account. All-in-all, it’s a useful post to get you started. If your experience is like mine, you won’t be sorry.

Posted in General | Tagged | Leave a comment

Dijkstra

Most Irreal readers probably know the name Dijkstra, if only from his famous letter to the ACM entitled “Go To Statement Considered Harmful” and his celebrated shortest path algorithm. In fact, Edsger Wybe Dijkstra was a giant in the field of Computer Science, A Turing Award winner, and a significant contributor to both the engineering and theoretical sides of Computer Science.

Krzysztof Apt has a long and interesting biographical article about Dijkstra in Inference. Although he was an astoundingly successful academic, Dijkstra didn’t do much formal publishing. Rather, he preferred to publish much of his work in private reports that he numbered consecutively and prefixed with his initials. There were 1,318 such reports totaling over 7,700 pages. He’d typically send photocopied copies of each report to about 20 colleagues chosen depending on the report’s subject matter.

Dijkstra was interested in formal methods and in particular about writing correct programs. He thought programming should be approached like Mathematics and that every program should come with a formal proof of correctness. He was, according to Apt, a friendly and personable man but his rigidly held views could be off-putting and were often interpreted as arrogance.

Apt’s article has many interesting vignettes from Dijkstra’s life including the fact that when he married he listed his profession as Programmer on the marriage license. The Dutch authorities rejected that on the grounds that there was no such profession. Most surprising of all, perhaps, is that the famous “considered harmful” phrase did not originate with him but was from Niklaus Wirth, an editor of the ACM at the time the letter was published. Dijkstra’s original title was “A Case against the GO TO Statement.”

If you have any interested at all in the history of our field—and, really, you should—you’ll want to read Apt’s article. It full of interesting facts you didn’t know.

Posted in General | Tagged | Leave a comment