We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Function key + Page Up/Down

From Esolang
Jump to navigation Jump to search

Function key + Page Up/Down is an esoteric programming language by user:raiseafloppafan7741 in 2026. It is based on Minsky machines.

Syntax

There are infinite unbounded counters that are all initialized to zero.

State [N] defines a label.

Page Up increments the current counter.

Page Down -> [State Number] decrements the current counter if it is not zero already. If it is zero, then it jumps to the specified label.

Control + Page Up moves to the previous counter.

Control + Page Down moves to the next counter.

Function key + Page Down resets the current counter to zero.

Control + C inputs a byte into the counter. EOF is -1.

Control + V outputs the counter as a byte modulo 256.

E freaking crashes the program in an elegant way.

Computational class

Function Key + Page Up/Down is a register machine with infinite unbounded registers and has the required subset of incrementing any register and decrementing any register or jumping if it is zero. Since Minsky machines only need 2 registers to be Turing-complete AND the subset of instructions {INC, JZDEC} are supported, then Function Key + Page Up/Down is Turing-complete as well.

Examples

Invoke undefined behavior

A serious piece of advice for all of you wiki editors/wanderers/admins/whatever, even if you're not on the wiki, if you don't know already: When you're cleaning your keyboard, do NOT drench it in water and use it after 4 hours, even though you unplugged it. If you're going to drench it in water anyway, at least make sure to dry it for at least five days. Any less and you've got one less functioning keyboard.

E

One Time Cat

State 1
Control + C
Control + V

Cat program

State 1
  Control + C
  Page Up
  Page Down -> 2
  Control + V
  Function key + Page Down
  Page Down -> 1
State 2

A+B Problem

1-byte inputs and outputs the sum modulo 256.

State 1
  Control + C
  Control + Page Down
  Control + C
  Control + Page Down
State 2
  Control + Page Up
  Page Down -> 3
  Control + Page Up
  Page Up
  Control + Page Down
  Control + Page Down
  Page Down -> 2
State 3
  Control + Page Up
  Control + V

See also