1munch(6x) XScreenSaver manual munch(6x)
2
3
4
6 munch - munching squares
7
9 munch [-display host:display.screen] [-foreground color] [-background
10 color] [-window] [-root] [-mono] [-install] [-visual visual] [-delay
11 usecs] [-xor] [-noxor] [-clear number] [-simul number] [-classic |
12 -mismunch | -random] [-fps]
13
15 The munch program performs the munching squares hack. It picks square
16 size, position, and gravity randomly. It also displays a creatively
17 broken misimplementation of the classic algorithm.
18
19 The munching squares hack consists of drawing Y = X XOR T for a range
20 of X and T over and over until all the possible combinations of X and T
21 have come up. It was reportedly discovered by Jackson Wright in 1962
22 and took 5 instructions of PDP-6 code.
23
25 munch accepts the following options:
26
27 -window Draw on a newly-created window. This is the default.
28
29 -root Draw on the root window.
30
31 -mono If on a color display, pretend we're on a monochrome display.
32
33 -install
34 Install a private colormap for the window.
35
36 -visual visual
37 Specify which visual to use. Legal values are the name of a
38 visual class, or the id number (decimal or hex) of a specific
39 visual.
40
41 -delay usecs
42 The delay between steps of the animation, in microseconds. De‐
43 fault: 2500.
44
45 -xor Use the XOR drawing function. This is the default.
46
47 -no-xor Don't use the XOR drawing function.
48
49 -clear number
50 Number of squares to misdraw before clearing the display. De‐
51 fault: 65.
52
53 -simul number
54 Number of squares to misdraw simultaneously. Default: 5.
55
56 -classic
57 Draw classic munching squares only.
58
59 -mismunch
60 Draw "mismunch" only.
61
62 -random Do one or the other.
63
64 -fps Display the current frame rate and CPU load.
65
67 DISPLAY to get the default host and display number.
68
69 XENVIRONMENT
70 to get the name of a resource file that overrides the global
71 resources stored in the RESOURCE_MANAGER property.
72
74 X(1), xscreensaver(1),
75 http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html
76
78 HAKMEM: MIT AI Memo 239, Feb. 29, 1972. Beeler, M., Gosper, R.W., and
79 Schroeppel, R.
80
81 "Unless otherwise stated, all computer programs are in PDP-6/10 assem‐
82 bly language."
83
84
85 ITEM 146: MUNCHING SQUARES
86 Another simple display program. It is thought that this was discovered
87 by Jackson Wright on the RLE PDP-1 circa 1962.
88
89 DATAI 2
90 ADDB 1,2
91 ROTC 2,-22
92 XOR 1,2
93 JRST .-4
94
95
96 2=X, 3=Y. Try things like 1001002 in data switches. This also does in‐
97 teresting things with operations other than XOR, and rotations other
98 than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT -14, -9, -20, ...)
99
100
101 ITEM 147 (Schroeppel):
102 Munching squares is just views of the graph Y = X XOR T for consecutive
103 values of T = time.
104
105
106 ITEM 148 (Cohen, Beeler):
107 A modification to munching squares which reveals them in frozen states
108 through opening and closing curtains: insert FADR 2,1 before the XOR.
109 Try data switches =
110
111 4000,,4 1000,,2002 2000,,4 0,,1002
112
113
114 (Notation: <left half>,,<right half>)
115 Also try the FADR after the XOR, switches = 1001,,1.
116
118 Copyright 1997 Tim Showalter.
119 Copyright 2004 Steven Hazel.
120 Copyright 1992-2008 Jamie Zawinski.
121
122 Permission to use, copy, modify, distribute, and sell this software and
123 its documentation for any purpose is hereby granted without fee, pro‐
124 vided that the above copyright notice appear in all copies and that
125 both that copyright notice and this permission notice appear in sup‐
126 porting documentation. No representations are made about the suitabil‐
127 ity of this software for any purpose. It is provided "as is" without
128 express or implied warranty.
129
130
131
132X Version 11 6.02-4.fc35 (09-Nov-2021) munch(6x)