Showing posts with label challenge. Show all posts
Showing posts with label challenge. Show all posts

Thursday, 2 October 2014

Coding and Poetry

It's National Poetry Day, apparently, so I thought I should finally tie up the loose ends from the COBOL poem I posted the other week.  Loose ends like what on earth possessed me to write a poem in COBOL...

It all started with a blog post from Girl on the Net, detailing the filthy things she'd like to do to programmers (link probably NSFW, needless to say).  More power to her elbow, I say, though since I work in an open plan office none of the things she's thinking of would be even remotely feasible.

Anyway, that was where it started.  Following on from that, via the magic of Twitter, I found myself reading an elderly article about poetry in Perl.  And this is where the trouble started.  That article makes a couple of snarky comments about COBOL, like "getting a volunteer to write poetry in COBOL is likely to be impossible."  So what was I supposed to do?  Just let it pass?  No, I couldn't really ignore the gauntlet that had been thrown down, even if it was a gauntlet that only I could see.  So I sat down, and I wrote a COBOL poem, and I posted it on here.  And then I sent it to Girl on the Net and the individual who'd linked to the Perl article, just because.

Don't worry, I'm not about to announce that I've now compiled an entire anthology of poems in COBOL, or in other obscure programming languages.  Though I did write a haiku in Spectrum BASIC while messing around on Twitter:

10 PRINT "Forever"
20 PRINT "I will love you"
30 GOTO 10

Anyone who bothered to look at the comments on the COBOL poem, however, will have seen that I was challenged to write something using Inform 7.  Something that would work as a code poem and as a piece of interactive fiction.  In the end, I wrote two.  Sort of.

See, although Inform 7 is practically English anyway, it's still code.  And it's code designed for a very specific job.  The closest I got to actual poetry in the code wasn't a very good piece of IF; you can examine a couple of things and there's a single command that allows you to win, and that's it.  Otherwise you just expire after about five turns.  It's very poetic and lovely, but it's a bit rubbish to actually play.  The other one managed to be slightly (but only slightly) more engaging as IF, but wasn't much cop as poetry as a result.  To make good IF you need to build a rich environment and then nail down absolutely everything the player might consider doing; poetry works better when you skirt around the edges and hint at things.

So I shan't be posting the results, as interesting a challenge as it was.  They were sent to my challenger, as proof that the challenge had been completed (and since he didn't write anything I win by default!), but they won't be seeing the light of day as poems.  Maybe as IF, if I work on them a little more someday.  Or maybe I'll write something else instead.

You are in a maze of twisty little passages, all alike...

Thursday, 13 March 2014

Lavendar and the Random Acolyte

[This story was written in response to a challenge from a Chap in my writing group, to write something with the above title.]

Lavendar hefted the sword, taking a moment to assess the weight and perfect the grip before lunging forward on the attack.  The enchanted blade made swift work of the slavering monsters that guarded the tower, dispatching them to whatever afterlife they considered worthy without a moment's hesitation.  There could be no hesitation when there was a beautiful princess to save.

And yet, Lavendar hesitated.  The monsters were slain, the door to the tower stood ahead, but there was an old man in some kind of robe walking up the road.  Lavendar regarded him warily, holding the sword ready just in case.  One more fight wouldn't make much difference, not in the long run.  The princess would be safe.

The old man stopped some distance away, holding up his hands to show he wasn't a threat.  He looked Lavendar up and down, one corner of his mouth twitching into half a smile.  "My, that's a big sword for such a little lady," he said gently.

Lavendar looked down at the blade in her hand.  "It's just a stick," she said at last, wondering how on earth the man could have thought it was a real sword.  "I'm only pretendin'."

"Slaying fearsome monsters, no doubt," the man said, coming a little closer.

"And rescuin' princesses."  Lavendar's chest puffed up with pride.  "I'm the mightiest hero in all the land."  The sorry-looking bushes on the edge of the property were a testament to that.  Not one of them had put up a real fight when faced with her and her magic sword.

"Well, Mighty Hero," said the man, "I'm just a humble acolyte, so I hope you'll let me pass unmolested.  I'm not hiding any princesses, I promise."

Lavendar screwed up her face in confusion.  "What's an ag... aglyte?"  She kept the stick gripped firmly in her hand, just in case.  Momma said you never could tell when some nice old man would turn out to be a horrible monster, and that tatty brown robe of his could have held any number of tentacles.

"An acolyte," said the man, pronouncing the word carefully.  "It means I've devoted my life to following my god.  You've probably seen people like me in the temples in town."

Momma didn't take Lavendar into the town very often.  She didn't like the hustle and the bustle, she said, and it always brought on one of her bad heads.  But when they did go in for something, Lavendar always liked to look at the temples with their fancy statues and to wonder about the lives of the people inside.  There were the High Priests of Glor, reciting the 1,667 words of power before images of their insatiable god in his squidly form, his mechanical form and his rotten form.  There were the Servants of the Hidden Eye, who covered themselves from head to foot and who Momma said liked to eat little girls who didn't behave themselves.  Lavendar's favourites were the Sisters of Glamour, who wore shiny, colourful clothes that she could only dream of.  Momma said they were no better than they should be, but Lavendar figured that meant they must be very good indeed.  She was never as good as she was supposed to be.

"How come you ain't in a temple, then?" she asked the acolyte.  "You don't look like none of the ones I've seen."

"You won't see many of my order," he replied.  He sat down on the grass at the edge of the property, basking in the sunlight and making Lavendar hold her sword a little bit tighter.  "We don't keep to a temple, as a rule.  We follow the path laid out for us by our god."

"This path?"  Lavendar scuffed at the dirt with her bare feet.  "Never thought this path would be chosen by a god for anythin', 'cept maybe gettin' rid of someone they didn't like."  She cocked her head to one side as she looked back at the man, curiosity overriding her nerves.  "Does your god not like you?"

He laughed, a surprisingly high-pitched laugh for such a big man.  "I don't mean a literal path, necessarily.  I just let my god decide where I go and what I do.  I follow His will in everything."

"He talks to you?"  She knew a lot of people in the temples claimed to talk to their gods, but she'd never once heard one actually reply.

"Not in the way you're thinking."  The man pulled a small leather pouch out from under his robe, where it had been hanging from a string around his neck.  "He uses these."  He gestured for her to hold out her hand, so she offered him the one that wasn't holding her sword.  He tipped the contents of the pouch into her hand.

"He talks to you with these?  But they don't look holy or nothin'."  She was holding a set of gaming dice of various sizes, plus a well-worn old silver coin.

Another high-pitched laugh.  Lavendar decided she didn't like the way he laughed.  It made something itch between her shoulders and she took a small step backwards, still holding out the dice in one hand and her sword in the other.

"They don't have to be holy," said the man.  "They're just tools.  Say I reach a junction, where I could go left or right.  I flip that coin, and the way it lands tells me which way to go."

"That ain't god," Lavendar snorted.  "That's just luck."

"Some call it that, yes," the man nodded.  "I prefer to think of it as my god guiding me down the path He has chosen."

"And you do that for everything?"

"Everything," said the man.  "Where to go, when to sleep, who to ask for food or shelter.  He guides me well."

"You ask folks for food?  Don't you have money?"  Lavendar knew some grown-ups had more money than others, and most had more money than Momma, but she didn't know it was possible to have no money and walk around like nothing was wrong, instead of begging on the streets or going to one of the poor houses.

"None but that coin you're holding there," he said, smiling like it was the finest thing in the world to be so poor.  "And I need that one, so I can't just spend it on bread."

"So you just walk up to people and ask them for somethin' to eat?"

"When He tells me to, yes."

"What if he tells you not to?"  This was a major stumbling block with any religion, as far as Lavendar was concerned.  Momma was always telling her not to do stuff, and she hated it.

"Then I go hungry."  The man sat up straight, abandoning his sunbathing in favour of addressing her in a more serious manner.  "If He says no, it's usually because the folks in question don't really have much to spare.  Or because asking would get me more trouble than an empty belly.  I just have to trust that He knows the best course of action."

"Are you gonna ask me for some food?"  The dice were getting heavy in her hand and she wanted to give them back to him, but he seemed in no hurry to ask her for them and she didn't want to just drop them in his lap if they were special to him.

His eyes flicked over to her house.  Lavendar followed his gaze to the peeling paint, the straggly clematis that grew by the door and tangled worse than her hair did, and the shuttered blinds behind which Momma was sleeping off one of her bad heads.  She held her breath as she waited for him to comment.  People always commented as they went by the house.  Often they didn't even bother trying not to be heard.

"Let's see what He says, shall we?" was all the man said.  He plucked the coin from her outstretched palm and in one fluid motion flicked it up into the air and caught it on the back of his hand.  Lavendar didn't manage to see which way it landed before he dropped it back into her hand, saying, "Looks like I won't be asking you for anything.  Good job I had a hearty breakfast this morning."  He patted his belly cheerfully.

"That's it?"  Lavendar used the question to hide her relief at not having to try sneaking food out of the house.  There'd be hell to pay if Momma thought she'd been stealing, holy man or no holy man.  "He says no so you don't do it?  What if he keeps sayin' it, over and over, till you starve to death?"

"That's the chance I take, following this path."

"Has it ever happened?  Not starvin' to death, but goin' for days and days without food?"

"Once or twice."  The man shrugged.  "Not as often as you might think, though.  He takes good care of me."

"But it's just luck," Lavendar burst out.  "You're just tossin' a coin.  What if it always comes down the wrong way?"

"It never has yet.  That's why I keep following this path.  It works out surprisingly well.  All you need is a little faith to see it through."

"Show me some more."  Lavendar finally crouched in front of him, putting the sword down on the ground at her feet and gently dropping the dice into the pool of his robe that covered his lap.  "Make another choice."

"You want me to ask Him to perform for you, like a circus entertainer?"  The man's eyebrows disappeared up into the fringe of his dark hair.

"Show me somethin' else," Lavendar insisted.  "I want to see how it works."

"Far be it from me to cross the will of a fearsome hero like yourself," he said.  "What would like me to show you?"

A world of possibilities opened up before her, and at first she was unable to think of anything to ask for.  "Where are you goin' next?" she asked at last.  "I know which way you came from, but there's a few places you could be goin' to from here.  Did you already decide which one you're goin' to?"

"I hadn't made a final choice, so let's find out together, shall we?"  He poked through the dice until he found the one he was looking for, then held it out to Lavendar.  "Here.  You throw it for me."

Tentatively, Lavendar took the die from him and inspected it.  It was just like the ones she'd seen used for games, with the same sorts of spots on each side in different patterns.  She rolled it around her hand, feeling the edges tickling her palm as it flipped over, then she tipped it out onto the dirt.

The man looked down at the top face.  "Looks like I'm going to Harbourtown.  Maybe I'll end up on a ship sailing to some foreign shore."

"All that's in Harbourtown is fishin' boats and a bad smell.  You should roll it again till you get some place nicer."  Lavendar picked up the die and looked at that one face more closely.  "How do you know it's Harbourtown?  I don't see no letters.  It could be anywhere."

"Yes, it could," the man agreed.  "That's the point.  I could hardly have a special die for every occasion.  One for right now with just the places I could go from here?  And then another for the next choice?  I'd never manage to carry them all around."

"Then how do you know which side is which when you do it?"

"I let Him tell me that when it falls."  There was a look in his eye that she'd seen once or twice from teachers when they really wanted her to figure something out.

"You decide which is which before you throw it?"  She turned it over in her fingertips.  "Like, this is Harbourtown?  And this is the redwood forest?"

"Not before I throw it," he said, still giving her that look.  "After it lands."

"After it lands?  You mean..."  She stared at him, and at the triumphant smile on his face as he saw that she'd figured it out at last.  "You're cheatin'?"

"Not cheating," he said mildly as he took the die back from her.  "We make our own luck in this world, little hero."  He scooped up all of the dice and dropped them back into the pouch, but the coin he held onto and looked at for a moment.  Then he tossed it into the air and caught it like before.

"What did that tell you to do?" Lavendar asked, rising up to try to see how the coin had landed even though she knew now that it didn't matter.

"Here," said the man, holding out his hand with the coin balanced on top of it.

At first Lavendar thought he was just holding it out for her to see, but then he gestured and told her to take it.  She stared at him in confusion until he repeated his offer.  "All good heroes need a lucky charm.  You can have this one."

Long after the man had disappeared out of sight down the road, Lavendar was still crouched in the dirt staring at the coin hidden in her hands.  It was old and worn, so much so that the two faces were nearly indistinguishable, but it was still a good coin.  She should probably give it to Momma, or use it to buy some nice white bread for them both, but it was her lucky charm.

Tossing it into the air was easy, but Lavendar lacked the grace and practice to catch it on her hand.  She looked at it as it glinted up from the dirt where it had landed.  We make our own luck in this world.

Lavendar smiled and picked up her sword.  There was still a princess to save, and you should never keep a girl waiting.