Blog

Mystic Dungeon BBS Update

I just added a doorgame conversion of Lost Treasure to Mystic Dungeon BBS; just go into the Door Games menu and hit L. Just a little toy to compete on the high score list.

Mystic Dungeon doorgame got a new patch, mostly just fixing display bugs, but I've nerfed poisons & paralysis to scale by damage inflicted; I'll see how that works in higher-level play, it may need another patch, so carry an antidote if you're cautious (you can get them from the alchemist in the NE of town). It's a fun, hard little RPG, I can get down to level 2 and 3 now, though that's very very dangerous; I'm nearly Level 3. Once anyone nears Level 4 legit, I'll add some more magic spells.

I'd like to see more competition; log in every day and do your 96 turns, and you can progress pretty fast. I like the turn limit, it prevents anyone (self included) from grinding for hours and jumping up the board unfairly.

I'm in progress at getting my Scheme text adventure completed, and then I'll doorgame convert it, and it'll go in the doors, too.

I need to look again at the file upload system, or maybe replace that entire feature with a script so you can browse files sanely.

Been pretty quiet, got a few users from Fediverse, but after doing some stability testing and system updates, I think it's in good shape now to advertise on /r/bbs, probably tomorrow morning.

The Best SF Author of All Time

So, I can't actually pick one, or even rank ten, but by decade (when they made the works most important to me) it's down to a short list:

  • 1830s: Edgar Allen Poe
  • … long empty stretch …
  • 1890s: H.G. Wells
  • … shorter empty stretch …
  • 1930s: H.P. Lovecraft
  • 1940s: A.E. Van Vogt
  • 1950s: H. Beam Piper, Clifford Simak
  • 1960s: Brian Aldiss, Robert A. Heinlein, Zenna Henderson, Frank Herbert, Andre Norton
  • 1970s: Marion Zimmer Bradley, Katherine Kurtz, Fritz Leiber, Anne McCaffrey, Michael Moorcock, "James Tiptree, Jr", Roger Zelazny
  • 1980s: Mary Gentle, William Gibson, Elizabeth Moon, Rudy Rucker, John Shirley, Bruce Sterling, Walter Jon Williams
  • 1990s: Pat Cadigan, Greg Egan, Neal Stephenson
  • 2000s: Neal Asher, Peter F. Hamilton, Alastair Reynolds
  • 2010s: Mira Grant (aka Seanan McGuire), Martha Wells

I can make an argument for almost any of them to be "my favorite" depending on mood, but Piper might be the winner in a bracket contest. I suspect I'd get down to something like Piper vs. Egan and my head would explode trying to compare Space Viking with Diaspora.

My first pass at this, there were only 3 female authors (Pat Cadigan, Mira Grant, and Martha Wells). Several were only fantasy: Which I think less of, but I do read—and Leiber and Moorcock's science fiction are not their best works.

Many only had a few great books or short stories surrounded by a giant midlist of dullness, but that's also why Niven, Pournelle, Steven Barnes, Iain M. Banks, Dan Simmons, and Poul Anderson never made it. Several I do list produced dullness after their peak, like Gibson objectively only wrote one short story collection & 2 thin novels worth reading, one should not read McCaffrey's post-trilogy extended sequels, and anything Stephenson wrote after The Diamond Age needed an aggressive editor to cut out about 2/3 of his text. And yet many continue to write exactly what I like, decades later.

The '60s-'80s really produced a LOT of SF I liked. Was it objectively better? Or was it just "the golden age of SF is 12" which was 1982, so I read what was still in print?

Terminal Condition

I spend half my time, easily, in a command-line terminal running zsh. So a new one, even one on an OS I don't run, is interesting:

There are some modern, nice conveniences in this. It's a little ways behind Mac Terminal.app (based on the NeXTstep Terminal from 1990), and vastly far behind iTerm2, but it's more advanced than the usual Linux terminals like rxvt, urxvt, or cross-platform Alacritty or Hyper.

Between this and WSL2 being a full Linux, it's plausible that the best Linux dev environment now (well, this summer when it's released) is Windows. The Year of the Linux Desktop is 2019, and it is owned by Microsoft®. Can you hear the tiny, distant screams of the FSF cultists?

Comparison based on code, reviews, and reddit thread with MS devs involved:

  • Scrollback: The single most important thing a terminal can do. MS does this, but doesn't have logging.

    Surprisingly, a lot of them only support a few pages. I keep mine at 10,000 lines or so, which is probably wasteful but so handy; I don't bother logging since my .zhistory keeps everything I typed, and I have Terminal.app and iTerm2 set to not close tabs automatically.

    Alacritty only just added scrollback last year.

  • Prompt Marking: Nope.

    This is a feature it's hard to live without once you've had it, no more paging up trying to see prompt lines (I have a red ANSI-colored prompt and it's still hard to see). In Terminal.app, Edit, Marks, Automatically Mark Prompt Lines, and then ⌘↑ and ⌘↓ move between them. iTerm2 has it enabled by default, and ⇑⌘↑ ⇑⌘↓ are the keys, which took me some re-learning.

    Nothing else has this, as far as I've seen.

  • Fonts: MS has programming ligatures and displays emoji, finally. Does not support RTL languages.

    I use Fira Code in all my editors and shells, and it's enormously helpful, more readable, and catches bugs: I look for === as a fat-equals symbol in JS, etc.

    Hyper, urxvt, Alacritty support Unicode fonts. rxvt stopped development almost 20 years ago so it barely shows 8-bit fonts correctly.

  • Tabs: MS has tabs! They're currently invisible until you add a second tab, same shit Terminal.app does, which annoys the hell out of me; I don't like UI that reshapes itself, reminds me of T-1000 Terminators (also makes it hard to tile my windows up correctly when they get resized).

    It's not clear if you can drag Windows Terminal tabs around to different windows.

    In iTerm2, I normally keep: First window with tabs for home shell, ssh into my server (running screen, so that has many open shells). Second window with 2 tabs for REPL, editor/running/compiling tasks, and sometimes a third tab for reading local docs. If I need more shells, I usually open them on the first window. I rarely open a third window for monitoring some long-running task; I just drag a tab out to its own window. All terminal windows are stacked on the left side of my screen, because there's no icons under that side of the Desktop.

    urxvt has tabs, but they're kind of a hack, not fully usable.

    Hyper has tabs, but they replace the title bar. Which is cool but also awful like a lot of things it does.

    rxvt and Alacritty don't do tabs, because they insist you use screen or tmux. Which sucks if you want to move a process from one window to another.

  • Profiles: MS supports multiple profiles, so you can use different ones for each task.

    So does Terminal.app, iTerm2, urxvt (but it's buried in a text file config).

    Alacritty, rxvt, and Hyper have a single profile and no UI for changing anything, hope you like editing text files and reloading.

    As far as I can tell, nothing else does automatic profile switching like iTerm2; when I cd to my ~/Code/CodeScheme folder, iTerm2 switches to my dark red transparent profile, including Scheme-specific triggers and copy/paste filtering.

    You can probably do that in urxvt's Perl(!) scripting, but it's not normal or easy.

  • Copy/Paste Filtering: Nope.

    iTerm2 and urxvt both let you set a bunch of regexp to run over lines to get selections correctly matching boundaries, not just space-delimited.

  • URL Highlighting: Nope.

    iTerm2, Hyper, and urxvt notice URLs and filenames, and let you click on them. In iTerm2, hold down ⌘ and click on any URL or path (like in an ls or find result!) and it does some useful action: Opens the URL in your browser or file path in your editor, by default, but you can configure that in the profile.

  • Custom Keybindings: Sorta? Doesn't seem complete, no idea if there's UI for it, but it does exist in their config.

    Most terminals can do this, but most can only remap a few actions. I like iTerm2's, as usual, which lets you bind any action, menu, or run a program on any keybinding. I mostly just use it to launch different profiles with starting paths & scripts.

    Terminal.app only lets you send specific text for a key.

  • Images: Sorta? Only if they're embedded in fonts.

    This is a neat trick in iTerm2: images. I use imgls all the time to see a thumbnail of every file with details (protip: I changed ls -ld in the script to ls -1Fskd for a more concise listing), and then ⌘-click to open what I want in Acorn; it's better than opening Finder and trying to read a long filename under a thumbnail.

    I'm unaware of anyone else being able to do this.

Tower of Babble

Programmers almost compulsively make new languages; within just a few years of there being computers, multiple competing languages appeared:

It proliferated from there into millions; probably half of all programmers with 10+ years of experience have written one or more.

I've written several, as scripting systems or toys. I really liked my Minimal script in Hephaestus 1.0, which was like BASIC+LISP, but implemented as it was in Java the performance was shitty and I had better options to replace it. My XML game schemas in GameScroll and Aiee! were half programmer humor, but very usable if you had a good XML editor. Multiple apps have shipped with my tiny lisp interpreter Aspic, despite the fruit company's ban on such things at the time. A Brainfuck/FORTH-like Stream, working-but-incomplete tbasic, and a couple PILOT variants (I think PILOT is hilariously on the border of "almost useful").

Almost every new language is invented as marketing bullshit based on a few Ur-languages:

  • C++: Swift
  • Java: Javascript (sorta), C#, Go
  • Awk: Perl, Python, PHP, Julia
  • C: Rust
  • Smalltalk: Objective-C
  • Prolog: Erlang, Elixir
  • ALGOL: C, Pascal, PL/1, Simula, Smalltalk, Java
  • LISP: Scheme, ML, Haskell, Clojure, Racket
  • BASIC: None, other than more dialects of BASIC.
  • FORTRAN: None in decades, but is the direct ancestor of ALGOL & BASIC.
  • COBOL: None in decades.

A few of these improve on their ancestors in some useful way, often performance is better, but most do nothing new; it's plausible that ALGOL 68 is a better language than any of its descendants, it just has mediocre compiler support these days.

Certainly I've made it clear I think Swift is a major regression, less capable, stable, fast, or even readable than C++, a feat I would've called impossible except as a practical joke a decade ago. When Marzipan comes out, I'll be able to rebuild all my 15 years of Objective-C code and it'll work on 2 platforms. The Swift 1.0 app I wrote and painfully ported to 2.0 is dead as a doornail, and current Swift apps will be uncompilable in 1-2 years; and be lost when Apple abandons Swift.

When I want to move my Scheme code to a new version or any other Scheme, it's pretty simple, I made only a handful of changes other than library importing from MIT Scheme to Chez to Chicken 4 to Chicken 5. When I tested it in Racket (which I won't be using) I had to make a handful of aliases. Probably even CLISP (which is the Swift of LISPs, except it fossilized in 1994) would be 20 or 30 aliases; their broken do iterator would be hard but the rest is just naming.

Javascript is a pernicious Herpes-virus-like infection of browsers and desktops, and nothing can ever kill it, so where it fits the problem, there's no reason not to use it. But there's a lot it doesn't do well.

I was leery of using FreePascal because it has a single implementation (technically Delphi still exists, but it's $X,000 per seat on Windows) and minimal libraries, and in fact when it broke on OS X Mojave, I was disappointed but I-told-you-so.

I'm not saying we should quit making new Brainfuck and LOLCODE things, I don't think it's possible for programmers to stop without radical brain surgery. But when you're evaluating a language for a real-world problem, try moving backwards until you find the oldest and most stable thing that works and will continue to work, not piling more crap into a rickety new framework.

The Biblical reference in the title amuses me, because we know now that it requires no malevolent genocidal war deity scared of us invading Heaven to magically confuse our languages and make us work at cross purposes; anyone who can write and think splinters their thought into a unique language and then argues about it.

Eldritch World

I wrote a text adventure:

It's like 15% complete, you can reach the first of four "recursions"/other worlds but then you're stuck. And today it only has a Mac console binary (you can run it from source on other platforms, with a little effort), I'll get on the cross-platform compiling and Terminal wrappers tomorrow, but this is a playable thing under a deadline!

TODO App

I'm yet again frustrated by the state of checklist TODO apps. I had a perfect one once, ToDo on the Palm Pilot; aesthetically it was of its time, but for usability on a stylus-based PDA it was perfect. Everything since then has been a compromise.

Must:

  1. Run locally on iPhone and Mac.
  2. Sync automagically, preferably with iCloud and/or Dropbox.
  3. Have multiple lists, though does not need nested folders.
  4. Show a list of items I can check on/off.
  5. Be able to show or hide checked items, delete checked items with a command.
  6. Be able to reorder by hand (or sort with a command).
  7. Start up instantly right back where I was.
  8. Be usable while drunk, stoned, tired, or hungry. UI cannot be a giant pile of fiddly little switches.

Nice to Have:

  1. Due dates/expire dates.
  2. Priority tags.
  3. Search screen to show "What's next?", showing date, priority, list, item in that order.
  4. Notifications. But local notifications require a recent app launch, so you might miss stuff; or interacts with calendar which many people find annoying; or uses push notifications, which costs real money past a small number of users.
  5. Emoji & color tags, photos, long notes, etc.

Must Not:

  1. Give my information to Google, Microsoft, Facebook, or other evil mega-corporation who will weaponize my shopping for killer drones or advertising, or both. I'm dubious of Apple & Amazon, but at worst they seem to be venal, not evil.
  2. Be subscription-based.

Don't Care:

  1. Other platforms. Android, Linux, Windows, I don't use these so they're not a pain point for me. If mulle-objc works out, I could think about that.
  2. Pomodoro, GTD, and other fetishistic rituals.

State of the Field

  • Clear was good on iOS, but it's been "dead"/rebooting at Impending for 2 years already, and they won't be making a new Mac version.
  • Apple's Reminders is awful on the Mac (try finding the "show all" button, and keeping your list in order).
  • Things, Trello, OmniFocus, etc. are too slow & heavy for a grocery list.
  • Text files in Editorial or Drafts don't have usable (finger-sized) checkboxes.
  • Wunderlist got bought by Microsoft and destroyed as per usual. They're getting to be as bad a product graveyard as Yahoo! was.
  • RememberTheMilk is not super useful until you pay $40/year, which is not what a dumb todo list should cost.

What Am I Doing?

Thinking about this. I could write the app I want, release it for $5 on each platform, use Marzipan to make it use the same codebase. In theory, this is pretty easy; I can write a database-backed table view thing in a week. Making it nice is a while longer. Marketing is my least favorite thing, who do I use to get it in front of millions of people?

But I'd have to pay Apple to get back into the sharecropping business, and deal with their shitty Xcode tools and the rotting corpse of developer.apple.com which got fucked over by Apple marketing so you can't get to the FUCKING DOCUMENTATION. @invalidname went to work for them and got sucked into the black hole.

Time and Space Wednesday Music

Feeling like some prog, spacey rock, á la Venture Bros.

Apple Music was no help today:

apple music blank albums

I'm really not "into" Michael Jackson, especially not twice. I assume it took him appearing on GotG Awesome Mix as support. So I just went thru and hit Dislike on every one of the little creep's albums, hopefully this never happens again. I keep suggesting to Apple Music to let us block an artist we don't like so they never reappear, and they've done no such thing. Somewhat ironic: His last few albums were Invincible and Immortal; not so much.

How Fast is My Scheme

I ran a dumb Sieve of Eratosthenes benchmark on a few Schemes. I have previously found idiomatic Swift 3,151x slower than C so surely a GC'd LISP can't do that great, right?

Chicken (compiled) and Chez do great; I would expect Chez to do better on a less numeric example, this kind of array-humping is what Chicken's perfect for, since it just compiles to C. Chicken's interpreter is ridiculous, in dev it's fine for seeing if something works, but you'd never ship that. Racket's sad, and it gets worse if you try to do anything productive. Biwascheme was impossible to even test properly, but at 10% completion it wasn't going to do anything useful.

Also, I want to complain about every Scheme having a different way to call the interpreter as a script, and invoke main with command line arguments. NOT A ONE of these are consistent, and only Chicken does what's reasonable.

# C - 100% C
mdh@Aegura:~/Code/CodeC% time ./primes 1000000 >~/tmp/primes-c.txt
./primes 1000000 > ~/tmp/primes-c.txt  0.05s user 0.00s system 92% cpu 0.054 total

# Chicken interpreter - 1.4% C
mdh@Aegura:~/Code/CodeScheme% time src/primes.scm 1000000 >~/tmp/primes-chicken.txt
src/primes.scm 1000000 > ~/tmp/primes-chicken.txt  3.74s user 0.12s system 99% cpu 3.872 total

# Chicken compiled - 26.2% C
mdh@Aegura:~/Code/CodeScheme% ./build.zsh primes
Compiling primes.scm
Linking...
./build.zsh:40: no matches found: *.import.scm
Built bin/primes
mdh@Aegura:~/Code/CodeScheme% time bin/primes 1000000 >~/tmp/primes-chicken.txt
bin/primes 1000000 > ~/tmp/primes-chicken.txt  0.19s user 0.01s system 98% cpu 0.206 total

# Chez interpreted - 23.8% C
mdh@Aegura:~/Code/CodeSchemeOld/chez% time ./primes.ss 1000000 >~/tmp/primes-chez.txt
./primes.ss 1000000 > ~/tmp/primes-chez.txt  0.20s user 0.03s system 98% cpu 0.227 total

# Chez compiled - 23.9% C
mdh@Aegura:~/Code/CodeSchemeOld/chez% chez-compile.zsh primes
compiling primes.ss with output to primes.so
()
()
mdh@Aegura:~/Code/CodeSchemeOld/chez% time bin/primes 1000000 >~/tmp/primes-chez.txt
bin/primes 1000000 > ~/tmp/primes-chez.txt  0.20s user 0.02s system 97% cpu 0.226 total

# Racket interpreter - 9.6% C
mdh@Aegura:~/Code/CodeRacket% time ./primes.rkt 1000000 >~/tmp/primes-racket.txt
./primes.rkt 1000000 > ~/tmp/primes-racket.txt  0.46s user 0.09s system 99% cpu 0.560 total

# Racket compiled - 12% C
mdh@Aegura:~/Code/CodeRacket% raco exe primes.rkt
mdh@Aegura:~/Code/CodeRacket% time ./primes 1000000 >~/tmp/primes-racket.txt
./primes 1000000 > ~/tmp/primes-racket.txt  0.37s user 0.07s system 99% cpu 0.443 total

# Biwascheme - 0.03% C
# Used stopwatch, took 13.89s for 100,000, couldn't get a result for 1,000,000