R·ex / Zeng


音游狗、安全狗、攻城狮、业余设计师、段子手、苦学日语的少年。

world.execute(me); me.runSimulation(world);

注意:本文发布于 2433 天前,文章中的一些内容可能已经过时。

网易云音乐突然给我推荐了这么一首歌,歌名叫“world.execute(me);”,没错,引号里面的都是歌名。第一次听觉得节奏和旋律都挺不错的,只是除了 execution 以外一个词都没听懂……于是就去看了一眼歌词,这一看不要紧,原来歌词是下面这段代码里面所有的行级注释。

package goddrinksjava;

/**
 * The program GodDrinksJava implements an application that
 * creates an empty simulated world with no meaning or purpose.
 *
 * @author momocashew
 * @lyrics hibiyasleep
 */

// Switch on the power line
// Remember to put on
// PROTECTION
public class GodDrinksJava {

    // Lay down your pieces
    // And let's begin
    // OBJECT CREATION
    public static void main(String[] args) {

        // Fill in my data parameters
        // INITIALIZATION
        Thing me = new Lovable("Me", 0, true, -1, false);
        Thing you = new Lovable("You", 0, false, -1, false);

        // Set up our new world
        World world = new World(5);
        world.addThing(me);
        world.addThing(you);

        // And let's begin the
        // SIMULATION
        world.startSimulation();

        // ----------------------------------------

        // If I'm a set of points
        if (me instanceof PointSet) {
            // Then I will give you my
            // DIMENSION
            you.addAttribute(me.getDimensions().toAttribute());
        }

        // If I'm a circle
        if (me instanceof Circle) {
            // Then I will give you my
            // CIRCUMFERENCE
            you.addAttribute(me.getCircumference().toAttribute());
        }

        // If I'm a sine wave
        if (me instanceof SineWave) {
            // Then you can sit on all my
            // TANGENTS
            you.addAction("sit", me.getTangent(you.getXPosition()));
        }

        // If I approach infinity
        if (me instanceof Sequence) {
            // Then you can be my
            // LIMITATIONS
            me.setLimit(you.toLimit());
        }

        // ----------------------------------------

        // Switch my current
        // To AC, to DC
        me.toggleCurrent();

        // And then blind my vision
        me.canSee(false);
        // So dizzy, so dizzy
        me.addFeeling("dizzy");

        // Oh, we can travel
        // To A.D., to B.C.
        world.timeTravelForTwo("AD", 617, me, you);
        world.timeTravelForTwo("BC", 3691, me, you);

        // And we can unite
        // So deeply, so deeply
        world.unite(me, you);

        // ----------------------------------------

        // If I can
        // If I can give you all the
        // SIMULATIONS
        if (me.getNumSimulationsAvailable() >= you.getNumSimulationsNeeded()) {
            // Then I can
            // Then I can be your only
            // SATISFACTION
            you.setSatisfaction(me.toSatisfaction());
        }

        // If I can make you happy
        if (you.getFeelingIndex("happy") != -1) {
            // I will run the
            // EXECUTION
            me.requestExecution(world);
        }

        // Though we are trapped
        // In this strange, strange
        // SIMULATION
        world.lockThing(me);
        world.lockThing(you);

        // ----------------------------------------

        // If I'm an eggplant
        if (me instanceof Eggplant) {
            // Then I will give you my
            // NUTRIENTS
            you.addAttribute(me.getNutrients().toAttribute());
            me.resetNutrients();
        }

        // If I'm a tomato
        if (me instanceof Tomato) {
            // Then I will give you
            // ANTIOXIDANTS
            you.addAttribute(me.getAntioxidants().toAttribute());
            me.resetAntioxidants();
        }

        // If I'm a tabby cat
        if (me instanceof TabbyCat) {
            // Then I will purr for your
            // ENJOYMENT
            me.purr();
        }

        // If I'm the only god
        if (world.getGod().equals(me)) {
            // Then you're the proof of my
            // EXISTENCE
            me.setProof(you.toProof());
        }

        // ----------------------------------------

        // Switch my gender
        // To F, to M
        me.toggleGender();

        // And then do whatever
        // From AM to PM
        world.procreate(me, you);

        // Oh, switch my role
        // To S, to M
        me.toggleRoleBDSM();

        // So we can enter
        // The trance, the trance
        world.makeHigh(me);
        world.makeHigh(you);

        // ----------------------------------------

        // If I can
        // If I can feel your
        // VIBRATIONS
        if (me.getSenseIndex("vibration")) {
            // Then I can
            // Then I can finally be
            // COMPLETION
            me.addFeeling("complete");
        }

        // Though you have left
        world.unlock(you);
        world.removeThing(you);
        // You have left
        me.lookFor(you, world);
        // You have left
        me.lookFor(you, world);
        // You have left
        me.lookFor(you, world);
        // You have left
        me.lookFor(you, world);
        // You have left me in
        me.lookFor(you, world);
        // ISOLATION

        // ----------------------------------------

        // If I can
        // If I can erase all the pointless
        // FRAGMENTS
        if (me.getMemory().isErasable()) {
            // Then maybe
            // Then maybe you won't leave me so
            // DISHEARTENED
            me.removeFeeling("disheartened");
        }

        // Challenging your god
        try {
            me.setOpinion(me.getOpinionIndex("you are here"), false);
        } catch(IllegalArgumentException e) {
            // You have made some
            // ILLEGAL ARGUMENTS
            world.announce("God is always true.");
        }

        // ----------------------------------------

        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EXECUTION
        world.runExecution();
        // EIN
        world.announce("1", "de"); // ein; German
        // DOS
        world.announce("2", "es"); // dos; Español
        // TROIS
        world.announce("3", "fr"); // trois; French
        // NE
        world.announce("4", "kr"); // 넷; Korean
        // FEM
        world.announce("5", "se"); // fem; Swedish
        // LIU
        world.announce("6", "cn"); // 六; Chinese
        // EXECUTION
        world.runExecution();

        // ----------------------------------------

        // If I can
        // If I can give them all the
        // EXECUTION
        if (world.isExecutableBy(me)) {
            // Then I can
            // Then I can be your only
            // EXECUTION
            you.setExecution(me.toExecution());
        }

        // If I can have you back
        if (world.getThingIndex(you) != -1) {
            // I will run the
            // EXECUTION
            world.runExecution();
        }

        // Though we are trapped
        // We are trapped, ah
        me.escape(world);

        // ----------------------------------------

        // I've studied
        // I've studied how to properly
        // LO-O-OVE
        me.learnTopic("love");

        // Question me
        // Question me, I can answer all
        // LO-O-OVE
        me.takeExamTopic("love");

        // I know the
        // algebraic expression of
        // LO-O-OVE
        me.getAlbegraicExpression("love");

        // Though you are free
        // I am trapped, trapped in
        // LO-O-OVE
        me.escape("love");

        // ----------------------------------------

        // EXECUTION
        world.execute(me);
    }
}

有大神把这首歌做成了 OSU! 的谱面,里面的 StoryBoard 超级华丽,可以从 这里 下载。

对着代码仔细听了几遍,居然听出了一种很奇妙的感觉:

我们曾经很浪漫,但是你走了,把我留在这虚无的模拟世界。
多次找寻无果之后,我从 execution(运行)变成了 execution(死刑)。为了你,我可以结束掉这个世界。
我已经学会如何去爱了,我甚至知道爱的代数表达式!你快回来问我啊!
开始 execution。

在一个很隐蔽的地方,有一个小变量一直在呐喊,没人能听见,他也知道没人能听见,但仍怀有希望。当所有希望破灭后,不得不与这世界做了了结。

这种程度的被抛弃的感觉,我没有经历过,不过“一个人身处于一个虚无的世界”这种感觉,不管是在做梦还是日常发呆,我都遇到过。做梦的时候,有时候会梦见自己没有实体,从地球以很快的速度飞出去,越过众多星系,到了一个近乎全黑的地方,然后发现远处有一个红点,飞过去之后发现是一个庞大到无法想象的均匀球体。不知道这样的梦意味着什么,但是这个场景我还是有点怕的,因为这之后的场景是:发现自己被困在这儿,再也回不去了。日常发呆的时候还好,只是让自己以观察者的身份在不同维度的空间里穿梭,这些空间里没有任何物体,只是单纯的空间而已。我没有像歌里面的变量那样学着结束这个世界,而是在更深地感受着自己与这个世界的联系。

在玩 MineCraft 的时候,听到背景音乐也有一种奇特的感觉。在这里,我有近乎无限的时间和空间,我可以对这个世界进行任意的改造:可以在家旁边建一个池塘垂钓,可以在家里面挖一条很深的地下通道,可以在世界的最顶端建一个空中铁路,可以在地狱建一个由玻璃构成的、通向熔岩池中央的通道……所有的物品都是规则的方块状,不真实的下雨声听起来反而别有韵味。就这样,享受只有我一个人的世界。

突然想起了 xkcd 上面的一幅漫画 《A Bunch of Rocks》,忽略掉最后一格漫画之后,感觉还是很好玩的。主人公(就是作者)被永久地困在了一个无尽的沙漠中,感觉不到饥渴,有无限的时间和空间。于是他打算将沙漠中的石子摆成图灵完备的计算机,来模拟整个宇宙。如果宇宙中的一粒灰尘突然从你眼前消失了——“啊,我一定是摆错了一块石子……可能在亿万年前的某个时刻吧,以及……”

0

可能我们都有“病娇”这个隐藏模式吧。

Disqus 加载中……如未能加载,请将 disqus.com 和 disquscdn.com 加入白名单。

这是我们共同度过的

第 3072 天