Twittjr
Twittjr is a system that allows an IBM PCjr to search the public timeline on Twitter. In case you weren't aware, the IBM PCjr is a personal computer introduced in 1984 and has a 4.77MHz processor, 128KB of RAM, and uses 360KB floppy disks for storage.
It seemed like a good idea at the time.
How does it work?
You have a PCjr hooked up to an external dial-up modem, which is connected to a phone line. Elsewhere, you have a modern internet-connected computer (call it the "server") with another dial-up modem, connected to another phone line. The PCjr calls the server and establishes a modem connection, which it uses to send a request for whatever search term the user enters. The server uses the Twitter Search API to download the three most recent posts on the public timeline that match the search, and shoves them back over the phone line to the PCjr, which displays them on the screen in glorious 16-color ASCII-vision. In the absence of user interaction, the PCjr refreshes the search results every minute or so, providing a sort-of-live feed.
What is it written in?
The PCjr software is in Cartridge BASIC, which is essentially BASICA with some extra bits. Cartridge BASIC is the best of the three forms of BASIC that can be used on the PCjr (the others are Disk BASIC and Cassette BASIC), because the interpreter doesn't take up system memory, it runs almost as fast as compiled code, and you can save your programs to disk. It does, however, require that you have A) the actual Cartridge BASIC cartridge, and B) a DOS disk to boot from.
The "server" software is a small Ruby script that uses only built-in libraries. It should work on any platform that can run Ruby, but I’ve only tested it on Linux.
Why Twitter on a PCjr?
I’m a long-time member of Computer Science House at RIT, and one day I discovered a fully-functional PCjr gathering dust on a shelf in one of our common rooms. Noticing that it used BASIC, which I was familiar with from my high school days, I figured I could write some eye-catching application that would attract people to our tables at the ImagineRIT 2009 innovation fair. Lots of CSHers had been joining Twitter recently, including myself, and someone who saw me fiddling with the PCjr jokingly suggested putting Twitter on it. Several weeks later, the first version of Twittjr was serving up tweets to curious open-house visitors.
Can I set this up on my own PCjr?
Absolutely, as long as you have the following things:
- One IBM PCjr with DOS boot disk and Cartridge BASIC cartridge
-
One of the following:
- Internal PCjr modem installed (limited to 300 baud)
- External serial modem with PCjr serial adapter to attach it
- A 5.25-inch floppy drive in your own computer, to copy the program
- A spare 5.25-inch disk (or use your boot disk if it’s writable)
- Any modern-ish PC to use as a server
- A modem for said PC that appears to your OS as a serial device
- A working installation of Ruby on said PC
- Two phone lines (at least one must be capable of calling the other)
And last but not least, you’ll need the Twittjr code package! It includes a README with basic setup instructions, so look that over before you start.
Bonus C64 Twitter Madness
If you're interested in getting Twitter on other ancient computing hardware, Johan Van den Brande wrote a cool Commodore 64 program called BREADBOX64. It's coded in C and takes advantage of an Ethernet add-on cartridge to allow for a completely standalone system... and it runs on just 64KB of RAM and a 985KHz CPU (no, that K is not a typo, it's 985 Kilohertz). Check it out!