Saturday, February 14, 2009

Particularly Silver

I went outside this morning and sat for awhile out on the patio. Rained last night, and cold today. Sat there for a long while. Hot cup of tea, and cigarettes and no shoes on. Saw the strangest thing. It looked a bit like a single string of that silvery stuff you throw on a Christmas tree, maybe blown in by the wind, one end touching the ground and the other resting on our fence. So silver. It would sway a little bit now and then in the breeze.

It was, to use my favorite phrase, particularly silver. It was the epitome of silver. So silver, it was almost light.

I sat and stared it down for a half hour or so. I was pretty sure it wasn't Christmas tree spoor. I thought it might be some thin wire. But from what? And besides, it was inconsistent. The silvery parts were thick enough to look like wire, but other parts were darker, and seemed thinner, like fine string, like the aforementioned tree trimmings, wide and silvery on the top and bottom, and dark and razor thin when viewed from the side.

I thought about being bitter, and resentful toward a person. Of hating a person. And yet loving them, and not wanting to hurt them. And in not hurting them, making the situation worse. Of bottling things up inside, but picking one thing, and deciding, when this thing happens, then I will explode, a little. Right, wrong, or crazy. I don't know.

Indifferent. That's my problem. There are so many things in my life that I just can't bring myself to care about anymore. I could probably improve my life immensely if I just started flipping a coin for every decision I need to make. Instead of killing myself with obsessive worry and doubt, and far too often not making any decision at all. I tell you, that third choice is a not a great one. Just ask my bankruptcy attorney.

It was spider silk. I couldn't figure it out at first, even from a couple feet away. Until I saw that it was the guide for a spider's web, that first strand they lay, upon which all the rest of the strands depend. The spider attached it to the fence, then released itself into the air, descending to the ground, then it fastened the strand to the earth, and climbed back up. The rest of the web was just the beginnings of the project, tucked back up in the corner where two fence posts meet. That's why it wasn't wet with morning dew, reflecting brilliantly in the sun. The guide, extending out six inches or so from the fence, was covered, irregularly, in miniscule little droplets of dew, refracting the light, each one bright white and yet also colorful from that close up.

Wednesday, February 4, 2009

And Justice For All

http://www.democrats.com/special-prosecutor-for-bush-war-crimes


Petition

Dear Attorney General Eric Holder, 

We the undersigned citizens of the United States petition you to appoint a Special Prosecutor to investigate and prosecute any and all government officials who have participated in torture and other war crimes. 

These crimes are being euphemistically referred to as "abusive interrogation techniques" by such respected figures as Senator John McCain. These are euphemisms for torture. Torture is a war crime. Waterboarding is a war crime. The CIA has admitted waterboarding detainees. Former Vice President Cheney brazenly admitted authorizing the program that led to waterboarding, other forms of torture too numerous to list, and ultimately, the deaths by homicide of detainees. 

As Major General Antonio Taguba, the Army general who led the investigation into prisoner abuse at Iraq's Abu Ghraib prison has stated: 

"After years of disclosures by government investigations, media accounts and reports from human rights organizations, there is no longer any doubt as to whether the current administration has committed war crimes. The only question that remains to be answered is whether those who ordered the use of torture will be held to account." 


The Washington Post summarized the Senate Armed Services Committee Report on detainee treatment: 

A bipartisan panel of Senators has concluded that former defense secretary Donald H. Rumsfeld and other top Bush administration officials bear direct responsibility for the harsh treatment of detainees at Guantanamo Bay, and that their decisions led to more serious abuses in Iraq and elsewhere. 


We the undersigned citizens demand a full and thorough investigation immediately. This investigation should be pursued no matter where it may lead and no matter what the political implications may be. To this end, we remind you that you work not on behalf of or for the President or the Congress, but for the People of the United States of America and for Justice itself. 

The United States is a representative democracy. The actions of our government officials are done in the name of its citizens. War Crimes have been committed in our name. Torture has been done in our name. The only way to clear our name of war crimes is to repudiate them through the aggressive prosecution of each and every person involved to the fullest extent of the law through the appointment of a Special Prosecutor.

We recommend adding a brief personal comment to your petition:

You must investigate and prosecute, or these crimes will recur, again and again. The men and women of future presidential administrations are watching right now, and will learn the lesson of what evils will or will not be tolerated by the American people from your actions, for good or ill, one way or another. In faling to act, you doom untold multitudes to unjust suffering, and the citizens of our nation to live in a state of perpetual shame.

Games Workshop ripped off Blizzard


Saturday, January 31, 2009

Scraps of life

Not a whole lot going on right now. Or at least, not a whole lot that hasn't been going on forever. But I'm bored and lonely, and thinking maybe I can scrape up enough crumbs to justify making a post.

I cancelled my Sprint Mobile Broadband account. Maybe that's one reason for this, the fact that I'll probably be offline for awhile, until I figure out who I'll go with next, and how I'll pay for it. I should have cancelled it a year ago. I've been paying out the nose, $100 a month, for mobile internet access while never leaving my living room, and 300 minutes per month on a cell phone that no one ever calls me on. Haven't even had the thing charged up in the last six months... I think it craps out on me around the middle of February, after which I'll see about Time Warner cable internet, or maybe this Verizon FIOS. Get a TV/internet/phone package that will end up saving me about $70 a month.

I don't know what I'll end up doing, but I doubt I'll ever drive a truck again. I got a notice last month warning me to get a new medical examination and file it with the DMV. I don't think I could pass it, so I didn't even bother. I assume at some point they'll send me a second warning, and then downgrade me to a class C license.

I'm officially stuck on Project Euler, at 68 problems completed. Although my Python skills aren't great what really got me was the math. Solving the rest of these would require me to spend more time learning, or relearning, more advanced math than I'd ever care to know. I definitely learned a lot from what I did do, as evidenced by my going over and rewriting some of the code I wrote last month and optimizing it, turning a script that could brute force a problem in 20 minutes, down to 8 minutes, down to 2 minutes, then finally getting it to run in 3 seconds.



Now I'm looking for new projects to expand my Python repertoire. Wrote a little script that, upon entering the day and time that you quit smoking, calculates and shows you the time since, how many cigarettes you would have smoked in that time, and how much money you have saved. Took about two hours, which is about how long I quit smoking before I dragged my ass down to the gas station, where the cashier ladies don't know me by name, but do reach for three packs of Marlboro lights as soon as they see me coming.

I wrote, and this is the weirdest thing, a world generator for the Traveller RPG. A game I've never played, have no desire to play, probably never will play. But I heard some people talking about it in a forum, found the rules online, and set to work, I think solely because I knew it would be a pretty straight forward coding exercise, just so many dice rolls to look up in tables. Here's the output:

Oecey II

Starport Quality: B
Berthing Cost:
Fuel Grade:
Fuel Cost/Ton:
World Size: 7
Circumference: 10460 km
Gravity: 0.98g
Atmosphere Category: 4
Description: Thin, Tainted
Pressure: 0.62 atms
Survival Gear Required: Filter
Mean Temperature: 22C
Temperate world. Earthlike. Liquid and vaporised water are common, moderate ice caps.
Surface Water: 62%
Population Class: 3
Census data: 8738 sentients
Government Level: 2
Democracy
Prohibitions & Laws
No man portable energy weapons, highly addictive narcotics, Agent programs, alien technology, visitors must present passenger manifest upon landing, may land anywhere.


I was trying to code planet size to the Roman numeral planetary order by dividing them in half, making small Mercury type planets more likely to be Suchandsuch I or II, and the larger earthlikes more like to be III thru V, etc... simple task, but for some reason it won't work. I surely fucked up somewhere... By the way, that Roman numeral stuff is coded to only appear in one fifth of the names, with the occasional Oecey Station/Prime, or other sci-fi trope. I'm gonna post the code. I know no one cares, but I'm proud of it...

def genname():
length = 0
name = ''
vowels = ['a', 'e', 'e', 'i', 'o', 'a', 'e', 'i', 'o', 'u', 'y', 'ie',
'ei', 'ea', 'oe', 'eo', 'ue', 'eu', 'ye', 'ey', 'ay', 'ya', 'oa']
consonants = ['r', 's', 't', 'l', 'm', 'n', 'b', 'c', 'd', 'f', 'g',
'h', 'j', 'k', 'l', 'm', 'n', 'p', 'k', 'r', 's', 't', 'v', 'w', 'x',
'z', 'nd', 'ng', 'st', 'tr', 'rt', 'qu', 'el', 'sl', 'ck', 'gh', 'gr',
'mm', 'nn', 'tt', 'll', 'ss', 'bb', 'dd', ]
for i in xrange(2):
length += random.randrange(1, 5)
coin = random.randrange(1, 2)
while len(name) < length:
if coin % 2 == 0:
name = name + consonants[random.randrange(len(consonants))]
coin += 1
else:
name = name + vowels[random.randrange(len(vowels))]
coin += 1
appendage = random.randrange(1, 4)
if appendage < 3:
name = name.title()
elif appendage == 3:
numbers = ['Station', 'Prime', 'II', 'III', 'IV', 'V', 'VI']
num = random.randrange(len(numbers))
name = name.title() + ' ' + numbers[int(num)]
world['name'] = name


Occasionally it will throw out a Yeleabb, or a Euxeill, or Oemmynne, but the majority of the time it comes up with good solid sci-fi trash like Ur Prime, Yed, Away IV, Ireus, Etcetera VI...

I have some doubts about the rest of the coding, some screwy things that I'm not sure whether they were screwy in the original rules, or whether I didn't get everything right. Seems to come up a little too often with that "Earthlike, water all over the place" line even for planets that have 1% surface water. Huge earth like planets with populations under 10, meteoroids 500km across with 74,000,000 inhabitants.

I'm thinking of starting some sort of long, very involved Python project. Either some sort of app, or maybe a roguelike game. Nothing insanely complicated, just something that would take a couple months of real work, and at the end actually be useful.

It's strange. I've been collecting an inordinate amount of roleplaying game stuff.


That I'm sure I'll never use. No longer a player, I'm now a collector of RPGs.

In a similar vein, I've recently got my hands on DVD's of that great old show, Cosmos:



Which I've been watching the hell out of, or would, if my DVD player weren't a piece of shit. Honestly, I would like nothing more than to go back to VHS... Remember when they were selling us on this shit? 'Oh, these little babies are indestructible! Never wear out like those old tapes do...'

There's a great part in there, somewhere, where Sagan pretty much savages Aristotle and Plato (emphasis below is mine):

Plato and Aristotle were comfortable in a slave society. They offered justifications for oppression. They served tyrants. They taught the alienation of the body from the mind (a natural enough ideal in a slave society); they separated matter from thought; they divorced the Earth from the heavens - divisions that were to dominate Western thinking for more than twenty centuries. Plato, who believed that ‘all things are full of gods,’ actually used the metaphor of slavery to connect his politics with his cosmology. He is said to have urged the burning of all the books of Democritus (he had a similar recommendation for the books of Homer), perhaps because Democritus did not acknowledge immortal souls or immortal gods or Pythagorean mysticism, or because he believed in an infinite number of worlds. Of the seventy-three books Democritus is said to have written, covering all of human knowledge, not a single work survives. All we know is from fragments, chiefly on ethics, and secondhand accounts. The same is true of almost all the other ancient Ionian scientists.

In the recognition by Pythagoras and Plato that the Cosmos is knowable, that there is a mathematical underpinning to nature, they greatly advanced the cause of science. But in the suppression of disquieting facts, the sense that science should be kept for a small elite, the distaste for experiment, the embrace of mysticism and the easy acceptance of slave societies, they set back the human enterprise. After a long mystical sleep in which the tools of scientific inquiry lay moldering, the Ionian approach, in some cases transmitted through scholars at the Alexandrian Library, was finally rediscovered. The Western world reawakened. Experiment and open inquiry became once more respectable. Forgotten books and fragments were again read. Leonardo and Columbus and Copernicus were inspired by or independently retraced parts of this ancient Greek tradition. There is in our time much Ionian science, although not in politics and religion, and a fair amount of courageous free inquiry. But there are also appalling superstitions and deadly ethical ambiguities. We are flawed by ancient contradictions.

The Platonists and their Christian successors held the peculiar notion that the Earth was tainted and somehow nasty, while the heavens were perfect and divine. The fundamental idea that the Earth is a planet, that we are citizens of the Universe, was rejected and forgotten. This idea was first argued by Aristarchus, born on Samos three centuries after Pythagoras. Aristarchus was one of the last of the Ionian scientists. By this time, the center of intellectual enlightenment had moved to the great Library of Alexandria. Aristarchus was the first person to hold that the Sun rather than the Earth is at the center of the planetary system, that all the planets go around the Sun rather than the Earth. Typically, his writings on this matter are lost. From the size of the Earth’s shadow on the Moon during a lunar eclipse, he deduced that the Sun had to be much larger than the Earth, as well as very far away. He may then have reasoned that it is absurd for so large a body as the Sun to revolve around so small a body as the Earth. He put the Sun at the center, made the Earth rotate on its axis once a day and orbit the Sun once a year.


I've read so much adulation of Plato and his ilk, but the more in depth I get, the more disgusted I become, and I was laughing out loud when I first read this. Imagine how much better off we would be today, if these sacred cow, scam artist, sons of bitches had been forced to get real jobs...


My mother keeps falling down. Fell down last week while going out to get the mail, saw a piece of wind blown trash on the ground and figured she would pick it up, next thing you know she's down on her face with a cut lip, and can't get up. Too many years working as a beautician, standing on her feet 8 hours a day, knees and joints and leg muscles in bad shape. It's scary. When I was a kid I spent my summers in a beauty salon, listening to the old ladies and the stylists talk, reading People and the National Enquirer and learning far more about the sex lives of celebrities than a 6 year old boy should. And one repeating pattern I picked up on was this:

"Oh, did you hear. Old Mrs Whatshername fell down the other day and broke her hip. She won't be in for awhile until she heals up."

And two weeks later.

"Oh, did you hear. Poor old Mrs Whatshername passed away."

Over and over and over. Old ladies fall down, break their hips, are bed ridden and die shortly thereafter. I don't know if any actuaries are noting this, but it was clear as day to me even at six years old.

And then there's everyone who hears about this, giving me the accusatory 'hey asshole' look, wondering why I'm not going out to get the mail for her, or doing the other things for her that have led to her taking spills. As if it would be better for her to spend the rest of her life in a chair, getting no exercise at all, rather than what little she does get, until her muscles turn to jelly and she ends up bedridden.

My niece is pregnant again. She works in a construction union, and has been out of work for awhile. Just married and her husband, who is about the most genuinely nice young guy you could meet, just lost his good paying job and scrambling around now trying to find his way, in an economy that's falling to pieces... I tell you, she inherited her luck from the wrong side of the family tree.

Boy, I had two run ins with shitty companies, and I don't want to forget to slander them here, while I'm still good and pissed off. The first is Kaplan University, an online educational thing. On their site they have some basic information about how their setup works, and a little "test" to take to see if you'd be well suited to online educational courses. Oh, and please give us your name and phone and address before you take the test, which is the most pitiful nonsensical bullshit I've ever seen, so that they can call me up every fucking day to try to hard sell me like a used car salesman... The whole test was questions about how I handle my online courses, which strangely enough, I didn't know how to answer, because of course I have never taken such an online course. Which makes the results pretty much worthless, for me, although the result for them in their goal, which amounts to little more than a phishing scheme was well served. Rest assured I wouldn't attend their university now if they paid me.

The other was ClubWPT, the online tournament poker site. They didn't piss me off too bad. I tried their two week trial, played some games. Won a lot of tournament points, and no money, and decided it was time to cancel my trial membership before the first charge comes in. So they send you to the usual cancellation type screen. Here's a bunch of reasons why people might quit, please put a check next to the reason why you are quitting, or fill in the Other box, and click here to complete your cancellation.

Well, none of the reasons are my reason. I don't have any problem with them. I'm just short on dough, took the free entertainment, and now it's time to bail. So I don't choose a reason, and click the button. Which dumps me right back on the same page, with some bullshit thing explaining to me that I HAVE to choose one of the reasons.

How fucking dare you people hold me hostage? I'm fine about helping out some company with a little info, if I have it to give, but where in hell do you people get off demanding it? So I clicked Other, and filled the box in with my reason for quitting, "FUCK YOU!" and now instead of maybe coming back and giving them another chance in the future, I've got this bad taste in my mouth every time I think of them.

Take note future MBA seekers and wannabe big business moguls of the world: If you want my money, or even the slightest possibility of ever getting even one dollar of my money, DO NOT EVER DEMAND EVEN ONE SINGLE THING OF ME. I'm not kidding. I pay you. I demand things of you. You can either serve me like a slave in the court of a Roman emperor, or just forget the whole fucking thing...

Not kidding. This is your only warning. By trying to sell me anything you have agreed to the terms of my EULA, whether you've read it or not.


A map I've been dicking around with in GIMP. Not my artistry, of course. I think it was an old map of the Isle of Man, turned by me into the beginnings of a map for... I don't know. A fantasy RPG I'll never play, or a story I'll never write, assuming I ever finish it, which I never will.

Well. This is getting depressing. I don't know why I bother with this. I think I'll go back bottling up everything, deep down inside.


Click.

Well, only got an hour of daylight left. Better get started.

Isn't it unsafe to travel at night?

It'll be a lot less safe to stay here. Your father's gonna pick up our trail before long. Can Loca ride?

Yeah, I can ride... Margaret, time to go! Margaret, thank you for everything.

Goodbye, Chenga.

Goodbye, miss...

I'll be back.

Monday, January 26, 2009

Casino Rats

I went to a casino the other day. For the first time in at least a year. On the way out of the joint a young casino rat tried to panhandle me out of a buck. Such a wave of nostalgia that brought up in me. It felt good, like the good old days.

Saturday, January 3, 2009

The high price of low livin'

I had the strangest feeling of deja vu a couple weeks ago, back when the gas price was peaking. I went into a gas station and dug out about eight or nine bucks in one dollar bills and put it all on #5, then was caught off guard by how quick the pump stopped pumping. I think I got a little over two gallons, just slightly less than I would need to get home.

Reminded me of when I was a teenager digging around under the seats for coins, I'd find the $1.60 or so I'd need to get home. And then being embarrassed to walk in and announce how poor I was, with my fist full of nickels, dimes and pennies.

So as I walked back into the station with the buck twenty five in change I scrounged up, it struck how strange it was to be embarrassed about only having $10 on me. And, how terribly unfair it is that the amount of spare change under my seats isn't keeping pace with inflation. By all rights I should have had at least a couple crumpled up ones under there, a fiver even. Of course dollar bills don't just conveniently fall out your pockets and down the crack between the seats like coins are apt to.

Personally, I'd like to see the government start minting up some $1, $5 and $10 coins, for exactly this reason. Until they do I suppose I'll have to be a little more cautious about my finances. Plan ahead. Be prepared.

I think I'll go down to the bank some time in next couple of days, get two or three rolls of quarters, and bust 'em open and scatter them around the inside of my car.

Just on the off chance that gas prices will go up again, some time in the future...

I was reminded of all this the other day when I went down again with my $15, and the damned pump just would not stop this time. Filled her up. Looking around, trying to figure out what was going on, I noticed the price for unleaded was $1.63. I don't remember that I've ever done a double take before. A genuine, honest to goodness double take, just like you see in the movies.

I looked at the price on the pump. Looked up at the big sign. Back to the pump. I kept thinking, "That one has got to be a four... What is wrong with my eyes?" It was a bad feeling, actually. I didn't feel well. It's one thing to doubt your sanity because of your actions. But to doubt your base perceptions is unsettling.

Thursday, November 20, 2008

pyramid.py

What follows is not pretty, but it is a game, written in Python, by me. I am inordinately proud of it.

When run it opens a window and displays a pyramid of numbers:


You earn a score equal to the numbers on the path you take, from top to bottom (using left and right mouse buttons to navigate.)


Once you reach the bottom you are shown your score in relation to the score of the best possible path:


At which point you can left click to play again, or close it and go play one of those fancy games like Solitaire, that's all bells and whistles, but no soul...


#!/usr/bin/env python
# Pyramid v1.03

import sys, random
import pygame
from pygame.locals import *

if not pygame.font: print 'Warning, fonts disabled'

pygame.init()

window = pygame.display.set_mode((600, 400))
pygame.display.set_caption('Pyramid')
screen = pygame.display.get_surface()
font = pygame.font.Font(None, 46)
left = 0
right = 1

def createpyramid():
for a in range(1, 10):
randomlist = []
for b in range(a + 1):
while len(randomlist) < (a + 1):
randnum = random.randrange(10)
if randomlist.count(randnum) == 0:
randomlist.append(randnum)
pyramid.append(randomlist)
maxscorelist.append(randomlist[:])

def drawpyramid():
background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill((250, 250, 250))
if pygame.font:
color = 250
for i in range(len(pyramid)):
temp = ""
for n in range(len(pyramid[i])):
temp = temp + " " + str(pyramid[i][n]) + " "
text = font.render(temp, 1, (color, 10, 10))
color = 10
textpos = text.get_rect()
textpos.centerx = background.get_rect().centerx
textpos.centery = textpos.centery + (i * 33) + 30
background.blit(text, textpos)
screen.blit(background, (0, 0))
pygame.display.flip()

def go(direction):
updatescore(direction)
for z in range(1, (len(pyramid))):
if direction == 0:
del pyramid[z][len(pyramid[z]) - 1]
else:
del pyramid[z][0]
del pyramid[1]
pyramid[0] = [currentscore]
drawpyramid()

def updatescore(direction):
global currentscore
currentscore = currentscore + pyramid[1][direction]

def getmaxscore():
x = 8
while x >= 0:
i = 0
while i < len(maxscorelist[x]):
left = maxscorelist[x][i] + maxscorelist[x + 1][i]
right = maxscorelist[x][i] + maxscorelist[x + 1][i + 1]
if left >= right:
maxscorelist[x][i] = left
else:
maxscorelist[x][i] = right
i = i + 1
x = x - 1
return maxscorelist[0]

def endgame():
background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill((250, 250, 250))
temp = "Score:" + " " + str(currentscore) + " " + "/" + " " + str(maxscore[0])
text = font.render(temp, 1, (10, 10, 10))
textpos = text.get_rect()
textpos.centerx = background.get_rect().centerx
textpos.centery = background.get_rect().centery
background.blit(text, textpos)
screen.blit(background, (0, 0))
pygame.display.flip()
while True:
if input('endgame') == True:
return True

def input(loop):
event = pygame.event.wait()
if event.type == QUIT:
sys.exit(0)
elif event.type == MOUSEBUTTONUP and loop == 'main':
if event.dict['button'] == 1:
go(left)
elif event.dict['button'] == 3:
go(right)
if event.type == MOUSEBUTTONUP and loop == 'endgame':
if event.dict['button'] == 1:
return True

while True:
currentscore = 0
pyramid = [[currentscore]]
maxscorelist = [[0]]
createpyramid()
maxscore = getmaxscore()
drawpyramid()
while True:
input('main')
pygame.event.clear()
if len(pyramid) == 1:
if endgame() == True:
break