4 XScreenSaver(1) XScreenSaver(1)
8 munch - munching squares screen hack
10 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
11 m
\bmu
\bun
\bnc
\bch
\bh [-display _
\bh_
\bo_
\bs_
\bt_
\b:_
\bd_
\bi_
\bs_
\bp_
\bl_
\ba_
\by_
\b._
\bs_
\bc_
\br_
\be_
\be_
\bn] [-foreground _
\bc_
\bo_
\bl_
\bo_
\br]
12 [-background _
\bc_
\bo_
\bl_
\bo_
\br] [-window] [-root] [-mono] [-install]
13 [-visual _
\bv_
\bi_
\bs_
\bu_
\ba_
\bl] [-delay _
\bs_
\be_
\bc_
\bo_
\bn_
\bd_
\bs] [-xor] [-noxor] [-shift]
14 [-noshift] [-logminwidth _
\bm_
\bi_
\bn_
\bi_
\bm_
\bu_
\bm _
\bw_
\bi_
\bd_
\bt_
\bh]
16 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
17 The _
\bm_
\bu_
\bn_
\bc_
\bh program preforms the munching squares hack until
18 killed. It picks square size, position, and gravity ran-
19 domly; configurable options are listed below.
21 The munching squares hack cosists of drawing Y = X XOR T
22 for a range of X and T over and over until all the possi-
23 ble combinations of X and T have come up. It was report-
24 edly discovered by Jackson Wright in 1962 and took 5
25 instructions of PDP-6 code.
27 O
\bOP
\bPT
\bTI
\bIO
\bON
\bNS
\bS
28 _
\bm_
\bu_
\bn_
\bc_
\bh accepts the following options:
30 -
\b-w
\bwi
\bin
\bnd
\bdo
\bow
\bw Draw on a newly-created window. This is the
33 -
\b-r
\bro
\boo
\bot
\bt Draw on the root window.
35 -
\b-m
\bmo
\bon
\bno
\bo If on a color display, pretend we're on a
38 -
\b-i
\bin
\bns
\bst
\bta
\bal
\bll
\bl
39 Install a private colormap for the window.
41 -
\b-v
\bvi
\bis
\bsu
\bua
\bal
\bl _
\bv_
\bi_
\bs_
\bu_
\ba_
\bl
42 Specify which visual to use. Legal values are the
43 name of a visual class, or the id number (decimal
44 or hex) of a specific visual.
46 -
\b-d
\bde
\bel
\bla
\bay
\by _
\bs_
\be_
\bc_
\bo_
\bn_
\bd_
\bs
47 How long to wait before starting over. Default 5
50 -
\b-x
\bxo
\bor
\br Use the XOR drawing function. (Default.)
52 -
\b-n
\bno
\bo-
\b-x
\bxo
\bor
\br Don't use the XOR drawing function.
54 -
\b-s
\bsh
\bhi
\bif
\bft
\bt Start drawing the square at weird starting points.
57 -
\b-n
\bno
\bo-
\b-s
\bsh
\bhi
\bif
\bft
\bt
58 Don't shift and start drawing the square at weird
64 X Version 11 17-Jun-97 1
70 XScreenSaver(1) XScreenSaver(1)
73 -
\b-l
\blo
\bog
\bgm
\bmi
\bin
\bnw
\bwi
\bid
\bdt
\bth
\bh _
\bm_
\bi_
\bn_
\bi_
\bm_
\bu_
\bm_
\b-_
\bw_
\bi_
\bd_
\bt_
\bh
74 The logarithm (base 2) of the minimum with of a
75 square (must be a power of 2, or some parts of the
78 E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
79 D
\bDI
\bIS
\bSP
\bPL
\bLA
\bAY
\bY to get the default host and display number.
81 X
\bXE
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
82 to get the name of a resource file that overrides
83 the global resources stored in the RESOURCE_MAN-
86 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
87 X
\bX(1), x
\bxs
\bsc
\bcr
\bre
\bee
\ben
\bns
\bsa
\bav
\bve
\ber
\br(1),
88 h
\bht
\btt
\btp
\bp:
\b:/
\b//
\b/w
\bww
\bww
\bw.
\b.i
\bin
\bnw
\bwa
\bap
\bp.
\b.c
\bco
\bom
\bm/
\b/p
\bpd
\bdp
\bp1
\b10
\b0/
\b/h
\bhb
\bba
\bak
\bke
\ber
\br/
\b/h
\bha
\bak
\bkm
\bme
\bem
\bm/
\b/h
\bha
\bak
\bkm
\bme
\bem
\bm.
\b.h
\bht
\btm
\bml
\bl,
\b,
89 h
\bht
\btt
\btp
\bp:
\b:/
\b//
\b/w
\bww
\bww
\bw.
\b.c
\bco
\bom
\bme
\bed
\bdi
\bia
\ba.
\b.c
\bco
\bom
\bm/
\b/H
\bHo
\bot
\bt/
\b/j
\bja
\bar
\brg
\bgo
\bon
\bn_
\b_3
\b3.
\b.0
\b0/
\b/J
\bJA
\bAR
\bRG
\bGO
\bON
\bN_
\b_M
\bM/
\b/M
\bMU
\bUN
\bNC
\bCH
\bH-
\b-
90 S
\bSQ
\bQR
\bR.
\b.H
\bHT
\bTM
\bML
\bL
92 H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
93 Quoted from HAKMEM, for historical interest. As that doc-
94 ument says, "Unless otherwise stated, all computer pro-
95 grams are in PDP-6/10 assembly language."
97 ITEM 146: MUNCHING SQUARES
98 Another simple display program. It is thought that
99 this was discovered by Jackson Wright on the RLE
109 2=X, 3=Y. Try things like 1001002 in data
110 switches. This also does interesting things with
111 operations other than XOR, and rotations other
112 than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT
115 ITEM 147 (Schroeppel):
116 Munching squares is just views of the graph Y = X
117 XOR T for consecutive values of T = time.
119 ITEM 148 (Cohen, Beeler):
120 A modification to munching squares which reveals
121 them in frozen states through opening and closing
122 curtains: insert FADR 2,1 before the XOR. Try data
130 X Version 11 17-Jun-97 2
136 XScreenSaver(1) XScreenSaver(1)
139 4000,,4 1000,,2002 2000,,4 0,,1002
141 (Notation: <left half>,,<right half>)
143 Also try the FADR after the XOR, switches =
146 C
\bCO
\bOP
\bPY
\bYR
\bRI
\bIG
\bGH
\bHT
\bT
147 Copyright (C) 1997 by Tim Showalter. Permission to use,
148 copy, modify, distribute, and sell this software and its
149 documentation for any purpose is hereby granted without
150 fee, provided that the above copyright notice appear in
151 all copies and that both that copyright notice and this
152 permission notice appear in supporting documentation. No
153 representations are made about the suitability of this
154 software for any purpose. It is provided "as is" without
155 express or implied warranty.
157 A
\bAU
\bUT
\bTH
\bHO
\bOR
\bR
158 Tim Showalter <tjs@andrew.cmu.edu>, 17-Jun-97, based on
159 what's in the Jargon File and stealing stuff from existing
160 xscreensaver modules.
196 X Version 11 17-Jun-97 3