From Thunderbird to mu4e and back to Thunderbird

I spent a couple of days configuring Emacs as an email client in my MacBook. There are lot of useful pages available on how to achieve this. The setup involves using a program like `mbsync` or `offlineimap` to create and maintain a local copy of your emails accounts on your computer, and installing and configuring an email client like `notmuch` or `mu4e` in Emacs. (You’ll discovering along the way that there is no way to make `mbsync` work with Google’s OAUTH2 on MacOS.)

My goal in setting Emacs as an email client is to have a long-term client-side solution for email, one that works the same way on MacOS, Linux, and Windows. Also, my hope was that it would integrate better with my workflow, which involves heavy use of Emacs `org-mode` and `org-roam`.

While I enjoy the simplicity of `mu4e`’s text interface, and search is way better than Thunderbird’s search, rendering of html mails is suboptimal. There is probably a solution for this, it’s just that I’m not willing to dive into another time sink for now. So I’m falling back to Thunderbird until I have time to fix it.

Doom Emacs, Hunspell, and MacOs

Emacs, Python, and LSP (Language Server Protocol)

  1. I’m assuming you have `pyenv` and pyenv-virtualenv installed. If not, check here first. `pyenv` is great for using different Python versions for development, and managing virtual environments.

  2. For example, les assume you need to create a development environment for a project using Python 3.8.5. First, install Python 3.8.5 using `pyenv`: ``` $ pyenv install 3.8.5 (This may take some time…) ```

    Create a virtual enviroment named `pyproject` (or whatever you prefer) using Python 3.8.5.

    ``` $ pyenv virtualenv 3.8.5 pyproject ``` Create the project directory, and specify the virtualenv you’ll use for the project in the `.python-version` file.

    ``` $ mkdir ~/dev/pyproject $ cd ~/dev/pyproject $ echo ‘pyproject’ » .python-version ```

    Install the Palantir Python Language Server, and other dependencies.

    ```python $ pip install python-language-server[all] $ pip install pylint flake8 black pyls-black ```

  3. In your Emacs config… In Doom Emacs:

    • Modify your `init.el` file: tools: lsp lang: (python +pyenv +lsp) editor: format

    • Add `elpy` to your `package.el` file: ``` (package! elpy) ```

    • Run `$ doom sync` at the terminal and restart Emacs, or reload your Doom Emacs configuration using `=M=-x doom/reload`.

      (Take a nice screenshot of code completion, or an animated gif)

Other things:

Other things

A plan for grounding your feet

Anecdote: Google has announced it will no longer offer free space for Google Photos. Google’s announcement: https://blog.google/products/photos/storage-changes/

I’m starting a long-term journey to become less dependent on big tech companies' free offerings. Why?

  • With few exceptions, free services are either a bait to raise user adoption, or to convert the user into a product (for example, as a target for ads).
  • As time passes, companies review their offerings in the context of their strategy. While users may naively believe in Google’s “don’t be evil”, the reality is that Google is a public company, and it needs to deliver consistent results quarter after quarter. So, free products may get killed (as in Google Reader) so you visit more webpages and can be targeted with ads instead of reading their content ad-free. Or free photo storage may no longer be free, expecting that a portion of users will engage with paid storage.
  • While some tech companies start by leveraging adversarial interoperability, when they grow they shift to closed or controlled APIs, limiting your access to your own information on their clouds to their toolkit. While most of them allow you to download all your data in some kind of format, most of the time the information is not in a format that allows easy migration to other services.

Email

Email may be one of those services that we take for granted. More than 10 years ago, Google offered free mail accounts that could be linked, for free, to a custom domain. (You could also buy the domain from Google, which outsourced domain registration with a third-party) This free accounts where very attractive. You could create unlimited mail accounts for your domain, each was given 5GB of storage if I remember well. This was a great option for startups, small companies, and anybody who wanted mail with a custom domain.

It was around those years when using Gmail was the cool thing to use.

Some years later, Google decided it was no longer offering free accounts for custom domains. Existing users would be allowed to create up to 10 users for their domains. If they needed more users, they would need to subscribe to Google Suite, which at the time was around $5 per user per month. (If you migrated from free to Google Suite, you had to pay for all your users, not just for the 11th user onward.)

There are some serious free alternatives to mail and custom domains, like Zoho, but none that I know offer the polished interface and ease of use of GMail. Also, associating your custom domain with those services can be only described as… “non-trivial”. Also, Google’s security is superb, search works great, you can access it from any device you own. So, if you are a small business owner, you’ll probably consider paying the current $10 monthly per user for a Google Suite account and focus on generating sales and revenue instead of wasting time managing email configurations.

Even so, I’m considering some changes to my email setup.

  • I have more than 10 years of email in my personal account. That’s a lot of information. Even if casual conversations have in part shifted to some kind of chat/messenger, email still servers for more important conversations or things that require more explanation, attached files, etc. Even if I don’t think that Google will goof of with my email, I want an local copy of all my email.
  • This local copy should function as my personal mail backup (better if it’s encrypted, and I have redundant copies), and also to migrate to another service in the future. (GMail may be fine for now, but how about in five or ten years?)
  • Online privacy is shifting from an occasional issue to a more preponderant issue. Maybe Google will not sell data about you to third parties directly, but how about use it for targeted advertising? Or how about shuffling your mail to arbitrary folders to best serve their interests? For example, if you happen to subscribe to an email newsletter, chances are it will end in the ‘Promotions’ folder, skipping your inbox. Or worse. I’m administrator of two low-traffic Google Groups, and no matter what I do, GMail always flag the mails as SPAM. I wonder, how is that mail from another Google product ends up flagged as SPAM?
  • Maybe I’m getting old, but lately I’m becoming more convinced that if your data is in the cloud, then it’s not your data, it’s their data. You can’t control if your data is being mined, or if when you delete an email it actually gets deleted from your email provider’s servers and backups.

Some alternatives I’m considering, not necessarily exclusive:

Run my own email server in a VPS like Linode

I’ve been doing some experiments configuring an email server from scratch in a Linode VPS instance. It took some effort to get the pieces together, and it’s working fine. The main issue here is that even if my server complies with all requisites like SPF records and DKIM and passing their SPAM tests, Google sends my email to the SPAM folder.

I need to do some further tests, having an encrypted partition to store the email, having a backup strategy in place, and maybe implementing OAuth and two-factor authentication to interact with the mail server.

Hosting this system costs around $5 monthly. I get 40GB of space, sans the operating system, which would be enough for my email accounts. Also, I would be the sysadmin for this server, which is both a benefit and a cost in time and mind space.

Have a local copy of all my email accounts

Remove GRUB from MacOS boot partition

I’ve got Linux on an external SSD drive which I can boot from my Macbook Pro using Command-D while powering up to select Linux as the boot drive.

The only glitch is that when installing Linux, by mistake I installed GRUB (Linux boot loader) on my Mac root partition. The easiest way to fix this is to boot the machine into repair mode using Command-R and reinstall MacOS. This won’t erase your data or applications, just reinstall the operating system and rewrite the boot partition. (The process takes about an hour, so plan ahead.)

Is it Worth the Time?

I’ll copy this xkcd comic here so I can find when I fall into another Emacs org-mode time sink.

Source: https://xkcd.com/1205/

Sanderson’s Laws of Magic

Source: https://www.brandonsanderson.com/sandersons-first-law/

Sanderson’s First Law of Magic

An author’s ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic.

Books with Soft Magic systems are books where magic is included in order to establish a sense of wonder and give the setting a fantastical feel. Really good writers of soft magic systems very rarely use their magic to solve problems in their books.

So, the rule for soft magic systems is to use the magic for ambiance but never for plot.

With Hard Magic, the author explicitly describes the rules of magic. More, the magic itself is a character. By showing off its laws and rules, the author provides twists, worldbuilding, and characterization.

In this context, you can use magic to solve problems because the reader understands how magic works.

Sanderson’s Second Law of Magic

Limitations > Powers

What’s important to what heroes are is not what they can do, but what they have trouble doing. When designing a magic system, it’s very difficult to come up with a magical power that’s truly original. However, you can be original with the limitation. Example: in The Wheel of Time fantasy series, practitioners of magic draw forth “threads” of the Aristotelian elements –fire, earth, water, air, and spirit– and then “weave” the different powers into complex patterns, which then accomplish a goal. The limitation of the magic is that its practitioners must use skill and knowledge, and take time to create what they’re making.

Limitations on a magic system do several things:

  • Struggle, because it forces the characters to work for their goals. They have to be more clever to overcome their problems. They need to work harder. All this leads to more interesting scenes. The nature of the writing encourages better writing.
  • An excellent magic system will increase tension. Superman fighting an enemy with kryptonite is far more tense than Superman just fighting an enemy.
  • Limitations force you, as a writer, to create more depth to your world and characters. In this sense, even outside the fantasy genre limitations are more important than abilities.

Different kinds of limiting factors of magic systems

  • Limitations. There are things that, for one reason or another, the magic system simply cannot do. Every magic has basic limitations, defined as the limited scope of the power. (i.e., Superman can’t see through lead.)

Sanderson suggests that limitations be more encompassing than simple parameters.

  • Weaknesses are things that, rather than being things the power cannot do, enemies can exploit. In contrast to a limitation, a weakness lives your caracter vulnerable. (Again, the obvious example is kryptonite.)
  • Costs. Using magic or being associated with it has a cost. Costs can be abstract (in the Wheel of Times, men who weave magic end up going crazy), or concrete (you need a certain quantity of mana or something to make certain spell work).
  • Others. These definitions are about how you approach certain aspects of your magic system, and how you don’t allow yourself to take easy answers.
    • How does one gain access to magic? Stardard ways: innate magic and learned magic.
    • How is the magic powered? Mitigate the breaking of physics law by preserving of the laws of thermodynamics. Energy to power the magic has to come from somewhere.
    • How often can the magic be used? Do you need special implements (wands…) or a special state of mind?

The point is not to write more complex plots but to tell better stories. What your characters have trouble accomplishing in a plot is going to be far more interesting than what they can do easily.

Sanderson’s Third Law of Magic

Expand what you already have before you add something new.

This law challenges the writer to create deep worldbuilding instead of just wide worldbuilding. Even if one can enjoy stories with massive worldbuilding, intrincate worlds, and clever use of magic, you can make the story boring by overburdening it with too much expository worldbuilding. Often great storytelling happens when a thoughtful writer changes one or two things about what we know, then extrapolates purposefully through all of the ramifications of that change. Variants of this: one truly evil villain usually works better than lots of mediocre villains.

Three useful directions where you can expand magic

  • Extrapolate. Extrapolation is about asking “what happens when” questions. How do the changes you’ve made affect the world as a whole? The changes should be aligned with the story goal’s and length. Epic fantasy may touch history and economics. An urban fantasy may better focus just on one specific factor.
  • Interconnect. Sometimes this law can go too far. Having large list of powers can help create a more unique experience for your storytelling.

Try tying your powers, cultures and themes together. Tie them thematically, and ask yourself how they play into the themes of your novel. This will help you worldbuild and expand, instead of adding.

  • Streamline. Look over your cultures, magics, and even characters and ask yourself, “Where can I combine these?”

Conclusion: expand, don’t add.