Remarks: One-Liners
From Maze
(Difference between revisions)
| Line 1: | Line 1: | ||
| − | One-liners such as 10 PRINT are curt, minimal BASIC programs written to illustrate, represent, and express ideas. This remarks examine three one-liners which make use of the RND function in BASIC on the Commodore 64. | + | One-liners such as 10 PRINT are curt, minimal BASIC programs written to illustrate, represent, and express ideas. These remarks examine three one-liners which make use of the RND function in BASIC on the Commodore 64. |
| − | Due to their brevity, one-liners must often exploit resources which exist in the underlying platform. For example, 10 PRINT relies on graphical images called PETSCII contained in the ROMs of the Commodore computers. The single line of code itself contains no data pertaining to the curves or pixels comprising the / and \ images. 10Print merely uses the numbers 205.5 and .5 to refer to characters number 205 and 206. Those two numbers are indexes into the "block graphics set" which the 8-bit home computers used to draw simple graphics. This feature, common to the Commodore video display hardware and many other platforms, but not the original Dartmouth BASIC system, kept the program very short. | + | Due to their brevity, one-liners must often exploit resources existing in the underlying platform. For example, 10 PRINT relies on graphical images called PETSCII contained in the ROMs of the Commodore computers. The single line of code itself contains no data pertaining to the curves or pixels comprising the / and \ images. 10 PRINT uses merely the numbers 205.5 and 0.5 to refer to characters number 205 and 206. Those two numbers are indexes into the "block graphics set" which the 8-bit home computers used to draw simple graphics. This feature, common to the Commodore video display hardware and many other platforms, but not the original Dartmouth BASIC system, helps keep the program very short. |
| − | + | ||
*Icicle Storm | *Icicle Storm | ||
| − | Block graphics sets - such as the non-typographic / and \ symbols used in 10Print - have collectively allowed a non-alphabetic visual vocabulary to flourish, one capable of representing emotions, stick-figures, space travel, balance sheets, graphical window systems. | + | Block graphics sets - such as the non-typographic / and \ symbols used in 10Print - have collectively allowed a non-alphabetic visual vocabulary to flourish, one capable of representing emotions, stick-figures, space travel, balance sheets, and graphical window systems. In 10 PRINT, block graphics characters more firmly represent the notion of a maze than the typographic / and \ symbols. A maze constructed of / and \ would have leaks at every junction. In contrast, the block graphics symbols form tight edges, accurate to the pixel. |
| − | + | ||
| − | In one-liners, sometimes symbols represent subject in a story. For example, in the variation on 10 PRINT below, one of the slanted symbols is reinvoked to represent an icicle. | + | For example, in the one-liner variation on 10 PRINT below, one of the same diagonal symbols that 10 PRINT uses can be reinvoked as an icicle: |
10 poke 1024+rnd(1)*1000,78: goto 10 | 10 poke 1024+rnd(1)*1000,78: goto 10 | ||
| + | |||
| + | In that program, part of the impression of movement and space-filling are features inherent to the medium of BASIC on the Commodore 64. Specifically, the slow, ruthless instantiation of icicles mimics the dynamics of a mounting storm because the computer can not draw them fast enough to fill the screen instantly. For narrative purposes, it would be possible to <em>slow down</em> the drawing, but not to speed it up (without resorting to extra-BASIC code execution or upgraded hardware). In a similar way to Icicle Storm's window gradually filling with frozen snow, 10 PRINT presents a cinematic representation of an experience. The pace of that experience is limited to the slow and steady synthesis of their final output images. | ||
| + | |||
| + | This one-line simulation may represent the accumulating energy of a storm, but it will never, like a real storm, die out and warm up. After completely filling the screen, the action ceases, so the one-liner can only tell one part of a story. | ||
This illusion takes some imagination and relies on the default color scheme of the BASIC environment: light blue ice crystals against a dark, foreboding azure, sky at late dusk. | This illusion takes some imagination and relies on the default color scheme of the BASIC environment: light blue ice crystals against a dark, foreboding azure, sky at late dusk. | ||
Icicle Storm relies on the RND command as well as "screen memory," the grid-shaped arrangement of memory locations which corresponds to the PETSCII graphics as they appear on a monitor. | Icicle Storm relies on the RND command as well as "screen memory," the grid-shaped arrangement of memory locations which corresponds to the PETSCII graphics as they appear on a monitor. | ||
| − | Part of the impression of movement and space-filling are features inherent to the medium of BASIC on the Commodore 64. Specifically, the slow, ruthless instantiation of icicles mimics the dynamics of a mounting storm because the computer can not draw them fast enough to fill the screen instantly. For narrative purposes, it would be possible to <em>slow down</em> the drawing, but not to speed it up (without resorting to extra-BASIC code execution or upgraded hardware). In a similar way to Icicle Storm's window gradually filling with frozen snow, 10 PRINT presents a cinematic representation of an experience. The pace of that experience is linked to the slow and steady synthesis of their final output images. | ||
| − | This, too, depends upon the physical interpretation of the program's output, what the PRINT command actually does in real-life. On older systems, it | ||
| − | This one-line simulation may represent the accumulating energy of a storm, but it will never, like a real storm, die out and warm up. After completely filling the screen, the action ceases, so the one-liner can only tell one part of a story. | + | |
| + | |||
