Taxman – a BASIC game from 1973

Back in 1973, the future definitely wasn’t equally distributed. While in Scotland we had power cuts, the looming three-day week and Miners’ Strike I, in California, the People’s Computer Company (PCC) was giving distributed computer access, teaching programming and publishing computer magazines. I don’t think we got that kind of access until (coincidentally) Miners’ Strike II a little over 10 years later.

taxman drawn image from People's Computer Company magazine (1973) , with "1 for you 19 for me" quote from The Beatles song "Taxman"
flares? platforms? centre parting? bow tie? It was 1973 after all

But the People’s Computer Company magazine archive is a sunny thing, overfilled with joyful amateur enthusiasm and thousands of lines of code fit to make Edsger Dijkstra explode. Of course it was written for the local few who had access to mainframes and terminals, but it hardly seems to come from the same world as the dark evenings in Scotland spent cursing the smug neighbours’ house with all the lights on, their diesel generator putt-putting into the night.

Lots of these games from the PCC era are forgettable now. The raw challenge of guessing a number on a text screen has paled somewhat in the face of 4K photo-realistic rendering. One game I found is still a little challenging, at least until you work out the trick of it: Taxman (or as the authors tried to rename it later, Factor Monster). Here’s a tiny sample game transcript:

Hi, I'm the taxman
Do you want the regulations?
(1=Yes, 0=No)? 0

How many numbers do you want
in the list? 6

The list is: 1  2  3  4  5  6 

You take? 5
Your total is  5 
I get  1 
My total is  1 

New list:  2  3  4  6 

You take? 6
Your total is  11 
I get  2  3 
My total is  6 

New list:  4 
I get  4 
because no factors of any number
are left.
My total is  10 

You  11  Taxman  10 
You win !!!

Again (1=yes, 0=no)?

Seems I sneaked a lucky win there, but it’s harder than it looks. The rules are simple:

  • Start with a list of consecutive numbers
  • You choose a number, but it has to have some factors in the list
  • The taxman (or the factor monster, a concept I much prefer as it doesn’t reinforce the Helmsley Doctrine) takes all the remaining factors of your number from the list
  • You get to choose a number from the list, which is now missing your previous choice and all of its factors, and repeat
  • Once the list has no multiples of any other number, the taxman/FM takes the rest
  • The winner is whoever has the largest sum.

For such a simple game (or perhaps, such a simple me) the computer wins surprisingly often. Since I find it fun to play, I thought I’d share the 1973 love as much as possible by porting to all of the BASIC dialects that I knew.

Plain text BASICtaxman.bas – runs under interpreters such as bas. Almost verbatim from the 1973 publication. May not allow you to play again on some interpreters; you might want to try my slightly rearranged 40 column version that should run on systems that don’t allow a variable to be dimensioned twice.

taxman on Amstrad CPC: starting with numbers 1-6, player has taken 4, so taxman takes 1 & 2, leaving 3, 5 and 6
taxman on Amstrad CPC: how BASIC programs look to me, yellow on blue 4 lyfe

Amstrad CPC Locomotive BASICtaxman.dsk – or as I call it, BASIC. 40 columns yellow on blue is how BASIC should look.

taxman on BBC Micro, showing games tart for 1-6. Adjacent numbers are a full column apart
taxman on BBC, Mode 7: dig the weird spacing

BBC BASICtaxman.ssd – for all the boopBeep fans out there. You can actually play this one in your browser, too. Yes, the number formatting is weird, but BBC BASIC was always its own master.

taxman: Commodore 64 showing the instructions
taxman on C64

Commodore 64taxman.prg – very very upper case for this dinosaur of a BASIC.

taxman running on Apple II: loaded from disk, started with 6 numbers
taxman running on Apple II

Apple II AppleSoft BASICTAXMAN.DSK – lots of fiddling with import tools and dialect weirdness because Apple.

taxman: end of game on ZX spectrum
taxman: end of game on ZX spectrum

ZX Spectrum (Sinclair BASIC)taxman.tap – 32 columns plus a very special dialect (no END, GOTO and GOSUB are GO TO and GO SUB) meant this took a while, but it was quite rewarding to get going.

taxman - BASIC program listing on ZX-81 running under sz81 emulator, Linux window borders visible
Taxman on ZX81: more SCROLLs than the Dead Sea

Sinclair ZX81 (16 K) – taxman.p – this one was a fight. The ZX81 didn’t scroll automatically, so you have to invoke SCROLL before every newline-generating PRINT or else your program will stop. For some reason this version gets unbearably slow near the end of long games, but it does complete.

Apple II on Raspberry Pi

C’mon let’s all die of dysentery on the Oregon Trail!

Update: You probably want to use https://github.com/linappleii/linapple instead of Linapple-Pie these days.

Building and installing the linapple-pie Apple IIe emulator is relatively easy on the Raspberry Pi:

sudo apt install libcurl4-openssl-dev libzip-dev zlib1g-dev libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-sound1.2-dev build-essential git
git clone https://github.com/dabonetn/linapple-pie.git
cd linapple-pie/src
make
sudo make install

This also works on an x86_64 Ubuntu machine. It does also install on a PocketCHIP (even if it takes a really long time) but I can’t get the display resolution to fit correctly.

Mac Classic II rev 2 re-capping


Since the 68kMLA wiki page on Capacitor Replacement doesn’t have it, and also doesn’t seem to be accepting new edits, here’s what you need to replace the leaky capacitors on a revision 2 Macintosh Classic II motherboard (part 820-0326-B):

  • 2× 1 µF, 50 V rating (C9, C15)
  • 3× 47 µF, 16 V rating (C3, C4, C13)
  • 12× 10 µF, 16 V rating (C5, C6, C7, C8, C10, C11, C12, C14, C21, C74, C79, C106)

You’ll probably also be looking for a 3.6 V ‘½ AA’/14250 lithium battery too, as if it hasn’t leaked in the 25 years since your Classic II was made it’ll be completely flat. These can be a bit pricey and hard to find. I got one at Sayal for nearly $10.

The revision 2 Classic II board is immediately identifiable by having only two ROM sockets where the first revision has four ROMs.

(Not Just) Firefox’s “Pile of Poo” Easter Egg: 💩

For a reason best known to the Unicode consortium, there is now the symbol U+1F4A9 “Pile of Poo”: 💩. If you happen to create a web page with this delightful character in the title, Firefox does something special:

Yep, that’s a smiley face poo, a bit like Mr Hankey. Oh dear.

Actually, it seems it might be an OS X Emoji thing, because Safari renders it in the title like that, and in the text as (enlarged to show texture):

iOS has it covered too:

Blackberry’s browser just shows a small black square. Android, rather sensibly, shows an empty square. It must be an Apple thing.

“Thanks” go to tchrist‘s comment in unicode – Why does modern Perl avoid UTF-8 by default? for alerting me to this character, and letting us know about the Symbola font that supports it. Yeah, cheers Tom …

iTunes ate my iPod!

Kind of what my iPod now does, until the battery runs out
Kind of what my iPod now does, until the battery runs out

I have, well had, a 2GB second-gen iPod Nano. Now I have a very slim brick.

When I upgraded to iTunes 8, it offered an update for my iPod. I let it do its thing, then resync’ed it. I noticed that the iPod rebooted after the sync — no big deal — but then kept rebooting (back and forth …) forever.

I tried resetting it; nope, it would just start doing its thing again.

I tried putting it into disk mode, then restoring it; nope, back and forth, back and forth

In desperation, I tried restoring it on a PC, which needed to reformat the iPod. Partial success; it sync’ed music from the PC, but since my working music library is on my iBook, I had to restore and resync, and guess what? back and forth, back and forth

I’d heard that the problem could be caused by empty podcast folders, so I cleared out and rebuilt my library, put the iPod into disk mode and restored it on a PC, resync’ed on the iBook and … back and forth, back and forth

As a last try I’m going to fsck it under Linux. I might be stuck using yamipod, which is probably a bonus, as all I use iTunes for is as an iPod conduit. I really miss having a Rockbox-capable player, as it just worked the way I expected.

UPDATE: yeah, that last one did it. Shame about yamipod’s UI.

The Apples in Stereo – Lee’s Palace, Toronto – 20 February 2007

In haste: The Apples in Stereo – Lee’s Palace, Toronto – 20 February 2007
(now updated to include better MP3s)

  1. (intro)
  2. Go
  3. Please
  4. Can You Feel It?
  5. The Rainbow
  6. Energy
  7. Strawberryfire
  8. Radiation
  9. Do You Understand?
  10. Open Eyes
  11. I Can’t Believe
  12. (apples in stereo mini-theme)
  13. Skyway
  14. (mini theme/tuning)
  15. Motorcar
  16. Tin Pan Alley
  17. Sun Is Out
  18. Same Old Drag
  19. (theme interlude)
  20. What’s the #?
  21. Ruby
  22. (encore intro)
  23. Play Tough
  24. Baroque

definitely clean

iTunes 'clean' marker

iTunes‘ clean/explicit labelling worries me. Shouldn’t I, at the age of Dennis the Communist Peasant, be able to decide what’s good for me? Not merely that, but it takes up a bunch of the song title entry, and they label songs by artists who don’t produce bowdlerised versions. Gah!

Free the Laserjet 4!

I love the HP LaserJet 4+. Built like a tank, good print quality, and now available used/refurb for pennies. Sure, they weight about as much as a Sherman, and suck power like there was no tomorrow, but one of my 4+s has nearly a million on the page count, yet prints crisp and clean.

Last weekend I scored a 4+ with built in duplexer from eBay for very little. It didn’t want to print at first (giving a cryptic 13 PAPER JAM error), but removing the rather beat-up full-ream paper tray fixed that. It may need a new cartridge (at almost twice what I paid for the printer), but I’m happy.

Wonder if I can direct-connect one of them to the ethernet port on Catherine’s eMac? I know my router won’t talk AppleTalk, so we can’t network just one printer.

music of 2005

It’s getting towards the end of the year, so I’m thinking about what albums I enjoyed most. These are the 2005 albums I have in my collection:

  • A Hawk And A Hacksaw — Darkness At Noon
  • Aimee Mann — The Forgotten Arm
  • Animal Collective — Feels
  • Beck — Guero
  • Bettye Lavette — I’ve Got My Own Hell To Raise
  • Bright Eyes — Digital Ash In a Digital Urn
  • Bright Eyes — I’m Wide Awake, It’s Morning
  • Calexico / Iron & Wine — In the Reins
  • Caribou — Marino Audio
  • Dan Jones — Get Sounds Now
  • The Decemberists — Picaresque
  • Deerhoof — The Runners Four
  • Devendra Banhart — Cripple Crow
  • Dressy Bessy — Electrified
  • The Duhks — The Duhks
  • Eels — Blinking Lights And Other Revelations
  • Fiona Apple — Extraordinary Machine
  • Gorillaz — Demon Days
  • Grandaddy — Excerpts From The Diary Of Todd Zilla
  • Jennifer Gentle — Valende
  • John Parish — Once Upon a Little Time
  • Kate Bush — Aerial
  • Kate Rusby — The Girl Who Couldn’t Fly
  • Kimberley Rew — Essex Hideaway
  • Lazerlove5 — Flicker Mask
  • Lemon Jelly — ‘64–‘95
  • The Lollipop People — We Need a New F-Word
  • Malcolm Middleton — Into The Woods
  • Marbles — Expo
  • The Mountain Goats — The Sunset Tree
  • My Morning Jacket — Z
  • Of Montreal — The Sunlandic Twins
  • Sigur Rós — Takk …
  • Sleater-Kinney — The Woods
  • Sufjan Stevens — Illinois
  • The Vanity Project
  • Wolf Parade — Apologies to the Queen Mary

I know there are some that won’t make my list (Aerial, for one) but the rest of them all have their moments.

Tiger’s Dictionary

OS X Tiger's Dictionary
I was pleased to see that Apple had included a comprehensive dictionary with OS X 10.4. The Oxford American is a decent enough reference tome, and the computer implementation isn’t bad at all.

The typography’s fairly clean, if rather heavy on the whitespace. Cross references are active; if one clicks on the small-caps word whitlow, you’ll go to its definition (if you have to; it’s kinda nasty). For some reason, the Dashboard version of the dictionary doesn’t have active xrefs.

Searching isn’t as good as it could be. As with most electronic products, it assumes you already know how to spell the word. The incremental search does allow that, as long as you have the first few letters right, the list of possible choices is quite small. Like all electronic dictionaries that I’ve seen, it’s not possible to browse the text in that spectacularly non-linear way that makes a real paper dictionary fun.

It does seem to have a good few Canadian terms, but a true Canadian dictionary should be shipped with Canadian Tiger. Correct spelling isn’t just optional. It also only labels British and Canadian spellings as ‘British’.

So, in summary, pretty good, but far from perfect.