Tuesday, 31 March 2026

miriam_e: from my drawing MoonGirl (Default)
Fell down a deep rabbithole today. For far too long I have been on a quest to find (or create) the perfect text editor. Today I found out about TECO -- the ancestor to emacs. If you thought emacs is ugly (I do) then you will be appalled at the awful, powerful ugliness of TECO. It is fascinating.

This seems a bit random, right? Spending much of the day reading about a text editor whose heyday was way back when I was a kid in school? I came to that after musing about the command set for the line editor Microsoft made for the TRS-80 and CoCo computers (I know the CoCo is technically a TRS-80 computer, but that gets confusing). The clumsy line editor (for editing program lines) has a very sparse, but powerful command set of just 16 instructions:
nSpace Move forward n number of characters
nC Change n number of characters
nD Delete n number of characters
nSc Search for nth occurence of character c
nKc Kill (delete) to nth occurrence of character c
n ← Move cursor n characters to the left
I Insert text
H Hack off rest of line and go into insert mode
L List current line and continue editing
X eXtends line - go to end of line and enter insert mode
A Abort changes and continue editing
Shift ↑ escape subcommand (escape insert mode)
Q Quit without saving
Break Quit without saving
E End editing, save changes
Enter End editing, save changes

I wondered if there were any more, so I read the disassembly of the BASIC ROMs for the old TRS-80 and CoCo. No. That's the full command set for their line editor.

I became curious about where they got the idea for this line editor from. When I looked for earlier examples of use of these commands in a line editor, I found that Bill Gates, and Paul Allen also wrote the BASIC interpreter for the Altair 8080 -- the world's first personal computer -- and Gates recently released the source code. So I read through its code. No, that early version doesn't include a line editor, however it turns out that a later, extended version of the Altair's BASIC in 1977 did have an identical line editor (I don't have the code for it, but was able to download a manual for it).

Interestingly, he and Allen didn't have an Altair at the time they wrote that BASIC, but their school had timeshare access to a PDP-8, and Paul Allen had written an 8080 emulator for the PDP-8, so they wrote the BASIC interpreter on the PDP-8 using that emulator! I don't know what editor they used at the time, but it might have been TECO... and that's how I came to be doing that particular bit of computer archaeology.

Oh, and by the way, if you feel masochistic enough, you can download and compile TECO today.
https://github.com/blakemcbride/TECOC

Nancy Drew books

Tuesday, 31 March 2026 08:18 pm
miriam_e: from my drawing MoonGirl (Default)
I've been taking a bit of a rest from reading science fiction lately, instead reading the old Nancy Drew mysteries, and the more recent Nancy Drew Files series of books. At first I was not all that keen on the older books as they're simplistic and naïve, but they're starting to grow on me. They have a certain 1930s charm.

The newer Nancy Drew Files books are more engrossing. I feel like I'm getting more Veronica Mars episodes (I loved that TV series). The books don't have the smart dialogue of that show, but they often have satisfyingly complex plots. Rob Thomas, the creator of Veronica Mars always said he took inspiration from the Nancy Drew books. I can see it.

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

May 2026

S M T W T F S
      12
3456789
10111213141516
17181920212223
24252627282930
31      

Style Credit

Expand Cut Tags

No cut tags
Page generated Wednesday, 6 May 2026 05:47 pm
Powered by Dreamwidth Studios