News

Well folks, I’m going to keep this brief. There has been a lot going on in my life so I haven’t had a lot of time to blog or gaming or stuff for a while, but there are also some coolness going on that I want to share with you:

One, The Adventures of The Snarky Avenger is back with new pages and, it appears that, all the factors that forced Aaron and I to take a break have been resolved. You can check out the latest goodness at http://snarkyavengercomic.com

Two, I will be at FandomFest (in Louisville, KY) this coming weekend (June 29th through July 1st) sitting panels, promoting the comic, and generally having a good time. My panel schedule is as follows:

The World of Audio Books (4:00 pm on Friday in the Collins Room)
Zombie Apocalypse (5:30 pm on Friday in the Beckham Room)
Listening to Literature: A Journey Through The Audio Book Process (4:00 PM on Saturday in the Fields Room)
I Love the Craft of Lovecraft (11:30 pm on Saturday in the Morrow Room)

If you are attending, stop by and say “hi”

Third, I am now co-Guild Master of the Redeemed SWTOR (and soon to be expanding to The Secret World) guild. We are on Bergen Colony. If you are looking for a Republic or Empire guild (we have an Empire side guild on the same server named Troublemakers), go check out http://guildredeemed.com.

And finally, a piece of audio drama I have a part in has been released: The Wendy Trilogy: Episode One. I play Captain Hook. Go check it out at http://www.gypsyaudio.org/show/twisted-tales/http://fandomfest.com/

Well, I am sure I am missing stuff, but that is it for now. Have a great day and I hope to see you at FandomFest.

SpringCon is This Weekend!

Hello my excellent friends,

I have some exciting news!

I will have a table to promote The Adventures of The Snarky Avenger and my podcast, Snark Infested Waters, this weekend at SpringCon here in Twin Cities. SpringCon is a two day comic convention held at the Minnesota State Fair Grandstand. (You can get more info on the Con here: http://midwestcomicbook.com/.)

If you’re a fan of The Adventures of The Snarky Avenger or my podcasting efforts or this blog Republic of Resistentialism stop by and say “hi”. And check out all the other great creators that will be at the con. (Check out the list here: http://midwestcomicbook.com/?page_id=13)

Hope to see you at SpringCon!

What are you going to do about it?

Alright, I’ve been thinking. I know, I setup this blog more or less as talk about tech stuff (software development, tools, gadgets, technology in general, etc) and this topic might be stretching it a bit, but it was inspired by technology or, at least, by people whining about technology. (And maybe fueled a bit by death of Andrew Breitbart, not that I was particularly a fan of his, but he did accomplish a lot in his short life.) This topic began to ruminate in my mind when someone said the only people who use Google+ (which I happen to like) are people who want to Google. The conversation then went on to talk how “we should have” backed an open-source social network platform which was better. (I am not really sure what the name of it is.) (I consider the individual who said this a friend and I am not going to name names.) This morning, the one question that needs to be asked here occurred to me, “what are you doing about it?” I mean this person could have created his own community for something he cares about using this open-source social network platform in an attempt to promote it, blog about it, talk about it forums, etc.

This prompted me to look back on my near 44 years life and ask, “well, what have you done about it?” And not to spend all my time tooting my own horn, I have actually done a lot.

When I as teenager, I was big into pen n’ paper RPGs (which I still enjoy), so I helped to start and run three gaming (pen ‘n paper RPGS, board games, card games, etc) club. Later while in the military I got into Anime. I started and ran two very successful Anime clubs. (One while I was in the Military and one after I got out.) I have been into SciFi/Fantasy/Horror fandom for much of my life and have been on staff for three conventions dedicated to these for varying lengths of time.

When podcasting first started, I saw a need for shows that I wanted to listen to, and started several (Snark Infested Waters, The Three Snarks, Ray Gun Radio, Snark Tank Radio, Saturday Night in the Snark Cave, etc) and I have produced over 500 episodes. I still produce shows from time to time to promote people and things I care about.

In high school I wanted to write stories so I gave up a summer and wrote a novel. Since then I have written and published several short stories and articles (many of which were not self-published). Although, I admit ,I still do not have a published novel on the market.

I love Audio/radio drama, so I got parts in several amateur audio/radio drama production; and I have created and produced my own audio/radio drama and a album of music.

I came up some superhero characters and love comic books, so I started a web comic for my character The Snarky Avenger and his friends (The Adventures of the Snarky Avenger) with my friend Aaron Siddall.

Not to mention all the games I wrote on my VIC-20 and Commodore 64, blogs and forums I have run to promote my ideas and faith, panels I have sat at conventions, software tools I have written, people I have supported and promoted, and new projects on the drawing board.

Sure, none of this has resulted in great wealth for me, although, it has given me a modicum of fame. (Which means that many people, narrow minded people, will not acknowledge those achievements.) But I have informed, inspired, and entertained a lot of people without having to compromise my values and ideas, and that is enough for me; and, obviously, there is still plenty of work to do.

This has become the age of DIY. The tools that used to only be available to large organizations and companies are now in the hands of almost anyone. If you can’t find what your looking for create it; if it does exists, use it, adapt it, promote it. Don’t just whine and complain about it. Stop expecting others to do it for you.

What are you going to do about it?

Message Generator

As I mentioned in my last post, I was working on a more generic version of the generator which was driven by XML. This version is written in Python. I wrote in for Python 2.7 using the py-dom-xpath library. I have included the python code here as well as three example XML files: Cave Johnson’s Lemon rant, a quote from model Caprice, and my take on the old Steve Jackson Games “Message form the Illuminated Master” generator.

Here is the code and the XML. Enjoy and let me know what you thing. (I am working on a Powershell version and I am looking at creating a widget for WordPress, by the way.)

generator.py

# Message Generator
# Written by Taylor Kent
# Copyright 2012 by Michael Taylor Kent

# Get the libraries we need
import argparse
import random
import xml.dom.minidom
import xpath
import re

# Setup commandline argument Parser
parser = argparse.ArgumentParser(description="Open an XML file, generate a random messgae based on the contents of the XML file, and display it")
parser.add_argument('msgdatafile', metavar='InputXmlFile', nargs='?', type=argparse.FileType('r'), help='The XML file containing the message generation details')
parser.add_argument('count', metavar='Integer', nargs='?', type=int, help='The Number of random messages to generate (Optional)', default=1)
parser.add_argument('outfile', metavar='OutputFile', nargs='?', type=argparse.FileType('w'), help='The file to put the generated messages into (Optional)')
# Parse Commandline arguements
args = parser.parse_args()
# Open XML data file
msgdata = xml.dom.minidom.parse(args.msgdatafile)
i = 1
for i in range(args.count):	
	# Get a list of all the message patterns in the xml file
	xpathqry = '//messagedata/patterns/pattern'
	msgpatterns = xpath.find(xpathqry, msgdata)
	# Pick a message pattern
	msgpattern = msgpatterns[random.randint(0,(len(msgpatterns) - 1))]
	# Create message
	# Gather all the parts
	msgpatternname = str(msgpattern.getAttribute('name'))
	msgpatternvalue = str(msgpattern.getAttribute('value'))
	# Create Message
	# Create list of replacements
	msgparts = []
	# Check for Shared lists being used (if any)
	xpathqry = '//messagedata/patterns/pattern[@name=\'' + msgpatternname +  '\']/sharedlistsused/list'
	msgsharedlists = xpath.find(xpathqry, msgdata)
	if len(msgsharedlists) > 0:
		for msglist in msgsharedlists:
			msglistname = str(msglist.getAttribute('name')) 
			msglistregex = str(msglist.getAttribute('replacepattern'))
			# Get the shared list	
			xpathqry = '//messagedata/sharedlists/list[@name=\'' + msglistname + '\']/items/item'
			msgitems = xpath.find(xpathqry, msgdata)
			msgitemchoice = msgitems[random.randint(0,(len(msgitems) - 1))]
			msgitemvalue = str(msgitemchoice.getAttribute('value'))
			msgparts.append([msglistregex, msgitemvalue])
	# Check for Specific lists (if any)
	xpathqry = '//messagedata/patterns/pattern[@name=\'' + msgpatternname +  '\']/specificlists/list'
	msgspecificlists = xpath.find(xpathqry, msgdata)
	if len(msgspecificlists) > 0:
		for msglist in msgspecificlists:
			msglistname = str(msglist.getAttribute('name')) 
			msglistregex = str(msglist.getAttribute('replacepattern'))
			# Get list items
			xpathqry = '//messagedata/patterns/pattern[@name=\'' + msgpatternname +  '\']/specificlists/list[@name=\'' + msglistname + '\']/items/item'
			msgitems = xpath.find(xpathqry, msgdata)
			msgitemchoice = msgitems[random.randint(0,(len(msgitems) - 1))]
			msgitemvalue = str(msgitemchoice.getAttribute('value'))
			msgparts.append([msglistregex, msgitemvalue])
			# Get linked items (if any)
			msgcleanedvalue = re.sub("\'", "\\\\\'", msgitemvalue)
			xpathqry = '//messagedata/patterns/pattern[@name=\'' + msgpatternname +  '\']/specificlists/list[@name=\'' + msglistname + '\']/items/item[@value=\"' + msgitemvalue + '\"]/linkeditem'
			msglinkeditems = xpath.find(xpathqry, msgdata)
			if len(msglinkeditems) > 0:
				for msglinkeditem in msglinkeditems:
					msglinkeditemvalue = str(msglinkeditem.getAttribute("value"))
					msglinkeditemregex = str(msglinkeditem.getAttribute("replacepattern"))	
					msgparts.append([msglinkeditemregex, msglinkeditemvalue])
	# Actuall generate the message (stupid immutable strings in Python makes this harder than it needs to be)
	msg = []
	if len(msgparts) > 0:
		for msgpart in msgparts:
			if len(msg) == 0:
				msg.append(re.sub(msgpart[0],msgpart[1],msgpatternvalue))
			else:
				msg.append(re.sub(msgpart[0],msgpart[1],msg[len(msg) - 1]))
	else:
		msg.append(msgpatternvalue)
	# Get the complete message and display it
	msgfinal = msg[len(msg) - 1]
	print (msgfinal)
	print
	# write messages to the specified file, if it was supplied
	if args.outfile != None:
		args.outfile.write(msgfinal)
		args.outfile.write('\r\n\r\n')

lemons.xml

Original Quote:
“Alright, I’ve been thinking. When life gives you lemons, don’t make lemonade – make life take the lemons back! Get mad! I don’t want your damn lemons, what am I supposed to do with these? Demand to see life’s manager. Make life rue the day it thought it could give Cave Johnson lemons. Do you know who I am? I’m the man who’s gonna burn your house down! With the lemons. I’m going to to get my engineers to invent a combustible lemon that burns your house down!”

<messagedata>
	<sharedlists>
	</sharedlists>
	<patterns>
		<pattern name="lemons" value="Alright, I've been thinking. When rp1thing1rp1 gives you rp1thing2rp1, rp1thing3rp1. Make rp1thing1rp1 take the rp1thing2rp1 back! Get mad! I don't want your damn rp1thing2rp1! What am I supposed to do with these?! Demand to see rp1thing1rp1 manager! Make rp1thing1rp1 rue the day rp1pronoun1rp1 though it could give rp1namerp1 rp1thing2rp1! Do you know who I am? I'm rp1pronoun2rp1 who's gonna burn your rp1thing4rp1 down! With rp1thing2rp1! I'm going to get rp1thing5rp1 a combustible rp1thing6rp1 that burns your rp1thing4rp1 down!">
			<sharedlistsused>
			</sharedlistsused>
			<specificlists>
				<list  name="thing4"  replacepattern="rp1thing4rp1">
					<items>
						<item value="house"/>
						<item value="refrigerator"/>
						<item value="capitol building"/>
						<item value="studio"/>
						<item value="restaurant"/>
						<item value="candy factory"/>
						<item value="warehouse"/>
						<item value="computer"/>
					</items>
				</list>
				<list  name="thing5" replacepattern="rp1thing5rp1">
					<items>
						<item value="my engineers to invent"/>
						<item value="my friends to cook up"/>
						<item value="some rebel scum to steal"/>
						<item value="a dark mage to conjure up"/>
						<item value="some wombats to sniff out"/>
						<item value="an army of cockroaches to carry"/>
						<item value="a genius to think up"/>
						<item value="Lex Luthor to invert"/>
						<item value="a gang of Mad Scientists to build a time machine and go the future to find"/>
					</items>
				</list>
				<list  name="thing1" replacepattern="rp1thing1rp1">
					<items>
						<item value="life">
							<linkeditem value="it" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="John">
							<linkeditem value="he" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="the government">
							<linkeditem value="it" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="the King">
							<linkeditem value="he" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="the Chruch">
							<linkeditem value="it" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="the dark mage">
							<linkeditem value="he" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="the system">
							<linkeditem value="it" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="Russia">
							<linkeditem value="Russia" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="Cthulhu">
							<linkeditem value="the great dark lord" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="that supid dog">
							<linkeditem value="it" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="the devil">
							<linkeditem value="it" replacepattern="rp1pronoun1rp1"/>
						</item>
						<item value="Darth Vader">
							<linkeditem value="he" replacepattern="rp1pronoun1rp1"/>
						</item>
					</items>
				</list>
				<list  name="thing2" replacepattern="rp1thing2rp1">
					<items>
						<item value="lemons">
							<linkeditem value="don't make lemonade" replacepattern="rp1thing3rp1"/>
							<linkeditem value="lemon" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="ice cubes">
							<linkeditem value="don't make a Tom Collins" replacepattern="rp1thing3rp1"/>
							<linkeditem value="ice cube" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="taxes">
							<linkeditem value="don't file a tax return" replacepattern="rp1thing3rp1"/>
							<linkeditem value="tax" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="bad music">
							<linkeditem value="don't just listen to it" replacepattern="rp1thing3rp1"/>
							<linkeditem value="song" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="undercooked pizza">
							<linkeditem value="don't send it back" replacepattern="rp1thing3rp1"/>
							<linkeditem value="pizza" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="mexican candy">
							<linkeditem value="don't eat it and puke" replacepattern="rp1thing3rp1"/>
							<linkeditem value="candy" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="crappy software">
							<linkeditem value="don't just install it and post bitter forum post online about how it sucks" replacepattern="rp1thing3rp1"/>
							<linkeditem value="software" replacepattern="rp1thing6rp1"/>
						</item>
						<item value="a Yugo">
							<linkeditem value="don't drive it" replacepattern="rp1thing3rp1"/>
							<linkeditem value="Yugo" replacepattern="rp1thing6rp1"/>
						</item>
					</items>
				</list>
				<list  name="name" replacepattern="rp1namerp1">
					<items>
						<item value="Cave Johnson">
							<linkeditem value="the man" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="Billy">
							<linkeditem value="the boy" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="Sheela">
							<linkeditem value="the woman" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="Merlin">
							<linkeditem value="the wizard" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="Robin Hood">
							<linkeditem value="the hood" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="that guy">
							<linkeditem value="the guy" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="Richard Nixon">
							<linkeditem value="the zombie (and former president)" replacepattern="rp1pronoun2rp1"/>
						</item>
						<item value="JFK">
							<linkeditem value="the gunslinger" replacepattern="rp1pronoun2rp1"/>
						</item>
					</items>
				</list>
			</specificlists>
		</pattern>
	</patterns>
</messagedata>

mombasa.xml

Original Quote:
“I knocked someone over in Mombasa and he broke his leg. But I gave him 10 Pounds and he seemed really pleased.”

<messagedata>
	<sharedlists>
	</sharedlists>
    <patterns>
	<pattern name="mombasa" value="I knocked someone over in rp1placerp1 and rp1pronoun1rp1 broke rp1pronoun2rp1 rp1bodypartrp1. But I gave rp1pronoun3rp1 rp1compensationrp1 and rp1pronoun1rp1 rpt1endingrpt1.">
		<sharedlistsused>
		</sharedlistsused>
		<specificlists>
			<list  name="place" replacepattern="rp1placerp1">
				<items>
					<item value="Mombasa"/>
					<item value="Washington State"/>
					<item value="Walmart"/>
					<item value="Hell"/>
					<item value="Detroit"/>
					<item value="Las Vegas"/>
					<item value="line for concert tickets"/>
					<item value="my dream"/>
					<item value="the robot factory"/>
					<item value="Moombase Alpha"/>
					<item value="the Dungeon of Dreadmore"/>
				</items>
			</list>
			<list  name="bodypart" replacepattern="rp1bodypartrp1">
				<items>
					<item value="leg"/>
					<item value="arm"/>
					<item value="jaw"/>
					<item value="finger"/>
					<item value="foot"/>
					<item value="head"/>
					<item value="ankle"/>
					<item value="wrist"/>
					<item value="shoulder"/>
					<item value="back"/>
					<item value="tooth"/>
				</items>
			</list>
			<list  name="compensation" replacepattern="rp1compensationrp1">
				<items>
					<item value="10 pounds"/>
					<item value="37 cents"/>
					<item value="a lemon"/>
					<item value="someone elses business card"/>
					<item value="a hall pass"/>
					<item value="an apple"/>
					<item value="a 30 dollar bill"/>
					<item value="a happy meal"/>
					<item value="a ticket to Disney"/>
					<item value="a dime bag"/>
					<item value="3 pennies"/>
					<item value="a Alien artifact"/>
					<item value="a bible"/>
					<item value="my sweaty socks"/>
					<item value="a Lady Gaga CD"/>
					<item value="a radioactive bolt"/>
					<item value="an electric shock"/>
					<item value="a punch in the face"/>
					<item value="drug"/>
					<item value="a red plastic dinosaur"/>
					<item value="some pocket lint"/>
					<item value="a pizza"/>
					<item value="a jar of pickles"/>
					<item value="a ticket to last years superbowl"/>
					<item value="my car keys"/>
					<item value="a dress"/>
					<item value="some pants"/>
					<item value="a toy truck"/>
					<item value="a bowl of ice-cream"/>
					<item value="some mexican candy"/>
					<item value="a boot to the head"/>
				</items>
			</list>
			<list name="ending" replacepattern="rpt1endingrpt1">
				<items>
					<item value="sued me"/>
					<item value="pulled out a shotgun"/>
					<item value="gave me a Tickle Me Elmo"/>
					<item value="stole my wallet"/>
					<item value="ran off screaming"/>
					<item value="hit me in the face with a pie"/>
					<item value="threw a rock at me"/>
					<item value="shot me in the leg"/>
					<item value="seemed really please"/>
					<item value="returned the favor"/>
					<item value="put a curse on me"/>
					<item value="gave it back"/>
					<item value="smoked a dubie"/>
					<item value="had a heart attack"/>
					<item value="discovered the meaning of life (and didn't share it with me)"/>
					<item value="bought a roast-beef hoagie"/>
					<item value="whent to Taco Bell"/>
					<item value="ate a bug"/>
					<item value="told me about a great investment opportunity"/>
				</items>
			</list>
			<list name="pronoun" replacepattern="rp1pronoun1rp1">
				<items>
					<item value="he">
						<linkeditem value="his" replacepattern="rp1pronoun2rp1"/>
						<linkeditem value="him" replacepattern="rp1pronoun3rp1"/>
					</item>
					<item value="she">
						<linkeditem value="her" replacepattern="rp1pronoun2rp1"/>
						<linkeditem value="her" replacepattern="rp1pronoun3rp1"/>
					</item>
				</items>
			</list>
		</specificlists>
	</pattern>
    </patterns>
</messagedata>

illuminator.xml

Examples:
“The President writes Internal Security and the tasty woman

Cthulhu will be the house

George W. Bush smacks Robin Hood and the cold FNORD

Batman hates Captain Kirk, and The President smacks the pen”

<messagedata>
	<sharedlists>
		<list  name="adjective">
			<items>
				<item value="blue"/>
				<item value="hot"/>
				<item value="alien"/>
				<item value="magical"/>
				<item value="fast"/>
				<item value="hot"/>
				<item value="cold"/>
				<item value="cool"/>
				<item value="ferocious"/>
				<item value="frightening"/>
				<item value="small"/>
				<item value="huge"/>
				<item value="Japanese"/>
				<item value="old"/>
				<item value="smelly"/>
				<item value="fat"/>
				<item value="phat"/>
				<item value="angry"/>
				<item value="irate"/>
				<item value="mellow"/>
				<item value="blue-green"/>
				<item value="hyper"/>
				<item value="paranormal"/>
				<item value="super"/>
				<item value="supernatural"/>
				<item value="happy"/>
				<item value="scary"/>
				<item value="cute"/>
				<item value="watery"/>
				<item value="Y2K-ready"/>
				<item value="ready"/>
				<item value="tasty"/>
			</items>
		</list>
		<list  name="thing">
			<items>
				<item value="MP3"/>
				<item value="alien"/>
				<item value="car"/>
				<item value="book"/>
				<item value="(CENSORED)"/>
				<item value="(REDACTED)"/>
				<item value="calendar"/>
				<item value="helicoper"/>
				<item value="briefcase"/>
				<item value="phone"/>
				<item value="dinosaur"/>
				<item value="robot"/>
				<item value="android"/>
				<item value="lizard"/>
				<item value="ball"/>
				<item value="hat"/>
				<item value="submarine"/>
				<item value="computer"/>
				<item value="man"/>
				<item value="woman"/>
				<item value="spaceship"/>
				<item value="tank"/>
				<item value="pen"/>
				<item value="fluid"/>
				<item value="lake"/>
				<item value="house"/>
				<item value="TV"/>
				<item value="radio"/>
				<item value="warbot"/>
				<item value="crate"/>
				<item value="dog"/>
				<item value="cat"/>
				<item value="CEO"/>
				<item value="CTO"/>
				<item value="Yugo"/>
				<item value="horse"/>
				<item value="FNORD"/>
				<item value="button"/>
			</items>
		</list>
		<list name="action">
			<items>
				<item value="writes"/>
				<item value="discovers"/>
				<item value="torments"/>
				<item value="fights"/>
				<item value="smokes"/>
				<item value="drives"/>
				<item value="pilots"/>
				<item value="runs from"/>
				<item value="is"/>
				<item value="was"/>
				<item value="will be"/>
				<item value="hates"/>
				<item value="jumps on"/>
				<item value="infiltrates"/>
				<item value="adapts to"/>
				<item value="fills"/>
				<item value="live in"/>
				<item value="live on"/>
				<item value="swims in"/>
				<item value="runs from"/>
				<item value="bounces"/>
				<item value="cooks"/>
				<item value="kills"/>
				<item value="smacks"/>
			</items>
		</list>
		<list name="person">
			<items>
				<item value="Dick Cheney"/>
				<item value="Luke Skywalker"/>
				<item value="Cave Johnson"/>
				<item value="Merlin"/>
				<item value="King Arthur"/>
				<item value="Robin Hood"/>
				<item value="Bill Clinton"/>
				<item value="Bob"/>
				<item value="Killer Kane"/>
				<item value="Superman"/>
				<item value="Lex Luthor"/>
				<item value="Batman"/>
				<item value="George W. Bush"/>
				<item value="The President"/>
				<item value="Some guy"/>
				<item value="(CENSORED)"/>
				<item value="(REDACTED)"/>
				<item value="The Quarterback"/>
				<item value="Zeus"/>
				<item value="Mr Fixit"/>
				<item value="Conan"/>
				<item value="Cthulhu"/>
				<item value="GLaDOS"/>
				<item value="The Master Computer"/>
				<item value="HAL 9000"/>
				<item value="KGB"/>
				<item value="Internal Security"/>
				<item value="General Hagenkraut"/>
				<item value="Captain Kirk"/>
			</items>
		</list>
	</sharedlists>
	<patterns>
		<pattern name="illumination1" value="The rp1adj1rp1 rp1thingrp1 is rp1adj2rp1">
			<sharedlistsused>
				<list  name="adjective" replacepattern="rp1adj1rp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
				<list  name="adjective" replacepattern="rp1adj2rp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
		<pattern name="illumination2" value="The rp1adj1rp1 rp1thingrp1 is rp1adj1rp1">
			<sharedlistsused>
				<list  name="adjective" replacepattern="rp1adj1rp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
		<pattern name="illumination3" value="rp1personrp1 rp1actionrp1 the rp1thingrp1">
			<sharedlistsused>
				<list  name="person" replacepattern="rp1personrp1"/>
				<list  name="action" replacepattern="rp1actionrp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
		<pattern name="illumination4" value="rp1person1rp1 rp1actionrp1 rp1person2rp1 and the rp1adjrp1 rp1thingrp1">
			<sharedlistsused>
				<list  name="person" replacepattern="rp1person1rp1"/>
				<list  name="action" replacepattern="rp1actionrp1"/>
				<list  name="person" replacepattern="rp1person2rp1"/>
				<list  name="adjective" replacepattern="rp1adjrp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>-->
		<pattern name="illumination5" value="rp1person1rp1 rp1actionrp1 rp1person2rp1 and the rp1thingrp1">
			<sharedlistsused>
				<list  name="person" replacepattern="rp1person1rp1"/>
				<list  name="action" replacepattern="rp1actionrp1"/>
				<list  name="person" replacepattern="rp1person2rp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
		<pattern name="illumination6" value="rp1person1rp1 rp1actionrp1 rp1person2rp1 and rp1person2rp1's rp1thingrp1">
			<sharedlistsused>
				<list  name="person" replacepattern="rp1person1rp1"/>
				<list  name="action" replacepattern="rp1actionrp1"/>
				<list  name="person" replacepattern="rp1person2rp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
		<pattern name="illumination7" value="rp1person1rp1 rp1action1rp1 rp1person2rp1, and rp1person3rp1 rp1action2rp1 the rp1thingrp1">
			<sharedlistsused>
				<list  name="person" replacepattern="rp1person1rp1"/>
				<list  name="action" replacepattern="rp1action1rp1"/>
				<list  name="person" replacepattern="rp1person2rp1"/>
				<list  name="person" replacepattern="rp1person3rp1"/>
				<list  name="action" replacepattern="rp1action2rp1"/>
				<list  name="thing" replacepattern="rp1thingrp1"/>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
		<pattern name="illumination8" value="FNORD">
			<sharedlistsused>
			</sharedlistsused>
			<specificlists>
			</specificlists>
		</pattern>
	</patterns>
</messagedata>

Enjoy. Please give credit where credit is due if you use the code. I would also be interested in seeing any patterns you come up with.

Fun with PowerShell

I have been trying to come up with the best way to start this blog. I have debated writing a post about why I am doing this blog, what it will be about, Resistentialism, me, etc. In the end I decided to share a share a stupid little scripting project I have been playing around with to help set the serious tone I believe this blog deserves.

I’ve been getting back into scripting lately since changing jobs. I have not needed todo all that much scripting in the past few years because I was in more of leadership role. Now I get to write scripts again, I am remember how much fun it is.

Back in the day, I stumbled upon a little script/program called the “Illuminator” that Steve Jackson Games was using to generate random, er, I mean coded, message from the “illuminated masters” of the Illuminati. I build something like it use a data file back then using VB 6.0 that I gave to SJG. (It was more or less useless to them considering that they are a Mac/Linux shop or at least were.) And now I use it as a way to learn various parts of new scripting languages when I need to. (I learn best “hands on”, and having a nice repeatable and expandable project to use for that makes things easier.) The project itself general requires using arrays, random numbers, files (writing to and reading from), and user input. (This example does not read from any files, but I am working on an expanded version that will. I will share that when it is complete. I also plan to write a Python version and possibly a Lua version as well.)

In the past, I would just generate random silly messages, but with the viral nature of Cave Johnson’s “Rue the day” speech from Portal 2, I decided to use that is the base message framework. If you have not played Portal 2 or hear of Cave Johnson, watch is video, thing will make a little more sense afterward:

Okay, with all that being said here is my silly little PowerShell “Rue the day” speech/message generator: (It has been testing with PowerShell 2 on Windows 7 64-bit)

##############################################################
# Name ruetheday.ps1
# Author: Taylor Kent
# Version: 1.0
# Description:
# 
# This script creates a random version on Cave Johnson's Rue The Day speech from Portal 2
# and either outputs it to the screen or a specifed file
# 
# You can add more things to the arrays used to generate the new version of the speech
# by modifying the code below
#
#
# Usage:
#
# ruetheday.ps1  [-number ] [-outfile ]
# 
# Usage Notes:
#
# Both parameters are optional
#
# History:
#
# 1.0 - Intial Creation
#
##############################################################

##############################################################
# Functions
##############################################################
# A standard way of displaying error text
function DisplayError
{
	param ([string]$errmsg, [string]$usageinfo)

	if ($usageinfo -ne "")
	{
$msg =@"
********************
ERROR: $errmsg
$usageinfo
********************
"@
	}
	else
	{
$msg =@"
********************
ERROR: $errmsg
********************
"@
	}
	Write-Host $msg -ForegroundColor red
}
# Check to see if a value is numeric
function isNumeric ($x) {
    $x2 = 0
    $isNum = [System.Int32]::TryParse($x, [ref]$x2)
    return $isNum
}
##############################################################
# Main
##############################################################
# Create Usage Info Constant
$USAGEINFO = @"
 ruetheday.ps1  [-number ] [-outfile ]
"@
# Check for commandline parameters
$quit = $false
$number = 1
$outfile = $null
if ($args.length -gt 0)
{
	for ($i = 0; $i -lt $args.Length; $i++)
	{
		switch ($args[$i])
		{
			"-?"
			{
				$quit = $true
				Write-Host "How to use:"
				Write-Host
				Write-Host $USAGEINFO
				Write-Host
			}
			"-help"
			{
				$quit = $true
				Write-Host "How to use:"
				Write-Host
				Write-Host $USAGEINFO
				Write-Host
			}
			"-number"
			{
				$i++
				if ((isNumeric $args[$i]) -eq $false)
				{
					$errmsg = $args[$i] + " is not a number and will be ignored"
					DisplayError $errmsg, $usageinfo
				}
				else
				{
					$number = [int]$args[$i]
				}
			}
			"-outfile"
			{
				$i++
				if ((test-path $args[$i] -IsValid) -eq $false)
				{
					$errmsg = $args[$i] + " is not a vaild path and will be ignored"
					DisplayError $errmsg, $usageinfo				
				}
				else
				{
					$outfile = $args[$i]
				}
			}
			default
			{
				$errmsg = $args[$i] + " is not vaild and will be ignored"
				DisplayError $errmsg, $usageinfo
			}
		}
	}
}
if ($quit -eq $false)
{
	for ($j=1; $j -le $number; $j++)
	{
		# Lists
		$thing1list = "life","John","the government","the king","the church","a dark mage","the system","Russia","Cthulhu","that stupid dog","the Devil","Darth Vader"
		$thing2list = "lemons","ice","taxes","bad music","undercooked pizza","mexican candy","a broken CD","crappy software"
		$thing3list = "don't make lemonade","don't make ice cubes","don't file a tax return", "don't just listen to it", "don't send it back", "don't just eat it and puke", "don't just eat it", "don't just install it and live with it"
		$thing4list = "house","refigerator","capitol building","studio","restaurant","candy factory","warehouse","computer"
		$thing5list = "engineers", "friends", "rebels","mages","wombat","army of cockroaches","Bucky Johnson","squid","Mad Scientists"
		$namelist = "Cave Johnson","Billy","Sheela","Merlin","Robin Hood","that guy","Richard Nixion"
		$pronounlist = "man","guy","woman","wizard","outlaw","guy","former president"
		
		# Get a random number generator
		$rand = New-Object System.Random
		
		# Pick stuff
		$thing1 = $thing1list[([int](($thing1list.Length - 1) * $rand.NextDouble()))]
		
		# $thing2 and $thing3 are linked
		$thing2number = [int](($thing2list.Length - 1) * $rand.NextDouble())

		$thing2 = $thing2list[$thing2number]
		$thing3 = $thing3list[$thing2number]

		$thing4 = $thing4list[([int](($thing4list.Length - 1) * $rand.NextDouble()))]

		# $name and $pronoun are linked
		$namenumber = [int](($namelist.Length - 1) * $rand.NextDouble())

		$name = $namelist[$namenumber]
		$pronoun = $pronounlist[$namenumber]

		$thing5 = $thing5list[([int](($thing5list.Length - 1) * $rand.NextDouble()))]

		# Generate Speech
$message = @"
Alright, I've been thinking. When $thing1 gives you $thing2, $thing3. Make $thing1 take the $thing2 back! Get mad! I don't want your damn $thing2! What am I supposed to do with these?! Demand to see $thing1 manager! Make $thing1 rue the day it though it could give $name $thing2! Do you know who I am? I'm the $pronoun who's gonna burn your $thing4 down! With $thing2! I'm going to get my $thing5 to invent a combustible $thing2 that burns your house down!
"@
		
		# If a file was supplied write the speech to it
		if ($outfile -ne $null)
		{
			$message | Out-File $outfile -Append
			"" | Out-File $outfile -Append
		}
		# Write the speech to the host
		Write-Host
		Write-Host $message
	}
	Write-Host

	$rand = $null
}

Here is a samples of it’s output:

Alright, I’ve been thinking. When Russia gives you undercooked pizza, don’t send it back. Make Russia take the undercooked pizza back! Get mad! I don’t want your damn undercooked pizza! What am I supposed to do with these?! Demand to see Russia manager! Make Russia rue the day it though it could give Merlin undercooked pizza! Do you know who I am? I’m the wizard who’s gonna burn your capitol building down! With undercooked pizza! I’m going to get my mages to invent a combustible undercooked pizza that burns your house down!

Got have fun with it. I look forward to your comments.

The Return of The Adventures of The Snarky Avenger

The Adv of The Snarky Avenger

Well folks, it has been a long time coming and now it is finally here, as of April 19th The Adventures of The Snarky Avenger web comic will return to the interwebs. Aaron (Aaron Siddall, the guy doing the awesome artwork) and I have spent the last year (more or less) re-tooling the comic and the site. Starting April 19th (tomorrow), you will be able to follow the adventures of The Snarky Avenger, Steve AKA The man with the Bionic Extension (no it is not what you’re thinking), and the beautiful Ninja Princess BruceAnn twice of week (Tuesday and Thrusdays) as they face off against Bugbears, The Easter Bunny, and other nefarious villains from around our world and galaxy. So head over to http://snarkyavengercomic.com and check it out (starting April 19th, 2011).

On a related note, Aaron and I will be attending Demicon 22 on April 29, 30, and May 1st in Des Moines, Iowa. I (Taylor) will be sitting the Podcasting 101, Pro Signing and Chat, RPG’s you might have missed, and Audio Books: Good – Bad – Ugly panels. Aaron will be sitting the Pro Signing and Chat and RPG’s you might have missed as well, and he will have some pieces of his awesome work in the Art show. If you are attending the con, stop by and say “hi”.

The Head Hunters by L. Ron Hubbard – Audiobook Review

The Head Hunters
Written by L. Ron Hubbard
Produced for audio by Galaxy Press with a full cast

Disclosure: I received a free copy of the audio book release of The Head Hunters by L. Ron Hubbard from Galaxy Press for review purposes.

I have to admit when I was first approached by Galaxy Press regarding reviewing of their audio books, I was a bit torn. I love stories of action and adventure from the pulp age, but I have read some of L. Ron Hubbard’s later work (Battlefield Earth and the Mission Earth series), and, well, I just wasn’t impressed. On the other hand the stories that Galaxy Press was offer me where from early in L. Ron Hubbard’s writing career and definitely in a more action/adventure vein. In the end I figured, if I didn’t like them then I would just say so. (I am all about giving honest reviews here.)

Fortunately for Galaxy Press and L. Ron Hubbard (and you), I really enjoyed The Head Hunters. The Head Hunters is a classic two-fisted pulp adventure story set in Polynesia. It centers around a man named Tom Christian. Christian is the adventure who is master of his own small sailing yacht. The story begins with Punjo Charlie, a local villain, menacing Christian’s first mate Hihi (a local islander). Punjo Charlie is trying to find a cache of gold discovered by Christian on the island’s interior and steal it. Christian and Hihi attempt to recover the gold before the rainy season hits and before Punjo Charlie finds it. But our heroes must also rescue a naive scientific expedition from the clutches of Punjo Charlie and his band of head hunters as well as recover the gold before it is too late.

As I said I really enjoyed The Head Hunters. Sure it was a bit dated as well as a little racist and sexist by today’s standards, but it was fun. A large part of what made it fun was the fact that it was produced with a full cast and audio effects and music (in the same style as books produced by GraphicAudio.) That really helped bring the story to life for me and upped the dramatic tension a bit. And the cast was great. The audio was clear even with the effects and music. The characters were well voiced. None of the accents were two thick. Every voice was unique. Quality of the audio performance over all was top notch.

Another big plus for me was that this audio books was only two hours long. I am a big fan of the short novel. I spend two hours a day driving and an hour at the gym listening to audio most days. Have a book I can complete in one days is nice sometimes.

If you enjoy tales of adventure in exotic locations with lots of action you should definitely check out The Head Hunters by L. Ron Hubbard. I give it 5 out of 5 snark bites.