Mac Died

My 2012 model iMac died suddenly with a fatal drive error. Apple cannot repair it, and I’d been looking for an excuse to get a new computer. I had hoped that they’d come out with a 27” iMac, but no such luck.

I ordered an M1 MacBook Air from the expensive side of the menu, 16GB memory, but only 1TB of storage, which is plenty for my porpoises. It arrived ahead of the predicted date, which I think Apple does on purpose, and the initial setup went rather smoothly, since you can just point it at another Mac. Sort of. I wound up plugging them together or something, because my old Air wasn’t visible over the network / bluetooth / magical whatever connection.

Then one enters the tedious part of making things work. The biggest thing was my Jekyll installation for building ronjeffries.com. We’ll cover that below, but first let’s talk about Sublime text.

Sublime Text

I’m running Sublime Text 4. To bring it up to my standard, I did the following:

Install “yaml” snippet

<snippet>
	<content><![CDATA[
---
date: "2021-MM-DD"
title: "TITLE"
blurb: "BLURB"
categories:
- Agile-Related
- 
---
]]></content>
	<tabTrigger>yaml</tabTrigger>
</snippet>

Use Tools / Developer / New Snippet, edit as above, Save. Sublime will be pointing to the right folder. Give the file a name ending in sublime-snippet. Mine is yaml.sublime-snippet.

Install Package Control

This is the package manager for Sublime and is not autoo installed. Bring up the Console thing, Command-Shift-P, and do Install Package Control

Install InsertDate

Using Package Control / Install Package, install InsertDate. It will display some instructions in Package Control Messages:

Package Control Messages
========================

InsertDate
----------

  InsertDate
  ==========

  Inserts the current date and/or time according to the specified format,
  supporting named timezones.


  Key Bindings (and Examples)
  ---------------------------

  Open the Command Palette and select
  "Preferences: InsertDate Keybindings - Default".


  Settings
  --------

  Run "Preferences: InsertDate Settings - Default" for an overview of available
  settings.

  You should have been asked to set your "tz_in" timezone setting so that
  InsertDate knows what your current timezone is and can represent it properly
  when using `%Z`. It will also be used when translating timestamps to different
  timezones, although this should work out of the box.

  For more information, refer to the README:
  - "InsertDate: Open README"
  - https://github.com/FichteFoll/sublimetext-insertdate#readme

And, yes, it will have asked you for your time zone. I found US/Eastern.

I want the ISO date for my purposes, so I used Package Control to open InsertDate Settings - Default, which provides a long and useful page about the many settings for your reading pleasure. I then changed InsertDate Settings - User to

{
	"tz_in": "US/Eastern",
	"format": "%Y-%m-%d"
}

This produces an ISO date when I press Command-F5,Command-F5: 2021-09-18

I’m not entirely sure why it does that, but it does.

To allow that to work, I had to turn off VoiceOver, the screen reading capability built into the Mac, which is tightly bound to F5. In System Preferences / Keyboard / Shortcuts you can find Accessibility and then Turn VoiceOver on or off, which you can uncheck. Whew.

Now I’m going to change the date shown in the yaml snippet to remind me what to type.

To do this, I must unfortunately figure out how to get down into that folder again. Good luck, when I do File / Open it happens to be still on that folder. Snippet is now:

<snippet>
	<content><![CDATA[
---
date: "Cmd-F5 Cmd-F5"
title: "TITLE"
blurb: "BLURB"
categories:
- Agile-Related
- 
---
]]></content>
	<tabTrigger>yaml</tabTrigger>
</snippet>

That’ll remind me how to get the date.

Now in fact I did all the above this morning, but Sublime worked just fine for the limited uses I had for it in the hard bits:

Making Jekyll Work

Bill Tozier helped me set up Jekyll Lo! these many years ago, and the installation was locked on Jekyll 2.5.something and Ruby VeryOld.something. That didn’t work at all on the new Mac.

J. B. Rainsberger and Ryan Latta offered to help me, and that was a Very Good Thing.

I am never afraid of my own code. No matter what it suddenly does, I just tick through the things one does, confident that I’ll find the issue. And I almost invariably do. Working on provided code (or a kit computer) I am far less confident and prone to get stuck. Both J.B. and Ryan are far more competent than I with these things, and their hand-holding was invaluable.

J. B. and I worked at first on getting the right stuff installed on the machine. We wound up with rbenv to manage Ruby instances, gem of course to install Ruby stuff, and bundler to manage the configurations. We tried a number of combinations, since my chosen Jekyll was way out of date, and managed to get to a point where I was able to build everything except that I had lost syntax coloring. That got me to a point where I knew I wouldn’t have to give up writing articles on my own web site.

Jekyll was up to version 4.2 or something, and my reading about the version changes made me believe that the many custom plugings Tozier and I had written would likely not work. Ryan, however, with little or know Jekyll experience, and, I imagine, in the knowledge that whatever he did on his own machine couldn’t make my life work, asked for access to my site (all 7 gig of it) and set to work.

He installed Ruby 3.0.2 (ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]) and Jekyll 4.2, and started ticking through the problems as if they weren’t daunting at all. He found only a half-dozen issues, and the hardest fix was to replace render_all with super, or something about like that, in two or three places. So, same day as he started, he pinged me and told me it worked. We chatted over Slack and Zoom and he pushed his changes to a branch.

I went ahead and perused his changes and did them all manually. I prefer that, when it’s practical, to just pulling them in, because I want to understand, at least once, what has been done.

And it all works now. Here’s a summary of what it is that works:

rbenv local 3.0.2 locks Ruby to that version in my rj-com-db folder.

Gemfile is:


source 'https://rubygems.org'
gem 'jekyll'
gem 'webrick', "~> 1.7"

The webrick is a plug-in that sets up jekyll serve in watch mode, so that it auto-builds when you save a file into the site. Useful feature when editing, and this version of Jekyll doesn’t include it unless you use the webrick thing.

Gemfile.lock is:


GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.9)
    em-websocket (0.5.2)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    eventmachine (1.2.7)
    ffi (1.15.4)
    forwardable-extended (2.6.0)
    http_parser.rb (0.6.0)
    i18n (1.8.10)
      concurrent-ruby (~> 1.0)
    jekyll (4.2.0)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.4.0)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 2.0)
    jekyll-sass-converter (2.1.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (2.3.1)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    listen (3.7.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.4.0)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.6)
    rb-fsevent (0.11.0)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (3.26.0)
    safe_yaml (1.0.5)
    sassc (2.4.0)
      ffi (~> 1.9)
    terminal-table (2.0.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    unicode-display_width (1.8.0)
    webrick (1.7.0)

PLATFORMS
  arm64-darwin-20

DEPENDENCIES
  jekyll
  webrick (~> 1.7)

BUNDLED WITH
   2.2.22

And it works, and it can build everything except the xprog files in about 25 seconds, and everything including xprog in about 45 seconds. The former was taking almost 10x as long on my iMac, much longer on my laptop. It’s so much faster that I changed the standard config to just build everything, which I formerly didn’t do because I’m not good at waiting.

Bottom Line

I think that’s my full report. I tell myself that I could have done this without the help of J. B. and Ryan, but somewhere deep inside I know that I wouldn’t want to, and maybe would have given up. I’m sure I’d have settled for the old version and missing my syntax coloring, at least for a while.

So I’m grateful to have such good friends and colleagues, and relieved that the new little bitty MacBook Air is doing the job. I’m also a bit surprised that it is doing it seven to ten times faster than the iMac. Progress is wonderful.

Thanks, Ryan, thanks J.B. And if anyone reads this, I have to wonder why.