Interesting Finds

by billhilf on February 12, 2007 10:50pm

This morning I’ve been catching up on the status of Perl 6.  Years ago, Perl was something I used a lot for all sorts of tasks, including a lot of backend data wrangling for a couple of the startups I worked at.  One of the benefits and banes of Perl is its tremendous flexibility.  It is powerful, but given enough rope….  When I came across one of Damian Conway’s contributions to Perl 6, ‘junctions’*, I was excited but simultaneously jealous that it didn’t exist in the early 90s when I really needed it.  Junctions are single scalar ‘overlay’ values that can represent multiple values at once.  So if you have a long list of things (like SKU numbers, passwords, customer IDs, etc.) you can superimpose them down into a single value to do a single test against the junction to see if it equals any of them.  Junctions are interesting because you can parallelize this type of test against the single value (junctions are unordered which lets the compiler evaluate the tests in parallel).  At first I thought it sounded like a fancy pointer or a tied hash/tied array trick common in Perl, but junctions allow you to write in simple English things like:

if $customerid eq any(@possible_ids)

…and get a single true or false from the test in this conditional statement.  Of course, there are other, more complicated ways to do this in many languages, but junctions makes it much easier to program with data in Perl and something I’m looking forward to experimenting with more as Perl 6 comes to life.

Two other interesting finds:

Some clever folks have used XNA to create a ZX Spectrum 48K emulator for Xbox 360.  I’m a classic computer collector and avid gamer so this goes on my list of things to experiment with.    It is a community project up on Codeplex: https://www.codeplex.com/zx360
This is a hard one to explain, it’s a video montage about Web 2.0, done by the Digital Ethnography folks at Kansas State University.  Check it out, worth the watch:  The Machine is Us/ing Us
Till next time,

-Bill

* Those of you who are Perl geeks may remember Damian’s Quantum::Superpositions module in Perl 5, which was an initial cut at this idea.  In classic Conway style the concept is drawn from the Schrödinger's cat thought experiment in quantum physics.