Bret Victor's software projects

Recent Projects

ClickShirt

Because the world needs more custom T-shirts.

BART widget

Train schedules and novel UI techniques.

bkasm

A high-level language for a low-level DSP.

Ancient History

Apple IIgs software

When I was a child, I spake as a child. I programmed as a child. and I cranked out a whole bunch of stuff for the Apple IIgs.

All this was written in 65C816 assembly language with no debugger or reference manuals.

Crazy Caltech Projects

CyberDJ

My house ran a small "pirate" FM radio station, which fell into disuse when people didn't have time to DJ. I automated the station, turning it into a web-enabled campus-wide jukebox. listeners could request, rate, and discuss songs online. And during live shows, DJs could interact with listeners through the webpage.

CyberDJ was a custom webserver, written from scratch. This was 1998, child. we didn't have "web apps" back then.

Ditch Day

A small part of our stack was this communication terminal with a movie-like "Gratuitous User Interface". it featured gratuitous spinning and flying windows, gratuitous bar graph indicators, gratuitous everything. The terminal windows swam around nauseatingly as you typed.

CokeOS

A well-designed embedded operating system. it ran on the 2-MHz processor powering my coke machine (see electronics section). the intent was to make it easy for anyone to write software to run on the coke machine.

Things you can play with online (all very old, but probably still working)

life on the farm

words don't do it justice.

viewsource

surfing in style.

multi

view a range of images on one page.

spellcheck

for simple webpages

Tools

bpublish

an HTML generator... but really, much more. a framework for designing a custom content description language and associated output generator. not XML-based, so you probably won't use it.

Download bpublish.tgz

Read bpublish_manual.txt

I usually call bpublish an automatic HTML generator, but it's really much more than that. It allows you to design your own content description language, specifically tailored to the type of content you need to describe, and provides a framework for writing your own output generator, for whatever sort of output you need to generate.

Basically, you write up your content with the flexible bpub syntax and user-defined keywords. You then use Perl code to describe what each keyword means. bpublish ties everything together, and provides your Perl code with everything it needs to do the job easily.

Hand-writing HTML for a complex website constantly involves tedious and error-prone duplication of common constructs and themes. Graphical editors give you little control over the low-level details. Both make you specify what you want, instead of letting you describe how to make what you want. bpublish gives you the how as well as the what. You get complete control over the details, but it eliminates the tedium by turning website design into a programming problem. You don't write the HTML -- you write Perl code to write HTML for you.

The main thing is that if you design your architecture right, you can end up with complete localization of the description -- each bit of information defined in just one place. On this website, for example, if I want to correct a spelling error, or add an item to an index, or change how paragraphs are formatted, or change how indexes are laid out, or change the entire color scheme or layout, I just make that change in one single place. I then type "bpub main.bpub" and that change propagates to one, or ten, or a hundred HTML files in just a couple of seconds. If I want to add images to a page, I don't have to make any changes whatsoever. I just drop the image files into the right directory, and my bpub code finds them, figures out their dimensions, and puts them on the page. Because the output generation is handled by custom Perl code, I don't have to tell it anything that it can't figure out on its own.

bpublish includes dynamic evalution, image inspection, persistent data structures (database, sort of), keywords for programming constructs, methods for easily sharing functionality among keywords, and all sorts of other neat stuff. I've built two very different websites with it, and use it for other text-generation tasks, and I absolutely love it.

If you want to try it out for yourself, you're free to download the entire program, or browse the docs. The manual is complete and well-detailed, and the full package contains most of the source code for my old website for example purposes.

kamaileon

send anonymous or forged email. Explicitly specify the "from" and "to" lines.

Download kamaileon.tgz

Read kamaileon_readme.txt

kamaileon is a simple tool for sending "anonymous" email. When you compose your message, you explicitly specify who the message should go to, who it should appear the message is going to, and who it should appear the message is from. There is also some support for mailing lists, and lists of lists.

This type of program has probably been written a thousand times before. But this is my version. It's easy to use, has a nice interface, and at any rate, it's certainly better than "telnet mail smtp".

lgrep

conveniently browse Apache server logs.

lgrep provides a more human-readable view of your web traffic than simply grepping through the raw server logs. It makes it possible to track individual user sessions, provide conditions so you only see the hits you are interested in, and customize the output however you like.

Here's what some typical output might look like:

 foobar.somewhere.net (98.99.100.101):
 bsr: Mozilla/5.0
 ref: www.google.com/search?hl=en&q=searchstring
   8:29: ~/mypage.html
   8:30: ~/anotherpage.html
   8:45: ~/yetanother.html
 ref: www.google.com/search?hl=en&q=happiness
  12:23: ~/happypage.html
  12:24: ~/sadpage.html

 somecomputer.somewhereelse.com (12.13.14.15):
 bsr: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
 ref: www.ugcs.caltech.edu/~mybestfriend/links.html
   8:39: ~/
   8:42: ~/etc.html

To give you an idea of the sorts of things you can do, here are some usage examples:

 # show only form submissions
 lgrep bret '$request =~ /^POST/'

 # show only Mozilla users and don't show image files
 lgrep bret nopics '$browser =~ /mozilla/i'

 # show only non-OK hits, prefixed with the response code
 lgrep bret bad '$print = "  $response: "'

 # show all server activity at noon today
 lgrep - '$time eq "12:00"'

 # design your own custom output format
 lgrep bret quiet '$println = "$date $time: $page"'

 # just print a count of unique human visitors
 lgrep bret quiet nobots '${z}{$ipaddr}++; $end = keys %z'

 # see what perverted things people like to websearch
 lgrep sex quiet '$println = $search'

Documentation is at the top of the source code.

deMODifier

convert Apple IIgs SoundSmith music files into ScreamTracker 3 modules.

Download Windows executable: demodifier.zip

Download the source code: demodifier.tgz

Read the docs: demodifier_readme.txt

Download some songs: slixmusic.zip

SoundSmith was arguably the most popular music creation program for the Apple IIgs, and countless songs were written with it. Most game and demo music was in SoundSmith format. Unfortunately, keeping your IIgs in the closet makes it difficult to listen to these songs. This program converts SoundSmith files into ScreamTracker 3 modules, which can be played by any modern MOD player (including Winamp), and even edited with several popular trackers. The converted files sound almost exactly like the originals, except for the higher sound quality that a modern player provides.

A Windows executable is provided, as well as the source code, which should compile anywhere. And because I know how frustrating it is to download a new program and not be able to play with it right away, I packaged up some of my old game music for you to deMODify.

MagicMouse

Control your mouse cursor with the arrow keys. (For Windows.)

I wrote this originally for the IIgs, and when I couldn't find anything similar for Windows, I wrote it myself. It lets you move the mouse cursor around by holding down certain modifier keys and pressing the arrow keys. Alternately, pressing the modifier keys and spacebar will "lock" MagicMouse mode, and let you move around using the arrow keys without having to hold down any modifiers. You can also press keys to set how fast the arrow keys make you move.

I've found that this program can be invaluable when using paint programs, resource editors, or anything else where you need precise mouse control. You'll never say "I just want to move this over by one pixel, dammit!" again.