的JavaScript
function stringTheory(theory) {
var proof = 0;
var principles = theory.split(/[ ,.'-]/);
for (var i = 0; i < principles.length; i++) {
var formula = '';
for (var j = 0; j < principles[i].length; j++) {
formula += principles[i].charCodeAt(j).toString(10);
}
proof += +formula;
}
return proof;
}
console.log(
/* \2 and \3 are start of text and end of text characters */
stringTheory('\2 Yo it\'s 4327 - Go to space, look back, and see the dot of a small blue rock you once sat on amid the vast empty void - KA-BOOM - you are in awe of it. "Ah" - so tiny in this vast space yet you are even more so. A mere atom in an ocean of stars, the earth a speck of dust to the sun\'s ping-pong ball. One day you shall go back and as your toes touch the soft soil once more, the cool wind in your hair as you cast your gaze upon the moon, a mere rock just like this one, and bask in it\'s warm glow - Ah. Only then can you know the scale of it all, what luck you have to call this place home. And with this new ken, a love you\'ve kept for all of time but had not seen - for it is clear to you now. You lay open your arms and fill the air with your song - (aah) ~o Good-bye space and ... o? \3') + 42
);
到底是怎么回事?
我们使用此字符串并应用一些stringTheory()
(实际上是将来的传输):
'\2 Yo it\'s 4327 - Go to space, look back, and see the dot of a small blue rock you once sat on amid the vast empty void - KA-BOOM - you are in awe of it. "Ah" - so tiny in this vast space yet you are even more so. A mere atom in an ocean of stars, the earth a speck of dust to the sun\'s ping-pong ball. One day you shall go back and as your toes touch the soft soil once more, the cool wind in your hair as you cast your gaze upon the moon, a mere rock just like this one, and bask in it\'s warm glow - Ah. Only then can you know the scale of it all, what luck you have to call this place home. And with this new ken, a love you\'ve kept for all of time but had not seen - for it is clear to you now. You lay open your arms and fill the air with your song - (aah) ~o Good-bye space and ... o? \3'
首先,我们将其标点符号拆分成单词。然后,我们通过将字符转换为十进制ASCII码来创建一组数字。相邻的字母变为相邻的数字(例如,aa
变为9797
)。
然后将数字相加。我们得到的是191212222216169
一个完全无用的数字,它没有任何意义,就像在太空中闲散地漂浮着的四千万块岩石一样。是什么让这个世界与众不同?为什么是生活。因此,通过给这个数字赋予生活意义, +=42
我们就会得到191212222216211
;
但为什么?
这是什么意思?为什么它stringTheory("Hello world")
当然意味着。