So, I mention this a week ago trying to see if anyone would bother, and we get an announcement on the fucking day it's going to start. You know what, fuck you /prog/
YOU WOULDN'T DOWNLOAD ACAR
BUT YOU MIGHT
UPLOAD A CDR
Name:
Anonymous2010-06-18 11:34
So…we can't start working out how factories or car/fuel encodings work without registering a team. And if we post our findings (or login information) here, other teams can steal them. How do we do this?
>>18 I'm sure that we're usually divided between multi-paradigm programmers(those that love mixing functional, imperative, meta ,OO, declarative, ... code), purely fictional programmers and a few nuts which stick to one paradigm only.
The factory syntax is a list of gates, of the form (left-input right-input gate-type '#' left-output right-output). The only valid gate-type appears to be 0. Each of the input/output fields is a reference to the output/input pin it's connected to; either a gate number followed by 'L' or 'R', or the special value 'X' representing an external data stream. Gates are implicitly numbered from 0 to n by the order they appear in the list, and each wire is specified redundantly at both connection points. Before and after the list are redundant specifications of the external pin locations. A signal traveling ``backward'' refers to one where the destination gate number is less than or equal to the source gate number; such signals are not read until the next clock cycle.
The gate logic is (a, b) -> (a-b, 2+a*b) mod 3.
The input string fed to a factory is (begins with) 01202101210201202.
The key prefix is 11021210112101221.
Here is a shitty program to run a factory. It takes a gate layout on stdin and prints the expected result on stdout. It has no error checking.