Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Automatic Drug and Aphex Twin Song Name Generator

created by mkb

(thing) by mkb (13.8 hr) (print)   ?   2 C!s I like it! Sat Mar 30 2002 at 10:38:43

This is a goofy little web gimmick I made up one day. If you would like to use it on the web, you'll have to host it yourself!

You can also use it in #everything by asking CowbotNeal "be aphex twin".

#!/usr/bin/perl -w

use strict;
use CGI;

my $query = new CGI;

if ($query->param("viewsource")) {
	print "Content-type: text/plain\n\n";
	open(SOURCE,"medicalname");
	while (<SOURCE>) {
		print;
	}
} else {

	print "Content-type: text/html\n\n";

	my @ends = qw(
	amine
	ophan
	aline
	etine
	ogen
	anine
	anol
	ophlex
	aphlex
	ia
	ane
	ene
	ine
	ite
	ate
	ation
	ose
	ose
	ase
	idine
	ax
	il
	ide
	);

	my @bridges = qw(
	afro
	estro
	iso
	ama
	etho
	ecto
	endo
	exo
	oli
	orli
	oxy
	obo
	ono
	);

	my @starts = qw(
	floozy
	trypto
	pro
	proto
	gyno
	andro
	miso
	poly
	hemato
	cyclo
	pneuma
	ma
	toma
	grappa
	logi
	logo
	lipo
	deca
	pneumo
	chloro
	fluoro
	hydro
	flu
	contra
	);

	my @vowelmiddles = qw(
	easter
	acu
	at
	in
	am
	eth
	al
	orl
	ornith
	ox
	estr
	);

	my @middles = qw(
	sertr
	protein
	plasmic
	skeletal
	trypt
	punct
	par
	gen
	pax
	clemast
	hemat
	mis
	fromag
	phenyl
	prop
	wank
	lip
	foz
	dextr
	fruct
	clem
	chlor
	nom
	chees
	meth
	but
	stat
	fumar
	phobic
	ponic
	);

	my $numsyllables;
	my $name = "";

	my $numwords = $query->param("numwords")||1;

	for (;$numwords > 0; --$numwords) {
		my $numsyllables = $query->param("numsyllables")||int( 1 + rand(6));
		my @syllables;
		$syllables[$numsyllables] = $ends[int(rand() * $#ends)];
	
		my $vowel = 1;


		for ( --$numsyllables; $numsyllables >= 0; --$numsyllables) {
			my @parts;
			my $part;
			if ($vowel) {
				@parts = (@middles,@vowelmiddles);
				$part = int(rand()*$#parts);
				$vowel = ($part > $#middles);
			} else {
				@parts = (@starts,@bridges);
				$part = int(rand()*$#parts);
				$vowel = ($part > $#starts);
			}
	
			$syllables[$numsyllables] = $parts[$part];
	
		}
	
		$name .= (join("",@syllables));
		$name .= " " if $numwords>1;
	}
	
	$name = ucfirst($name);

	if ($query->param("suffix")) {
		my $suffix = $query->param("suffix");
		$suffix =~ s/\-//g;
		$name .= "-".$suffix;
	} elsif (rand() > 0.75) {
	#if (rand() > 0.75) {
		$name .= "-".chr(65+rand()*26);
	}

	my @params = $query->param();
	my $querystring = join("&",map {"$_=".$query->param($_)} @params);
if ($query->param("mode") eq "xml") {
	print <<EOT;
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
>

<channel rdf:about="http://www.ele.uri.edu/cgi-bin/user/mkb/medicalname?mode=xml">

<title>Drug Name Generator</title>
<link>http://www.ele.uri.edu/cgi-bin/user/mkb/medicalname?mode=xml</link>
<description></description>

<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.ele.uri.edu/cgi-bin/user/mkb/medicalname?mode=xml" />
</rdf:Seq>
</items>
</channel>

<item rdf:about="http://www.ele.uri.edu/cgi-bin/user/mkb/medicalname?mode=xml">
<title>$name</title>
<link>http://www.ele.uri.edu/cgi-bin/user/mkb/medicalname?mode=xml</link>
</item>

</rdf:RDF>
EOT
	} else {

	print <<EOT;
<HTML><HEAD><TITLE>Automatic Drug and Aphex Twin Song Name Generator</title></head>

<BODY>
<H1>$name</h1><BR />

<A HREF="medicalname?$querystring">AGAIN!</a><BR />
<form action="medicalname" method="get">
change options!<br>
number of word parts <input type="text" name="numsyllables"><br>
suffix <input type="text" name="suffix"><br>
number of words <input type="text" name="numwords"><br>
<input type="Submit" value="Submit">
<A HREF="medicalname?viewsource=yes"></form>
<br>
View source</a>

</body></html>
EOT
	}
}

printable version
chaos

Drukqs If you hear only one song this year, there's something seriously wrong with you When I Get Low I Get High CowbotNeal
Olsen Twins Tetris was Soviet Communist Propaganda #everything Electronic Music Genre Generator
Jennifer Love Hewitt California red-legged frog Aphex Twin Project Gutenberg
Rap artists who insist on singing their own name in their songs William Benjamin Robinson afx Paxil
Everything cheat codes Ventolin consensual crimes E2 GNU Project
Boston Public plotline generator bucky tubes How to wipe your ass Objective-C
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Drink up!
Harold and Maude
Closer
Bigfoot
Lexical Analyzer
miai
Robert Johnson
Dead people I have known
Aqua Teen Hunger Force
i had a dream about the future
Igor Stravinsky
White space
steganography
community supported agriculture
New Writeups
choirotey
Violent pickup lines(idea)
Ouzo
Blue Ovaries, Grrrrrrwl(log)
uncljoedoc
explanation(person)
Noung
One no longer loves one's insight when one communicates it(idea)
AspieDad
Pornology(essay)
nailbiter
Nicole duFresne(person)
Simulacron3
stigmergy(idea)
nakusavi
Yesterday I learned how to kiss(idea)
aneurin
UK Local Elections 2008(event)
Phyrkrakr
Kansas City Royals(thing)
niruena
Amalric of Bena(person)
niruena
Third Crusade(event)
Ariloulaleelay
I am a female android(personal)
csmith1492
Sublime Optimism(person)
etouffee
A tentative laugh, she expected to be interrupted(poetry)
This affordable entertainment brought to you by The Everything Development Company