Media Summary: October 2017

Some interesting links for the month:

Aerial view of Ur, 1927.
Aerial view of Ur, 1927
Advertisements

Setting up ZSH on a Mac

I’ve been using the excellent Fish shell for the last few (three? four?) years, but every once in a while I need bash-compatibility, and Zsh seemed like perhaps a sweet spot between the two.

If you’re in a similar spot, this is a two-minute (almost) guide to getting up and running with Zsh on OS X.

Step 1: What does brew have?

~> brew search zsh
==> Searching local taps...
zsh ✔                                zsh-autosuggestions                  zsh-git-prompt                       zsh-lovers                           zsh-syntax-highlighting
fizsh                                zsh-completions                      zsh-history-substring-search         zsh-navigation-tools                 zshdb

Step 2: Just install the main product

So brew has a lot of packages, but I just need zsh for now.

Step 3: Use it!

I used to have this two step process of first adding it to /etc/shells and then calling chsh -s on it, but there’s a better way to do it:

sudo dscl . -create /Users/$USER UserShell /usr/local/bin/zsh

Step 4: Configuration options

Here you can either create .zshrc files manual, or through the startup menu, or … use Oh-my-zsh/Prezto.

I went with the last one, but here’s what the “first time menu” looks like:

Please pick one of the following options:

(1)  Configure settings for history, i.e. command lines remembered
 and saved by the shell.  (Recommended.)

(2)  Configure the new completion system.  (Recommended.)

(3)  Configure how keys behave when editing command lines.  (Recommended.)

(4)  Pick some of the more common shell options.  These are simple "on"
 or "off" switches controlling the shell's features.

(0)  Exit, creating a blank ~/.zshrc file.

(a)  Abort all settings and start from scratch.  Note this will overwrite
 any settings from zsh-newuser-install already in the startup file.
 It will not alter any of your other settings, however.

(q)  Quit and do nothing else.  The function will be run again next time.
--- Type one of the keys in parentheses ---

Step 5: Prezto

Pretty straightforward to install, and you can keep tweaking later, if that’s what you want.

git clone –recursive https://github.com/sorin-ionescu/prezto.git “$ZDOTDIR:-$HOME/.zprezto”

And then

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

That’s it, open a new terminal and enjoy your new shell!

On the space dog

From an article in the New Yorker reminiscing about Laika:

But the story of Laika had a dark lie at its core. In 2002, forty-five years after the fact, Russian scientists revealed that she had died, probably in agony, after only a few hours in orbit. In the rush to put another satellite into space, the Soviet engineers had not had time to test Sputnik 2’s cooling system properly; the capsule had overheated. It remained in orbit for five months with Laika inside, then plunged into the atmosphere and burned up over the Caribbean, a space coffin turned shooting star. Turkina quotes one of the scientists assigned to Laika’s program: “The more time passes, the more I’m sorry about it. We shouldn’t have done it. We did not learn enough from the mission to justify the death of the dog.”

Monthly recap (October 2017)

Some ups and downs this month … leaving out some things.

One surprisingly good movie I saw this month was “Never let me go”, based on a book by the recent Nobel-prize winner, Kazuo Ishiguro. It’s already seven years old, and I’m surprised I never heard of it before. What’s more, it turns out another similar (in some ways) movie I saw a long time ago, “The Remains of the Day” was also based on a book written by the same guy (movie: 1993, novel: 1989) !!

Minor updates:

  • For various reasons, decided to make a will with my wife (not done yet, but got started on it)
  • Got another tooth extracted in preparation for an implant (long story, I have bad gums, need a bone graft and sinus lift, blah blah blah, painful and pointless)
  • Participated in a “Girls who code” event at work, which was extremely gratifying
  • Took a “mini train trip” with Tara (a few stops on the Caltrain)

Watched/read:

  • Logan (finally! it was good!)
  • Ghost in the shell (finally! it was good too!)
  • Bought Prague Cemetery by Umberto Eco (finally! but won’t get to read it for a while …)
  • Our souls at night (Netflix)

Adventures with exhaust fans

This might be downright trivial for a lot of people, but it was an ”Achievement Unlocked” moment for me.

There was a Nutone exhaust fan in our bathroom that was really loud, as in louder than any sound made by anything else at home.

So after several months of this, and reluctant or embarrassed to call someone to fix it, I decided to fix it myself.

Step 1: Buy replacement fan and motor

Step 2: Watch a few YouTube videos for morale

Step 3: Get a ladder, get a torch (bathroom is in an awkward spot, no natural light!)

So, today, after turning the appropriate circuit breaker off (which, as everyone discovered to their annoyance, also turned off both the TV and the WiFi!), I climbed up and took a good look at the grille.

Now the grille in the videos just snapped off easily, but this one didn’t budge at all; and when it did, it sort of rotated with a grinding noise.

At this point, I realized I was on my own, and just clawed at whatever I could, and that obviously, obviously, since there was a light in front of the fan, the light cover should come off first.

The grill, light cover, and light.

So this happened, and revealed a light bulb with a nut-and-screw above it. So off came the light bulb, and the nut, and after unplugging it, so did the grille.

Great, I thought, now face to face with the motor assembly, the videos say to remove any screws visible and then “pop out the tabs”. The screw came off easily, but the tabs didn’t exactly “pop out” at all.

No, they were quite fixed, and the metal of the motor assembly scraped against the metal of the housing as I tried all kinds of trial-and-error pushing and prodding to get it off. In the end, it did come off.

Down to a hole in the wall.

So at this point, I was exactly half-way through the whole affair, and thought that all I had to do was retrace my steps. Except that now the new motor assembly didn’t fit in the same way, it was a tiny bit less well-adjusted, and for a moment I thought I had ordered the wrong part (has happened before!), and would have to first put everything back and then do this all over again, but luckily (very luckily!) the moment passed, and then the tabs “popped in” (smiley face!)

One more unknown obstacle, which might seem almost tedious at this point as a reader, but which, having to hold up the grille plate while doing it, was something more for me: the motor assembly had a loose screw which had to pass through a hole in the grille so that a nut could be fastened on it. Sounds easy enough?

No, because of the looseness of the screw. Every time the grill was not exactly positioned, the screw was pushed back up. When it was exactly positioned, but the nut wasn’t exactly positioned, the screw was pushed back up. Only when all three were in perfect alignment (which eventually did happen, and I survived to sit here and tell you of it) did the grille finally get secured in place.

So in the end then, a happy ending. The fan and the light work, and make less noise, and I have had a happy weekend.

(Imagine the epitaph: Here lies Agam. He fixed his bathroom exhaust fan. Forgive him his hyperbole.)

 

Sci/Math/Prog Summary: October 2017

Interesting stuff from the past month:

  • I feel the old “static typing vs dynamic typing” debate has gotten more nuanced recently with ‘spec’ and ‘schema’ in Clojure (i.e. better, fine-grained, runtime constraints). Also, as this article shows, there is a different “sweet spot” for different companies/people, which colors their perceptions of usefulness.
  • Cool antique stuff: check out this machine that debuted at the 1939 World’s Fair in New York.
  • A fake interview with Linus Torvalds on Linux and Git, which made me smile 🙂
  • A balanced look at Urbit (not fawning, and not hating). If you’re curious, read this next.
  • You knew the moon affected the earth by its gravity, causing tides; but did you know it’s light was also influential?
  • Presented as idle curiosity: “Git bombs
  • Squids are marvellous creatures
  • Allen Wirfs-Brock gives a fascinating account of Smalltalk, and what it’s really about.
  • LIGO wasn’t just about discovering Gravitational Waves (and winning a nobel!) … it has also explained Gamma Rays, and the origin of heavy elements.
  • Inertia.
  • Someone’s journey developing a new Forth (ignore if you don’t know what that is).
  • As the subtitle of this text points out: “Once, robots assisted human workers. Now it’s the other way around.”
  • Cool weird trains of the past: duplex railway!
  • Been using Tinderbox for less than a year, but I share this person’s opinion.

On Robot Overlords

Extract from a recent New Yorker story, “Welcoming our new robot overlords”

We stood behind a young woman wearing a polo shirt and Lycra shorts, with a long blond ponytail. When a step was completed, a light turned on above the next required part, accompanied by a beep-beep-whoosh sound. A scanner overhead tracked everything as it was happening, beaming the data it collected to unseen engineers with iPads. Employees who follow a strict automated protocol—some call them “meat robots”—need little training. Even the drill was attached to a computer-assisted arm; the worker just had to move it to the right position and let the machine do its magic. A decade ago, industrial robots assisted workers in their tasks. Now workers—those who remain—assist the robots in theirs.