Pages

Wednesday, December 28, 2011

Running Lego Mindstorms RIS 2.0 on newer windows

While getting my old Lego Mindstorms (an RCX 2.0 setup) set up for my little brother to play with, I learned some thigns about using it with newer versions of Windows (Windows 7 in my case). I found out here that there is a patch needed for the USB IR tower, which resolves the problem of the system locking up when the tower is plugged in. You can download it here: http://cache.lego.com/downloads/education/tower164.zip.
After installing this, things will run fine, unless you decide to use the official program and launch it more than once. At which point you will see a message like "A critical error has occurred. You may be running out of memory, or you may need to reinstall Robotics Invention System 2.0." The solution to this is a bit messy. There is a file left behind here
Vista/Win7: C:\Users\<user>\AppData\Local\Temp\Ris 2.0.mov.#res
XP: C:\Documents and Settings\<user>\Application Data\Temp\Ris 2.0.mov.#res
This file must be deleted each time before the program is launched. What I did was create a batch script to do this, and a Visual Basic script to launch the batch script (so it could happen without launching a command prompt window).
You'll find both scripts here: https://gist.github.com/1531705
I recommend replacing all shortcuts to theLaunchRis2.exe with a shortcut to the Visual Basic script. Note that the VB script assumes you will put put the batch script in %PROGRAMFILES(X86)%\LEGO MINDSTORMS\launchRis.bat (or %PROGRAMFILES%\LEGO MINDSTORMS\launchRis.bat on a 32 bit system), but you can easily edit the script to change the location.
Of course, this second problem is irrelevant if you decide to write the programs youself (I preferred this over the graphical tool Lego provided). There are several languages available.
Let me know if you have suggestions for improvement or run into any issues.

Thursday, September 1, 2011

A userscript for Viewvc

I've posted a userscript I've written as a workaround for a request for ViewVC that hasn't been done yet (despite the fact a patch has already been submitted).  The missing feature is a link to the log view for directories.

A few Autohotkey scripts

I decided to post the source for a few Autohotkey scripts a couple of days ago:

  • GW Tonic Bot : This one is a bot to drink tonics for you in Guild Wars to help you get your Party Animal title. It maps back and forth between your Guild Hall and drinks 2 tonics (yes, 2 tonics because of a bug in GW) each time it stops.
  • GW Drunkard Bot : This one was meant to drink alcohol at specific intervals to achieve optimal points towards your Drunkard title.  This was made obsolete by the March 3, 2011 update.  You can now click them (or have an autoclicker click them) as fast as you want.
  • Generic Autoclicker : This one can be for any kind of automated clicking, it just clicks (or double clicks) where you tell it to at an interval you specify.
Note that I haven't tested them in IronAHK, only Autohotkey on Windows.  Also note that it's also easy to convert these to an .exe file if you don't want to install Autohotkey.  And if a non-techie is reading this, I'm happy to provide that for you.  Just leave a comment below.

Also feel free to comment (or fork) either of these scripts if you have improvements.  Some people have found that the delay between mappings in the tonic bot is not long enough for slower internet connections and so you have to tell it to drink more tonics than you'd think (since some clicks will be wasted).

Monday, August 1, 2011

Musical Amateurism

Warning: the following is at rant on the state of pop music that shamelessly derides the music industry.  Reader discretion is advised.

I've been thinking about music and musical instruments lately.  And it occurred to me how odd our current musical experience is.  One of the oldest recorded songs in history dates back to about 1400BCE, but it's likely unrecorded music existed long before that.  My point being that music has always been a very pervasive element in our cultures.  It was performed by average Joes for average Joes, where many (if not all) of the listeners actively took part in the experience.  But this is not reflected in our current musical culture.  We now only passively engage with the music with our stereos, ipods, etc.  And it is largely no longer done by amateurs.  Teams of professionals (of whom the actual artist is often only a small part, as in the case of pop singles).  And the industry that has been built to protect this corporatizing (like the RIAA) and wanting money practically every time someone sings one of their songs is also downright odd, when viewed in the context of most of our musical history.  How can you copyright something so quintessential to the human experience?  (By the way, the RIAA has yet to share a single penny of the settlements they've won with the artists they're supposedly protecting, I refuse to buy an album released by the RIAA).

I think this decline in musical amateurism started with the end of the Baroque period of music, when music began being performed by people whose profession was music and the instruments of choice became more complex (for example, the decline of the recorder).  This was partly because of the growing world economy that made more leisure time possible.  Whereas in the past, as my Western Civ professor put it, "Most of your ancestors were hungry most of the time."  Aristocracies were falling, and more power (politically and economically) was making its way into the hands of the common man.  But even in this period of history, folk music was still alive and well.  And although amateur musicians were no longer the sole source of music, they were still a significant source of it.   This continued for some time, with professional music comprising a larger and larger percentage of the music consumed by the population.  Things changed again, and rather dramatically, with the advent of recorded music.  In the past, it was still very typical for a household to have a means of producing their own music.  A woman was considered more marriageable if she were able to provide this service for her home.  The piano was the most popular choice for this, in my opinion because it arguably has a greater capacity to make a single musician a one man band than any other instrument.  There were other factors as well.  The depression hit, which drove down piano sales considerably, and recorded musical devices became more and more inexpensive.  When these devices became relatively mainstream, it gave households the ability to have music without the need of any musical talent or the cost of maintaining a musical instrument (pianos generally need tuned about twice a year).  This process, as most of you already know has been accelerated many times in recent history, with the advent of radio, CDs, portable players, and the MP3.

While I do still spurn what the pop single culture has become, with its uncreative and sometimes downright unpleasant lyrics, its increasingly heavy use of autotuners, and seeming desire to sell sex rather than musical talent, I do still enjoy the occasional good beat.  What I'm really coming to sense as far as what's been lost over time is musical amateurism.  These days, with the world as your critic, you can't even watch a Youtube video of a little kid plucking out their first tune without reading a comment below of "this kid sukx".  Folk is essentially dead (at least in America).  The closest thing you can get to this amateurism (aside from high school recitals) is Indie.  And several of these bands are just corporate wannabes.  And because of this, it seems to be hard to find bands willing to break the mold being created by the professionals (you might find some on Jamendo).  This lapse in creativity and morality is disturbing.  But so is how passive we've become in our interactions.  This goes for all our interactions like texting your mom instead of talking face to face, but also for our music.  Unless you count what establishments largely built on lecherous recreation, like clubbing joints, our interaction with music and musically with each other is largely minimal.  I'm not saying that I'd like all such establishments shut down and the music industry to die.  Maybe it still has a place in our society, I don't know.  But I would like to see people become more involved in the musical process and increasing the level of creativity in the music listened to by the general populace.  But If singing about getting probed by aliens or getting excited by chains and whips represents the pinnacle of creativity in popular music then

Why not mess around with music in your home?  Get a cheap keyboard ($50), guitar ($40), recorder ($4), tin whistle ($10), fife ($5), or whatever floats your boat and create something!  It can't be any worst than the wares the music industry is currently offering!

Tea is tea

So, it turns out the dude at Teavana was right: all teas (e.g. black, white, green, oolong, etc) are all prepared (check out the cool chart) from the same plant (Camellia Sinensis). Naturally, this excludes Rooibus and herbal teas.  But this surprised me.



Speaking of tea, I've always found this story interesting about how tea came to be.  The Bodhidharma was meditating soon after arriving in China for 9 years.  At some point during this time, he dozed off for just a second.  He was so frustrated at having broken his concentration that he cut off his eyelids so that he'd never be distracted again by sleep.  Guan Yin (Buddhist bodhisattva of compassion) caused the eyelids to grow into tea plants, used by Buddhist practitioners to this day to prevent sleep from interrupting their meditations.  The Japanese character for tea leaf is the same as that for eyelid.