Sunday, October 14, 2012

Invaders -- FROM SPACE!

I am presently enrolled in an embedded systems class. Over the last three weeks, my lab partner and I had the opportunity to (dear readers: keep reading) implement Space Invaders on a Digilent Atlys board. It was fun.

I think my favorite part was the lab writeup where we had to describe the game in detail; upon encouragement from the denizen of a treeless plain in Africa, I have decided to post it here verbatim for your amusement. See, I don't like dry technical writing. It puts me to sleep. I also don't like arbitrary requirements. :D


Space Invaders for the Digilent Atlys

By:
[my lab partner and I]

Wednesday, September 12, 2012

Lady Elegans


A waltz was playing somewhere.

Well, it certaainly felt like a waltz was playing. After a terse conversation with Lady Elegans he had been directed to this hall, hidden like her cellar behind an impenetrable, unmarked wall. He had stepped in to find himself floating up towards the middle of the room, and from there he had discovered that walking--oddly enough--was an effective means of propulsion along the corridor.

As such, it was quite the impressive corridor. Ribbons and arcs of baroque pillars danced between each other, mostly obscuring the long chamber's square profile. Occasional gaps revealed plush carpeting, ornate dining areas, shadowed niches, abandoned servants' areas, and other scenes of abandoned grand living. The walls were odd, though he couldn't quite make out why, and each area he passed felt like it followed the last, as though the long hall were a concatenation of segments of time.

If you don't find something strange about The Hall, she had said, you can never help us and so will never leave.

Does floating through the air on a predetermined track count? How about flying through an ancient hall behind a solid stone wall? Perhaps the eery waltzing feeling as he strode through the air, the lack of servants, the abandoned air in so elegant a place?

He thought for a moment, staring off into space. It was something simple--

What the-- What moved? It took a moment to bring his thoughts back to reality...well, the present reality. Something in the shadows cast by the pillars? The sojourner began a slow and careful examination of the shadows. The nearest ballroom looked well-lit by a chandelier or two out of his line of sight. Still, they would be about there, and the web of pillar-like laces was thin above there, so the wall over there should be...

Laced with shadows.

It was black. Not a trace of the ample lighting was making it to the wall, and the lattices that landd there seemed to have shadows lapping at their bases. The walls certainly were odd light here where shadows should be, shadows bunched in plain sight, the right shadows sitting the wrong way in some spaces, all just orderly enough to evade the unwary mind.

Wrong shadows in a hall of memories...

Monday, August 20, 2012

IP 9258 HTTP Parsing Problems

Hi!

Warning: technical dump.

I've recently had the opportunity to work with the IP Power 9258 PDU. It's actually quite nice in many ways, but its HTTP query string and header parsing have a few terrible bugs in them.

Header field names ("User-agent" in "User-agent: my-super-browser") should be case insensitive. This PDU requires both "User-agent" and "Authorization" to be capitalized.

Query parameters are normally delimited with "&". The PDU expects "+", though between "cmd" and "p6x" you can use &.

Query parameters are also supposedly order-independent. This lovely device requires "delay" to be first (if present) and to be followed with the "+" delimiter. Using "&" will put the port in an unusable state, further testing required.

curl is your friend, the AHR2 module for Node.js is not...for now. Fixen are in the pipes.

Wednesday, August 15, 2012

Shadows

*slam*

From the frightening whirl of the ether he impacted the floor, and with a lurch reality settled around him and sealed the gap through which he'd come.

Fate liked doing this. She tended to land him in places where help was needed, but they were usually strange, alien places. Now it was his turn to get off the--well, floor, judging by its smoothness--figure out where he was, and solve the puzzle(s) set before him.

As usual, he was unharmed and still had his full tool belt from the work site. Fate was not always kind--he'd once saved a race of arthropods from destruction while...less than tastefully clothed. Turns out clothing was a mark of evil in their society, so in a way she had still been kind.

Looking around, he noticed that it was a well-lit room. The dead lack of ambient noise hinted at a deep, underground installation, and he was curious just where he was... Seven smooth, space-age-style doors lined one wall while the opposite wall was, oddly enough, smooth-hewn stone. From the strata and the temperature he was quite some distance down. A few curious-looking machines stood idle at one end of the room; earth-movers by the grinder-conveyor belt face and the tracked bottom, though the machinery that followed the grinding head was quite mysterious. It was big enough he found it hard to imagine how it had gotten in here--likely sealed in as construction progressed.

He walked to each door in sequence. As he approached, they opened revealing more door-lined walls, vast, orderly rows of segments of much larger machines, one completely empty room with a tiny sign in the back: "Lost + Found." Seeing that little danger was visible, he became more bold and started opening doors in more rapid succession, covering vast swaths of ground until he discovered one of the original doors was locked. Realizing what a locked door meant--danger--he immediately started examining the door for weaknesses.

The doorframe was smooth, and the sensor that triggered the door itself was nowhere in evidence. No tool he had would fit into the crack, and nothing in his belt would so much as scratch the surface, so he tucked away the door's location and moved on.

The next door was a junk room. He stepped in and just about fell off a cliff--the room was huge! Hundreds of little trinkets sat around, some of them gleaming in the randomly-placed lights around the chamber. There were doors in the ceiling and floor, junk was haphazardly welded to segments of the walls, the walls were outright broken in a few places, and nothing was in use. The cavernous room felt dead. Again taking note of which door he had been in, he stepped back out.

The last door was odd. It slid open hesitantly, as if something were nervous about letting him in. This, like the sealed door, was intriguing, so he stepped cautiously into the largest library he'd ever seen--well, it felt like a library. Massive shelves ran all the way up to the arched roof, lit by magnificent crystal chandeliers.

The shelves were empty.

The place felt alive somehow, too. Shadows clung to the edges of the pillars and shelves, seeming to spite the lights. As he wandered around and past the first layer of shelving, he noticed strange things: cobwebs, moving shadows, books that weren't books hovering just on the edge of existence. Occasionally one of the outside walls was broken by another of the sealed doors, and he tried with less and less vigor to pry them open. Other breaks in the shelves were normal doors, behind which was a motley mix of library shelves and more doors (sic). Each room was well-lit in the middle, but the shadows hung around the outside, seemingly right on the brink of destruction.

Finally, he found it. In the back of the deepest room he found a broken wall. Shelves still clung to it, but their disarray only highlighted the wall protruding from itself.

Finding a crowbar and hammer in his kit, he discovered that the shelves cleared away easily. The fissure was just wide enough to give his tools purchase, and he began the slow process of prying the panel out.

Several minutes later, the crack was wide enough to slip through. Behind it was pitch black, so he fetched out his flashlight. All he could discover was that the floor was stone--the same as in the root node he had started in. He wriggled in.

The room was dark, but the shadows were natural. Cobwebs hung, partially obscuring the piles of boxes and crates that filled the room leaving narrow paths to walk through. Clearing the spiders' testament of time back, he found that the crates were labelled--some were old records of the library's operation, some were marked with periods of older history, and some were completely unmarked. Some of the crates were styled like the doors, while others fit better with the library's decor. It was a strange place. Crates were aging, and occasionally somewhere in the distance one would groan and collapse under the weight of its neighbors.

After what seemed forever (and about sixteen armfuls of discarded cobweb and three pyrotechnic urges) later, he found an open space with a single chair, a small end table, and a book. A sudden chill ran down his spine, and he took a step into the open space. The reluctant feeling from the library's entrance was met with an angry, dismal feeling and an argument began. He took another step. The argument felt more heated, and the sadder of the two seemed to be winning. As he arrived at the chair, he looked down at the book. It was beautifully gilt, with deep red leather wrapping its covers and bearing its title. Before he could make out the characters, the hesitant feeling yanked the table and book out of reality, and the angry feeling started condensing into a dark, elegant lady with a cold face sitting in the chair.

"I see you've been exploring the library, Amadaeus. I hope to help you find what you are looking for."

Thursday, August 2, 2012

Little Tech Tricks

As this doesn't fit my usual genre of blog post, here is your fair warning: this is another of my technical posts. :)

So I've recently switched to a Mac Mini in one of my spheres of influence. It's been challenging; missing or stolen keyboard shortcuts still miff me, but several things have worked well for me:
  1. Mou. This is a Markdown editor for Macs (OS X). I have tried about a dozen in Linux, Windows, and OS X and this one takes the cake, kicks butte, `sudo rm -rf /`, and any other superlative expressions of high marks you wish to contribute. It's shiny. It does real syntax highlighting. It isn't cross-platform. :( Above all, though, it scrolls with you as you type!!! Now, as you're typing notes in class or composing a blog post, you can see what you're typing rather than scrolling back to the bottom after every change you make.
  2. I play with hardware. This means that I need to use serial communications fairly often, and Macs kind of suck in this department. Windows and Linux both know that a standard USB COM port is; BSD/OSX needs to be told. For the most common of these, FTDI provides their own solution. It works rather well. If you don't want to go through the effort, OSX lets you attach any USB device to a Linux virtual machine (I like VirtualBox) and let a real operating system do the dirty work. (This works for charging the Motorola W755 phone on macs and for reading EXT2/3-formatted USB devices as well.) Remember to install the Guest Additions.
  3. EXT2 R/O access: MacFuse combined with fuse-ext2 will at least get you started.
  4. iTerm2. If you do any amount of work on a terminal, iTerm2 is here to save you from xterm and Terminal. One problem; several standard keyboard shortcuts are AWOL. Lucky for you, ShadowFiend and his commenters have been gracious enough to show the world how to fix this.
  5. BetterTouchTool. This is how I got enough gestures and taps (middle click anyone?) working to be somewhat productive once again on OS X.
  6. IRC. Several programs exist that fill this need; I'm enjoying Colloquy at present.
  7. Google Calendar/iCal integration.
Also, I've had the opportunity to set up and modify several servers in a professional capacity of late, and a couple of articles I found are worth mentioning, if anything for my future benefit.
  1. HTTP Basic authentication. There is a simple Perl command that generates encrypted passwords. (A better article exists but was not found by me.) While Basic Auth is a terrible choice for strong security, it has many handy little uses and this makes administering those a bit easier.
  2. How to get an SSH Key's fingerprint. Useful when lots of little keys are running around nekked. 'Nuf said.
I hope you find something here useful. Happy Thursday!

Monday, July 9, 2012

Setting Sail

As I stepped out of the village, my heart swelled. I turned to look back at the place where I had grown wings, the place where I knew when to behave how, where I had learned how to perch in the shadows of the eaves of the cathedrals, soaking in the monks' chanted prayers for a better world--and where I had learned that those lonely spaces were not where I wanted to be. Thronging festivals, living, vibrant friendships, home--

As I choked back a quiet sob, I looked up at the ramparts of the town's wall. There the Guardian met my gaze sternly, dispassionately, and unyieldingly. I had made my choice, and I must go. Absorbing the loss was harder than I had ever imagined it would be--it felt like attending my own funeral.

Then again, my departure had been a joyous one. Most of the townsfolk looked forward to making the journey I was embarking upon--but none of them would understand the loss until they made the decision and left for themselves, taking the experience with them. While where I was going wasn't cold, it was unknown, and the place he was leaving was warm and familiar.

As I looked down into the satchel of provisions I had prepared, several mainstays of my previous life were lacking. First and foremost among them was the water from the well at the village's center. It was said that it led villagers to leave, though some had been there for years without showing a trace of its effects.

That bag was by no means empty! Among the various foodstuffs and camp supplies sat the beautiful crystal that had been given me by my chosen travelling companion. She had left some time before me, knowing that working in a trade caravan would be advantageous for us when we arrived. She had--accurately--predicted that I would miss her, and that it would be hard for me, so she had prepared for her absence from me. First had been a series of gifts and messages hidden with others in the town, and then had been this.

The bluish, clear cube rested largely on my open hand. Its cool warmth refreshed my skin from the Sun's toll, while it warmed my heart with memories. About once a day we were able to converse through it--in her foresight she had found a matched, tuned pair that could tunnel through the intervening distance and yield just such a connection. I polished it slightly, and in its own way it let me know with an irritated pinkish tinge that the connection wouldn't be open that day. I had been late leaving.

Sigh.

I looked down at my coarse all-weather tunic, up at the scorching sun, and out towards the mistwall that obscured my destination--a new adventure and a new home.

Thinking about her and the longer route she had taken, I started walking.

Wednesday, June 27, 2012

Beaconkeeper

I had just finished communicating the coordinates of all the navigational beacons in the sector to the new arrival when another call came. The other captain saw the indicator and told me,

"Well, the commstat is hailing us, and that's what we came here for; we'll be in touch!"

I was not surprised, as I knew where I was in the universe of people. Having been about to discuss replacement equipment and the local culture, I was still a tad disappointed.

In the string of video calls that ensued, I knew I stood little chance. Much of what I would of said was ignored as out-of-channel banter, with bits and pieces considered off-topic in-channel noise. Once I saw this, I realized that I was being a pain. Something needed to change.

"Helmsman, what is the current cloaking charge?"

The middle-aged officer glanced at his dials and then eyed me. "Sir, we're at 75%."

That was odd. We'd been charging it for a week and I had told him to keep it at peak readiness.

"Sir, we're at 75% of what you need. I can see that you're plotting the old Malay Turk maneuvre, and we haven't quite got the staying power to do it."

Realizing that he was three moves ahead of me, I ceded his point. "Well, we can at least ameliorate the interstitial jitter. Put us on full electromagnetic silence and engage the cloaking engine."

If you can't help 'em, don't get in their way, I thought. At least he has what he needs for when he gets here.







P.s. On a completely unrelated note, 21 days remaining. :)