44 lines
No EOL
2 KiB
JSON
44 lines
No EOL
2 KiB
JSON
{
|
|
"title": "5. Weird machines",
|
|
"levels": [
|
|
{
|
|
"id": "deadfish",
|
|
"name": "Deadfish",
|
|
"description": "Deadfish is a very small joke programming language. It is often used as a test program for other esoteric programming languages. Marble machinations is now one of them.\n\n There are four commands:\ni: increment the accumulator\nd: decrement the accumulator\ns: square the accumulator\no: output the accumulator\n\n if the value becomes -1 or 256, it should be set to zero.\n\nThe test cases are taken from esolangs.org/wiki/Deadfish",
|
|
"stages": [{
|
|
"input": "iiso",
|
|
"output": "4"
|
|
},{
|
|
"input": "iissso",
|
|
"output": "0"
|
|
},{
|
|
"input": "diissisdo",
|
|
"output": "288"
|
|
},{
|
|
"input": "iissisdddddddddddddddddddddddddddddddddo",
|
|
"output": "0"
|
|
}]
|
|
},
|
|
{
|
|
"id": "brainfuck",
|
|
"name": "Brainfuck",
|
|
"description": "The language brainfuck operates on a 'tape' of bytes, with a pointer that can be moved left and right. Level input is formatted as '<program>#<input>'.\n(separator # is 35)\n\n+ (43): increment\n- (45): decrement\n< (60): move left\n> (62): move right\n, (44): input\n. (46): output\n[ (91): skip to matching ] if current value is zero\n] (93): jump to matching [ if current value is not zero\n\nmaximum memory needed: 32 bytes\nlongest program: 106 commands",
|
|
"stages":[{
|
|
"input": ">><[]++++++++-.#",
|
|
"output": [7]
|
|
},{
|
|
"input": ",>,>,>,.<.<.<.#woem",
|
|
"output": "meow"
|
|
},{
|
|
"input": "++++[++++.]#",
|
|
"output": [8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 0]
|
|
},{
|
|
"input": "-[>,]<+[-.<+]-#reverse cat program",
|
|
"output": "margorp tac esrever"
|
|
},{
|
|
"input": "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.#",
|
|
"output": "Hello World!\n"
|
|
}]
|
|
}
|
|
]
|
|
} |