Ecco un approccio leggermente diverso:
Python, 368308 297 byte
EDIT, questa volta l'ho davvero giocato a golf. Rasato di 60 caratteri.
from random import*
from en import*
C=choice
v=["code-golf","understand","go","do"]
n=["salad","octopus","fun","lunch"]
for f,l in("verbs",v),("nouns",n):exec"l.append(str(C(wordnet.all_"+f+"()))[:-4]);"*12
exec'print"Computers will never",C(v),noun.article(C(n)),C(("for","after")),C(n);'*input()
Ecco il trucco di cui sono più orgoglioso:
for f,l in("all_verbs",v),("all_nouns",n):
Non sapevo nemmeno che Python potesse farlo! Ecco una spiegazione più semplice:
for (a, b) in ((0, 1), (1, 2), (2, 3)):
assegna aeb a 0 e 1, quindi a 1 e 2, quindi a 2 e 3.
Questo utilizza la libreria linguistica di NodeBox per generare un elenco di verbi / nomi / clausole, e quindi seleziona casualmente da essi.
Questa libreria non è eccezionale per generare parole casuali (da qui i 368 byte), ma la cosa bella di questo approccio è che si ottengono parabole rassicuranti piuttosto casuali. Ecco cosa intendo.
Computers will never attempt a syria for synchronization.
Computers will never understand a salad for change of mind.
Computers will never brim an electric company for synchronization.
Computers will never pivot a dusk for fun.
Computers will never bedaze an electric company for genus osmerus.
Computers will never brim a salad for vital principle.
Computers will never attempt an erythroxylum after lunch.
Computers will never understand an uuq for water birch.
Computers will never brim an ictiobus for change of mind.
Computers will never brim an ictiobus for 17.
Computers will never lie in an octopus for change of mind.
Computers will never happen upon a toothpowder for water birch.
Computers will never typeset an electric company for change of mind.
Computers will never brim a french oceania after lunch.
Computers will never bring out an ictiobus for glossodia.
Computers will never bedazzle an animal fancier for ash cake.
Computers will never attempt a dusk for genus osmerus.
Computers will never understand an animal fancier for genus osmerus.
Computers will never accredit a prickly pear cactus for 17.
Computers will never typeset an erythroxylum for water birch.
Ma ehi, non credo che il programma di qualcun altro genererà il detto: "I computer non abbatteranno mai un fantasma di animali per la torta di cenere".
Ecco una versione non modificata (574 byte):
import random
import en
v = ["code-golf", "understand"]#list of verbs
n = ["a salad", "an octopus"]#list of nouns
c = ["for fun", "after lunch"]#list of clauses
for i in range(14):
v.append(str(random.choice(en.wordnet.all_verbs()))[:-4])
n.append(en.noun.article(str(random.choice(en.wordnet.all_nouns()))[:-4]))
c.append("for "+str(random.choice(en.wordnet.all_verbs()))[:-4])
N=input("Enter the number of reassuring phrases you want: ")
for i in range(N):
print "Computers will never"+' '+random.choice(v)+' '+random.choice(n)+' '+random.choice(c )+'.'
E infine, ma sicuramente non meno importante, ecco alcune delle mie parabole rassicuranti preferite, che prevedo diventeranno frasi di cattura molto popolari nei prossimi 10-15 anni.
Computers will never move around a methenamine for godwin austen.
Computers will never conk an adzuki bean for bitterwood tree.
Computers will never jaywalk a cross-dresser for fun.
Computers will never hyperbolize an accessory after the fact for norfolk island pine.
Computers will never dissolve a salad for earth wax.
Computers will never acetylise an incontrovertibility for dictatorship.
Computers will never reciprocate a strizostedion vitreum glaucum for commelinaceae.
Computers will never goose an action replay for star chamber.
Computers will never veto a bottom lurkers for jackboot.
Computers will never reciprocate a visual cortex for oleaginousness.
Computers will never baptise a special relativity after lunch.
Computers will never understand a gipsywort for citrus tangelo.
Computers will never get it a brand-name drug for electronic computer.
Computers will never deforest a paperboy after lunch.
Computers will never bundle up a nazi for repurchase.
Computers will never elapse a bernhard riemann for counterproposal.
e il mio preferito personale:
Computers will never romanticise a cockatoo parrot for cross-fertilization.