Acme-ConspiracyTheory-Random
view release on metacpan or search on metacpan
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
'fluoride',
'dihydrogen monoxide',
'carbon nanotubes',
);
_MERGE_( $redstring, chemicals => $chemicals );
return $chemicals;
}
sub food {
my $redstring = shift // {};
my $food = _RANDOM_(
'apples',
'Big Macs',
'KFC family buckets',
'most wines',
'Kraft instant mac and cheese boxes',
'bananas',
);
_MERGE_( $redstring, food => $food );
return $food;
}
sub attribute {
my $redstring = shift // {};
my $attr = _RANDOM_(
'gay',
'insane',
'infertile',
'immobile',
'horny',
'female',
'fat',
'fluorescent',
);
_MERGE_( $redstring, attribute => $attr );
return $attr;
}
sub artifact {
my $redstring = shift // {};
my $artifact = _RANDOM_(
'the holy grail',
'the golden fleece',
'Excalibur',
'the ark of the covenant',
"Jesus's foreskin",
'the Holy Prepuce',
'the Book of the Dead',
'the Necronomicon',
"the Philosopher's Stone",
"a fragment of the true cross",
"the seal of Solomon",
'the crystal skull',
sub { "a golden " . fake_animal( $redstring ) },
'the original copy of the bible',
'the original copy of the quran',
'the original copy of the Declaration of Independence',
);
_MERGE_( $redstring, artifact => $artifact );
return $artifact;
}
sub bad_place {
my $redstring = shift // {};
my $bad_place = _RANDOM_(
'a secret Antarctic base',
'Area 51',
'Langley, Virginia',
'Guantanamo Bay Detention Camp',
'Windsor Castle',
'The Pentagon',
'Denver International Airport',
'the basement of the Vatican',
sub { myth_place( $redstring ) },
sub {
my $p = random_place( $redstring );
"a series of tunnels underneath $p";
},
sub {
my $p = random_place( $redstring );
"a secret base in $p";
},
'a facility inside the hollow Earth',
);
_MERGE_( $redstring, bad_place => $bad_place );
return $bad_place;
}
sub random_place {
my $redstring = shift // {};
my $random_place = _RANDOM_(
'the USA',
'the UK',
'France',
'Italy',
'Germany',
'Spain',
'Egypt',
'Israel',
'Lebanon',
'Syria',
'Japan',
'China',
'Brazil',
'Argentina',
'Chile',
'Tunisia',
'Antarctica',
'Norway',
'Australia',
'New Zealand',
);
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
'space is real';
},
sub {
$redstring->{topic} = { name => 'viruses', plural => 1 };
'viruses are real';
},
sub {
$redstring->{topic} = { name => 'vaccines', plural => 1 };
'vaccines are safe';
},
sub {
my $animal = real_animal( $redstring );
"the $animal is real";
},
sub {
my $place = random_place( $redstring );
"$place is real";
},
sub {
$redstring->{topic} = { name => 'carbon dating', plural => 0 };
'the Earth is 4.5 billion years old';
},
sub {
$redstring->{topic} = { name => 'radiocarbon dating', plural => 0 };
'the universe is 14 billion years old';
},
sub {
$redstring->{topic} = { name => 'pigeons', plural => 1 };
'dinosaurs are real';
},
sub {
$redstring->{topic} = { name => 'surveillance drones', plural => 1 };
'birds are real';
},
);
_MERGE_( $redstring, misinformation => $info );
return $info;
}
sub victim {
my $redstring = shift // {};
my $victim = _RANDOM_(
'Elvis Presley',
'JFK',
'Hitler',
'Robin Williams',
'Martin Luther King Jr',
'Abraham Lincoln',
'King Charles I',
'Marilyn Monroe',
'Tupac Shakur',
'Princess Di',
'Jeff Buckley',
'Andy Kaufman',
'Jim Morrison',
'Brandon Lee',
'Lee Harvey Oswald',
'Archduke Franz Ferdinand',
'the original Avril Lavigne',
'Malcolm X',
'John Lennon',
'Michael Jackson',
'Queen Elizabeth II',
'Prince Phillip',
'Walt Disney',
);
_MERGE_( $redstring, victim => $victim );
return $victim;
}
sub physicist { # and chemists
my $redstring = shift // {};
my $x = _RANDOM_(
'Nikola Tesla',
'Benjamin Franklin',
'Albert Einstein',
'Isaac Newton',
'Stephen Hawking',
'Henry Cavendish',
);
_MERGE_( $redstring, physicist => $x );
return $x;
}
sub biologist { # and medics
my $redstring = shift // {};
my $x = _RANDOM_(
'Charles Darwin',
'Edward Jenner',
'Robert Koch',
'Carl Linneaus',
'Alexander Fleming',
'Dr Fauci',
);
_MERGE_( $redstring, biologist => $x );
return $x;
}
sub website {
my $redstring = shift // {};
my $x = _RANDOM_(
'Tumblr',
'Pinterest',
'Youtube',
'Facebook',
'Wikipedia',
'Twitter',
'Instagram',
'Geocities',
'Parler',
'Angelfire',
'the Fediverse',
'Nostr',
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
my $celebrity = celebrity( $redstring );
my $consequence = _RANDOM_(
sub {
$redstring->{topic} = { name => 'robotics', plural => 0 };
'replaced by a robot';
},
sub {
$redstring->{topic} = { name => 'impersonation', plural => 0 };
'replaced by a look-alike';
},
sub {
$redstring->{topic} = { name => 'blackmail', plural => 0 };
'blackmailed into silence';
},
);
"$celebrity has been $consequence";
},
sub {
my $objects = objects( $redstring );
my $group = shady_group( $redstring );
"$objects were invented by $group";
},
sub {
my $resource = precious_resource( $redstring );
"$resource is a source of free energy";
},
sub {
my $mythplace = myth_place( $redstring );
my $place = random_place( $redstring );
"$mythplace is in $place";
},
sub {
my $victim = victim( $redstring );
my $mythplace = myth_place( $redstring );
"$victim discovered $mythplace and was killed to keep it a secret";
},
sub {
my $resource = precious_resource( $redstring );
my $disease = disease( $redstring );
"$resource can cure $disease";
},
sub {
my $animal = real_animal( $redstring );
my $group = shady_group( $redstring );
"the $animal is a fake animal, engineered by $group";
},
sub {
my $chemicals = chemicals( $redstring );
my $animal = real_animal( $redstring );
my $s = ($animal ne 'fish') ? 's' : '';
my $attribute = attribute( $redstring );
"the $chemicals in the water is turning the $animal$s $attribute";
},
sub {
my $chemicals = chemicals( $redstring );
my $food = food( $redstring );
"$food are full of $chemicals";
},
sub {
my $animal = real_animal( $redstring );
"the $animal originally comes from another planet";
},
sub {
my $animal = real_animal( $redstring );
my $group = shady_group( $redstring );
my $stupid = _RANDOM_(
'people in costumes',
'animatronics',
'CGI',
'highly coordinated swarms of bees',
'holograms',
'a mirage',
);
"the $animal is a fake animal and is just $stupid";
},
sub {
my $animal = fake_animal( $redstring );
"the $animal is a real animal";
},
sub {
my $time = future_time( $redstring );
"the world will end $time";
},
sub {
my $time = future_time( $redstring );
$redstring->{topic} = { name => 'comets', plural => 1 };
"the comet will hit us $time";
},
sub {
my $place = random_place( $redstring );
$redstring->{topic} = { name => 'flooding', plural => 1 };
"$place was destroyed by floods";
},
sub {
my $place = random_place( $redstring );
my $group = $redstring->{shady_group}{name} // shady_group( $redstring );
$redstring->{topic} = { name => 'coup d\'etats', plural => 1 };
"$place is ruled by $group";
},
sub {
my $time = future_time( $redstring );
$redstring->{topic} = { name => 'zombies', plural => 1 };
"the zombie apocalypse will start $time";
},
sub {
my $time = future_time( $redstring );
$redstring->{topic} = { name => 'Jesus', plural => 0 };
"Jesus will return $time";
},
sub {
my $mc = mind_control_device( $redstring );
my $group = $redstring->{shady_group}{name} // shady_group( $redstring );
"THEY ($group) are using $mc";
},
sub {
my $victim = victim( $redstring );
my $place = bad_place( $redstring );
"$victim is alive and kept at $place";
},
sub {
my $artifact = artifact( $redstring );
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
"They teach $truth1 at schools in $place.",
"Everybody in $place knows that $truth1.",
"People in $place found out that $truth1.",
);
},
sub {
my $celeb = celebrity( $redstring );
my $pronoun = $redstring->{celebrity}{female} ? 'she' : 'he';
my $truth1 = hidden_truth( $redstring );
my $group = shady_group( $redstring );
$redstring->{protagonists} = $redstring->{shady_group};
my $are = $redstring->{protagonists}->{plural} ? 'are' : 'is';
my $silence = _RANDOM_(
"$pronoun will probably have to be eliminated",
"$pronoun is going to be killed if $pronoun isn't dead already",
"$pronoun is being paid to stay quiet",
"$pronoun will meet a convenient \"accident\"",
sub {
my $clone = clone( $redstring );
"$pronoun has been replaced by $clone";
},
sub {
my $place = bad_place( $redstring );
"$pronoun has been imprisoned in $place";
},
);
_UCFIRST_ "$celeb found out that $truth1 and $silence. " . _UCFIRST_ "$group $are protecting this secret.";
},
sub {
my $celeb = celebrity( $redstring );
my $pronoun = $redstring->{celebrity}{female} ? 'she' : 'he';
my $group = shady_group( $redstring );
$redstring->{protagonists} = $redstring->{shady_group};
_UCFIRST_ _RANDOM_(
"$celeb is a member of $group.",
"$celeb is a former member of $group.",
"$celeb was thrown out of $group.",
"$celeb infiltrated $group.",
"$celeb is the leader of $group.",
"$celeb is secretly worshipped by $group.",
);
},
);
if ( $redstring->{protagonists} and not $redstring->{antagonists} and _RANDOM_(0..1) ) {
my $group1 = $redstring->{protagonists}{shortname} // $redstring->{protagonists}{name};
my $group2 = shady_group( $redstring );
$redstring->{antagonists} = $redstring->{shady_group};
my $know = splural ($redstring->{antagonists}) ? 'know' : 'knows';
$theory .= " " . _UCFIRST_ _RANDOM_(
sub {
my $bribe = precious_resource_with_quantity( $redstring );
"$group2 $know the truth but $group1 have paid them off with $bribe.";
},
"$group2 $know the truth but $group1 have threatened them to keep them silent.",
"$group2 were helping them until $group1 betrayed them.",
"$group2 were helping them for a while.",
"$group2 were originally opposed to this but they're now in on it.",
"$group2 are trying to get evidence to prove it.",
);
}
_MERGE_( $redstring, base_theory => $theory );
my $evidence = evidence( $redstring );
$theory .= " $evidence" if $evidence;
my $numerology = numerology( $redstring );
$theory .= " $numerology" if $numerology;
_MERGE_( $redstring, theory => $theory );
return $theory;
}
my %special_numbers = (
19 => [ qr/COVID/, '19 is the coronavirus number' ],
24 => [ qr/TINTIN/, 'There are 24 Tintin comics' ],
33 => [ qr/MASON/, '33 is associated with the masons' ],
35 => [ qr/ELVIS/, 'Elvis was born in 1935' ],
44 => [ qr/OBAMA/, 'Barack Obama was the 44th President of the USA' ],
45 => [ qr/TRUMP|QANON|USA/, 'Donald Trump was the 45th President of the USA',
qr/UNITEDNATIONS/, 'The United Nations was founded in 1945' ],
46 => [ qr/BIDEN/, 'Joe Biden was the 46th President of the USA' ],
47 => [ qr/THECIA/, 'The CIA was founded in 1947',
qr/SILVER/, 'Silver has atomic number 47' ],
49 => [ qr/NATO/, 'NATO was founded in 1949' ],
51 => [ qr/KFC/, 'Area 51 is the fifty-first area' ],
52 => [ qr/KFC/, 'KFC was founded in 1952' ],
55 => [ qr/BIGMAC|MCDONALDS/, 'McDonalds was founded in 1955' ],
63 => [ qr/JFK|OSWALD/, 'JFK was shot in 1963' ],
79 => [ qr/GOLD/, 'Gold has the atomic number 79' ],
81 => [ qr/HIV/, 'AIDS was discovered in 1981' ],
82 => [ qr/COKE/, 'Diet Coke first came out in 1982' ],
86 => [ qr/RADON/, 'The atomic number for radon is 86' ],
92 => [ qr/URANIUM/, 'The atomic number for uranium is 92' ],
322 => [ qr/SKULL/, 'Skull and Bones is Order 322' ],
666 => [ qr/DEVIL|DEMON|SATAN/, '666 is the number of the beast' ],
);
sub numerology {
my $redstring = shift // {};
my @strings = List::Util::uniq(
grep { length }
map { my $letters = uc( $_ ); $letters =~ s/[^A-Z0-9]//g; $letters }
map {
/^(the )(.+)$/i ? $2 : $_
}
map {
ref( $_ ) ? grep( defined, $_->{name}, $_->{shortname}, $_->{title}, $_->{author} ) : $_
}
values( %$redstring )
);
my %calcs;
foreach my $string ( @strings ) {
next if length($string) >= 20;
( run in 1.065 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )