Skip to content

Instantly share code, notes, and snippets.

@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@xsot
xsot / gen.rb
Last active January 18, 2019 13:22
Minimal charset quine
names = {
43 => 'e',
'prog' => 'x', # the program will be stored in this variable
'template' => 'c',
0 => 'ee', # register?
1 => 'ex',
2 => 'ec',
4 => 'xe',
8 => 'xx',
16 => 'xc',