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.

Plack

From Esolang
Jump to navigation Jump to search
Plack
Paradigm(s) Stack-based
Designed by User:IamAfile
Appeared in 2026
Computational class Turing complete
Reference implementation Unimplemented

Plack (Chinese name:盘栈) is a "super language" — fresh, unique, easy to learn, with a Rubik's-cube-inspired feel — designed by the "mysterious man" (User:IamAfile), created on 12 September 2026.

This language has 2 stacks and 0 registers!!

Thanks to Dragoneater67 for improving the readability of the syntax highlighting configuration.

Thanks to I am islptng for translating parts of this page from Chinese to English.

Instruction set

Instruction What does it do
a Pushes 0
A Pop a value and print it
b Convert stack top to ASCII
B Convert stack top to number
c Increment stack top
C Decrement stack top
d Switch to the 2nd stack
D Switch back to the 1st stack
e Jump marker paired with E
E If stack top is not equal to 0, jump back to e
f Swap top and bottom elements of the stack
g Halt
G Sleep for 1 second
10 h Redirect the specified number to the next line of code
H Remove all redirects
I Instruction separator
j 10 Define a label for the number
K 10 If stack top is zero, jump to the corresponding label
k 10 If stack top is nonzero, jump to the corresponding label


常见问题/不常见问题(Frequently Asked Questions / Uncommon Questions)

  • 什么是 h? 你可以把 h 当成函数的 def。在它前面的那个数字当成函数的名称,而下一行的整行代码会被当成函数的代码块。
  • h 和 j 有什么区别? j 是给 k/K 的一个标记,类似于你在 C++ 里面写 label:。是非常有趣的一件无趣事情。
  • 要 I 有什么用? 它可以让你的代码大幅的减少行数!(但无法保证能减少体积)
  • e E 的 e 有什么作用? 你可以想象成 brainfuck 的 []。
  • 为什么都是大小写? 因为我想设计成大写和小写是相互相反的关系。
  • 有注释吗? 有,当然有。
# comment
(* comment *)

这是我最喜欢的注释之一,当然如果你们喜欢的话,我也可以加入一百个注释!

  • 10 和 h 之间要不要隔空格? 可以不要,但为了你的观感体验,还是要空格吧,建议隔一条楚河。
  • K/k 的跳转目标? 那当然是对应的 j(不是下一行哦,而是那一行)。
  • e E 是否可以嵌套? 当然可以,你完全可以把它当成括号来处理。
  • f 在只有一个或零个元素的时候的行为? 当然是编译器一起和你爆了!
  • 作者精神是否正常? 不。(唉,这并不是脏话,这是自我调侃,我只是说我的风格有点不正常而已,这并不是脏话)
  • j h 的数字会不会冲突? 不会。
  • H 和 h 的关系? 相反关系

Examples

Hello:

5Ih
ccccc
10Ih
5I5
aI10I10I10I10I10I10I10IccbAaI10I10I10I10I10I10I10I10I10I10IcbAaI10I10I10I10I10I10I10I10I10I10I10ICCbAaI10I10I10I10I10I10I10I10I10I10I10ICCbAaI10I10I10I10I10I10I10I10I10I10I10IcbAaI10IbA

What? You can't understand this? Never mind, here's a more "normal" version:

5 h
ccccc
10 h
5 5
a 10 10 10 10 10 10 10 ccbA
a 10 10 10 10 10 10 10 10 10 10 cbA
a 10 10 10 10 10 10 10 10 10 10 10 CCbA
a 10 10 10 10 10 10 10 10 10 10 10 CCbA
a 10 10 10 10 10 10 10 10 10 10 10 cbA
a 10 bA

Prints `Hello` followed by a newline.

Syntax Highlight

This is a configuration for MT Manager:

{
  name: ["plack", ".pla", ".plan"]
  comment: {
    startsWith: "#"
  }
  comment: {
    startsWith: "(*",
    endsWith: "*)"
  }
  contains: [
    {
      match: /[aABbCcDdeEfgGhHIjKk]/,
      0: "keyword"
    },
    {
      number: "10",
      style: "number"
    }
  ]
}

Interpreter

Currently none, you're welcomed to add one!

反馈

这是我第一次写 esolang,如果你有任何想法,欢迎到 我的讨论页 留言。