Wednesday, July 30, 2008

Pair #1

Finally, I'm putting up what I have for Pair, my script language intended for homebrew game projects. Pair is designed to be a small, embedded, acceptably fast (probably not yet the case) script language that will ultimately allow multiple concurrent VM (and not OS-based) threadlets, generators and continuations.

I don't have a lot of time on my hands, so stuff like this takes quite a long while. Now, there's some messed up stuff going on here. You'll have to forgive me that or wait until it's refined more. For example, scoping isn't right at all. The (let ..) expression isn't how it's supposed to be in a lisp-type language. It defines a variable for the rest of the outer scope which isn't right. I'll fix that. Continuations aren't currently supported, but the underlying machinery is mostly there as well as the mechanism for running multiple lightweight VM threads although this is not accessible from the command line program. Which is probably good, since I'm not sure how well that works with the garbage collector at this point. Also, there's a lot of just general messiness going on. There are a bunch of warnings at compile time and comments are sparse. These things will be fixed eventually. I've compiled these with Visual C++ .NET 2003. There are two parts here.

Version 0.01.00

The Pair Compiler
The Pair VM

See the Code Use Policy if you are interested in using any of this for your own purposes.

Code Use Policy

If you use code from this blog for non-commercial use please credit Paul D. Senzee and include a link to If you make changes, please send them back. If you'd like to use code from this blog for commercial purposes, contact me so that we can work something out.

Friday, July 18, 2008

Edge of Ability

Some of the most successful projects are at the bleeding edge of their implementor's ability. Absolutely as simple as possible out of sheer terror of complexity.

The sequel to this phenomenon is the universal second system effect.

Intellectual discovery can be a powerful motivator in design decisions. Take care when tasking a developer with a mundane or boring task. People have a way of making uninteresting problems interesting!

I have more to say about this, including a crazy idea about the SR71 Blackbird, Lisp and the Apollo Missions all somehow appearing before their time (like from the future ;) )..

Wednesday, July 16, 2008

Wednesday, July 09, 2008

The Ghost Box

The Art of Pranking Part II

The bigger, badder wireless pranking device that evolved from Part I of our pranking bonanza. This is a somewhat technical post. A following post will detail our exploits with it.

The completed device

Learning from the Past

There were a few issues with the first model.
  1. The photocell was clearly visible on the front of the adapter and that made it look suspicious.

  2. High maintenance. The contraption didn't work well when it was dark outside. In the interest of simplicity, it was designed to sound when it got too dark. That is, in the normal case, when a shadow fell across it. How dark was too dark was adjustible with a screwdriver. Of course, that meant that Ryan had to turn it off each night or if it rained out. This also made it high maintenance, because it didn't turn off automatically - it would keep sounding as long as the target was casting a shadow over the photocell. This drove Ryan crazy, since he had to listen to it and turn it on and off all the time.

  3. It was not wireless. Fazeel was eventually able to follow the cord back to the noise box when he figured it out. Then the jig was up.

  4. It only emitted one single type of noise. Although deliciously annoying, it didn't offer as much flexibility as we'd like.

  1. The photocell should be better concealed. Bought a Nortel adapter at Skycraft Surplus for $5 apiece. Using a cordless saw, opened it up, removed the internals. Cut the transformer from the prongs that go into the wall socket, leaving enough plastic around them to keep them solid, and taped the terminals up to insulate them thoroughly from each other and the rest of the electronics I was stuffing in the box. Took one of the detectors from the toy (see below), pulled out the electronics and put them in.

    Cut off the antenna and hooked up the adapter's cord as the new antenna. Added a battery holder and two AAA batteries. Drilled out a hole for the sensor, slipped it through. Still pretty conspicuous.

    To obscure the photocell, cut clear contact paper into a rounded-rectangle shape consistent with the types of stickers you might find on these things. Then, colored over the contact paper with black dry erase marker.

    Because this adapter now has batteries (the adapter from the previous prank didn't since it was powered from the box it was attached to), I had to install some sort of switch to keep the batteries alive. Otherwise, I'd have to tear that thing back open all the time to replace them. I really didn't have a way to solidly mount a tiny switch, so I slipped a tiny reed (magnetic) switch in the seam. It's powered on by sticking a really tiny rare-earth magnet on the switch.

  2. The device should roughly detect motion, specifically a rapid change in light intensity as opposed to merely detecting dark. This was nailed with the solution to the wireless problem described next.

  3. Wireless would be ideal. This appeared to be beyond my skills and/or experience in electronics, but I found a toy at Toys 'R' Us that, appropriately modified, was wireless and sensed motion. It's called a SpyGear Wireless Tracker. This also had some issues when used in this way. For example, when triggered, it had a blinking red light (LED) that continued to blink until manually reset. That made my job with the glue circuitry a lot more complex.

  4. Plays back a recorded message. This appeared to be the easiest to accomplish. Radio Shack, in fact, sells a voice recording/playback module for about $10 (above). This device was almost perfect. The difficult thing about it was that it had a rubber plunger switch to playback with no leads or any apparent way to hook into and trigger it from other circuitry. So I had to take the switch apart, drill tiny holes in the PCB for the wires and solder them directly onto the traces underneath. Not ideal. Sound quality is not great, but then I didn't really expect that much.

Finishing Up

The receiver mess (with voice record/playback unit) in nearly completed form.

Getting the glue circuitry working correctly was a pain, in the end I went for an inefficient but dead simple approach that made all the pieces work together. Maybe in the future I'll refine it. Anyhow, for now, I'm pretty happy with it.

More to come on the fun we've had.. !

Tuesday, July 08, 2008

What the @#$*! is that Noise?

The Art of Pranking at EA

Video. Fine moments in pranking at EA Tiburon. You'll see narration by my former manager, Rob Hyder, who pulled off perhaps the finest prank ever here - The Disappearing Door.

Our prank may not be as cool as some of those, but we're still refining it. The target? Fazeel Gareeboo, my manager.

1. Misdirection

Fazeel was out for two weeks, so he was likely expecting some sort of prank. So we had to do something obvious. There's a certain report that Fazeel hates, so of course we papered his cube with it.

2. The Idea

The real idea was to set up an annoying noise that went off whenever the target scooted his chair in to work. Fortunately, Fazeel sits next to the window. So I made a detector that set off a sound whenever a shadow is cast on it. Camouflaged the detector by hollowing out an electrical adapter and used the wire from the adapter to connect with the control circuitry and the buzzer.

Then we taped the buzzer box (yes, made from a Wal-Mart soapdish) to the back of Ryan Burkett's monitor. The box sported a switch so that Ryan could flip it on and off at will.

We got three solid days of torture out of that baby! Yeah!

So, of course, I built a bigger, badder, wireless version with voice playback that I'll post about later.