git @ Cat's Eye Technologies Dipple / master lua / machine.lua
master

Tree @master (Download .tar.gz)

machine.lua @masterraw · history · blame

#!/usr/bin/lua

-- SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
-- For more information, please refer to <https://unlicense.org/>
-- SPDX-License-Identifier: Unlicense

-- Implements an automaton by Elliott Hird.
-- Not sure what it was supposed to do...

m = {}
x = 0
while 1 do
  m[m[0] or 0] = x
  x = m[(m[0] or 0) + 1]
  m[0] = x
end