诗(PSTF)
Jump to navigation
Jump to search
There is also an Esolang called 诗, but I'm trying to make Poetic (Mihai Popa) as Chinese -------- 诗 is another Esolang with same name of None1's 诗, and it is designed by PSTF.
Language overview
Every line is a command, and punctuations are ignored.
- If a line is less than 10 characters long, the value is that single digit.
- If a line is 10 characters long, the value is 0.
- If a line is more than 10 characters long, the value is that digits representing the line length.
Has a 30K byte tape that can be switched to unlimited memory.
Every cell is a DWORD.
Commands must be separated by a newline!
Command | Example line | Meaning |
---|---|---|
1 | 右 | Go to the next byte. |
2 | 向左 | Go to the previous byte. |
3 | 加上它: | Add the byte with the value after next_digit. If next_digit is 0, then add 10 instead. |
4 | 减去这个: | Subtract the byte with the value after next_digit. If next_digit is 0, then subtract 10 instead. |
5 | 我需要输入 | Give user input and store the value as a ASCII character. |
6 | 输出这个字符 | Output the byte value as a ASCII character. |
7 | 无限循环开始了 | If the current byte is equal to 0, jump execution to after the matching 8. |
8 | 这无限循环结束了 | If the current byte is not equal to 0, jump execution to after the matching 7. |
9 | 给我一个随机数好吗? | Set the current byte to a random value from 0 and 255. |
0 | 这个程序将不继续运行 | End program execution. |
11 | 三万个太少了,我需要更多 | Switch memory to unlimited and back to 30K. |
12 | 将当前的单元格输出为数字 | Output the byte value as an integer. |
Examples
- This section is still a work in progress. It may be changed in the future.
- Because eligible Chinese poems are a bit of difficult, and the author cannot write poems, everyone is welcome to add sample programs!
Truth machine
真理的机器 减四十八 对对对对对对这一行正好四十八个字对对对对对对这一行正好四十八个字对对对对对对这一行正好四十八个字 无限循环开始了 四十八 对对对对对对这一行正好四十八个字对对对对对对这一行正好四十八个字对对对对对对这一行正好四十八个字 无限循环开始了 输出这个字符 这无限循环结束了 这无限循环结束了 四十八 对对对对对对这一行正好四十八个字对对对对对对这一行正好四十八个字对对对对对对这一行正好四十八个字 输出这个字符
Cat Program
既然这样,那我就不客气了
内容复制器 输入一串字符串 将其原样输出 然后就没了 去你妈的,没下文了
Computational class
In the 30K memory mode, 诗 is not Turing-complete as the memory is limited.
In the unlimited memory mode, it's Turing-complete.