Sclipting

Sclipting is a stack-based golf language, inspired by GolfScript, that uses Chinese characters for instructions and Hangul syllables for data (strings and integers). The basic idea is that to minimise the number of characters in a program, the language should provide as many single-character instructions as possible. It was invented by Timwi in 2011.
Sclipting is not considered finished as it can trivially be extended with more and more instructions assigned to new Chinese characters.
== Semantics ==
=== Execution ===
Sclipting is stack-based. Most instructions execute by popping a certain number of elements from the stack and pushing a result. Some instructions, however, operate on the top item without popping it. Yet other instructions may shuffle the stack around almost arbitrarily.
At the begining of the program, the input (e.g. STDIN) is placed on the stack as a single string.
At the end of execution, the 併 instruction is executed once, which generates a string from all or part of the stack contents. This string then forms the program’s output.
=== Byte-array literals ===
The most common literal in Sclipting is the byte array (also called a buffer). It is encoded in the source as a sequence of Hangeul syllables in the following way:
* Encode three bytes at a time. Three bytes are 24 bits. Take the first 12 bits and add U+AC00 (that’s your first character), then the rest and add U+AC00 (that’s the second character). If the byte array length is divisible by 3, you are done.
* If there is one byte left, encode it in a single character by shifting it left by 4 bits and adding U+AC00.
* If there are two bytes left, generate the first character from the first 12 bits the same way as above, while the second character is U+BC00 plus the remaining 4 bits of the second byte.
Examples:
Example input 	Sclipting byte-array literal
00 	가U+AC00
2A 2F 	꺢및U+AEA2 U+BC0F
2A 2F 00 	꺢묀U+AEA2 U+BB00
“Sclipting” in UTF-853 63 6C 69 70 74 69 6E 67	넶꽬늗건늖멧U+B136 U+AF6C U+B297 U+AC74 U+B296 U+BA67
“ДЖ” in UTF-16 (Little Endian)14 04 16 04 	굀뀖걀U+AD40 U+B016 U+AC40
=== Number literals ===
Positive numbers are expressed as a (big-endian) byte array. This allows arbitrary-size integers.
7076 Hangeul syllables can be used to express a negative integer (U+BC00 = −1 to U+D7A3 = −7076). The range overlaps with that used by byte array literals, but there is no ambiguity because byte array literals always start with a character in the range U+AC00-U+BBFF. Thus, if the program contains a U+BC0x with no character in that range preceding it, it encodes a negative number.
If you need a negative number less than −7076, write it as a positive number and then negate it.
=== Data types ===
Sclipting knows the following data types:
* Byte array: A sequence of bytes of a certain length.
* String: A sequence of Unicode characters of a certain length.
* Integer: An arbitrary-size signed integer.
* Float: A double-precision (IEEE) floating-point number. Possible values include ±∞ and NaN.
* List: A list of items of a certain length. Each item can be of any of these datatypes, including another list.
* Mark: A special item (generated by 標) that marks a position in the stack (and occupies a stack slot of its own). Currently only 并 and 併 make use of this.
* Function: An anonymous function (lambda) that can be pushed to and popped from the stack and executed.
=== Conversions ===
The following describes implicit conversions that are performed by instructions that expect a certain input data type. However, some instructions may override some of the behaviours described here.
==== Conversion to byte array ====
Items never convert implicitly to a byte array. Instructions that generate byte arrays specify in their documentation how they generate it.
==== Conversion to string ====
* Byte arrays are decoded as UTF-8.
* Integers/floats are rendered into strings by using the invariant culture.
* Lists are converted to strings by converting each element to a string and concatenating them all. If the list contains further lists, this applies recursively.
* Marks and functions convert to the empty string.
==== Conversion to integer ====
* Byte arrays are assumed to be in big-endian order and converted to a positive integer as if it were a base-256 number.
* Floats are rounded toward 0. The floats ±∞ and NaN are all converted to 0.
* Strings are parsed as integers (in decimal) using the invariant culture. If the string is not a valid integer, it is converted to 0.
* Lists are converted to integers by converting each element to an integer and then computing the sum. If the list contains further lists, this applies recursively. If any item in the structure is a float, the sum operation is floating-point and the resulting float is then converted to an integer.
* Marks and functions are converted to 0.
==== Conversion to float ====
All items that aren’t already floats convert to a float in the same way that they convert to integers, except of course that the result of a list sum is not rounded.
==== Conversion to list ====
Items never convert implicitly to a list. Instructions that operate on lists or iterate over them specify in their documentation what they do when the input is not a list.
Many list operations convert any non-list to a string and then operate on that as if it were a list of characters; however, they generally return the result as a string, not a list of characters. This difference is significant: when converting to an integer, the string “47” converts to 47, but the list { “4”, “7” } converts to 4 + 7 = 11.
==== Booleans ====
Some instructions treat an item as a boolean. These generally convert them to an integer and then compare against 0. 0 is considered false, everything else true. Note this has the following consequences:
* All floats greater than -1 and less than 1 are considered false, as are NaN and ±∞.
* Almost all strings are false. The only strings that are true are those that encode a valid non-zero integer.
* A list containing items that add up to 0 is also considered false, even if those items are not themselves all false (for example, the list { −1, 1 }).
=== Instructions ===
Syntactically, there are four types of instructions:
* Singular instruction: A singular instruction is a lexical unit. The instruction syntactically stands by itself and does not form a structure with other instructions. Every instruction that is not explicitly marked otherwise is a singular instruction.
* Block head instruction: These instructions start a block, which is a nested sequence of instructions that may be executed conditionally or repeatedly. The block must ultimately be terminated by a block-end instruction (終), although there may be multiple blocks separated by a condition-block instruction (況) or an else instruction (不 or 逆).
* Condition-block instruction: The 況 instruction can be used to specify code to execute at the beginning of every iteration of a while loop (generally used to compute a terminating condition). This instruction terminates the condition block and starts the primary block. For example, in the code 套 c 況 p 不 e 終, the c block is executed at the beginning of every iteration; p is the primary block, only executed if c returned true; and e is the else block, only executed if c returned false already in the first iteration.
* Else-block instruction: Most block instructions may have an else block which executes only if the first block was not executed. A block instruction is allowed to have such an else block unless explicitly stated otherwise. The else instruction terminates the primary block and starts the else block, which must be terminated by the block-end instruction (終).
* Block-end instruction: The 終 instruction, which lexically terminates a block.
It is a compile-time error to have a block head instruction or an else instruction without a matching end instruction.
==== Block structure ====
Sclipting	Unicode	Engrish 	Meaning
況 	U+6CC1 	condition	Marks the lexical end of a block that computes a terminating condition and the start of the primary block. This can only be used with one of the while loops (套/要/迄/到/滿/充).
不 	U+4E0D 	no 	Marks the lexical end of a block and the start of a new block which is executed only if the first block wasn’t. In general, the difference is that 不 pops an item and 逆 doesn’t, but the exact semantics depend on the block’s head instruction.
逆 	U+9006 	opposite 	Marks the lexical end of a block and the start of a new block which is executed only if the first block wasn’t. In general, the difference is that 不 pops an item and 逆 doesn’t, but the exact semantics depend on the block’s head instruction.
終 	U+7D42 	end 	Marks the lexical end of a block. An item may be pushed depending on the block’s head instruction.
==== Stack manipulation ====
===== Discard instructions =====
Sclipting	Unicode	Engrish	Stack transition	Meaning
丟 	U+4E1F 	discard	(X) → () 	Pops an item.
棄 	U+68C4 	abandon	(X, X) → () 	Pops two items.
===== Additional stack manipulation instructions =====
Sclipting 	Unicodes 	Meaning
① ... ⑳,㉑ ... ㉟,㊱ ... ㊿ 	U+2460 .. U+2473,U+3251 .. U+325F,U+32B1 .. U+32BF	Pushes a copy of the item at the specified location from the bottom of the stack (1-based counting).
❶ ... ❿,⓫ ... ⓴ 	U+2776 .. U+277F,U+24EB .. U+24F4 	Pushes a copy of the item at the specified location from the top of the stack (1-based counting).
⑴ ... ⒇ 	U+2474 .. U+2487 	Moves the item at the specified location from the bottom of the stack (1-based counting) to the top.
⓵ ... ⓾ 	U+24F5 .. U+24FE 	Moves the item at the specified location from the top of the stack (1-based counting) to the top. Note this implies ⓵ is a no-op.
⒈ ... ⒛ 	U+2488 .. U+249B 	Swaps the item at the specified location from the bottom of the stack with the top item.
==== Loops and conditionals ====
The instructions listed in this table are all block instructions which cause their associated block to be executed conditionally or repeatedly. Block instructions in this list may optionally have either type of else block unless explicitly stated otherwise.
Where these descriptions describe an item as true or false, they refer to the boolean value of an item as described in the section “Conversions”. An item is empty if it is either the empty list, or it is not a list and converts to the empty string. This means the mark (標) is empty, but integers and floats are not.
Sclipting	Unicode	Engrish 	Stack transition	Meaning
是 	U+662F 	yes 	(X) → () 	If: Executes the block only if the top item is true (是/倘), false (沒/毋) or non-empty (夠/含). 是/沒/夠 pop the item while 倘/毋/含 do not. If the item is false/true/empty and there is an else block, the else instruction overrides the popping behaviour.
倘 	U+5018 	if 	(X) → (X) 	If: Executes the block only if the top item is true (是/倘), false (沒/毋) or non-empty (夠/含). 是/沒/夠 pop the item while 倘/毋/含 do not. If the item is false/true/empty and there is an else block, the else instruction overrides the popping behaviour.
沒 	U+6C92 	not 	(X) → () 	If: Executes the block only if the top item is true (是/倘), false (沒/毋) or non-empty (夠/含). 是/沒/夠 pop the item while 倘/毋/含 do not. If the item is false/true/empty and there is an else block, the else instruction overrides the popping behaviour.
毋 	U+6BCB 	not 	(X) → (X) 	If: Executes the block only if the top item is true (是/倘), false (沒/毋) or non-empty (夠/含). 是/沒/夠 pop the item while 倘/毋/含 do not. If the item is false/true/empty and there is an else block, the else instruction overrides the popping behaviour.
夠 	U+5920 	enough 	(X) → () 	If: Executes the block only if the top item is true (是/倘), false (沒/毋) or non-empty (夠/含). 是/沒/夠 pop the item while 倘/毋/含 do not. If the item is false/true/empty and there is an else block, the else instruction overrides the popping behaviour.
含 	U+542B 	contain 	(X) → (X) 	If: Executes the block only if the top item is true (是/倘), false (沒/毋) or non-empty (夠/含). 是/沒/夠 pop the item while 倘/毋/含 do not. If the item is false/true/empty and there is an else block, the else instruction overrides the popping behaviour.
套 	U+5957 	loop 	(X) → () 	While loop: Repeatedly, 1. if there is a condition block (況), it is executed; 2. the top item is popped (套/迄/滿) or merely examined (要/到/充); 3. the primary block is executed if the item is true (套/要)/false (迄/到)/non-empty (滿/充). This is repeated until the item is false (套/要)/true (迄/到)/empty (滿/充). If the first item examined is already false (套/要)/true (迄/到)/empty (滿/充), and there is an else block, the else block is executed and its instruction overrides the popping behaviour.
要 	U+8981 	necessity	(X) → (X) 	While loop: Repeatedly, 1. if there is a condition block (況), it is executed; 2. the top item is popped (套/迄/滿) or merely examined (要/到/充); 3. the primary block is executed if the item is true (套/要)/false (迄/到)/non-empty (滿/充). This is repeated until the item is false (套/要)/true (迄/到)/empty (滿/充). If the first item examined is already false (套/要)/true (迄/到)/empty (滿/充), and there is an else block, the else block is executed and its instruction overrides the popping behaviour.
迄 	U+8FC4 	until 	(X) → () 	While loop: Repeatedly, 1. if there is a condition block (況), it is executed; 2. the top item is popped (套/迄/滿) or merely examined (要/到/充); 3. the primary block is executed if the item is true (套/要)/false (迄/到)/non-empty (滿/充). This is repeated until the item is false (套/要)/true (迄/到)/empty (滿/充). If the first item examined is already false (套/要)/true (迄/到)/empty (滿/充), and there is an else block, the else block is executed and its instruction overrides the popping behaviour.
到 	U+5230 	arrive 	(X) → (X) 	While loop: Repeatedly, 1. if there is a condition block (況), it is executed; 2. the top item is popped (套/迄/滿) or merely examined (要/到/充); 3. the primary block is executed if the item is true (套/要)/false (迄/到)/non-empty (滿/充). This is repeated until the item is false (套/要)/true (迄/到)/empty (滿/充). If the first item examined is already false (套/要)/true (迄/到)/empty (滿/充), and there is an else block, the else block is executed and its instruction overrides the popping behaviour.
滿 	U+6EFF 	full 	(X) → () 	While loop: Repeatedly, 1. if there is a condition block (況), it is executed; 2. the top item is popped (套/迄/滿) or merely examined (要/到/充); 3. the primary block is executed if the item is true (套/要)/false (迄/到)/non-empty (滿/充). This is repeated until the item is false (套/要)/true (迄/到)/empty (滿/充). If the first item examined is already false (套/要)/true (迄/到)/empty (滿/充), and there is an else block, the else block is executed and its instruction overrides the popping behaviour.
充 	U+5145 	be full 	(X) → (X) 	While loop: Repeatedly, 1. if there is a condition block (況), it is executed; 2. the top item is popped (套/迄/滿) or merely examined (要/到/充); 3. the primary block is executed if the item is true (套/要)/false (迄/到)/non-empty (滿/充). This is repeated until the item is false (套/要)/true (迄/到)/empty (滿/充). If the first item examined is already false (套/要)/true (迄/到)/empty (滿/充), and there is an else block, the else block is executed and its instruction overrides the popping behaviour.
上 	U+4E0A 	up 	(I, I) → (I) 	For loop: Pops two integers start and end and iterates over the integers in that range. The integer start is pushed and the block executed. Then start + 1 (上) or start − 1 (下) is pushed and the block executed again, etc. The block is executed a total of end − start + 1 (上)/start − end + 1 (下) times. There may be a 不 block that is executed if end < start (上)/end > start (下). A 逆 block is not allowed.
下 	U+4E0B 	down 	(I, I) → (I) 	For loop: Pops two integers start and end and iterates over the integers in that range. The integer start is pushed and the block executed. Then start + 1 (上) or start − 1 (下) is pushed and the block executed again, etc. The block is executed a total of end − start + 1 (上)/start − end + 1 (下) times. There may be a 不 block that is executed if end < start (上)/end > start (下). A 逆 block is not allowed.
各 	U+5404 	each 	(X) → (X) 	For-each loop: Iterates over the items in a list, the characters in a string, or the bytes in a byte array. 各 pops the item while 每 does not. Each item is pushed and the block executed. If the list is empty and there is an else block, the else instruction overrides the popping behaviour. (If the top item is a byte array containing UTF-8 text and you wish to iterate over the characters, you will have to convert it to a string first, e.g. by using 併.)
每 	U+6BCF 	every 	(X) → (X, X) 	For-each loop: Iterates over the items in a list, the characters in a string, or the bytes in a byte array. 各 pops the item while 每 does not. Each item is pushed and the block executed. If the list is empty and there is an else block, the else instruction overrides the popping behaviour. (If the top item is a byte array containing UTF-8 text and you wish to iterate over the characters, you will have to convert it to a string first, e.g. by using 併.)
==== Arithmetic ====
These instructions generally take integers or floats as arguments. When they encounter any other datatype, they will convert items to floats or integers as described in the section “Conversions”. In the following descriptions, “number” (and N in the stack transition) means “integer or float”. If the description and stack transition mention only “integer”, floats are accepted but are rounded toward zero.
Divisions by zero (including modulo zero) return NaN.
Sclipting	Unicode	Engrish 	Stack transition	Meaning
加 	U+52A0 	add 	(N, N) → (N) 	Addition: Pops a and b and pushes a + b.
減 	U+6E1B 	subtract 	(N, N) → (N) 	Subtraction: Pops a and b and pushes a − b.
縮 	U+7E2E 	reduce 	(N, N) → (N) 	Subtraction: Pops a and b and pushes b − a.
乘 	U+4E58 	multiply 	(N, N) → (N) 	Multiplication: Pops a and b and pushes a × b.
除 	U+9664 	divide 	(N, N) → (N) 	Float division: Pops a and b and pushes a ÷ b as a float, even if both operands are integers.
分 	U+5206 	divide 	(I, I) → (I) 	Integer division: Pops integers a and b and pushes a ÷ b as an integer that is rounded toward 0.
剩 	U+5269 	leftovers	(I, I) → (I) 	Modulo: Pops a and b and pushes the remainder. The result is always between 0 and b − 1, even if a is negative.
重 	U+91CD 	double 	(N) → (N) 	Double: Pops a and pushes a × 2.
半 	U+534A 	half 	(N) → (N) 	Half: Pops a and pushes a ÷ 2 as a float (半) or as an integer rounded toward 0 (隔).
隔 	U+9694 	separate 	(I) → (I) 	Half: Pops a and pushes a ÷ 2 as a float (半) or as an integer rounded toward 0 (隔).
方 	U+65B9 	power 	(N, N) → (N) 	Exponentiation: Pops a and b and pushes ab. If a is an integer and b is a non-negative integer, the result is an integer, otherwise a float.
平 	U+5E73 	flat 	(N) → (N) 	Square: Pops a and pushes a².
根 	U+6839 	root 	(N) → (N) 	Square root: Pops a and pushes √a.
圜 	U+571C 	circle 	(F) → (I) 	Round: Rounds a number towards 0.
圍 	U+570D 	circle 	(F) → (I) 	Round: Rounds a number away from 0.
團 	U+5718 	sphere 	(F) → (I) 	Round: Rounds a number down.
圓 	U+5713 	surround 	(F) → (I) 	Round: Rounds a number up.
繞 	U+7E5E 	surround 	(F) → (I) 	Round: Rounds a number to the nearest integer (halves are rounded away from zero).
輪 	U+8F2A 	wheel 	(F) → (I) 	Round: Rounds a number to the nearest integer (halves are rounded to even).
負 	U+8CA0 	negative 	(N) → (N) 	Negative: Pops a and pushes −a.
對 	U+5C0D 	correct 	(N) → (N) 	Absolute value: Pops a and pushes |a|.
增 	U+589E 	increase 	(I) → (I) 	Increment: Pops integer a and pushes a + 1. (Note this rounds floats toward 0 before the increment.)
貶 	U+8CB6 	decrease 	(I) → (I) 	Decrement: Pops integer a and pushes a − 1. (Note this rounds floats toward 0 before the decrement.)
數 	U+6578 	number 	(F) → (F) 	Logarithm: Calculates the log to base e.
位 	U+4F4D 	position 	(F) → (F) 	Logarithm: Calculates the log to base 10.
級 	U+7D1A 	level 	(F) → (F) 	Logarithm: Calculates the log to base 2.
左 	U+5DE6 	left 	(I, I) → (I) 	Shift left: Pops a and b and pushes a << b. b can be negative in which case a is shifted to the right instead.
右 	U+53F3 	right 	(I, I) → (I) 	Shift right: Pops a and b and pushes a >> b. b can be negative in which case a is shifted to the left instead.
雙 	U+96D9 	both 	(I, I) → (I) 	Bitwise and: Pops a and b and pushes a & b.
另 	U+53E6 	other 	(I, I) → (I) 	Bitwise or: Pops a and b and pushes a | b.
倆 	U+5006 	clever 	(I, I) → (I) 	Bitwise xor: Pops a and b and pushes a ^ b.
無 	U+7121 	not 	(I) → (I) 	Bitwise not: Pops a and pushes ~a.
啃 	U+5543 	gnaw 	(I, I) → (I, I) 	Bit split: Pops a and b. Let c = a & ~(−1 << b) (the bottom b bits of a) and d = a >> b (the rest of the number). 啃 pushes c then d; 嚙 pushes d then c.
嚙 	U+5699 	bite 	(I, I) → (I, I) 	Bit split: Pops a and b. Let c = a & ~(−1 << b) (the bottom b bits of a) and d = a >> b (the rest of the number). 啃 pushes c then d; 嚙 pushes d then c.
沌 	U+6C8C 	chaotic 	() → (I) 	Random integer: Pushes a random integer between 0 (inclusive) and 2³² (exclusive).
紛 	U+7D1B 	disarray 	(I) → (I) 	Random integer: Pushes a random integer between 0 (inclusive) and the specified maximum (exclusive).
胡 	U+80E1 	wild 	(I, I) → (I) 	Random integer: Pushes a random integer between the specified minimum (inclusive) and maximum (exclusive).
亂 	U+4E82 	chaos 	() → (F) 	Random float: Pushes a random float between 0 (inclusive) and 1 (exclusive).
野 	U+91CE 	wild 	(F) → (F) 	Random float: Pushes a random float between 0 (inclusive) and the specified maximum (exclusive).
猖 	U+7316 	wild 	(F, F) → (F) 	Random float: Pushes a random float between the specified minimum (inclusive) and maximum (exclusive).
==== Logic ====
These instructions generally deal with boolean logic. Descriptions that refer to true or false refer to the boolean value of an item as described in “Conversions”.
Sclipting	Unicode	Engrish 	Stack transition	Meaning
小 	U+5C0F 	small 	(N, N) → (I) 	Less than: Pops a and b and pushes 1 if a < b, otherwise 0.
大 	U+5927 	great 	(N, N) → (I) 	Greater than: Pops a and b and pushes 1 if a > b, otherwise 0.
少 	U+5C11 	less 	(N, N) → (I) 	Less than or equal to: Pops a and b and pushes 1 if a ≤ b, otherwise 0.
瀰 	U+7030 	overflow 	(N, N) → (I) 	Greater than or equal to: Pops a and b and pushes 1 if a ≥ b, otherwise 0.
同 	U+540C 	same 	(X, X) → (I) 	Equality: Pops two items and pushes 1 (同)/0 (差) if they are exactly the same thing (integer 0, float 0, character ‘0’ and byte array 0x00 are considered different), otherwise 0 (同)/1 (差).
差 	U+5DEE 	different 	(X, X) → (I) 	Equality: Pops two items and pushes 1 (同)/0 (差) if they are exactly the same thing (integer 0, float 0, character ‘0’ and byte array 0x00 are considered different), otherwise 0 (同)/1 (差).
侔 	U+4F94 	equal 	(I, I) → (I) 	Integer equality: Pops two items and pushes 1 (侔)/0 (异) if they convert to the same integer, otherwise pushes 0 (侔)/1 (异).
异 	U+5F02 	different 	(I, I) → (I) 	Integer equality: Pops two items and pushes 1 (侔)/0 (异) if they convert to the same integer, otherwise pushes 0 (侔)/1 (异).
肖 	U+8096 	resemble 	(S, S) → (I) 	String equality: Pops two items and pushes 1 (肖)/0 (殊) if they convert to the same string, otherwise pushes 0 (肖)/1 (殊).
殊 	U+6B8A 	different 	(S, S) → (I) 	String equality: Pops two items and pushes 1 (肖)/0 (殊) if they convert to the same string, otherwise pushes 0 (肖)/1 (殊).
與 	U+8207 	and 	(I, I) → (I) 	Logical and: Pops a and b and pushes 1 if both are non-zero, otherwise 0.
或 	U+6216 	or 	(I, I) → (I) 	Logical or: Pops a and b and pushes 1 if either or both are non-zero, otherwise 0.
隻 	U+96BB 	one of pair	(I, I) → (I) 	Logical xor: Pops a and b and pushes 1 if one is non-zero (but not both), otherwise 0.
非 	U+975E 	not 	(I) → (I) 	Logical not: Pops a and pushes 1 if a is 0, otherwise 0.
嗎 	U+55CE 	is it? 	(I, X, X) → (X) 	Conditional operator: Pops q, y and n and pushes y if q is non-zero, otherwise pushes n.
==== Lambda function instructions ====
Instructions marked with a “█” are block head instructions; all others are singular instructions.
Block	Sclipting	Unicode	Engrish 	Stack transition	Meaning
█ 	塊 	U+584A 	block 	() → (F) 	Introduces an anonymous function (lambda expression) consisting of the instructions within the block. The function is pushed onto the stack and not executed. 掳 additionally pops an item and stores it with the function; a copy of that item is pushed every time the function starts to execute.
█ 	掳 	U+63B3 	capture 	(X) → (F) 	Introduces an anonymous function (lambda expression) consisting of the instructions within the block. The function is pushed onto the stack and not executed. 掳 additionally pops an item and stores it with the function; a copy of that item is pushed every time the function starts to execute.
 	開 	U+958B 	initiate	(F) → () 	Pops an item. If the item popped is a function, it is executed.
 	辦 	U+8FA6 	handle 	(F) → (F) 	Pops an item, executes it if it is a function, and then pushes it back.
 	演 	U+6F14 	perform 	(F) → (F) 	If the top item on the stack is a function, executes it without popping it. Note this means that the function will “see” itself on the stack.
==== Lists and strings ====
These instructions all operate on a list or a string. Anything that is not a list or string is converted to a string as described in the section “Conversions”.
===== Instructions to operate on a specific index =====
The following instructions all operate on a specific item in a list or character in a string, identified by an index counting either forward from the start or backward from the end of the list/string. The semantics of each instruction are the same as those listed under “see also” at the end of the table except that those take an index from the stack. 
Element 	Retrieve (pop) 	Retrieve (no pop) 	Insert 	Delete 	Retrieve + delete 	Replace 	Exchange
first 	一U+4E00one 	壹U+58F9one 	氫U+6C2Bhydrogen 	鈧U+9227scandium 	鈮U+922Eniobium 	鉕U+9255promethium 	鉈U+9248thallium
2nd 	二U+4E8Ctwo 	貳U+8CB3two 	氦U+6C26helium 	鈦U+9226titanium 	鉬U+926Cmolybdenum 	釤U+91E4samarium 	鉛U+925Blead
3rd 	三U+4E09three 	叁U+53C1three 	鋰U+92F0lithium 	釩U+91E9vanadium 	鎝U+939Dtechnetium 	銪U+92AAeuropium 	鉍U+924Dbismuth
4th 	四U+56DBfour 	肆U+8086four 	鈹U+9239beryllium 	鉻U+927Bchromium 	釕U+91D5ruthenium 	釓U+91D3gadolinium 	釙U+91D9polonium
5th 	五U+4E94five 	伍U+4F0Dfive 	硼U+787Cboron 	錳U+9333manganese 	銠U+92A0rhodium 	鋱U+92F1terbium 	砈U+7808astatine
6th 	六U+516Dsix 	陸U+9678six 	碳U+78B3carbon 	鐵U+9435iron 	鈀U+9200palladium 	鏑U+93D1dysprosium 	氡U+6C21radon
7th 	七U+4E03seven 	柒U+67D2seven 	氮U+6C2Enitrogen 	鈷U+9237cobalt 	銀U+9280silver 	鈥U+9225holmium 	鍅U+9345francium
8th 	八U+516Beight 	捌U+634Ceight 	氧U+6C27oxygen 	鎳U+93B3nickel 	鎘U+9398cadmium 	鉺U+927Aerbium 	鐳U+9433radium
9th 	九U+4E5Dnine 	玖U+7396nine 	氟U+6C1Ffluorine 	銅U+9285copper 	銦U+92A6indium 	銩U+92A9thulium 	錒U+9312actinium
10th 	十U+5341ten 	拾U+62FEten 	氖U+6C16neon 	鋅U+92C5zinc 	錫U+932Btin 	鐿U+943Fytterbium 	釷U+91F7thorium
last 	乾U+4E7Esky 	首U+9996head 	鈉U+9209sodium 	鎵U+93B5gallium 	銻U+92BBantimony 	鎦U+93A6lutetium 	鏷U+93F7protactinium
2nd-last 	兌U+514Clake 	跟U+8DDFfollow 	鎂U+9382magnesium 	鍺U+937Agermanium 	碲U+78B2tellurium 	鉿U+927Fhafnium 	鈾U+923Euranium
3rd-last 	離U+96E2fire 	副U+526Fsupplement 	鋁U+92C1aluminium 	砷U+7837arsenic 	碘U+7898iodine 	鉭U+926Dtantalum 	錼U+933Cneptunium
4th-last 	震U+9707thunder 	矩U+77E9square 	矽U+77FDsilicon 	硒U+7852selenium 	氙U+6C19xenon 	鎢U+93A2tungsten 	鈽U+923Dplutonium
5th-last 	巽U+5DFDwind 	手U+624Bhand 	磷U+78F7phosphorus 	溴U+6EB4bromine 	銫U+92ABcaesium 	錸U+9338rhenium 	鋂U+92C2americium
6th-last 	坎U+574Ewater 	蟜U+87DCinsect 	硫U+786Bsulfur 	氪U+6C2Akrypton 	鋇U+92C7barium 	鋨U+92E8osmium 	鋦U+92E6curium
7th-last 	艮U+826Emountain 	週U+9031week 	氯U+6C2Fchlorine 	銣U+92A3rubidium 	鑭U+946Dlanthanum 	銥U+92A5iridium 	鉳U+9273berkelium
8th-last 	坤U+5764earth 	蛛U+86DBspider 	氬U+6C2Cargon 	鍶U+9376strontium 	鈰U+9230cerium 	鉑U+9251platinum 	鉲U+9272californium
9th-last 	陰U+9670yin 	貓U+8C93cat 	鉀U+9240potassium 	釔U+91D4yttrium 	鐠U+9420praseodymium 	金U+91D1gold 	鑀U+9440einsteinium
10th-last	陽U+967Dyang 	指U+6307finger 	鈣U+9223calcium 	鋯U+92EFzirconium 	釹U+91F9neodymium 	汞U+6C5Emercury 	鐨U+9428fermium
see also 	掘U+6398excavate掊U+638Adig 	挖U+6316dig out采U+91C7collect 	栽U+683Dcultivate種U+7A2Eseed 	殲U+6BB2annihilate摧U+6467destroy 	裒U+88D2take out抽U+62BDpull out 	插U+63D2insert恢U+6062restore 	混U+6DF7mix拌U+62CCmix
===== Other list/string manipulation instructions =====
Instructions in this table marked with a “█” are block head instructions; all others are singular instructions.
Block	Sclipting	Unicode	Engrish 	Stack transition 	Meaning
 	掘 	U+6398 	excavate 	(X, I) → (X) 	Pushes the ith (掘/挖) or ith-last (掊/采) item/character within a list/string (starts at zero), or the empty string if i is out of range. 掘/掊 pop the list/string, 挖/采 do not.
 	掊 	U+638A 	dig 	(X, I) → (X) 	Pushes the ith (掘/挖) or ith-last (掊/采) item/character within a list/string (starts at zero), or the empty string if i is out of range. 掘/掊 pop the list/string, 挖/采 do not.
 	挖 	U+6316 	dig out 	(X, I) → (X, X) 	Pushes the ith (掘/挖) or ith-last (掊/采) item/character within a list/string (starts at zero), or the empty string if i is out of range. 掘/掊 pop the list/string, 挖/采 do not.
 	采 	U+91C7 	collect 	(X, I) → (X, X) 	Pushes the ith (掘/挖) or ith-last (掊/采) item/character within a list/string (starts at zero), or the empty string if i is out of range. 掘/掊 pop the list/string, 挖/采 do not.
 	栽 	U+683D 	cultivate 	(X, I, X) → (X) 	Inserts an item/character into a list/string at a specified forward (栽) or backward (種) index, shifting later items/characters to the right (padding as necessary).
 	種 	U+7A2E 	seed 	(X, I, X) → (X) 	Inserts an item/character into a list/string at a specified forward (栽) or backward (種) index, shifting later items/characters to the right (padding as necessary).
 	殲 	U+6BB2 	annihilate	(X, I) → (X) 	Deletes the ith (殲) or ith-last (摧) item/character within a list/string. If i is negative or out of range, nothing happens.
 	摧 	U+6467 	destroy 	(X, I) → (X) 	Deletes the ith (殲) or ith-last (摧) item/character within a list/string. If i is negative or out of range, nothing happens.
 	裒 	U+88D2 	take out 	(X, I) → (X, X) 	Pushes the ith (裒) or ith-last (抽) item/character within a list/string (starts at zero), or the empty string if i is out of range, and then removes that item/character from the list/string.
 	抽 	U+62BD 	pull out 	(X, I) → (X, X) 	Pushes the ith (裒) or ith-last (抽) item/character within a list/string (starts at zero), or the empty string if i is out of range, and then removes that item/character from the list/string.
 	插 	U+63D2 	insert 	(X, I, X) → (X) 	Replaces the ith (插) or ith-last (恢) item/character within a list/string with a new item (padding as necessary).
 	恢 	U+6062 	restore 	(X, I, X) → (X) 	Replaces the ith (插) or ith-last (恢) item/character within a list/string with a new item (padding as necessary).
 	混 	U+6DF7 	mix 	(X, I, X) → (X, X)	Exchanges the ith (混) or ith-last (拌) item/character within a list/string with an item on the stack (padding as necessary).
 	拌 	U+62CC 	mix 	(X, I, X) → (X, X)	Exchanges the ith (混) or ith-last (拌) item/character within a list/string with an item on the stack (padding as necessary).
 	匱 	U+5331 	lack 	() → (L) 	Pushes the empty list.
 	虛 	U+865B 	empty 	() → (S) 	Pushes the empty string.
 	長 	U+9577 	length 	(X) → (I) 	Pushes the number of items/characters in a list/string. 長 pops the list/string, 梴 does not.
 	梴 	U+68B4 	long 	(X) → (X, I) 	Pushes the number of items/characters in a list/string. 長 pops the list/string, 梴 does not.
 	疊 	U+758A 	repeat 	(X, I) → (L) 	Pushes a list containing i repetitions of the item x.
 	張 	U+5F35 	stretch 	(I, X) → (L) 	Pushes a list containing i repetitions of the item x.
 	復 	U+5FA9 	repeat 	(X, I) → (X) 	Pops a list/string/byte array x and an integer i and pushes a new list/string/byte array containing i concatenated repetitions of x.
 	伸 	U+4F38 	extend 	(I, X) → (X) 	Pops a list/string/byte array x and an integer i and pushes a new list/string/byte array containing i concatenated repetitions of x.
 	標 	U+6A19 	mark 	() → (M) 	Pushes a mark (used by 并 and 併).
 	并 	U+5E76 	combine 	(M, ...) → (L) 	Pops all items from the topmost mark to the top of the stack and pushes a list containing those items (并) or converts them to strings and pushes the result as a single concatenated string (併).
 	併 	U+4F75 	combine 	(M, ...) → (S) 	Pops all items from the topmost mark to the top of the stack and pushes a list containing those items (并) or converts them to strings and pushes the result as a single concatenated string (併).
 	合 	U+5408 	combine 	(X, X) → (X) 	Concatenates two lists or two strings. If either item is not a list, converts both to a string before concatenating. 合 concatenates in stack order, 融 in the reverse order.
 	融 	U+878D 	blend 	(X, X) → (X) 	Concatenates two lists or two strings. If either item is not a list, converts both to a string before concatenating. 合 concatenates in stack order, 融 in the reverse order.
 	子 	U+5B50 	child 	(X, I, I) → (X) 	Substring/sublist: Returns the substring/list of the specified index and count. 子 pops the input, 部 does not.
 	部 	U+90E8 	part 	(X, I, I) → (X, X)	Substring/sublist: Returns the substring/list of the specified index and count. 子 pops the input, 部 does not.
 	昉 	U+6609 	start 	(X, I) → (X) 	Left substring/sublist: Returns the first n (昉/俶) or length − n (始/初) characters/items. 昉/始 pop the input, 俶/初 do not.
 	俶 	U+4FF6 	start 	(X, I) → (X, X) 	Left substring/sublist: Returns the first n (昉/俶) or length − n (始/初) characters/items. 昉/始 pop the input, 俶/初 do not.
 	始 	U+59CB 	begin 	(X, I) → (X) 	Left substring/sublist: Returns the first n (昉/俶) or length − n (始/初) characters/items. 昉/始 pop the input, 俶/初 do not.
 	初 	U+521D 	beginning 	(X, I) → (X, X) 	Left substring/sublist: Returns the first n (昉/俶) or length − n (始/初) characters/items. 昉/始 pop the input, 俶/初 do not.
 	末 	U+672B 	final 	(X, I) → (X) 	Right substring/sublist: Returns the last n (末/尾) or length − n (端/止) characters/items. 末/端 pop the input, 尾/止 do not.
 	尾 	U+5C3E 	tail 	(X, I) → (X, X) 	Right substring/sublist: Returns the last n (末/尾) or length − n (端/止) characters/items. 末/端 pop the input, 尾/止 do not.
 	端 	U+7AEF 	end 	(X, I) → (X) 	Right substring/sublist: Returns the last n (末/尾) or length − n (端/止) characters/items. 末/端 pop the input, 尾/止 do not.
 	止 	U+6B62 	stop 	(X, I) → (X, X) 	Right substring/sublist: Returns the last n (末/尾) or length − n (端/止) characters/items. 末/端 pop the input, 尾/止 do not.
 	反 	U+53CD 	reverse 	(X) → (X) 	Reverses a list or string.
 	捃 	U+6343 	sort 	(X) → (X) 	Sorts the items in a list (by converting each item to a string for the purpose of the comparison) or the characters in a string (according to the invariant culture).
 	訂 	U+8A02 	arrange 	(X) → (X) 	Sorts the items in a list (by converting each item to an integer for the purpose of the comparison) or the characters in a string (by their Unicode codepoint value).
█ 	折 	U+6298 	snap 	(X) → (X, X) 	Take-until/skip-until: Splits a list or string into two as follows. Iterates over the items in a list or the characters in a string in forward (折/破) or backward (擘/断) order. Each item is pushed and the block executed; at the end of each iteration, an item is popped. If that item is true, the iteration is halted. At the end, two lists/strings are pushed: the original list or string, split at the position where the block returned true. 折/擘 pop the original list/string; 破/断 do not. If the list/string is empty and an else block exists, no results are pushed and the else instruction overrides the popping behaviour; however, if no else block exists, two empty lists/strings are pushed.
█ 	破 	U+7834 	rupture 	(X) → (X, X, X) 	Take-until/skip-until: Splits a list or string into two as follows. Iterates over the items in a list or the characters in a string in forward (折/破) or backward (擘/断) order. Each item is pushed and the block executed; at the end of each iteration, an item is popped. If that item is true, the iteration is halted. At the end, two lists/strings are pushed: the original list or string, split at the position where the block returned true. 折/擘 pop the original list/string; 破/断 do not. If the list/string is empty and an else block exists, no results are pushed and the else instruction overrides the popping behaviour; however, if no else block exists, two empty lists/strings are pushed.
█ 	擘 	U+64D8 	break 	(X) → (X, X) 	Take-until/skip-until: Splits a list or string into two as follows. Iterates over the items in a list or the characters in a string in forward (折/破) or backward (擘/断) order. Each item is pushed and the block executed; at the end of each iteration, an item is popped. If that item is true, the iteration is halted. At the end, two lists/strings are pushed: the original list or string, split at the position where the block returned true. 折/擘 pop the original list/string; 破/断 do not. If the list/string is empty and an else block exists, no results are pushed and the else instruction overrides the popping behaviour; however, if no else block exists, two empty lists/strings are pushed.
█ 	断 	U+65AD 	sever 	(X) → (X, X, X) 	Take-until/skip-until: Splits a list or string into two as follows. Iterates over the items in a list or the characters in a string in forward (折/破) or backward (擘/断) order. Each item is pushed and the block executed; at the end of each iteration, an item is popped. If that item is true, the iteration is halted. At the end, two lists/strings are pushed: the original list or string, split at the position where the block returned true. 折/擘 pop the original list/string; 破/断 do not. If the list/string is empty and an else block exists, no results are pushed and the else instruction overrides the popping behaviour; however, if no else block exists, two empty lists/strings are pushed.
 	會 	U+6703 	assemble 	(X) → (X) 	Join: Concatenate all the strings in a list into a single string while interspersing them with the specified separator. If the input is not a list, it is converted to a string and the separator interspersed between every character.
 	癲 	U+7672 	mad 	(I, X) → (X) 	Pushes a random list or string of the specified length by picking items/characters from the specified list/string.
 	癡 	U+7661 	silly 	(X, I) → (X) 	Pushes a random list or string of the specified length by picking items/characters from the specified list/string.
 	繓 	U+7E53 	shuffle 	(X) → (X) 	Randomly shuffles the items in a list or the characters in a string.
===== String manipulation only (no lists) =====
Sclipting has built-in support for regular expressions. All regular expression instructions in Sclipting default to the behaviour normally referred to as “single-line mode” (Perl modifier s), which means that the . operator matches any character. The behaviour can be altered within a regular expression by using the (?-s:...) construct to disable “single-line mode” (so . matches anything but newlines). The same construct can be used to enable “multi-line mode” (m; alters the meanings of ^ and $ to match the beginning/end of a line within the string instead of the beginning/end of the whole string), “ignore case” (i) and “ignore whitespace” (x).
Instructions in this list marked with a “█” are block head instructions. Instructions marked with a “ʘ” can only be used within the main block of one of those block instructions. If several blocks are nested, the “ʘ” instructions apply only to the innermost block.
Block	Sclipting	Unicode	Engrish 	Stack transition	Meaning
 	講 	U+8B1B 	explain 	(S) → (I) 	Converts a character to its Unicode codepoint. If the item popped is not a character, it is converted to a string and its first character used. If the string is empty, NaN is pushed.
 	字 	U+5B57 	character 	(I) → (S) 	Converts a Unicode codepoint to its character. Note the result may be two characters because of UTF-16 encoding. If the codepoint is out of range, the empty string is pushed.
 	移 	U+79FB 	change 	(S, S, S) → (S) 	Pops h, n, r. Replaces all occurrences of n within h with r. 變 is case-sensitive, 改 is case-insensitive, and 移 takes n to be a regular expression.
 	變 	U+8B8A 	change 	(S, S, S) → (S) 	Pops h, n, r. Replaces all occurrences of n within h with r. 變 is case-sensitive, 改 is case-insensitive, and 移 takes n to be a regular expression.
 	改 	U+6539 	change 	(S, S, S) → (S) 	Pops h, n, r. Replaces all occurrences of n within h with r. 變 is case-sensitive, 改 is case-insensitive, and 移 takes n to be a regular expression.
█ 	換 	U+63DB 	substitute	(S, S) → (S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	代 	U+4EE3 	replace 	(S, S) → (S, S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	替 	U+66FF 	replace 	(S, S) → (S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	更 	U+66F4 	replace 	(S, S) → (S, S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	取 	U+53D6 	take 	(S, S) → (S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	挐 	U+6310 	hold 	(S, S) → (S, S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	拿 	U+62FF 	take 	(S, S) → (S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	拏 	U+62CF 	hold 	(S, S) → (S, S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	用 	U+7528 	use 	(S, S) → (S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	喫 	U+55AB 	eat 	(S, S) → (S, S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	買 	U+8CB7 	buy 	(S, S) → (S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
█ 	進 	U+9032 	advance 	(S, S) → (S, S) 	Finds matches of a regular expression (換/代/替/更), a case-sensitive substring (取/挐/拿/拏) or a case-insensitive substring (用/喫/買/進) (top item) in a string (item below) and executes the block for the first match (換/代/取/挐/用/喫) or all matches (替/更/拿/拏/買/進) found. At the end of each iteration, the last item is popped and used as the replacement string for this match. After the last iteration, the string resulting from all those replacements is pushed. — The regular expression or substring is always popped. 換/替/取/拿/用/買 pop the input string as well, 代/更/挐/拏/喫/進 do not. If there is no match and there is an else block, the else block is executed. If it is a 不 block, the input string is popped, but is pushed back again at the end of the block. If it is a 逆 block, the input string is left alone and not popped or pushed.
ʘ 	現 	U+73FE 	appear 	() → (S) 	Pushes the current match.
 	坼 	U+577C 	split 	(S, S) → (L) 	Splits a string at every match of a regular expression and pushes the result as a list of strings. If the regular expression includes capturing parentheses, their matches are included in the list as well. The regular expression is always popped; 坼 pops the input string as well, 裂 does not.
 	裂 	U+88C2 	split 	(S, S) → (S, L) 	Splits a string at every match of a regular expression and pushes the result as a list of strings. If the regular expression includes capturing parentheses, their matches are included in the list as well. The regular expression is always popped; 坼 pops the input string as well, 裂 does not.
 	壯 	U+58EF 	big 	(S) → (S) 	Converts a string to upper-case (壯), lower-case (微) or title-case (題). If the item is a list, this operation is applied recursively to every element in the list.
 	微 	U+5FAE 	tiny 	(S) → (S) 	Converts a string to upper-case (壯), lower-case (微) or title-case (題). If the item is a list, this operation is applied recursively to every element in the list.
 	題 	U+984C 	title 	(S) → (S) 	Converts a string to upper-case (壯), lower-case (微) or title-case (題). If the item is a list, this operation is applied recursively to every element in the list.
 	瘋 	U+760B 	crazy 	(I) → (S) 	Pushes a random string of the specified length. Characters are picked from the set a-z, A-Z (瘋) or a-z, A-Z, 0-9 (狂).
 	狂 	U+72C2 	insane 	(I) → (S) 	Pushes a random string of the specified length. Characters are picked from the set a-z, A-Z (瘋) or a-z, A-Z, 0-9 (狂).
===== Regular expression capturing group instructions =====
Block	Sclipting	Unicodes 	Meaning
ʘ 	Ⓐ .. Ⓩ 	U+24B6 .. U+24CF	Pushes the part of the current match corresponding to the specified capturing group within the regular expression.
== Examples ==
=== Hello, World! ===
丟낆녬닆묬긅덯댦롤긐
=== 99 bottles of beer on the wall ===
丟눰標下標❷❶냦및嗎긆깯덇끬뉐❷貶是댰終긆뭦긆깥뉗긠닶먠덆둥긇덡닆렬겠
併標❸❶냦및嗎긆깯덇끬뉐❷貶是댰終긆뭦긆깥뉗긮겠併❸녆굫뉒걯닦넠뉆뭷닢렠댆굳댲걩덂걡댦뭵닦뀬겠
⓵끶묠덆묠덆둥긇꽴닷깥껂걢덗딠댶뭭뉒걭닷깥껀밊嗎⓸倘貶不꾓밉終倘긆깯덇끬뉐
❷貶是댰終不냦묠눦뭴덆롥댰終긆뭦긆깥뉗긠닶먠덆둥긇덡닆렮겠밊終
== Interpreter ==
* Sclipting is implemented in Esoteric IDE.
Category:Stack-based
Category:Languages
Category:2011
Category:Implemented
Category:Turing complete
Category:Non-interactive IO
Category:CJK
Category:Golfing language