跳到正文

个人记录

Shakespeare详解

tiger2005约 8 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年2月25日
篇幅
约 8 分钟
获赞
3

版本

  1. v1当前

互怼中的编程


这个语言需要超强的语文知识和代码能力


开头,一行文字,代表你的代码叫什么(似乎什么用都没有)


之后,演员表,只能用《罗密欧与朱丽叶》中的角色好坑啊,之后一个逗号,后面你想说什么就说什么。用句号结束。

就像

代码
Romeo, a young man with a remarkable patience.

众所周知,一场戏都是有几幕组成,那么用以下方法定义幕

代码
Act I: Hamlet's insults and flattery.  //背景
Scene I: The insulting of Romeo.       //幕

你可以将每段话中的描述换掉。

当然,一个背景下必须有一个或以上幕,且用罗马数字排序


之后就是推人了

推人用[]包着

其中有

代码
Enter 后跟几个人名,表示把这几个人推上太
Exit 后跟几个人名,表示把这几个人拉下台
Exeunt 把所有人拉下台,代码结束

接下来就是对话了

注意啦,一定是至多二人对话才有效,其他的编译器不理

这时,比较好玩的就登场了

用贬义词表示-1(pig),其他的表示1(tree)

在名词前面可以加若干个形容词,每个形容词代表返回值乘以2

你现在可以制作2的整数次方和它的负数了。之后,用

代码
the sum of A and B

相加,用

代码
the difference between A and B

相减。

当然,可以用thyself(自己)或其他人名表示调用变量

之后再在这个表示一个具体数的前面写上

代码
You are

就能给对面的人赋值了

好变态的赋值法


用

代码
Open your heart

输出对方的目前值,用

代码
Speak your mind

输出对方对应的ASCII字符,用

代码
Listen to your heart.

读入对方的ASCII字符并存储ASCII码,用

代码
Open your mind

读入对方的数值


当然,我们要在幕之间跳来跳去,就有了

代码
Let us return to scene III
We shall
We must
       proceed to

意思都是跳到第三幕


问题是一个必备的东西

代码
Juliet:
Am I better than you?
Hamlet:
If so, let us proceed to scene III.

在这里,A问出一个问题,B可以回答If so或If not,后面一个运行语句

问题类型

用as good/bad as表相等

用better表大于

用worse表小于


你想啊,一个人难道就只能记住一个数?

代码
Remember me

将自己的值放入对方的记忆中

代码
Recall your imminent death

只要一个句子有Recall,就将对方记忆中弹出一个数

在这个语言中,每个人都是一个栈,每个人的值相当于栈顶数


试一下?

前方有一些非英文语言

代码
The Infamous Hello World Program.
名称
Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.
定义
Act I: Hamlet's insults and flattery.
Scene I: The insulting of Romeo.
[Enter Hamlet and Romeo]
哈姆雷特和罗密欧的对话
Hamlet:
You lying stupid fatherless big smelly half-witted coward!
这里用6个词形容coward(懦夫),表示-64
You are as stupid as the difference between a handsome rich brave
hero and thyself!
用三个词形容hero(英雄)表示8,之后用来和之前的-64对比,变为72
Speak your mind!
输出'H'
You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's day.
-128+32=-96
You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself!
(4+1)-(-96)=101
Speak your mind!
'e'
You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse.
[101+(8-1)]=108
Speak your mind.
Speak your mind!
"ll"
[Exit Romeo]
Scene II: The praising of Juliet.
[Enter Juliet]
Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his black cat!
[(108+1)+2]=111
Speak thy mind!
'o'
[Exit Juliet]
Scene III: The praising of Ophelia.
[Enter Ophelia]
Hamlet:
Thou art as lovely as the product of a large rural town and my amazing bottomless embroidered purse.
4*8=32
Speak thy mind!
' '
Thou art as loving as the product of the bluest clearest sweetest sky and the sum of a squirrel and a white horse.
8*(1+2)=24
Thou art as beautiful as the difference between Juliet and thyself.
111-24=87
Speak thy mind!
'W'
[Exeunt Ophelia and Hamlet]
Act II: Behind Hamlet's back.
Scene I: Romeo and Juliet's conversation.
[Enter Romeo and Juliet]
Romeo:
Speak your mind.
'o'
You are as worried as the sum of yourself and the difference between my small smooth hamster and my nose.
111+(4-1)=118
Speak your mind!
'r'
Juliet:
Speak YOUR mind!
'l'
You are as bad as Hamlet!
0
You are as small as the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece.
[2-(-8)]^2-(-4)^3=100
Speak your mind!
'd'
[Exit Romeo]
Scene II: Juliet and Ophelia's conversation.
[Enter Ophelia]
Juliet:
Thou art as good as the quotient between Romeo and the sum of a small furry animal and a leech.
100/(2+1)=>33
Speak your mind!
'!'
Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister!
100/{2*[1-(-4)]}=10
Speak your mind!
'\n'
[Exeunt]
完结撒花*★,°*:.☆( ̄▽ ̄)/$:*.°★* 。

实际上,这个语言就完结了

顺便说一下

目前这个语言的编译只能在转换为C语言后才可以,如果你能将褒贬义词什么的都找出来写个编译器,你就能破吉尼斯世界记录了。

原文