Code for the Advent of Code event
aoc advent-of-code
at rust 14 lines 277 B view raw
1error 'Requires Lua 5.2' unless _VERSION\find 'Lua 5.2' 2 3emulator = require 'emulator' 4 5input = io.open 'input.txt', 'r' 6 7for line in input\lines '*l' 8 emulator.parse line 9 10input\close! 11 12emulator.set 'b', emulator.get 'a' 13 14print "The value of wire a is #{emulator.get 'a'}"