Aug 26
Back in April I joined my first Homebrew Website Club meeting and since then I’ve made a habit of reading the blogs from everyone there that day. The first post I read this Wednesday is from Thomas Vander Wal at his blog Off the Top.
On this very hot summer day (108°F / 42°C) I’m reminded of blogs that used to have names, like columns or talk shows. I think of old ones like Jorn Barger’s Robot Wisdom, Dave Winer’s Scripting News and John Gruber’s Daring Fireball. Then I think of newer blogs I read like The Jolly Teapot from Nicolas Magand and The Beauty of Nature from Franz Graf.
A blog with a name gravitates around a theme. The posts are its pulse, reminding the reader of the core idea that made it be in the first place.
“Proper names are poetry in the raw. Like all poetry they are untranslatable.”
W.H. Auden, A Certain World (1970)
Personal sites take us through the discovery of ideas and events in a person’s life, more journal or diary than talk show. A personal site is closer to the reader, a viewport-sized window into the writer’s mind.
In 2001, RuPaul wrote at his weblog www.rupaul.com:
weblog = sweet narcissism
i’m off to do my nightclub act in indianapolis. i guess i’ll hire a local donkey when i get there (that’s a joke, dan matthews). i gotta get a laptop for when i’m on the road, whoring myself. which one should i get ? should i wait till after christmas ? jonno will know. meanwhile, here is a list of my favorite movies this year.
I love that remark from RuPaul. That first line is a throwaway comment followed by a mention of his nightclub act in Indianapolis in a post about his favorite movies of the year! To call a weblog sweet narcissism is, even in 2001, an acknowledgement and celebration of the breakaway act of sharing your writing with the world.
Over half a century before RuPaul, George Orwell said the same thing but called it egoism.
Putting aside the need to earn a living, I think there are four great motives for writing, at any rate for writing prose. They are:
(i) Sheer egoism
(ii) Aesthetic enthusiasm
(iii) Historical impulse
(iv) Political purpose
George Orwell, Why I Write (1946)
We need more writers.
Aug 26
I’ve been spending a lot of time writing Lisp code lately. It’s been fun to open Emacs and tinker away with Elisp, I’ve been doing that on and off for about a year, and that has progressively sparked an interest in Common Lisp and I suppose Scheme now too.
Today I was curious about the book Structure and Interpretation of Computer Programs (1996) because I had seen the first MIT lecture on YouTube a while back and then it became one of those things I tell myself I’ll get to later.
I made some time tonight to read the foreword and prefaces and I liked these quotes:
The source of the exhilaration associated with computer programming is the continual unfolding within the mind and on the computer of mechanisms expressed as programs and the explosion of perception they generate.
If art interprets our dreams, the computer executes them in the guise of programs!
First, we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute.
Jul 16
New computer means new configuration from scratch! Since Emacs is the mainstay program I use across devices, I want to document how I’m doing web development with it right now.
First I took the time to go over my init.el and remove anything I’m not using. I like to aim for about 100-120 lines of code on it. It’s an arbitrary number, but it makes it easy to know where things are whenever I change it. One of the drawbacks of Emacs is how fun and time consuming it can become to want to mess around with configurations, but that’s just procrastination so this limit is important to keep me in check.
Here are my notes on how I’m setting up Emacs for web development.
I’ve installed Emacs on macOS via the emacs-plus homebrew recipe. I learned about it from Alvaro Ramirez’s Awesome Emacs on macOS article.
Emacs packages
Installing Prettier
First I installed npm via homebrew:
$ brew install npm
Next, to get prettier to run in Emacs I installed it globally via npm:
$ npm i -g prettier@3.9.5
For Emacs to find the node executable, I had to update my init.el. This code synchronizes Emacs’s internal environment variables with my system user shell.
(exec-path-from-shell-initialize)
File-based Mode Inits
I’m sure I’ll update the list as I start working on other projects on this computer, but for now HTML and CSS is enough for this blog, so here’s what I added in my init.el to start web-mode when opening files with those extensions:
;; File-based mode inits
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.css?\\'" . web-mode))
There’s also a hook on web-mode to set some configuration and start the other minor modes:
;; Hooks
(add-hook 'web-mode-hook
(lambda ()
(display-line-numbers-mode 1)
(emmet-mode 1)
(prettier-mode 1)
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(define-key emmet-mode-keymap (kbd "TAB") 'emmet-expand-line)))
That’s it for now! :-)