teaching machines

Keystrokes File Format

A Keystrokes text movie is composed of a number of frames. Each frame is currently stored in a separate file, and all metadata describing the frame is stored in the file name. The only thing inside the file is the text of the frame (or a diff describing how to construct it from the previous […]

Keystrokes Patcher

For our Keystrokes project, we grab “frames” for our text movie as snapshots of the file being edited. We don’t really want to pass the complete file around for every snapshot, so instead we store diffs between frames that allow us to reconstruct any particular frame beyond the first. To produce frame 2, we apply […]

Capturing snapshots of a text file in Vim

To make a movie of textual development, I need a way to capture edits to a text file. Capturing needs to be done automatically and transparently; the developer shouldn’t have to trigger them. Otherwise, he’d forget. My initial thoughts were to intercept every keystroke and record the changes elsewhere on disk. I didn’t really like […]

Making a jQuery slider do something

Getting a slider to display was the first step. The end goal is to make the slider scrub through a series of snapshots of a text file. In between, let’s just figure out how to map the tick to a timestep. jQuery sliders are discrete; they can only be scrubbed to integral positions. Since the […]

Loading a remote file in JavaScript

Next up on my list of things I don’t know how to do is load a file in JavaScript. For now, let’s assume the file is hosted on the same server as the script. I understand that reading local files requires HTML5 and reading files from other servers can be troublesome. jQuery has several ways […]

Adding a slider into WordPress

How can I get a slider in HTML? Actually, how can I get a slider in WordPress, which is slightly harder? jQuery UI provides a slider, but the jQuery that ships with WordPress was not appearing for me. I tried using the jQuery provided by Google’s CDN instead: There are probably later versions I could […]