极东语

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

极东语 is an Esolang designed by PSTF, islptng, Hotcrystal0, and PSTF's new AI friend(DeepSeek R1-671b) for golfing, and also called OPL(Oriental Programming Language).

It uses CJK characters as the commands.

Data Types

Currently, we support these data types:

  • Numbers, generate by 〇一二三四五六七八九 or 0123456789, fraction slash is 分(/), decimal point is 点(.).
  • Arrays, enclose by 《》, seperate by comma.
  • Strings, enclose by 『』(No escape) or 「」(Escaped), \ for escaping.
  • Booleans, 真 or 假.
  • Nonetype, 空(None), ラ(Undefined behaviour), or ぞ(Invalid type).
  • Code blocks, enclose by 【】. Commands can be seperated by ;.
  • Hanguliums, like Sclipting's byte array, returns a string decoded by UTF-8, quoted in 〔〕.

We also have a deque, a stack, a tape, and ten registers(①②③④⑤⑥⑦⑧⑨⑩).

Command flow

Our first program

写〔멙놏멚납멙놽멙뢨머겂〕

Stack manipulations

Discard

Command Table
Command Meaning
This is Argumented individual instruction. It receives x, and pop top x-th item from the stack and return it(1-based). Leave blank means top.
This is Non-argumented individual instruction. It pop top item from the stack and return it.
This is Argumented individual instruction. It receives x, and pop top x items from the stack and return them as array. Leave blank means 1.
This is Non-argumented individual instruction. It pop top item from the stack and discard it.
This is Argumented individual instruction. It receives x, and pop x-th item from the stack and discard them. Leave blank means top.
This is Argumented individual instruction. It receives x, and return top x-th item from the stack but not pop it. Leave blank means top.

Push

Command Table
Command Meaning
This is Argumented individual instruction. It receives x, and push x into stack.
This is Non-argumented individual instruction. It duplicates stack top.
This is Argumented individual instruction. It receives x, and push a copy top x-th item of stack. Leave blank means 1.

Control flow

Command Table
Command Meaning
若 x 则 ... 否 ... 止 This is statement block. If x returns true, then do code 1, else code 2. You can construct elif by 否若.
循 ... 止 This is statement block. It is an infinity loop.
若 x 作 ... 止 This is statement block. It is a conditional loop.
对 i 之 r 作 ... 止 This is statement block. It is an iterative loop.
退 This is Non-argumented individual instruction. It exit the current loop. 退!退!退! will exit current program.
This is Non-argumented individual instruction. It jumps to next round of the loop.
This is Non-argumented individual instruction. It does nothing.
This is Non-argumented individual instruction. It quits the programming environment.