esolang

SpeedScript

Brainfuck you write by running. Every lap is one command, and its pace says which.

Turing complete: yes · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: Hello, World!

The idea

SpeedScript was made for the student taught esolangs course at Carnegie Mellon University. A program is a run recorded on Strava. Each lap is one brainfuck command, picked by how fast it was run. A script fetches the latest activity through the Strava API, runs the brainfuck its laps spell and writes the code and its output into the activity's description. The specification says the point is to spend 0% of one's time on self care, since the workout does the coding.

Read the story

The specification gives its programs as laps of 100 m. Its author tried to run the Hello World and failed. The input is always empty, so the read command always reads nothing.

The machine

Pace per mileBrainfuckDoes
5:30 or faster>Move the pointer right
6:00<Move the pointer left
6:30+Add 1 to the cell
7:00-Take 1 from the cell
7:30.Print the cell
8:00,Read, which always gives 0
8:30 9:00[ ]Loop while the cell is not 0

The specification gives no table. Of the 40,320 ways to give the eight paces the eight commands, only this one and the same with < and > swapped make its first program a Hello World, and both make the second a string reverser.

Its notes turn each pace into the seconds a 100 m lap takes, one sixteenth of the pace, so a mile counts as 1600 m. Each pace covers the 30 seconds up to it, so a lap of 6:10 is a + and a lap slower than 9:00 is no command. A program is written as the specification writes it, one lap per line such as Lap 0: 6:30, or as paces in a row. Cells are bytes that wrap from 255 to 0, and the tape reaches both ways.

Example

The Hello World is 72 laps.

The Hello World is 72 laps. They spell a well known 72 command brainfuck Hello World, which counts with bytes that wrap and steps five cells left of the one it starts on.

Eight laps at 6:30 put 8 in the first cell. A loop then adds 8 to the next cell eight times, and one more 6:30 and a 7:30 print 65.

Expected: A

The second program is ten laps that spell ,[>,]<[.<], brainfuck's string reverser. With the input always empty it prints nothing.

Patterns it teaches

Further

SpeedScript builds on Brainfuck.

Non-textual

Brainfuck equivalents

Write your own in Run Convert a program from SpeedScript

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: speedscript.

Command line

shib run speedscript -e 'Lap 0: 8:00 // 28.125-30
Lap 1: 8:30 // 30-31.875
Lap 2: 5:30 // 20.625
Lap 3: 8:00 // 28.125-30
Lap 4: 9:00 // 31.875-33.75
Lap 5: 6:00 // 20.625-22.5
Lap 6: 8:30 // 30-31.875
Lap 7: 7:30 // 26.25-28.125
Lap 8: 6:00 // 20.625-22.5
Lap 9: 9:00 // 31.875-33.75'
shib manual speedscript

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/speedscript.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org