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.
POY (2026)
- Not to be confused with Poy.
| Paradigm(s) | Concatenative |
|---|---|
| Designed by | User:RocketRace |
| Appeared in | 2026 |
| Computational class | Turing complete |
| Major implementations | in Python |
| File extension(s) | N/A |
POY is an esoteric programming language by User:RocketRace in 2026. It is a concatenative language implemented as a DSL for Python for round #100 of the Code Guessing competition. Its name is an acronym for "Python cOncatenative programmYng". The language notably uses only the [ and ] characters in its source code, and is remarkable for functioning as valid python source code. Version 1.0 of POY is documented within the comments and source code of the submission, describing the language as "Factor-flavored, despite rhyming with Joy". Also included in the submission is an interpreter and two example programs.
[[[[]]]][[ ]][[[[]]] ][[[] ]]
[[[[] ]] ][[[] ]] [[[[] ]]
][[[] ]] [[[[] ]] ][[[] ]]
[[[[]]]][[ ]][[[ [] ]]][[[]
]][[[ []]]] [[ []]][
[[[]] ]][[[ ]] ][[[[
]]]][ [[]]][[[[ ]]]][
[[]]] [[[[]]]]
[[[[[[[ []]] ]]
]]][[[[]] ]][[ [ ]]
][[[[] ]]][ [ []
]][[[[ ]]]] [ []
][[[[] ]]][[ []]] [[
[[]]]] [[[]] ][[[[]]]
][[[ ]]][
[[ [] ]] ][
[[ ]] ][ [[
[]]] ][[[
]]][ [[[]
]]][ [[]]][ [[[]
]]][ [[]] ][[[ []]]
][[[[[[[ [[]]]]
]]] ]]
Syntax
Programs consist of sequences of matching [ and ] characters, generated inductively from the following rules:
program ::= [ ] | [ program ] | program [ [ ] ] [ program ] | program [ [ nested ] ] [ nested ] nested ::= [ ] | [ nested ]
(The third and fourth branches of program are motivated in the semantics section.)
Whitespace is ignored, allowing the code to be formatted in a visually aesthetic way. Indeed, the original submission uses whitespace to shape its program into 10 consecutive pixel art renditions of sans undertale. Note that there is no mention of comments in the original specification. However, being a Python DSL, # can be used for line comments.
Semantics
POY has fairly standard catlang semantics; it operates on a stack of values and borrows the typical notion of quotations and word calls. Its programs are associative, allowing for them to be factored; however, in its current (1.0) state the language has no features that actually allow factoring to take place, namely custom word definitions.
Quotations (the first two branches of program in the syntax) are pushed to the stack immediately.
Sequences of three quotations of the form program [ [ ] ] [ program ] (the third branch) have the effect of executing the rightmost quotation against the current stack. It is useful when pushing arbitrary (not necessarily known) values onto the stack.
Sequences of three quotations of the form program [ [ nested ] ] [ nested ] (the fourth branch) are word calls. The depth of recursion of the first nested (plus two for the surrounding braces) is treated as a namespace index, and the depth of recursion of the second nested (plus one for the surrounding braces) is treated as a word index. Together, these uniquely define a builtin word. These have various effects, such as stack manipulation and numeric operations. This form of "symbol hiding" is understandable given the limited syntactic expressiveness of the language, as the computational capacity of the language must be sufficient to compute the kolakoski sequence as per the code guessing challenge. However, this does mean the language's syntactic minimalism does not match its semantic minimalism (and indeed, its computational capacity can be arbitrarily powerful simply with a few added words).
As specified, POY is likely Turing complete. This is because it embeds a basis for concatenative calculus: k is a simple combination of base/swap and base/drop, and cake can be implemented using a combination of base/call, builtin syntax, and combinators.
Builtin words
POY 1.0 has the following builtin words, numbered by (namespace index, word index). While these words are not documented in the specification, they have clear and generally unambiguous definitions in other programming languages like Factor.
- 2, 1: base/swap
- 2, 2: base/dup
- 2, 3: base/drop
- 2, 4: base/call
- 2, 5: base/quote
- 2, 6: base/over
- 2, 7: base/swapd
- 2, 8: base/dupd
- 2, 9: base/nip
- 2, 10: base/rot
- 2, 11: base/-rot
- 3, 1: number/0
- 3, 2: number/++
- 3, 3: number/--
- 3, 4: number/+
- 3, 5: number/-
- 3, 6: number/neg
- 3, 7: number/*
- 3, 8: number/div
- 3, 9: number/floordiv
- 3, 10: number/%
- 3, 11: number/pow
- 3, 12: number/round
- 4, 1: array/new
- 4, 2: array/push
- 4, 3: array/get
- 4, 4: array/iota
- 4, 5: array/map
- 5, 1: combinator/2dup
- 5, 2: combinator/dip
- 5, 3: combinator/keep
- 5, 4: combinator/times
- 6, 1: boolean/t
- 6, 2: boolean/f
- 6, 3: boolean/if
- 7, 1: io/.
Example program: Computes 22/7 on the stack
[[[[]]]][[ ]][[[[]]] ][[[] ]]
[[[[] ]] ][[[] ]] [[[[] ]]
][[[] ]] [[[[] ]] ][[[] ]]
[[[[]]]][[ ]][[[ [] ]]][[[]
]][[[ []]]] [[ []]][
[[[]] ]][[[ ]] ][[[[
]]]][ [[]]][[[[ ]]]][
[[]]] [[[[]]]]
[[[[[[[ []]] ]]
]]][[[[]] ]][[ [ ]]
][[[[] ]]][ [ []
]][[[[ ]]]] [ []
][[[[] ]]][[ []]] [[
[[]]]] [[[]] ][[[[]]]
][[[ ]]][
[[ [] ]] ][
[[ ]] ][ [[
[]]] ][[[
]]][ [[[]
]]][ [[]]][ [[[]
]]][ [[]] ][[[ []]]
][[[[[[[ [[]]]]
]]] ]]
This program can be "desugared" into the following:
[] base/drop # Drop forced initial value number/0 number/++ number/++ number/++ number/++ # 4 number/0 number/++ number/++ number/++ number/++ number/++ # 5 number/* number/++ number/++ # multiply and add 2 => 22 number/0 number/++ number/++ number/++ number/++ number/++ number/++ number/++ # 7 number/div # final result on the stack
Example program: Print 100 entries of the Kolakoski sequence
This example program can be found at the bottom of the original submission. It is somewhat longer than necessary, both to pad the length to a nice multiple of sans undertale, as well as due to including a Lagrange polynomial with large coefficients in its source code.