munch(6x)

🌈 NAME 🌈

okay bestie, meet munch β€” literally β€œmunching squares,” and yes, this is the munch(6x) page from the XScreenSaver manual. it’s giving vintage chaos, and we’re obsessed. πŸ’–

✨ SYNOPSIS ✨

the whole invocation vibe is exactly this, no cap:

munch [--display host:display.screen] [--foreground color] [--background
color] [--window] [--root] [--window-id number][--mono] [--install]
[--visual visual] [--delay usecs] [--xor] [--noxor] [--clear number]
[--simul number] [--classic | --mismunch | --random] [--fps]

πŸ’… DESCRIPTION πŸ’…

so munch performs the munching squares hack. it picks square size, position, and gravity randomly. it also displays a creatively broken misimplementation of the classic algorithm β€” yes, on purpose, and it’s iconic. πŸŽ€

the munching squares hack consists of drawing Y = X XOR T for a range of X and T over and over until all the possible combinations of X and T have come up. it was reportedly discovered by Jackson Wright in 1962 and took 5 instructions of PDP-6 code. five. that’s the whole flex. ✨

πŸŽ€ OPTIONS πŸŽ€

okay so munch accepts the following options, and every single one is here:

  • --window β€” draw on a newly-created window. this is the default, bestie. 🫢
  • --root β€” draw on the root window.
  • --window-id number β€” draw on the specified window.
  • --mono β€” if on a color display, pretend we’re on a monochrome display.
  • --install β€” install a private colormap for the window.
  • --visual visual β€” specify which visual to use. legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual. iykyk.
  • --delay usecs β€” the delay between steps of the animation, in microseconds. default: 2500.
  • --xor β€” use the XOR drawing function. this is the default.
  • --no-xor β€” don’t use the XOR drawing function.
  • --clear number β€” number of squares to misdraw before clearing the display. default: 65.
  • --simul number β€” number of squares to misdraw simultaneously. default: 5.
  • --classic β€” draw classic munching squares only.
  • --mismunch β€” draw "mismunch" only.
  • --random β€” do one or the other.
  • --fps β€” display the current frame rate and CPU load. main character stats, fr fr.

πŸ¦‹ ENVIRONMENT πŸ¦‹

  • DISPLAY β€” to get the default host and display number.
  • XENVIRONMENT β€” to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.
  • XSCREENSAVER_WINDOW β€” the window ID to use with --root.

🌸 HISTORY 🌸

HAKMEM: MIT AI Memo 239, Feb. 29, 1972. Beeler, M., Gosper, R.W., and Schroeppel, R.

"Unless otherwise stated, all computer programs are in PDP-6/10 assembly language."

πŸ“ ITEM 146: MUNCHING SQUARES πŸ“

another simple display program. it is thought that this was discovered by Jackson Wright on the RLE PDP-1 circa 1962.

            DATAI 2
            ADDB 1,2
            ROTC 2,-22
            XOR 1,2
            JRST .-4

2=X, 3=Y. try things like 1001002 in data switches. this also does interesting things with operations other than XOR, and rotations other than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT -14, -9, -20, ...) πŸ’€

πŸ¦„ ITEM 147 (Schroeppel): πŸ¦„

munching squares is just views of the graph Y = X XOR T for consecutive values of T = time.

🧚 ITEM 148 (Cohen, Beeler): 🧚

a modification to munching squares which reveals them in frozen states through opening and closing curtains: insert FADR 2,1 before the XOR. try data switches =

4000,,4    1000,,2002    2000,,4    0,,1002

(Notation: <left half>,,<right half>)

also try the FADR after the XOR, switches = 1001,,1.

🌈 SEE ALSO 🌈

X(1), xscreensaver(1), https://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html β€” go read, bestie, the lore is real. πŸ‘‘

okay legal bestie, here is the exact copyright + permission notice:

  • Copyright Β© 1997 Tim Show alter.
  • Copyright Β© 2004 Steven Hazel.
  • Copyright Β© 1992-2008 Jamie Zawinski.

Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

X Version 11 Β· 6.09 (07-Jun-2024) Β· munch(6x) β€” that’s the footer, bestie; page complete, slay forever. πŸ’…βœ¨

πŸ“¦ where this page comes from