<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>bleything.blog(:stuff) - Home</title>
  <id>tag:blog.bleything.net,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  
  <link href="http://blog.bleything.net/" rel="alternate" type="text/html" />
  <updated>2008-07-28T23:52:41Z</updated>
  <geo:lat>45.41387</geo:lat><geo:long>-122.72492</geo:long><link rel="self" href="http://feeds.feedburner.com/bleything/blog" type="application/atom+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2008-07-28:6856</id>
    <published>2008-07-28T23:51:00Z</published>
    <updated>2008-07-28T23:52:41Z</updated>
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/348899933/back-on-the-air" rel="alternate" type="text/html" />
    <title>Back on the air!</title>
<content type="html">
            &lt;p&gt;Hello blogsville!&lt;/p&gt;


	&lt;p&gt;I think I’ve got things back up and running after an extended vacation from a working Mephisto.  We’ll see how it goes.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=SRAzNJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=SRAzNJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=fFvCJJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=fFvCJJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=Bo37PJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=Bo37PJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2008/7/28/back-on-the-air</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2008-03-23:6746</id>
    <published>2008-03-23T21:06:00Z</published>
    <updated>2008-03-23T21:15:05Z</updated>
    <category term="Hacks" />
    <category term="Hardware" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/256672847/controlling-a-blinkm-from-max-msp" rel="alternate" type="text/html" />
    <title>Controlling a BlinkM from Max/MSP</title>
<content type="html">
            &lt;p&gt;A fellow BlinkM enthusiast over at the &lt;a href="http://getsatisfaction.com/thingm"&gt;ThingM GetSatisfaction board&lt;/a&gt; asked whether it was possible to control a BlinkM on an Arduino from &lt;a href="http://cycling74.com/products/maxmsp"&gt;Max/MSP&lt;/a&gt;.  I’ve been playing with Max/MSP in conjunction with my newly-completed &lt;a href="http://www.monome.org/40h/kit"&gt;Monome 40h kit&lt;/a&gt;, so I decided to take a stab at it.  Here’s the comment I posted on GetSatisfaction:&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Turns out it’s actually really, really easy!&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Add a swatch. Send its left outlet to a “prepend 1 0 4 0 99”, and send prepend’s outlet to a serial object. For me, my Arduino showed up as port b (send “print” to serial to get a list in the max window), so I set up the serial with “serial b 19200”.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Program BlinkMCommunicator onto the Arduino, drop the BlinkM in the normal position, and you’re set. It’s so easy!&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I expanded upon that simple patch and came up with &lt;a href="http://blog.bleything.net/pages/max-msp-blinkm-patch"&gt;this one&lt;/a&gt;, that includes sliders and a menu to select which port to talk to.  The menu is not of my design; it was yoinked from &lt;a href="http://www.arduino.cc/playground/Interfacing/MaxMSP#arduino2max"&gt;Arduino2Max&lt;/a&gt; from the Arduino Playground.&lt;/p&gt;


	&lt;p&gt;Look for more Max/MSP fun soon.  I’m really digging this environment.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=1pDuhJF"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=1pDuhJF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=Q3n46CF"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=Q3n46CF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=Xh70QjF"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=Xh70QjF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2008/3/23/controlling-a-blinkm-from-max-msp</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2008-03-08:6743</id>
    <published>2008-03-08T19:29:00Z</published>
    <updated>2008-03-08T19:32:21Z</updated>
    <category term="Hacks" />
    <category term="Hardware" />
    <category term="Processing" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/248021590/monome-osc-proxy-in-processing" rel="alternate" type="text/html" />
    <title>Monome OSC Proxy in Processing</title>
<content type="html">
            &lt;p&gt;(I can hear you all going “wtf does that subject line mean”... bear with me)&lt;/p&gt;


	&lt;p&gt;I recently picked up a &lt;a href="http://monome.org/40h/kit"&gt;monome 40h kit&lt;/a&gt;.  Assembly was a breeze, but I ordered LEDs from China and they’re not here yet.  I’m super anxious to start using my new toy, but it’s hard to tell what’s going on unless you can see the button pads light up.&lt;/p&gt;


	&lt;p&gt;So what is the enterprising hacker to do?  Fake it?  &lt;span class="caps"&gt;OKAY&lt;/span&gt;!&lt;/p&gt;


	&lt;p&gt;I’ve been hacking around with &lt;span class="caps"&gt;OSC&lt;/span&gt; lately… it’s a really cool, extremely flexible network protocol for device control and the like.  Read more about it &lt;a href="http://en.wikipedia.org/wiki/OpenSound_Control"&gt;right here on the wikipedia&lt;/a&gt;.  One of the cool things about the Monome setup is that while the physical device communicates using a serial protocol over &lt;span class="caps"&gt;USB&lt;/span&gt;, the applications communicate via &lt;span class="caps"&gt;OSC&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;Anyway, blah de blah.  What I did was use the &lt;a href="http://www.sojamo.de/libraries/oscP5/"&gt;oscP5&lt;/a&gt; library to intercept the messages between the Monome router and applications.  I update the grid based on those messages, and then pass them on to the destination recipient.  It works surprisingly well!  Here’s a screenshot of the sketch in use, running the flin application:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://blog.bleything.net/assets/2008/3/8/flin_proxy_1.png" /&gt;&lt;/p&gt;


	&lt;p&gt;Remember that input is happening on my real monome.  The black disc is a button that I was pressing when I took the screenshot.&lt;/p&gt;


	&lt;p&gt;This is early software, and as such has problems and limitations.  Here’s a copy/paste from the &lt;span class="caps"&gt;README&lt;/span&gt;:&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Known Bugs / Issues / Didn’t Do Yet&lt;/strong&gt;

	&lt;ul&gt;
	&lt;li&gt;Only supports the 40h (and maybe the 64, I dunno)&lt;/li&gt;
		&lt;li&gt;High &lt;span class="caps"&gt;CPU&lt;/span&gt; usage due to render strategy&lt;/li&gt;
		&lt;li&gt;Doesn’t (yet) support rotation&lt;/li&gt;
		&lt;li&gt;Doesn’t support input… probably won’t as I’m not intending to write an emulator, but we’ll see.&lt;/li&gt;
		&lt;li&gt;Does not yet support the full &lt;span class="caps"&gt;OSC&lt;/span&gt; dictionary… coming soon?&lt;/li&gt;
		&lt;li&gt;Sometimes cells will get “stuck” on during a transition until the next time that cell is updated.&lt;/li&gt;
	&lt;/ul&gt;
&lt;/p&gt;


	&lt;p&gt;So that’s about it.  You can get it from my Subversion:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;svn co http://svn.bleything.net/monome/Monome_Display_Proxy&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Details about how to use it are in the &lt;span class="caps"&gt;README&lt;/span&gt;.  Please email me if you have any troubles.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=TnxLXEF"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=TnxLXEF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=LZQmrQF"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=LZQmrQF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=jIyHz9F"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=jIyHz9F" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2008/3/8/monome-osc-proxy-in-processing</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2008-02-01:6734</id>
    <published>2008-02-01T10:00:00Z</published>
    <updated>2008-03-23T21:20:04Z</updated>
    <category term="Hacks" />
    <category term="Hardware" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/227158273/wiimote-and-blinkm-are-love" rel="alternate" type="text/html" />
    <title>Wiimote And BlinkM Are love</title>
<content type="html">
            &lt;p&gt;Long time no blog.  Sorry.  Tonight I’m going to write about something a little different than normal.  There will be no Ruby in this post!  Consider yourself warned.&lt;/p&gt;


	&lt;p&gt;It should be obvious from my recent posts that I dabble in the dark arts of hardware hacking.  I recently found out about (and promptly ordered) a new little toy called a &lt;a href="http://thingm.com/products/blinkm"&gt;BlinkM&lt;/a&gt;.  BlinkMs are basically smart LEDs… they’re an &lt;span class="caps"&gt;RGB LED&lt;/span&gt; with a small microcontroller that you can interact with over the I&lt;sup&gt;2&lt;/sup&gt;C protocol.&lt;/p&gt;


	&lt;p&gt;Tod E. Kurt, one of the guys behind the BlinkM, &lt;a href="http://todbot.com/blog/2008/01/25/blinkm-hello-video-guides-example-code/"&gt;posted some example code&lt;/a&gt; which included details on how to use the guts of a Nintendo Wii Nunchuck controller to fiddle with the BlinkM.  I decided to take that one step further (or one step back, depending on your point of view) and hack together a similar control without requiring you to take your nunchuck apart.&lt;/p&gt;


	&lt;p&gt;My setup requires a lot of pieces.  First, the Wii remote itself with a connected nunchuck.  Next, the &lt;a href="http://code.google.com/p/darwiinosc/"&gt;DarwiinOSC&lt;/a&gt; branch/fork of &lt;a href="http://sourceforge.net/projects/darwiin-remote/"&gt;DarwiinRemote&lt;/a&gt;.  &lt;span class="caps"&gt;OSC&lt;/span&gt;, for what it’s worth, is &lt;a href="http://en.wikipedia.org/wiki/OpenSound_Control"&gt;Open Sound Control&lt;/a&gt; is a networked sound control protocol, sort of like &lt;span class="caps"&gt;MIDI&lt;/span&gt; over the network.  It allows devices to send all sorts of information in easy to digest packets.&lt;/p&gt;


	&lt;p&gt;I’m reading the &lt;span class="caps"&gt;OSC&lt;/span&gt; messages with &lt;a href="http://processing.org"&gt;Processing&lt;/a&gt;, the environment on which &lt;a href="http://arduino.cc"&gt;Arduino&lt;/a&gt; based their &lt;span class="caps"&gt;GUI&lt;/span&gt;.  In turn, Processing is doing some math on the sensor readings and feeding them to an Arduino via a serial connection.  That Arduino is controlling the BlinkM.  Complicated?  Eh, not as bad as it sounds!&lt;/p&gt;


	&lt;p&gt;The best way to understand what’s going on is to see it in action.  Here’s a short video I created demonstrating the hack:&lt;/p&gt;


&amp;lt;object height="350" width="425"&gt;&amp;lt;param&gt;&amp;lt;/param&gt;&amp;lt;embed src="http://www.youtube.com/v/xhmTV6-c2J4" height="350" width="425"&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;br /&gt;

	&lt;h2&gt;Some Technical Details&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;I had a hell of a time figuring out the magic dance to get the BlinkM initialized and ready for commands.  I ended up doing a gross hack which you’ll see in the code below, wherein I set the fade speed inside the update loop.  Gross?  Gross.  For some reason, every time the BlinkM starts up, the fade speed resets to 0.&lt;/li&gt;
		&lt;li&gt;I’m using the &lt;a href="http://www.sojamo.de/libraries/oscP5/"&gt;oscP5&lt;/a&gt; library for Processing to read the &lt;span class="caps"&gt;OSC&lt;/span&gt; messages.  &lt;span class="caps"&gt;OSC&lt;/span&gt; is a damn cool protocol!  I wonder if there is Ruby code to read/write it…&lt;/li&gt;
		&lt;li&gt;The translation of the (x,y) coordinates of the nunchuck’s joystick to displayable colors took some thinkin’.  I absolutely suck at math so anything that I did right is purely by chance, heh.  I ended up converting the rectangular coordinates to polar coordinates.  This is convenient because the polar coordinates look like (r,&amp;theta;), where r is the distance from the origin and &amp;theta; is the angle from the origin axis.  This maps pretty cleanly onto brightness and hue, respectively, and to make things even easier, the BlinkM can take an &lt;acronym title="Hue/Saturation/Brightness"&gt;HSB&lt;/acronym&gt;-formatted color.  I just set the saturation to full-bore and ran with it.&lt;/li&gt;
		&lt;li&gt;The BlinkM examples from Tod that I previously mentioned include a sketch called BlinkMCommunicator, which sets up a simple serial &amp;lt;-&amp;gt; I&lt;sup&gt;2&lt;/sup&gt;C translator in the Arduino.  I used this to communicate between Processing and the BlinkM.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;The Code&lt;/h2&gt;


	&lt;p&gt;The code is available &lt;a href="http://blog.bleything.net/pages/wiimote-and-blinkm-processing-sketch"&gt;over here&lt;/a&gt;.  Unfortunately my syntax highlighter doesn’t like Java, so you’ll have to cope with it being monochrome :)&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=lTGh2cE"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=lTGh2cE" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=bn8MJCE"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=bn8MJCE" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=XxJ2GuE"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=XxJ2GuE" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2008/2/1/wiimote-and-blinkm-are-love</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-11-17:5877</id>
    <published>2007-11-17T01:03:00Z</published>
    <updated>2008-02-01T09:22:03Z</updated>
    <category term="Administrivia" />
    <category term="Ruby, Rails, and related" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/186058963/rubyconf-stuff" rel="alternate" type="text/html" />
    <title>RubyConf stuff</title>
<content type="html">
            &lt;p&gt;Well.  RubyConf was two weeks ago now and I still haven’t completely wrapped my head around it.  It was a different experience this year than last (understanding that last year was my first RubyConf), and I’m not sure whether I liked it better.  I would have preferred a single track, although I completely acknowledge the reasons why multitrack made sense… I just didn’t like having to make decisions between two talks I really wanted to see, which happened at pretty much every junction.&lt;/p&gt;


	&lt;p&gt;I particularly enjoyed &lt;a href="http://zenspider.com/"&gt;Ryan Davis’s&lt;/a&gt; and &lt;a href="http://segment7.net/"&gt;Eric Hodel’s&lt;/a&gt; talks, which both more or less boiled down to them talking about the tactics they use to write more/better code.  That’s the kind of thing I really like to hear about: the ways that other people boost their productivity and output quality.  In this case, the people were experts, but it’s fun to hear from newbies too, as they almost always bring new perspective.&lt;/p&gt;


	&lt;p&gt;Another highlight was &lt;a href="http://chopine.be/lrz/"&gt;Laurent Sansonetti’s&lt;/a&gt; talk on how &lt;a href="http://www.apple.com"&gt;Apple&lt;/a&gt; loves Ruby.  I can’t really explain how totally awesome this was.  Apple really does love Ruby, and the stuff you can do in Leopard with Ruby is astounding.  You’ll just have to watch the video.&lt;/p&gt;


	&lt;p&gt;Speaking of which, one totally awesome thing that may not be universally known is that &lt;a href="http://confreaks.com"&gt;Confreaks&lt;/a&gt; recorded (almost) every session and are publishing the videos on their website.  It’s a lot of video to process so things are a little slow in coming, but eventually all of the conference videos will be &lt;a href="http://rubyconf2007.confreaks.com/"&gt;here&lt;/a&gt;.  They’ve already published all of the &lt;a href="http://rejectconf4.confreaks.com/"&gt;RejectConf presentations&lt;/a&gt;... you can see my 3 minutes on &lt;span class="caps"&gt;IRB&lt;/span&gt; history (now with more working) &lt;a href="http://rejectconf4.confreaks.com/d2t3_4th_annual_reject_conf_irb_history.html"&gt;here&lt;/a&gt;.  The code is available &lt;a href="http://blog.bleything.net/2006/10/21/shell-style-history-for-irb"&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I’ve also arranged to get the raw camera captures for my talk and I’ll be putting together a video of my presentation in a different format later.  On that topic, the slides for my presentation are available &lt;a href="http://bleything.net/pdfs/cewr.pdf"&gt;at this link&lt;/a&gt;.  They’re under the &lt;a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;Creative Commons Attribution-Noncommercial-Share Alike 3.0&lt;/a&gt;... the video on Confreaks will be as well, which is slightly different than what their pages say.  The non-commercial clause is the only exception.&lt;/p&gt;


	&lt;p&gt;Also as promised, below is a list of links to the stuff I talked about:&lt;/p&gt;


	&lt;h2&gt;Serial Hardware&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://keyspan.com/products/usa19hs/homepage.spml"&gt;Keyspan &lt;span class="caps"&gt;USA&lt;/span&gt;-19HS &lt;span class="caps"&gt;USB&lt;/span&gt; -&amp;gt; serial adapter&lt;/a&gt; &amp;mdash; the best &lt;span class="caps"&gt;USB&lt;/span&gt;/serial adapter I’ve found.  About $40.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ftdichip.com/Products/FT232R.htm"&gt;&lt;span class="caps"&gt;FTDI FT232R USB&lt;/span&gt; -&amp;gt; &lt;span class="caps"&gt;UART&lt;/span&gt; chip&lt;/a&gt; &amp;mdash; These are only available in surface-mount packaging.  You can get one on a breakout board from Sparkfun, if you need it by itself.  See the Buy Some Gear section.&lt;/li&gt;
		&lt;li&gt;&lt;span class="caps"&gt;FTDI TTL232R USB&lt;/span&gt; -&amp;gt; &lt;span class="caps"&gt;UART&lt;/span&gt; cables &amp;mdash; these are &lt;span class="caps"&gt;USB&lt;/span&gt; cables with embedded FT232Rs, available in various configurations.  Necessary if you’re using a Boarduino (see below) and handy to have around for other purposes as well.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;a href="http://www.x10.com"&gt;&lt;span class="caps"&gt;X10&lt;/span&gt; Home Automation&lt;/a&gt;&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://x10-cm17a.rubyforge.org"&gt;x10-cm17a gem&lt;/a&gt; / &lt;a href="http://rubyforge.org/projects/x10-cm17a"&gt;project page&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.x10.com/automation/ck18a_s_ps32.html"&gt;&lt;span class="caps"&gt;CM17A&lt;/span&gt; FireCracker kit&lt;/a&gt; &amp;mdash; The FireCracker control module, one appliance module, one transceiver/lamp module, and a remote.  Note that these are much cheaper on eBay.  See links in the Buy Some Gear section below.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;a href="http://www.betabrite.com"&gt;BetaBrite &lt;span class="caps"&gt;LED&lt;/span&gt; sign&lt;/a&gt;&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://betabrite.rubyforge.org"&gt;betabrite gem&lt;/a&gt; / &lt;a href="http://rubyforge.org/projects/betabrite"&gt;project page&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.betabrite.com/pages/bbclassic.htm"&gt;213C-1 sign&lt;/a&gt; &amp;mdash; this is the model of the sign I demonstrated&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;a href="http://arduino.cc"&gt;Arduino development boards&lt;/a&gt;&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://rad.rubyforge.org"&gt;Ruby Arduino Development&lt;/a&gt; / &lt;a href="http://rubyforge.org/projects/rad"&gt;project page&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.ladyada.net/make/boarduino/"&gt;Boarduino&lt;/a&gt; &amp;mdash; the small breadboard-compatible Arduino clone I demonstrated&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.arduino.cc/playground/Code/SimpleMessageSystem"&gt;Simple Message System&lt;/a&gt; &amp;mdash; an Arduino library that provides a simple &lt;span class="caps"&gt;ASCII&lt;/span&gt; messaging protocol.  Look for Ruby bindings Real Soon Now™&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.ladyada.net/make/pshield/"&gt;Prototyping Shield&lt;/a&gt; &amp;mdash; Note that Sparkfun also sells a ProtoShield.  Lady Ada’s is far superior.&lt;/li&gt;
		&lt;li&gt;Arduino clones &amp;mdash; There are a number of Arduino-compatible boards that are cheaper or have different design goals.  I didn’t talk about these, but check out &lt;a href="http://www.freeduino.org/freeduino_open_designs.html"&gt;Freeduino&lt;/a&gt; and the &lt;a href="http://moderndevice.com/"&gt;Bare Bones Board&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;a href="http://www.maxstream.net/products/xbee/xbee-oem-rf-module-zigbee.php"&gt;XBee Radios&lt;/a&gt;&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;other xbee modules are pin-compatible, so pick the one that best suits your need, and remember that the Series 1 doesn’t fully support ZigBee&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.arduino.cc/playground/Shields/Xbee01"&gt;Arduino xbee shield&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Buy some gear!&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Keyspan &lt;span class="caps"&gt;USA&lt;/span&gt;-19HS&lt;/strong&gt; &amp;mdash; Froogle it or just hit up your local computer store.  I got mine at CompUSA.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;FTDI FT232R&lt;/span&gt;&lt;/strong&gt; &amp;mdash; Available on a breakout board from &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=718"&gt;Sparkfun&lt;/a&gt;, or from &lt;a href="http://www.digikey.com"&gt;Digi-Key&lt;/a&gt; and &lt;a href="http://www.mouser.com"&gt;Mouser&lt;/a&gt; as a bare part.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;FTDI TTL232R&lt;/span&gt;&lt;/strong&gt; &amp;mdash; Available in all configurations &lt;a href="http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&amp;amp;#38;prodCategoryID=47&amp;amp;#38;title=Cables%3A+TTL-232R+and+variants"&gt;direct from &lt;span class="caps"&gt;FTDI&lt;/span&gt;&lt;/a&gt;, or in most configurations from &lt;a href="http://www.digikey.com"&gt;Digi-Key&lt;/a&gt; and &lt;a href="http://www.mouser.com"&gt;Mouser&lt;/a&gt;.  If you’re doing a Boarduino, though, your best bet is &lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;#38;cPath=19&amp;amp;#38;products_id=70&amp;amp;#38;zenid=98f0db6f43e99ebf79382e1cc59109f8"&gt;Adafruit&lt;/a&gt;, because you can get a little price break if you get it bundled…&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;X10&lt;/span&gt; gear&lt;/strong&gt; &amp;mdash; eBay.  Try &lt;a href="http://search.ebay.com/search/search.dll?from=R40&amp;amp;#38;_trksid=m37&amp;amp;#38;satitle=x10+firecracker"&gt;this search&lt;/a&gt; for “x10 firecracker”.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;BetaBrite&lt;/strong&gt; &amp;mdash; Apparently they’re sold at Sam’s Club.  We don’t have those in Oregon so I can’t confirm.  I got mine from eBay.  I use &lt;a href="http://search.ebay.com/search/search.dll?from=R40&amp;amp;#38;_trksid=m37&amp;amp;#38;satitle=%28betabrite%2Cbeta+brite%29"&gt;this search&lt;/a&gt;, which catches both “BetaBrite” and “Beta Brite”.  You may be able to find other retailers too.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;Arduino&lt;/strong&gt; &amp;mdash; Lots of options here.  &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=666"&gt;Sparkfun&lt;/a&gt; is a good one, but I prefer &lt;a href="http://www.adafruit.com/index.php?main_page=index&amp;amp;#38;cPath=17&amp;amp;#38;zenid=984f4165f5a779247c562c66718ab273"&gt;Adafruit&lt;/a&gt;.  I recommend the &lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;#38;cPath=17&amp;amp;#38;products_id=68&amp;amp;#38;zenid=984f4165f5a779247c562c66718ab273"&gt;Starter Pack&lt;/a&gt;, which comes with an Arduino, ProtoShield kit, battery, wall wart, &lt;span class="caps"&gt;USB&lt;/span&gt; cable, and some goodies to play with.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;Boarduino&lt;/strong&gt; &amp;mdash; &lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;#38;cPath=19&amp;amp;#38;products_id=72&amp;amp;#38;zenid=984f4165f5a779247c562c66718ab273"&gt;Adafruit&lt;/a&gt;.  Be sure to tick the box to add the &lt;span class="caps"&gt;TTL232&lt;/span&gt; cable if you need one.  You’re going to have to solder this one… if you just don’t feel like it, email me and we can talk ;)&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;Protoshield&lt;/strong&gt; &amp;mdash; &lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;#38;cPath=17&amp;amp;#38;products_id=51&amp;amp;#38;zenid=984f4165f5a779247c562c66718ab273"&gt;Adafruit again&lt;/a&gt;.  There’s also the &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=7914"&gt;Sparkfun one&lt;/a&gt;, but it’s more expensive and poorly designed (see the last paragraph in the description on Sparkfun to see what I mean)&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;XBee modules&lt;/strong&gt; &amp;mdash; &lt;a href="http://www.digikey.com"&gt;Digi-Key&lt;/a&gt; or &lt;a href="http://www.mouser.com"&gt;Mouser&lt;/a&gt;.  Maybe other places too, but they’re who I’ve used.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;XBee Shield&lt;/strong&gt; &amp;mdash; &lt;a href="http://www.nkcelectronics.com/freeduino-arduino-xbee-shield-kit.html"&gt;&lt;span class="caps"&gt;NKC&lt;/span&gt; Electronics&lt;/a&gt;, who sells on eBay as &lt;a href="http://myworld.ebay.com/nkc_store/"&gt;nkc_store&lt;/a&gt;.  I’ve been very pleased with their service.  &lt;span class="caps"&gt;NKC&lt;/span&gt; also sells some Arduino clones, for what it’s worth.  Sparkfun sells exactly the same thing (albeit with an XBee module) for $80, which is highway robbery.  Here’s &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8471"&gt;the link&lt;/a&gt;, though, if you feel like throwing your money away :)&lt;/li&gt;
	&lt;/ul&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=e9eRymB"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=e9eRymB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=t4mJmJB"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=t4mJmJB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=e6fNunB"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=e6fNunB" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/11/17/rubyconf-stuff</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-10-09:5841</id>
    <published>2007-10-09T02:02:00Z</published>
    <updated>2007-10-09T02:06:16Z</updated>
    <category term="Announcements" />
    <category term="Ruby, Rails, and related" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/167220571/rubyconf-2007" rel="alternate" type="text/html" />
    <title>RubyConf 2007</title>
<content type="html">
            &lt;p&gt;So the big (to me) announcement: I’ve been invited to speak at RubyConf 2007 next month!  My presentation is called “Controlling Electronics with Ruby”, and you can read the proposal &lt;a href="http://blog.bleything.net/pages/controlling-electronics-with-ruby"&gt;here&lt;/a&gt;.  It’s going to be fun; I’ll be bringing along some hardware to demonstrate with :)&lt;/p&gt;


	&lt;p&gt;Also, for my own benefit I put together a calendar of the RubyConf sessions.  It’s available &lt;a href="http://blog.bleything.net/assets/2007/10/8/RubyConf07.ics"&gt;here&lt;/a&gt;, feel free to grab it.  You can probably subscribe to it using iCal or whatever, and if there are changes in the agenda, I’ll update it.  It should contain timezones for everything, but I might have missed one or two, so please let me know if it’s wacky for you.&lt;/p&gt;


	&lt;p&gt;That’s all.  See you in Charlotte!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=faSJvJg3"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=faSJvJg3" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=bsH10aTR"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=bsH10aTR" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=ArJGgVly"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=ArJGgVly" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/10/9/rubyconf-2007</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-09-12:5837</id>
    <published>2007-09-12T21:31:00Z</published>
    <updated>2007-09-13T17:38:56Z</updated>
    <category term="Administrivia" />
    <category term="Announcements" />
    <category term="Ruby, Rails, and related" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/155670883/announcing-laika-s-open-source-software" rel="alternate" type="text/html" />
    <title>Announcing LAIKA's Open Source Software</title>
<content type="html">
            &lt;p&gt;On behalf of the entire &lt;a href="http://laika.com"&gt;&lt;span class="caps"&gt;LAIKA&lt;/span&gt;&lt;/a&gt; Information Technology department, it is my great pleasure to announce the release of a number of projects developed by the Information Systems group:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://opensource.laika.com/wiki/Athenaeum"&gt;Athenaeum&lt;/a&gt; &amp;mdash; A “live” web view of the contents of a Delicious Library&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://opensource.laika.com/wiki/GrowlNotifier"&gt;Growl Notifier&lt;/a&gt; &amp;mdash; A plugin for CruiseControl.rb that sends build notifications to one or more Growl daemons.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://opensource.laika.com/wiki/Linen"&gt;Linen&lt;/a&gt; &amp;mdash; A framework for building command-line interfaces&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://opensource.laika.com/wiki/TextMateBundle"&gt;TextMate Bundle&lt;/a&gt; &amp;mdash; Some of us use TextMate.  This bundle includes some helpful commands and snippets that we wrote.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://opensource.laika.com/wiki/ThingFish"&gt;ThingFish&lt;/a&gt; &amp;mdash; A network-accessable datastore with extensible metadata&lt;br /&gt;&lt;span&gt;Please note that the ThingFish release is alpha quality, and much has changed between the current download and trunk. Watch for a new release Real Soon&amp;trade;&lt;/span&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;These projects were all developed to fit needs within our organization, but designed to be useful outside &lt;span class="caps"&gt;LAIKA&lt;/span&gt; as well. They’re released under the &lt;span class="caps"&gt;BSD&lt;/span&gt; license, and are therefore free to use, in every sense of the word.&lt;/p&gt;


	&lt;h2&gt;Where To Get It&lt;/h2&gt;


	&lt;p&gt;The primary source for &lt;span class="caps"&gt;LAIKA&lt;/span&gt; Open Source software is &lt;a href="http://opensource.laika.com"&gt;opensource.laika.com&lt;/a&gt;. This is a Trac instance, and is the main point of contact for all &lt;span class="caps"&gt;LAIKA&lt;/span&gt; open source projects. Check here first. File bugs here. Read documentation here :)&lt;/p&gt;


	&lt;p&gt;Downloads will also be hosted at RubyForge, so any of our projects that are available as gems will be installable via the normal gem mechanism. You can view our project page at &lt;a href="http://laika.rubyforge.org"&gt;laika.rubyforge.org&lt;/a&gt; and download our files at &lt;a href="http://rubyforge.org/projects/laika"&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;h2&gt;About &lt;span class="caps"&gt;LAIKA&lt;/span&gt;&lt;/h2&gt;


	&lt;p&gt;&lt;span class="caps"&gt;LAIKA&lt;/span&gt; is an animation studio based in Portland, Oregon (USA). We are currently working on two feature films and a large number of commercial projects. More information is available at &lt;a href="http://www.laika.com"&gt;laika.com&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;About &lt;span class="caps"&gt;LAIKA IS&lt;/span&gt;&lt;/h2&gt;


	&lt;p&gt;&lt;span class="caps"&gt;LAIKA&lt;/span&gt;’s Information Systems group is a team of programmers, database administrators, and tech writers inside the Information Technology department.  We make the shiny tools that help the rest of &lt;span class="caps"&gt;LAIKA&lt;/span&gt; do their jobs more easily, ease the sharing of information between groups, and solve mission-critical problems (like picking a place to go to lunch).&lt;/p&gt;


	&lt;p&gt;We believe in open source software. Many of the tools we use in-house are open source, and we feel strongly that we should give back whenever possible.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;LAIKA&lt;/span&gt;’s IS department is:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Ben Bleything&lt;/li&gt;
		&lt;li&gt;Jeff Davis&lt;/li&gt;
		&lt;li&gt;Michael Granger&lt;/li&gt;
		&lt;li&gt;Steven J. Hall&lt;/li&gt;
		&lt;li&gt;Jeremiah Jordan&lt;/li&gt;
		&lt;li&gt;Myra Lavenue&lt;/li&gt;
		&lt;li&gt;Mahlon E. Smith&lt;/li&gt;
		&lt;li&gt;Anthony Roberts&lt;/li&gt;
		&lt;li&gt;Kim Wallmark&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;How to Contact Us&lt;/h2&gt;


	&lt;p&gt;If you’ve got problems with the code, please file appropriate bugs in our Trac instance. If you’ve got general questions or comments, please email opensource AT laika, dot com.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=H7ZJNQMQ"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=H7ZJNQMQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=PM66msUn"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=PM66msUn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=x5SM2ktU"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=x5SM2ktU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/9/12/announcing-laika-s-open-source-software</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-07-30:5805</id>
    <published>2007-07-30T18:47:00Z</published>
    <updated>2007-07-30T18:47:21Z</updated>
    <category term="Announcements" />
    <category term="Hacks" />
    <category term="Ruby, Rails, and related" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/138935517/announcing-shell-style-history-for-irb-the-fixed-edition" rel="alternate" type="text/html" />
    <title>Announcing Shell-Style History for irb, the fixed edition!</title>
<content type="html">
            &lt;p&gt;Astute readers will recall that during RubyConf last year, &lt;a href="http://blog.bleything.net/2006/10/21/shell-style-history-for-irb"&gt;I posted about&lt;/a&gt; a little &lt;code&gt;irb&lt;/code&gt; hack I’d written that allowed for shell-style history viewing and replay.  There was a problem with it, however… replayed lines that made assignments didn’t work.  So if you tried to replay&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt; b = &lt;span class="i"&gt;5&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;=&amp;gt; &lt;span class="i"&gt;5&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&amp;gt;&amp;gt; b + &lt;span class="i"&gt;10&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;=&amp;gt; &lt;span class="i"&gt;15&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;... you’d get …&lt;/p&gt;


&lt;pre&gt;NameError: undefined local variable or method `b' for main:Object
        from (irb):1&lt;/pre&gt;

	&lt;p&gt;... which sucks.  This has now been fixed!  Witness:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt; b = &lt;span class="i"&gt;5&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;=&amp;gt; &lt;span class="i"&gt;5&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&amp;gt;&amp;gt; b + &lt;span class="i"&gt;10&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;=&amp;gt; &lt;span class="i"&gt;15&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&amp;gt;&amp;gt;  exit&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;superx ~...personal/toys/irbhistory &amp;gt; irb&lt;tt&gt;
&lt;/tt&gt;&amp;gt;&amp;gt; h&lt;tt&gt;
&lt;/tt&gt;[&lt;span class="i"&gt;0937&lt;/span&gt;] b = &lt;span class="i"&gt;5&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;[&lt;span class="i"&gt;0938&lt;/span&gt;] b + &lt;span class="i"&gt;10&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;[&lt;span class="i"&gt;0939&lt;/span&gt;] h&lt;tt&gt;
&lt;/tt&gt;=&amp;gt; &lt;span class="pc"&gt;nil&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&amp;gt;&amp;gt; h! &lt;span class="i"&gt;937&lt;/span&gt;,&lt;span class="i"&gt;938&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;=&amp;gt; &lt;span class="i"&gt;15&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;So that’s pretty cool, yeah?  You can get the updated code &lt;a href="http://blog.bleything.net/pages/irb_history"&gt;here&lt;/a&gt;.  It’s also in subversion, &lt;a href="http://svn.bleything.net/toys/irbhistory/"&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Thanks to &lt;a href="http://gilesbowkett.blogspot.com/"&gt;Giles Bowkett&lt;/a&gt; for pointing out a mis-feature that resulted in all evals returning nil, when you’d probably want them to return in the usual way.  This is fixed now :)&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=AepAfTUG"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=AepAfTUG" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=BWJ7rnKR"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=BWJ7rnKR" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=efBnpjVI"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=efBnpjVI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/7/30/announcing-shell-style-history-for-irb-the-fixed-edition</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-07-24:5803</id>
    <published>2007-07-24T18:25:00Z</published>
    <updated>2007-07-24T18:27:39Z</updated>
    <category term="Announcements" />
    <category term="Ruby, Rails, and related" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/136952177/pdx-rb-presents-foscon-iii-really-radical-ruby" rel="alternate" type="text/html" />
    <title>PDX.rb presents FOSCON III: Really Radical Ruby</title>
<content type="html">
            &lt;p&gt;Once again, &lt;a href="http://www.pdxruby.org"&gt;&lt;span class="caps"&gt;PDX&lt;/span&gt;.rb&lt;/a&gt; will be hosting an evening of wide-ranging talks about Ruby.  This year the focus is on people doing strange things with Ruby.  Strange, of course, is anything that’s just a little bit outside the usual.  If you’ve created a new Ruby-based interface for hacking on your brand-new internet-enabled phone (rPhone anyone?) or composed your latest bit of metaprogramming magic, we’d love to hear about it.&lt;/p&gt;


	&lt;p&gt;We’ll be keeping the event open-ended and freeform.  We’ll use the lightning-talk-inspired approach and give each presenter the opportunity to cram whatever they can into 10 minutes.  Make it interesting and you might even get an extra minute or two.  We’ve already selected 7 speakers, but there will be a few slots left open until the actual event.&lt;/p&gt;


	&lt;p&gt;Our speakers are:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Greg Borenstein &amp;mdash; programming &lt;a href="http://www.arduino.cc"&gt;Arduino&lt;/a&gt; boards with Ruby&lt;/li&gt;
		&lt;li&gt;Lennon Day-Reynolds &amp;mdash; Speaker’s Discretion&lt;/li&gt;
		&lt;li&gt;Giles Bowkett &amp;mdash; Creating programmatic &lt;span class="caps"&gt;MIDI&lt;/span&gt; music with Ruby&lt;/li&gt;
		&lt;li&gt;John Lam &amp;mdash; Running Ruby on the &lt;span class="caps"&gt;CLR&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;Ola Bini &amp;mdash; JRuby!&lt;/li&gt;
		&lt;li&gt;Ian Dees &amp;mdash; Radical Test Portability&lt;/li&gt;
		&lt;li&gt;Luke Kanies &amp;mdash; Using Racc to write a real Domain Specific Language&lt;/li&gt;
		&lt;li&gt;You&lt;/li&gt;
		&lt;li&gt;... or possibly… &lt;span class="caps"&gt;YOU&lt;/span&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This is all taking place Tuesday, July 24th (hey, that’s today!) at 7:30 pm.  The location is &lt;a href="http://www.holocene.org"&gt;Holocene&lt;/a&gt; (&lt;a href="http://maps.google.com/maps?f=q&amp;amp;#38;hl=en&amp;amp;#38;geocode=&amp;amp;#38;q=holocene&amp;amp;#38;sll=45.51721,-122.65566&amp;amp;#38;sspn=0.011472,0.027573&amp;amp;#38;ie=UTF8&amp;amp;#38;z=16&amp;amp;#38;iwloc=A&amp;amp;#38;om=1"&gt;map&lt;/a&gt;), here in beautiful Portland, Oregon.&lt;/p&gt;


	&lt;p&gt;There will be plenty of Ruby fun going on and lots of socializing with fellow Rubyists.  Last year, &lt;span class="caps"&gt;FOSCON II&lt;/span&gt; was overflowing.  We’ve found a new venue to fit you all in, so why miss it?  Oh yeah, did I mention the free pizza?&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=rCJvKeHs"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=rCJvKeHs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=2XpthYf4"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=2XpthYf4" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=5MGZllm9"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=5MGZllm9" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/7/24/pdx-rb-presents-foscon-iii-really-radical-ruby</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-07-18:5801</id>
    <published>2007-07-18T17:25:00Z</published>
    <updated>2007-07-18T17:37:25Z</updated>
    <category term="Announcements" />
    <category term="Hacks" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/134996185/fun-with-greasemonkey" rel="alternate" type="text/html" />
    <title>Fun with Greasemonkey</title>
<content type="html">
            &lt;p&gt;For the past few months, I’ve been learning Javascript.  One of the fun things about learning Javascript is when you get to start playing with &lt;a href="http://www.greasespot.net/"&gt;Greasemonkey&lt;/a&gt;.  If you’re not familiar, Greasemonkey is a Firefox extension that allows you to write Javascript that executes inside the context of a page once it’s been loaded… effectively allowing you to manipulate pages before you see them.  If you’ve never played with Greasemonkey, I highly recommend it.  It’s great fun!&lt;/p&gt;


	&lt;p&gt;The real purpose of this post, though, is to share with you a couple of userscripts I’ve written:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://svn.bleything.net/toys/greasemonkey/dinosaurcomicseastereggs.user.js"&gt;Dinosaur Comics Easter Eggs NG&lt;/a&gt; &amp;mdash; shows the three &lt;a href="http://qwantz.com"&gt;Dinosaur Comics&lt;/a&gt; easter eggs (comic title, &lt;span class="caps"&gt;RSS&lt;/span&gt; title, and comments subject) beneath the comic.  Works for archive pages too!&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://svn.bleything.net/toys/greasemonkey/twitteravatarnamedisplay.user.js"&gt;Twitter Avatar Name Display&lt;/a&gt; &amp;mdash; shows name next to the small avatars on Twitter pages.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://svn.bleything.net/toys/greasemonkey/twoprecappercleanerupper.user.js"&gt;TWoP recapper cleaner upper….er&lt;/a&gt; &amp;mdash; removes the side and top/bottom bars from &lt;a href="http://televisionwithoutpity.com"&gt;Television Without Pity&lt;/a&gt; pages and resizes the content width to 100%, thus allowing you to read most recap pages without scrolling.  Huzzah!&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I’ll very likely be writing more scripts as time goes on.  I’ll keep posting them &lt;a href="http://blog.bleything.net/pages/greasemonkey"&gt;on this page&lt;/a&gt;.  You can also get them from &lt;a href="http://userscripts.org/users/31023"&gt;userscripts.org&lt;/a&gt;.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=Joe7XhXo"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=Joe7XhXo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=x8ryktbB"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=x8ryktbB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=SJFzK0B5"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=SJFzK0B5" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/7/18/fun-with-greasemonkey</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-06-16:4671</id>
    <published>2007-06-16T17:14:00Z</published>
    <updated>2007-07-18T16:34:08Z</updated>
    <category term="Announcements" />
    <category term="dorkbot" />
    <category term="dorkbotpdx" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/125374893/dorkbotpdx-0x00" rel="alternate" type="text/html" />
    <title>DorkbotPDX 0x00</title>
<content type="html">
            &lt;p&gt;Since I primarily talk about Ruby here, you may not know that I’m also a hardware hacker… a beginner, in the scheme of things, but a hardware hacker nonetheless.  Cool hardware hackers the world over have a group called Dorkbot:”http://dorkbot.org.  Here in Portland we’ve got our own chapter: &lt;a href="http://dorkbotpdx.org"&gt;Dorkbot &lt;span class="caps"&gt;PDX&lt;/span&gt;&lt;/a&gt;, organized primarily by fellow Rubyist &lt;a href="http://opposable-thumbs.net"&gt;Thomas Lockney&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Dorkbot &lt;span class="caps"&gt;PDX&lt;/span&gt; is about to hold its first official event.  Included below is the announcement.  As it says, if you’re a hacker, painter, engineer or sculptor, musician or maker, you’ll fit right in.  Come join us!&lt;/p&gt;


	&lt;h2&gt;Dorkbot &lt;span class="caps"&gt;PDX&lt;/span&gt; 0×00&lt;/h2&gt;


	&lt;p&gt;Come join DorkbotPDX, people doing strange things with electricity, for our inaugural event at &lt;a href="http://barvendetta.com/"&gt;Vendetta&lt;/a&gt; on June 24th at 5pm. If you’re a hacker, painter, engineer or sculpture, musician or maker you’ll fit right in. We bring together the tech and art worlds and enjoy it all over a pint of beer. We’ll have presentations and performances by these fine folks:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Jason Plumb is a software engineer by day…hardware hacker, reverse engineer, and experimental sound geek by night. He will provide an overview of the Essential Reality P5 glove controller and explain how it can be used with free and open-source software to create and manipulate sound.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Jesse Fox studied music composition and physics at Bates College before getting a Master’s Degree from the Center for Computer Research in Music and Acoustics at Stanford University. He will discuss his involvement with the League of Electronic Musical Urban Robots (LEMUR) and describe the detailed techincal recreation of George Antheil’s “Ballet Mecanique”, which includes xylophones, bass drums, tam-tam, pianists, electric bells, a siren, airplane propellers, and a volley of player pianos.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Donald Delmar Davis, principal research anarchist at D3 Laboratories, will overview the deconstruction of Arduino and Wiring platforms to create artistic robot platforms with &lt;span class="caps"&gt;AVR&lt;/span&gt; microcontrollers. “AI Begins With Self Destruction”&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;paint &amp; copter create multi-media experiences of regurgitated and improvised media. By synthesizing live and pre-manipulated video feeds, field recordings and live instrumentation, Paint and Copter filter cultural noise and reprocess it into a new, mesmerizing thread.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We will also have a brief open-mic of sorts referred to as Open Dork. This is a show and tell where you can have the mic for a few minutes to discuss your latest project, vent about frustrations trying to get your art grant or tell us about the intricacies of the color blue.  It’s your time to tell us what you think we need to hear.&lt;/p&gt;


	&lt;p&gt;Festivities will begin at 5pm and you can expect them to last until they kick us out. Please bring yourself, your friends and any thing you’d like to share.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://dorkbotpdx.org/wiki/dorkbotpdx_0x00"&gt;http://dorkbotpdx.org/wiki/dorkbotpdx_0×00&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;........................................................................&lt;/code&gt;
&lt;code&gt;.........dorkbot: people doing strange things with electricity..........&lt;/code&gt;
&lt;code&gt;......................... http://dorkbot.org ...........................&lt;/code&gt;
&lt;code&gt;........................................................................&lt;/code&gt;&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=GWjSP8ds"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=GWjSP8ds" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=GJodkxRH"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=GJodkxRH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=tlfvSnyU"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=tlfvSnyU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/6/16/dorkbotpdx-0x00</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-06-13:4659</id>
    <published>2007-06-13T17:49:00Z</published>
    <updated>2007-06-13T17:55:35Z</updated>
    <category term="Announcements" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/124567161/a-brief-excursion-into-greasemonkey" rel="alternate" type="text/html" />
    <title>A brief excursion into Greasemonkey</title>
<content type="html">
            &lt;p&gt;By this point, I would suspect that most Firefox readers who are reading this know about Greasemonkey.  If not, &lt;a href="http://greasespot.net"&gt;go forth and read&lt;/a&gt;.  I &lt;em&gt;additionally&lt;/em&gt; suspect the same is true for &lt;a href="http://twitter.com"&gt;Twitter&lt;/a&gt;.  If not, you know what to do.&lt;/p&gt;


	&lt;p&gt;One thing that annoys me about Twitter is the avatar display on a user’s page.  If I’m looking at (for instance) &lt;a href="http://twitter.com/topfunky"&gt;Geoff’s page&lt;/a&gt;, I see a lot of little tiny icons that I don’t recognize.  I find myself hovering over each to see if they’re someone I know so I can click and friend them.  I got sick of the hover delay, so I decided to fix it.  I wrote a userscript that puts each users’ name next to their avatar image, and puts each on its own line.&lt;/p&gt;


	&lt;p&gt;I’d never worked with Greasemonkey, and only recently started playing with Javascript, so it was an experience.  I was able to find a cool little &lt;a href="http://wiki.greasespot.net/Code_snippets#XPath_helper"&gt;XPath helper&lt;/a&gt; on the Greasemonkey wiki, which helped immensely.  The code to actually do the manipulation is only about 10 lines long.&lt;/p&gt;


	&lt;p&gt;If you’re interested, you can grab the latest and greatest version of the script by &lt;a href="http://svn.bleything.net/toys/greasemonkey/twitteravatarnamedisplay.user.js"&gt;clicking here&lt;/a&gt;.  I should also plug my toys repository… it’s got all manner of fun junk laying about.  Check it out with &lt;code&gt;svn co http://svn.bleything.net/toys&lt;/code&gt;.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=Et23CvDa"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=Et23CvDa" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=TN88XRDv"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=TN88XRDv" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=DqioWnOD"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=DqioWnOD" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/6/13/a-brief-excursion-into-greasemonkey</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-05-16:4504</id>
    <published>2007-05-16T20:34:00Z</published>
    <updated>2007-07-18T16:34:58Z</updated>
    <category term="Administrivia" />
    <category term="hate" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/117249796/yet-more-comment-spam-blathering" rel="alternate" type="text/html" />
    <title>Yet More Comment Spam Blathering</title>
<content type="html">
            &lt;p&gt;I’m damn sick of comment spam.  To that end, I’ve set Mephisto to turn off commenting after 3 months and disabled comments for all articles older than that.  You can always email me, it’s my first name at my last name dot net.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=QXCn13Q0"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=QXCn13Q0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=7E9qvbt3"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=7E9qvbt3" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=qnXD7qev"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=qnXD7qev" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/5/16/yet-more-comment-spam-blathering</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-05-15:4463</id>
    <published>2007-05-15T18:07:00Z</published>
    <updated>2007-07-18T16:33:26Z</updated>
    <category term="Ruby, Rails, and related" />
    <category term="hpricot" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/116925825/fun-with-hpricot" rel="alternate" type="text/html" />
    <title>Fun with hpricot</title>
<content type="html">
            &lt;p&gt;Those who know me personally know that I’m a pretty huge video game nerd.  I’ve been wanting to learn &lt;a href="http://code.whytheluckystiff.net/hpricot/"&gt;hpricot&lt;/a&gt; better, so I decided to combine the two interests.  I give you &lt;code&gt;vgdod.rb&lt;/code&gt;, which goes and scrapes info about Amazon Video Games’ Deal of the Day.  It could probably be optimized, and the XPath could likely be better, but it gets the job done!&lt;/p&gt;


	&lt;p&gt;It was interesting to try to write XPath for &lt;span class="caps"&gt;HTML&lt;/span&gt; that I didn’t control… this was the first time I’ve had that particular joy, and it was a good exercise.  I think we (web developers, that is) sometimes forget that other people might want to manipulate our &lt;span class="caps"&gt;HTML&lt;/span&gt; at some point.  Anyway, the code:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;&lt;span class="c"&gt;#!/usr/bin/env ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="s"&gt;&lt;span class="dl"&gt;%w(&lt;/span&gt;&lt;span class="k"&gt;rubygems hpricot open-uri shorturl&lt;/span&gt;&lt;span class="dl"&gt;)&lt;/span&gt;&lt;/span&gt;.each {|g| require g}&lt;tt&gt;
&lt;/tt&gt;&lt;span class="r"&gt;def&lt;/span&gt; &lt;span class="fu"&gt;fetch&lt;/span&gt;(url = &lt;span class="s"&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;/span&gt;) ; &lt;span class="r"&gt;return&lt;/span&gt; Hpricot(open(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;http://www.amazon.com&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; + url)) ; &lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;vg_url = fetch.at(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;a[text()=Video Games]&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)[&lt;span class="sy"&gt;:href&lt;/span&gt;]&lt;tt&gt;
&lt;/tt&gt;dotd_img = fetch(vg_url).search(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;img&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;).select {|e| e[&lt;span class="sy"&gt;:src&lt;/span&gt;] =~ &lt;span class="rx"&gt;&lt;span class="dl"&gt;/&lt;/span&gt;&lt;span class="k"&gt;deal-of-the-day&lt;/span&gt;&lt;span class="dl"&gt;/&lt;/span&gt;&lt;/span&gt;}.first&lt;tt&gt;
&lt;/tt&gt;dotd = fetch(dotd_img.parent[&lt;span class="sy"&gt;:href&lt;/span&gt;])&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;# title -- platform -- price -- url&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;printf &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;%s -- %s -- %s -- %s&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;,&lt;tt&gt;
&lt;/tt&gt;  dotd.at(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;//div.buying//b.sans&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;).inner_text.strip,&lt;tt&gt;
&lt;/tt&gt;  dotd.search(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;//b.price&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;).last.inner_text.strip,&lt;tt&gt;
&lt;/tt&gt;  dotd.search(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;//div[@class=buying]&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)[&lt;span class="i"&gt;3&lt;/span&gt;].inner_text.gsub(&lt;span class="rx"&gt;&lt;span class="dl"&gt;/&lt;/span&gt;&lt;span class="k"&gt;(&lt;/span&gt;&lt;span class="ch"&gt;\&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;nbsp;|&lt;/span&gt;&lt;span class="ch"&gt;\s&lt;/span&gt;&lt;span class="k"&gt;|Platform:)&lt;/span&gt;&lt;span class="dl"&gt;/&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;/span&gt;),&lt;tt&gt;
&lt;/tt&gt;  &lt;span class="co"&gt;WWW&lt;/span&gt;::&lt;span class="co"&gt;ShortURL&lt;/span&gt;.shorten(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;http://www.amazon.com&lt;/span&gt;&lt;span class="il"&gt;&lt;span class="dl"&gt;#{&lt;/span&gt;dotd_img.parent[&lt;span class="sy"&gt;:href&lt;/span&gt;]&lt;span class="dl"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=3t6BtqX6"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=3t6BtqX6" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=zy6h6QUK"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=zy6h6QUK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=AtNxkH4V"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=AtNxkH4V" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/5/15/fun-with-hpricot</feedburner:origLink></entry>
  <entry xml:base="http://blog.bleything.net/">
    <author>
      <name>ben</name>
    </author>
    <id>tag:blog.bleything.net,2007-04-25:3789</id>
    <published>2007-04-25T18:06:00Z</published>
    <updated>2007-05-16T20:36:34Z</updated>
    <category term="Ruby, Rails, and related" />
    <link href="http://feeds.feedburner.com/~r/bleything/blog/~3/111924828/getting-rid-of-pharmaceutical-spam" rel="alternate" type="text/html" />
    <title>Getting rid of pharmaceutical spam</title>
<content type="html">
            &lt;p&gt;I have been getting absolutely &lt;em&gt;slammed&lt;/em&gt; with stupid drug spam.  Mephisto’s spam moderation stuff is pretty good, but the sheer volume required me to go down to the console to take care of the problem:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;regex = &lt;span class="rx"&gt;&lt;span class="dl"&gt;/&lt;/span&gt;&lt;span class="k"&gt;viagra|cialis|xanax|levitra|tramidol|valium|&lt;/span&gt;&lt;span class="ch"&gt;\&lt;tt&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;span class="k"&gt;carisoprodol|tramadol|nexium|ultracet|allegra|&lt;/span&gt;&lt;span class="ch"&gt;\&lt;tt&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;span class="k"&gt;zoloft|hoodia|snitz|ultram|levaquin|augmentin|&lt;/span&gt;&lt;span class="ch"&gt;\&lt;tt&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;span class="k"&gt;prednisone|phentermine|fioricet|diethyproprion&lt;/span&gt;&lt;span class="dl"&gt;/&lt;/span&gt;&lt;span class="mod"&gt;i&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;Comment&lt;/span&gt;.find_all.select {|c| c.body =~ regex}.map(&amp;amp;&lt;span class="sy"&gt;:destroy&lt;/span&gt;).size&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;I was building the regex as I went along so I don’t have an exact count, but that probably deleted 500 comments.  Much easier to moderate the other crap now.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=TmZUTqmt"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=TmZUTqmt" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=PbWdP1tM"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=PbWdP1tM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/bleything/blog?a=VZayGpKJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/bleything/blog?i=VZayGpKJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://blog.bleything.net/2007/4/25/getting-rid-of-pharmaceutical-spam</feedburner:origLink></entry>
<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=bleything/blog</feedburner:awareness></feed>
