Blog

Gretchen, Stop Trying to Make ALAC Happen!

I have a bunch of FLAC files from an album I bought, it was that or low-quality MP3. iTunes ("Music.app") doesn't read FLAC, even tho it's the industry standard for lossless audio.

So I fought with ffmpeg (each "f" stands for "fuck you"), and it converted about half of them into usable files.

Eventually I found XLD X Lossless Decoder: Lossless audio decoder for Mac OS X

Had to right-click, Open to get past Mac Gatekeeper, ugly little program, been in development forever, but it works perfectly. Converted a directory full of flac into m4a, then just dragged them into iTunes and now have music where I want it. If I'm real excited for it, I could downgrade them to AACs, but eh good enough for now.

Everyone be sure to tell Apple that ALAC is stupid and not going to happen.

(the ffmpeg I did was:

for f in *.flac; do
  echo "$f"
  ffmpeg -i "$f" -c:a alac -c:v copy -acodec alac "${f%.flac}.m4a"
done

but now I really don't wanna hear about how to fix that.)

Angry Wires Monday Music

Vim the Next Generation

So I figured I should modernize my Vim skills, from 1995 to 2023. A lot's changed since I last configured Vim.

Installed a modern MacVim, in my case sudo port install MacVim. It's launched with mvim, but I just change alias v=mvim in my .zshrc

In the code blocks below, ~% is my shell prompt, ## filename shows the contents of a file, cat into it or whatever. Neither of those lines belong in the file!

To start, I want to use vim9script. So my old .vimrc now starts with that mode command, then I changed all my comments from " to #. Not much else had to change. The way to detect MacVim etc is clearer now, and I can get ligatures from Fira Code!

Syntax highlighting files can just be dropped in ~/.vim/syntax/

Update 2023-04-11: added statusline highlight colors, under syntax loading

## .vimrc
vim9script
# Mark Damon Hughes vimrc file.
# Updated for Vim9, 2023-04-09
#
# To use it, copy it to ~/.vimrc
# Note: create ~/tmp, ~/.vim, see source commands below.

set nocompatible    # Use Vim defaults (much better!)
filetype plugin on
set magic
set nrformats=

set errorbells
set nomore wrapscan noignorecase noincsearch nohlsearch noshowmatch
set backspace=indent,eol,start

set nosmarttab noexpandtab shiftwidth=8 tabstop=8

set encoding=utf-8 fileencoding=utf-8
set listchars=tab:__,eol:$,nbsp:@

set backup backupdir=~/tmp dir=~/tmp
set viminfo='100,f1,<100

set popt=header:2,number:y  # 2=always

set tw=80       # I use this default, and override it in the autogroups below

# ctrl-] is used by telnet/ssh, so tags are unusable; i use ctrl-j instead.
set tags=./tags;/
map <c-j> <c-]>

# Don't use Ex mode, use Q for formatting
map Q gq

map <Tab> >>
vmap <Tab> >
map <S-Tab> <<
vmap <S-Tab> <

# Always have syntax highlighting on
syntax on

# https://github.com/mr-ubik/vim-hackerman-syntax
# changed:
# let s:colors.cyan         = { 'gui': '#cccccc', 'cterm': 45 } " mdh edit
# let s:colors.blue         = { 'gui': '#406090', 'cterm': 23 } " mdh edit
source $HOME/.vim/syntax/hackerman.vim

set laststatus=2    # 2=always
# %ESC: t=filename, m=modified, r=readonly, y=filetype, q=quickfix, ff=lineending
# =:right side, c=column, l=line, b=buffer, 1*=highlight user1..9, 0=normal
set statusline=\ %t\ %m%r%y%q\ [%{&ff}]\ %=%(c:%02c\ l:%04l\ b:%n\ %)
set termguicolors
hi statusline guibg=darkblue ctermbg=1 guifg=white ctermfg=15
hi statuslinenc guibg=blue ctermbg=9 guifg=white ctermfg=15

hi Todo term=bold guifg=red
# Use `:set guifont=*` to pick a font, then `:set guifont` to find its exact name
set guifont=FiraCode-Regular:h16
if has("gui_macvim")
    set macligatures
    set number
elseif has("gui_gtk")
    set guiligatures
    set number
endif
set guioptions=aAcdeimr
set mousemodel=popup_setpos
set numberwidth=5
set showtabline=2

augroup c
    au!
    autocmd BufRead,BufNewFile *.c set ai tw=0
augroup END

augroup html
    au!
    autocmd BufRead,BufNewFile *.html set tw=0 ai
augroup END

augroup java
    au!
    autocmd BufRead,BufNewFile *.java set tw=0 ai
augroup END

augroup objc
    au!
    autocmd BufRead,BufNewFile *.m,*.h set ai tw=0
augroup END

augroup php
    au!
    autocmd BufRead,BufNewFile *.php,*.inc set tw=0 ai et
augroup END

augroup python
    au!
    autocmd BufRead,BufNewFile *.py set ai tw=0
augroup END

augroup scheme
    au!
    autocmd BufRead,BufNewFile *.sls setf scheme
    autocmd BufRead,BufNewFile *.rkt,*.scm,*.sld,*.sls,*.ss set ai tw=0 sw=4 ts=4
augroup END

Package Managers & Snippets

Next I need a package manager. I've settled on vim-plug as complete enough to be useful, not a giant blob, and is maintained. There's at least 7 or 8 others! Complete madness out there
(I've already picked one, I don't need further advice, and will actively resent you if you give me any. I'm just pointing at the situation being awful.)
Install's easy, drop it in autoload, mkdir -p ~/.vim/plugged

The first thing I want is a snippet manager, and SnipMate's the best of those. Edit .vimrc at the end, set your "author" name, it's used by several snippets.

## .vimrc
call plug#begin()

Plug 'https://github.com/MarcWeber/vim-addon-mw-utils'
Plug 'https://github.com/tomtom/tlib_vim'
Plug 'https://github.com/garbas/vim-snipmate'
Plug 'https://github.com/honza/vim-snippets'

g:snips_author = 'Mark Damon Hughes'
g:snipMate = { 'snippet_version': 1,
        'always_choose_first': 0,
        'description_in_completion': 1,
    }

call plug#end()

Next part's super annoying. It needs a microsoft shithub account; I made a new one on a throwaway email, but I don't want rando checkouts using my real name. includeIf lets you choose between multiple config sections, so now I have:

## .gitconfig
[include]
    path = ~/.gitconfig-kami
[includeIf "gitdir:~/Code/"]
    path = ~/.gitconfig-mark

## .gitconfig-kami
[user]
    name = Kamikaze Mark
    email = foo@bar

## .gitconfig-mark
[user]
    name = Mark Damon Hughes
    email = bar@foo

~% git config user.name
Kamikaze Mark
~% cd ~/Code/CodeChez
~/Code/CodeChez% git config user.name
Mark Damon Hughes

But shithub no longer has password logins! FUCK.

~% sudo port install gh
~% gh auth login

Follow the prompts and it creates a key pair in the system keychain. I hate this, but it works (on Mac; Linux install the package however you do, it works the same; Windows you have my condolences).

Now vim, :PlugInstall, and it should read them all. I had to do it a couple times! Then :PlugStatus should show:

Finished. 0 error(s).
[====]

- vim-addon-mw-utils: OK
- vim-snipmate: OK
- vim-snippets: OK
- tlib_vim: OK

Let's create a snippet!

~% mkdir .vim/snippets

## .vim/snippets/_.snippets
snippet line
    #________________________________________

snippet header
    /* `expand('%:t')`
    * ${1:description}
    * Created `strftime("%Y-%m-%d %H:%M")`
    * Copyright © `strftime("%Y")` ${2:`g:snips_author`}. All Rights Reserved.
    */

And if I make a new file, hit i (insert), line<TAB>, it fills in the snippet! If I type c)<TAB>, it writes a copyright line with my "author" name; it's highlighted, so hit <ESC> to accept it (help says <CR> should work? But it does not). Basically like any programmer's editor from this Millennium.

Update 2023-07-24: Added header, which is my standard document header, expand is filename with extension, rest are self-explanatory. Sometimes I add a license, which SnipMate preloads as BSD3, etc.

Use :SnipMateOpenSnippetFiles to see all the defined snippet files.

File Tree

NERDTree seems useful; read the page or :help NERDTree for docs. Add another plugin in .vimrc just before call plug#end(), do a :PlugUpdate, and it's that easy. But I want to hit a key to toggle the tree, and another key to focus the file, which takes me into the exciting world of vim9 functions.

## ~/.vimrc
Plug 'https://github.com/preservim/nerdtree'

# open/close tree
def g:Nerdtog()
    :NERDTreeToggle
    wincmd p
enddef
nnoremap <F2> :call Nerdtog()<CR>
# focus current file
nnoremap <S-F2> :NERDTreeFind<CR>

Update 2023-04-11: In NERDTree, on a file, hit m for a menu, and you can quicklook, open in Finder, or reveal in Finder, and much more. Doesn't seem to be a right-click or anything functionality, so it was not immediately obvious how to make it open my image files, etc.

And I think that's got me up to a baseline modern functionality.

Scheme Parent Protocols

Here's a subtle point of using Scheme (Chez, R6RS) records with inheritance:

;; creates a record, two default fields
(define-record-type Foo
    (fields (mutable x) (mutable y))
    (protocol (λ (new) (λ ()
        (new 1 2) )))
)

;; creates a subtype, one specified field
(define-record-type Bar
    (parent Foo)
    (fields (mutable z))
    (protocol (λ (super-new) (λ (z)
        (let [ (new (super-new)) ]
            (new z) ))))
)

(define b (make-Bar 3))
(Foo-x b)
1
(Foo-y b)
2
(Bar-z b)
3

The "new" your subtype protocol (constructor, in any OOP system) gets is a wrapper function that calls the parent protocol, and returns your actual "new". If you don't have a protocol, you just do (make-Bar 1 2 3) and that works.

It's a little annoying that define-record-type doesn't copy accessors forward, leading to either that mess of Foo-x/y, Bar-z, or a long list of (define Bar-x Foo-x) etc., but if I wanted a real object system I already have one. In my use case records are faster, I just didn't understand this quirk, and the docs don't help by calling the constructors "n" and "p".

Fighters Are Not Boring, Players Are

My infrequent commentary on role-playing games, in particular the Old-School Renaissance.

I don't understand how fighters can be "boring"? They're up front fighting, which is the most exciting role for most people. They can be mechanically simple, but of course you role-play and make up your actions to be interesting.

And what I'm seeing as arguments from the "other side" is they only mean in tactical wargames without role-playing. As if they can't do anything that isn't listed as a specific rule and skill. That's not what RPGs are for!

A Fighter should be role-playing during fights, as players should at all times. Not looking at your dice, stats, feats, skills, magic powers, equipment. BE THERE. BE Ichi the Bushi, or whatever you named your "generic Level 1 Fighter". Describe what you're doing. Run up stairs to get a height advantage (or be able to fight a giant above the knees), or swing on a chandelier, or kick furniture at someone, or throw dirt, tactically de-advance into an ambush, etc. If you're fencing, you compare styles, observe the enemy's preferred moves, do a riposte against that. Don't be boring.

Then the Referee tells you what happens; that might involve your usual attack roll with a bonus, more damage, more defense, or just narrate what happens.

Non-fighters can do those things, too, but they mostly miss against any competent foe, and can't take a hit back, so it's fairly pointless. How often does a Thief get in position to get their backstab bonus & damage, the one mechanical chance they have to be effective in combat? Basically never. If they do, they die the next round because they stood up in melee.

Magic items also differentiate them. Only Fighters and Thieves can use most magic weapons, and in OD&D even the most simplistic +1 magic sword makes a pig farmer into a hero, and allows fighting ghosts and werewolves! And you'd never waste a sword on a Thief who can't hit.

You don't need giant stacks of rules & mechanics to be interesting! Even my SIX WORD RPG! is all you need, and your fighter will be effective if you role-play effectively.

As always, read Matt Finch's Primer, he says almost exactly what I'd say (esp. the Ninja example & Abstract Combat-Fu):

And some inspirational "be a Fighter" music, with Army of Darkness video:

Flipping Back to 2010 With Flipboard

  • Flipboard embraces Mastodon: subhead "The news reading app is going all in on the Fediverse." so I don't have to say "don't forget fediverse"!

Wow. Early days of the iPad, Flipboard was the best news-reading app for a while. My 2010-11-11 review:

Perhaps the best app isn't a newspaper at all, though. Flipboard is an aggregator for items from Twitter accounts and lists, your own or various public ones. Since many blog writers now tweet about every new entry, they all show up in Flipboard. Navigation is trivially easy and obvious, and little space is wasted on anything but information.
I'm not entirely pleased by how it shows articles, though: You see the first few paragraphs, then a link to the original site, so they can collect their ad revenue. While I sympathize with the need for ads, I just want everything collected. However, it does have a "Read Later" action which sends an article to Instapaper, the ONLY one of these newspaper apps which does.
Still, I think this is pretty close to the ideal for a newspaper. If it had RSS support, and a clearer separation of old from new content, I'd be happy to junk all of the "newspapers" and RSS readers I use.

It did later get RSS, and for years it replaced newspapers. They kind of bit-rotted, and my use of social media changed, so I lost touch with them.

So today's announcement's a "OH YEAH, THOSE GUYS". They still had my old login but my password's gone, recovered & set a real password, and I'm back in. Looks just like it always did. Remove some junk sources, and it's a pretty normal newspaper again.

… There's an option to connect my Mastodon account, but right now it fails at Authorize! So far Mastodon doesn't show up in hashtag searches and such. They have their own Masto server at flipboard.social but I don't need that.

So this is interesting, but not quite useful yet.

What I'm Watching: Troll, Troll, Troll

  • Troll (2022): Roar Uthaug, Norwegian director of generally mediocre fantasies, a disaster movie, a comedy-ish cop show, and the bad remake Tomb Raider, has turned in his kaiju movie! And… it's much much better than I expected. It's fairly linear, dumb miners wake up a massive mountain Troll, literally the King of Edvar Grieg's song In the Hall of the Mountain King as the use of a couple versions of the music and Dovrefjell location indicate. Paleontologist Nora Tidemann (Ine Marie Wilmann) is scooped up as a civilian expert, and she coincidentally has the most adorably insane father (Gard B. Eidsvold) who taught her about Trolls. The government is in total denial about the nature of the beast, and only considers military action, except for one wacky plan. Nerd heroes like Siggi the very cute military hacker (Karoline Viktoria Sletteng Garvang), and friendly soldier (Mads Sjøgård Pettersen) figure out the solution half-assed, lot of running around antics and people dying underfoot, world is saved.

The romance subplot I expected doesn't go anywhere, Roar really misses a lot of conventional story beats, and often leaves us staring at conference or mess hall tables. The father is great, he's like a Dwarf driven mad by knowledge, and eventually we find out just how mad he has reason to be. The Troll itself is sad and pining for the fjords, with again really good motivation and mythical backstory. Hoo-wa soldiers do their jobs despite obvious court-martial ignoring of orders.

Moral of the story: Don't be a Christian, because Trolls can smell Christian blood.

Fluff, but a pretty good kaiju movie.

★★★★☆

  • Trollhunter (2010): By André Øvredal, who also made The Autopsy of Jane Doe. Halfway between Blair Witch and X-Files, student filmmakers follow around a creepy man (Otto Jespersen) in a van, who turns out to be a professional Troll hunter, learn horrible realities their government does not want them to know.

The Trolls, plural, here are managed wildlife, with fairly wide-scale knowledge and consequences in the Norwegian government. Much more thought has been put into how they live and function, and each one has its own style. No boring office work here, just dark woods with something much worse than bears.

Cheaply made, and really the kids are all kind of indistinguishable, but the writing, plot, and cinema verité style carry it.

Moral of the story: Don't be a Christian, because Trolls can smell Christian blood.

★★★★½

  • Stand Still Stay Silent aka SSSS (webcomic): wiki Trolls here are not giant monsters, but a plague that infects any animal life. Very small animals keep some original form and maybe a monster personality, but can be eaten by cats, which are immune to the plague; larger animals like people just turn into horrible gribbly masses of tentacles and parts, Shoggoths basically. Scandinavian old-timey pagan religion is the only real weapon against the Trolls.

90 years after the apocalypse, a crew of immune soldiers, psychic pagan wizards, cat, and a straggler or two get in a van and go scouting the old city. It's just non-stop horrors, with occasional beauty of nature (but inherently violent, evil nature) reclaiming civilization. Just a charming comic. Zero punches are pulled.

The "second adventure" of the webcomic contradicts this with tainted bears that have personalities, the main characters lose their personalities, and then COVID happened, the author went insane and became a Christian with apocalyptic Mark of the Beast paranoia "oh no they're gonna ban MY BIBLE" (says Christians just before banning every book except their Bible), and stopped the comic with Christianity saving everyone even tho it was explicitly useless nonsense before.

Moral of the story: Don't be a Christian, because Christians are Trolls.

★★★★☆ for the first adventure, ☆☆☆☆☆ for the second.

BONUS:

  • Trollies Radio Show Sing-A-Long (1992): This was on FORGOTTEN_VCR the other day, and it is nightmarish. Ripoff "troll" doll puppets sing bad covers of pop rock songs. The DJ Trollie [sic] isn't the worst thing ever, and the saxophone rock crab is great, amazing, but everything else is 30 minutes of child entertainment hell. Man has sinned against all the gods and this is our punishment.

Moral of the story: Don't have ears, because the Trollies will kill you with them.

★☆☆☆☆ yes is actually preferable to SSSS adventure 2.

Myst Again

So there's yet another version of Myst on the App Store

I've so far on iOS bought "Myst (Legacy) for Mobile", "Riven (Legacy) for Mobile", "The Manhole: Masterpiece", and "realMyst" [sic capitalization]. On Mac, I played the original CDROM Mac Classic Myst, Riven, URU, and "realMyst Masterpiece" [sic capitalization], Obduction off Steam. Cyan got their pound o' flesh.

Myst (Legacy) & Riven (Legacy) has screen-by-screen tapping, it's extremely obscure what's going to happen when you do, and the low-rez screens compressed into the teeny OG iPhone size aren't great. But it's also the only version that has Riven! And it's basically playable. These are fine. Adequate. ★★★☆☆

The Manhole is super weird. It's for kids ("V is for VOID"), but you'll like it. Go experience it, it's $1.99 and maybe the best if most amateur, almost outsider art thing Cyan's ever done. You think Myst is perplexing, Manhole is 100x weirder and harder to navigate. ★★★★½ (down ½ for the tiny window & unlabelled tap areas; the content is ★★★★★)

realMyst has a pretty reasonable modern interface. You'll want to "invert look" (I just started it up for a screenshot, and couldn't get up the stairs until I flicked that switch). The graphics are fine for an early-00s 3D game, and honestly you don't need more than that. I'm not going to re-solve it, but I did so without cheats last time (sweet Cthulhu I hate the subway puzzle, and should've cheated that). ★★★★☆

Myst Mobile now, needs a pretty modern iPad, my Air works fine but got very hot. The graphics textures & grass and such are much better, early '10s quality but still not peak AAA quality. I can get better views from MineTest with shaders. I think realMyst has better lighting, or at least more consistent. Indoors in Myst Mobile I often couldn't see much of anything, at the same brightness settings that were usable in realMyst.

I picked the "randomize puzzles" option, and sure enough the puzzles are different from standard, but all solved the same way as OG, go read books and look up values in the library, planetarium, click buttons and do a little math, etc.

Movement is with a soft joystick, and drag the screen to rotate camera. realMyst's movement was much better.

The problem is the controls are all over the place. Doors are still sliders, rather than swinging open; 3D budget doesn't go that far, I guess. Some buttons you just tap (there's a new button to open the imager cave). Some switches you tap and they flip to the opposite state, some you have to pull all the way into position. Doors you tap on the handle… sometimes that works. The log cabin door was difficult to tap on, which you need to do at speed to reach SPOILER REDACTED. Knobs don't turn linearly, but sort of randomly spinning to a new value as you move your finger. The clock tower puzzle is an unbelievable pain in the ass, getting the levers to move all the way down and not release is very fussy, I bet most new players cannot get them to work. I hate literally every control that isn't a button.

The letter from Atrus to Catherine is missing, so you have no idea what the switches are for. If you know, the new CGI heads for Atrus, Cirrus, Achenar are super cheesy and plastic, like bobbleheads floating in space.

They have a camera, and as usual it only makes square, kinda shitty Polaroid photos even tho Polaroid's been dead for 20 years, but there's no journal, and they don't save in order!!! THE FUCK. I actually miss the shitty grainy, wrong-gamma, square photos & journal in URU's KI system.

They only give you access to the island first. So I opened all the Ages, and… can't go to them. It's $9.99 IAP, soon going up to $14.99. If you don't own any version of Myst, that's a good deal; if you've bought a new one every decade or so for the last 30 years, it's kind of bullshit, and I'm probably not inclined to pay for it.

★★★½☆

What I want is for them to remake Riven, maybe make peace with Ubisoft and remake Exile, Revelations, End of Ages, and URU? There's a fan-made "real URU" in progress, so at least that'll be playable again soon. Instead Cyan has Skyrim Disease, every new platform needs a new adaptation, but they never move forward. (Yes I've played Obduction; pain in the ass most tedious train simulator ever).

Screenshots are SPOILERS! (Soylent Green is PEOPLE!)

MineTest Youstubes

So I like to watch videos of the games I play; maybe learn something, maybe just recognize "oh, I do that too". Parasocial but shared-ish experience.

The problem with a free, open source, often Linux-based game is, nobody has working sound. And they really don't have working mics on their broken dumpster-dived Thinkpads, or video editing software. So the MineTest youstubes are mostly divided into:

  1. No audio, sub-5-minute, incoherent flailing around.
  2. [CRACKLE DIGITAL SCREAM] FREE FRAPS quality audio/video, mostly children on PVP servers, and I like none of those things.
  3. Germans. And I'm not usually one to pick on anyone's appearance, but… maybe leave the selfie cam off if you fill 90% of the view. From across the room.
  4. Handful of good youstubers; some are non-English but I can muddle thru Spanish, a few words of Portuguese, or French.
  • New: SteleCat: Just started
  • Dee23Gaming: Modded, building series
  • duckgo: Author of SurviveTest, Portuguese but either little speech or the CC will actually work on some of it.
  • Richard Jeffries: Long creative/peaceful building series

There was another one, professionally done but rather boring where he just dug tunnels in his mine, laid down glass slab floors, and rarely came up to add to a kinda artsy tower, 100+ episodes… and it's gone. He's vanished, taken down his videos? And I'm drawing a blank on his name now so I can't even find out what happened.

If you have other suggestions, that are not 1-3, comment/tell me on fedi.