I’m super excited to have just pre-ordered a Thing-o-Matic from MakerBot Industries. It’s a fully automatic 3D printer (aka CNC rapid prototyper) that can also be outfitted with different material nosels (aka extruders) to draw in 2D, print designs for circuit board, and even dispense frosting and peanut butter. (Not joking.) Here’s a great example of what you can do with it. (Skip to 3:00 for the cool stuff.)
Here’s another video of the machine printing parts for copies of RepRap Mendel, another F/OSS CNC RP machine design:
This is a new model that won’t ship won’t ship until November 2010, unfortunately, but I’m sure it’ll take a while to get some cool designs done, anyway. The idea here is that if anyone else would like their own desktop 3D printer (RepRap, CupCake, Thing-o-Matic or other F/OSS design), you’ll be able to print about 50% of the parts for it on this original “parent” machine and order your own electronics and other assembly hardware online. Â đ
I’ve spent half the day so far inbeded in the furious stressful upgrade process of a handful of Ubuntu Linux 10.04 and Mac OS X Snow Leopard systems from Ruby 1.9.1 to Ruby 1.9.2. I haven’t even gotten to the Rails 3.0.0 stuff yet: just the baseline Ruby installation. I’ve gone through the upgrade process on both types of systems so far and the base issues have been the same. Here’s a common issue that many people are running into:
preston$ gem1.9
/opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories’: undefined method `path’ for Gem:Module (NoMethodError)
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:883:in `source_index’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in `init_gemspecs’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in `initialize’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:841:in `new’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:841:in `block in searcher’
from <internal:prelude>:10:in `synchronize’
<…and so on…>
Assuming you’re upgrading from a previous Ruby installation, note that the “site_ruby” directories are no longer used, and will eff up your 1.9.2 installation if you fail to delete them after the install. On OS X, run:
sudo rm -rf /opt/local/lib/ruby1.9/site_ruby/
On Ubuntu Linux 10.04, run:
rm -rf /usr/local/lib/ruby/site_ruby/
…to correct this issue. All note that you may see errors such as this:
root@li92-132:~# rake –version
/usr/local/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path’: can’t find executable rake for rake-0.8.7 (Gem::Exception)
from /usr/local/bin/rake:19:in `<main>’
…despite have a rake gem installed. Apparently 1.9.2 comes with a version of rake internally, but is unable to find it for some reason relating to the rake.gemspec file. Remove the file to fix this issue. On Ubuntu Linux 10.04, run:
Notice the “1.9.1” path of the PATH. Yeah.. it’s weird. But for compatibility reasons your 1.9.2 installation will continue to use a path with 1.9.1. To quote the Ruby 1.9.2 FAQ page:
The standard library is installed in /usr/local/lib/ruby/1.9.1
This version number is “library compatibility version”. Ruby 1.9.2 is mostly compatible with the 1.9.1, so its library is installed in the directory.
I’m sure there’s a wonderful technical reason for this, but it’s still misleading and confusing as hell. I ended up manually deleting a bunch of stuff I shouldn’t have because I thought I was innocently “cleaning up” after the old version. Whatever. Additional suggestions:
Just to keep things clean, you may also want to remove your old Ruby 1.8.x builds. (I recommend doing so unless you have older apps that haven’t moved to 1.9.x yet.)
Phusion Passenger seems to work fine on Ubuntu 10.04 with the latest version of Apache 2 as of this writing, though don’t forget to recompile, reinstall, reconfigure and restart apache2 when you do so.
Check if you still need rack v1.0.1 installed (for older Rails app) before nuking everything. đ
Kindle 2 with M-Edge Leather Platform Jacket and optional e-Luminator 2 book light.
I just wanted to shout out a quick “thanks” to the thousands of Kindle fans that have used the Kindle Tools website to find the PIDs for their Kindle devices. I’m aware that the site doesn’t fully support all models and variations of Kindle hardware devices and software applications, but I am supporting the site and hope to do so one day. The public-facing portion of the site is super easy to use and I never expected it to generate the traffic that it does, especially considering it’s a “one-time use” kind of tool. It’s very encourage to periodically receive a package in the mail gifted by a grateful Kindle Tools user off my wishlist. I generally don’t reply but do get these tokens of apprecation and your support is VERY much appreciated.
Let’s all continue to support the Kindle community and Amazon.com, while simultaneously insisting on open standards, free data interchange, and the non-proprietary future of our data in the ebook domain. The last thing we want is non-interoperable ebooks, so make your voice heard!
Over the past year I’ve put out a few working demos of how to develop full 3D, OpenGL-based OSX applications using Ruby. Most of the comments I’ve received have been positive, but I think the high learning overhead has been the prime limiting factor in addoption. I also decided to focus exclusively on Mac OS X, further limiting the potential audience.
I’m pleasing to learn that Martin “monkstone” Prout has successfully run the code contained within my Starfield.app–basically a folder of code on a OS X system that looks and behaves like an .exe does Windows–on a Kubuntu Linux system. I haven’t personally tried to replicate this myself due to a lack of time, but you can read how monkstone did it on his blog.
It’s the first day of class at the ASU Polytechnic campus in the East Phoenix valley, and I’m illegally parked without a permit. Some fun facts for you:
A single-course, single-semester adjunct position for the 2010 year pays approximately $6K, before taxes. (Thus, around $12K pre-tax for the academic year.)
An annual faculty and staff “Red Lot” pass costs $480 out of pocket. Everyone allegedly pays for these out of pocket either up front or automatic payroll deduction, though I know this to be false in some cases. These passes are “…[a]vailable only to faculty and staff. Some covered spaces available in red lots on a first-come, first-served basis.”
Ergo, a part-time adjunct (such as myself) can expect to pay around 4% of their contract value just on the parking space.
Each of these devices is especially good at performing certain types of tasks, to the point that it also feels silly to not use the tool best suited to the job.  To a computer scientist all four of these are technically Turing machines–more commonly known as “computers”–but each has its own practical strength and weaknesses. And while carrying a single device solely by itself one becomes incredibly mobile, taking all four is not. I’m like a sleep-deprived mother of quadruplets sluggishly pushing a custom designed stroller through the grocery store. The monstrousity of brushed metal widgets, cables and wall warts I’m toting reminds me of that fictional car designed by Homer Simpson.
But such are the pro and cons of appliance computing. Not all of these hardware devices are technically needed on this particular Wednesday, but the combination of specialized functions provided by the union allows me a more productive day. I could have left at least one at home, provided that I had a reasonable amount of interoperability between them to shuffle data.
…
Stop. Oh god. I saw this coming the second Amazon announced they would use their own locked-down format (.azw/.mobi) for eBooks purchased through their store. (Aside: If you’re interested in Kindle encryption you may eventually find yourself at my KindleTools site for finding PIDs.) My biggest of fear with regards to the emerging ebook market is now in full swing. Not only are there subtle, often incompatible (and proprietary) differences in ebook data between reading application software, but most of the time I can’t even legally attempt it. It’s like Microsoft Office vs. Word Perfect vs Lotus Notes vs The People of Earth all over again.
Each content retailer is trying to be the de facto digital ebook data locker for the entire market, and the folks at the top of the food chain–most notably Amazon–have no business interest in supporting standardized (or at least conventionalized) data interchange with less popular consumer applications and devices. But why would they? If they can provide the content and the software and the hardware with a majority of the market, why not do everything possible to lock consumers into the monopoly? Here’s a painstakingly detailed scientific visualization of the current eBook market:
Amazon's view of the eBook market.
Let me make this clear: I am no stranger to paying for books. I read a LOT, and especially over the past year it hasn’t been unheard of for me to spend well over hundred dollars per month on eBook content alone, which I do for many reasons. Here’s the 8th-grade equation demostrating how I can scientifically demonstrate the value of this technology in my life:
Knowledge Gained (in the fictional unit of “knols“, K) x Ease of Future Reference (in the subjective economic unit of utils) / Content Cost (in dollars, $) x Total Consumption Time (in hours, 3600 x s)
This new unit of electronic book value that I’ll refer to as a Vebu–short for “value of ebookS unit”–reduces to this:
Vebu == knol utils per 3600 dollar seconds == uK/3600$s
In other words, we need to maximize the availability of meaningful information (knol utils) at a minimum of money and time (dollars hours) to achieve maximum value for our electronic virtual book libary, Vebu. A simple, unsophisticated yet meaningful quantity.
But here’s how this effed up market effects Vebu:
I have no less than 7 different, largely incompatible pieces of eBook reader software on iPad alone, as of today. Kindle, iBooks, Borders, B&N, Stanza, Free Books and Wattpad. (Effect: lower u, lowering Vebu.)
Borders, Barnes & Noble and the other brick-and-mortar vendors are freaking out, scaring they’ll become the next Blockbuster of the Netflix era. Each has their own application that works primarily with their own store, but not much else, forcing you to use their reader. Not all software is availble on all platforms, though, sometimes making lookups a major pain, and different retails of course carry different publishers, so it’s easy to unwittingly get sucked into all of them. (Effect: lower u and higher s, significantly lowering Vebu.)
None of the distributor reader apps are keen on “sharing” your content with friends/colleagues, forcing others to re-purchase content you should have been able to at least “lend” to them in the freakin’ first place. (Effect: higher $, lowering Vebu.)
O’Reilly, PragProg and other publishers don’t think the major distributors should be necessary, and some are leading the charge buy allowing you to directly purchase digital editions in a variety of formats. This is fine–I have no major qualms about this–but since most readers applications are trying to push you to the store of the vendor that wrote the apps, importing data can be a headache. (Effect: higher s, lowering Vebu.)
Amazon, already having a huge content delivery infrastructure, offers propriety features such as cross-device synchronization of bookmarks and highlights that isn’t as good in others. The Kindle hardware will also read to you in the car, but they only sync with Amazon services; Apple’s iBooks/iTunes is better with PDFs but doesn’t have text-to-speach; Stanza aggregates many different content sources but isn’t as great with commercial stuff… everything has distinct pros and cons. They’re all different and I have to use all of them because they can’t/won’t talk to each other and I can never remember which damn content locker to which I committed my stuff. (Effect: lower u, higher s, significantly lowering Vebu.)
The problem grows exponentially greater as more retailers, publishers, application developers, and independent authors enter the market, intentionally building walls that consumers have no interest in observing.
Here’s what needs to happen.
If you’re Amazon, Borders, B&N, or really any retailer that is gung-ho about becoming the provider of individual data lockers, that’s fine, but you need to give us the key. It’s understandable that you’re reluctant to open up your formats in a way that could be consumed in ways you can’t control, but consider this: if you never figure out how to allow publisher content to cross application and retailer boundaries, you are effictively capping Vebu to artifically low levels. If you instead focus on optimizing all the variables instead of restraining them, you’ll have a platform unmatched even by Amazon. I, for one, would switch to it in a heartbeat.
Avdi Grimm has a recent post noting the use of “and” and “or” Ruby keywords as essentially control flow operators, and hinting on their Perl origins. This instantly recalled several mental notes of old Perl programs, so I though I’d put out a few quick notes on the Perl equivalents for Ruby programmers not versed in Perl 5.
Perl Semantics
Perl actually borrows the precedence rules of “&&” and “||” from C, though I’m not entirely convinced the Perl and Ruby semantics of “and” and “or” are identical. We have to remember that Larry Wall is a linguist, and that some of Perl’s idiosyncrasies are due more to human considerations than machine. Programming Perl has several pages of great content on “and” and “or”. For example, here’s an excerpt from the circa 2000 version of Programming Perl:
But you can’t just up and replace instances of || with or. Suppose you change this:
$xyz = $x || $y || $z;
to this:
$xyz = $x or $y or $z; # WRONG
That wouldn’t do the same thing at all! The precedence of the assignment is higher than “or” but lower than ||, so it would always assign $x to $xyz, and then do the ors. To get the same effect as ||, you’d have to write:
$xyz = ($x or $y or $z);
The moral of the story is that you must still learn precedence (or use parentheses) no matter which variety of logical operator you use.
What Avdi says about precedence and control flow seems correct, though the reasons for it–in Perl at least–is to differentiate between two subtly distinct human linguistic semantics. For example, consider the following two English statements.
I’m either traveling by car or just staying home.
I’m either traveling by car or by train.
At first glance the semantics seem identical, but on closer inspection they are completely different. Let’s look at each.
I’m either traveling by car or just staying home.
In Perl, this is the equivalent of:
$traveling_by_car = can_use_car($me) or stay_home($me);
The semantics of or is to describe consequence (aka control flow) in a specific order. Either I’m traveling_by_car(), or else screw the whole thing and I’ll just stay_home() instead, in which case it makes little difference what the value of $traveling_by_car is. In other words, the semantics of the assignment trump that of the consequence, and should the consequence occur (which in this case probably has side effects), the assignment probably doesn’t matter. This is why Perl users often use or in the following context instead of ||:
open FOO, $file or die “a horrible death: $!”;
@lines = <FOO> or die “$file is empty?”;
I’m either traveling by car or by train.
In English, this is a misleading statement of truth for several reasons.
What we mean is that one of the two options is true, but one and only one. As programmers we know this better as an xor statement–A is true if and only if B is false, and vice versa–but since there is no colloquial English equivalent of xor, we instinctively infer the meaning from the speakers misstatement.
As programmers we tend to look at || as a short-circuit operator evaluated left to right. But this English statement defines no explicit evaluation order. This could have been written “I’m either traveling by train or by car” (notice “car” and “train” are reversed), but it means the same thing. In other words, we are evaluating the arguments for truth, not consequence. Thus, order should not affect truth.
Closing Thoughts
In most real-world Ruby contexts these operators will work interchangeably so long as precedence order is considered. But even so, keep in mind that mixing the two styles in different contexts is not necessarily a sign of inconsistency. Using the appropriate operator may actually be a sign of maturity: a way of communicating slightly different semantics in an otherwise logically equivalent context.
If you’re a registered Libertarian in Arizona you may have noticed that, in most districts, you don’t have many candidate options. In my district, the only real choice was for state governor. You can quickly make that decision in about 45 minutes by reviewing the following material.
All have variances in opinion and political approach. If you’re voting on the candidate most likely able to compete against the democratic and republican candidates I’d recommend either Barry Hess, who tends to come across as a somewhat robotic career politician, or Bruce Olsen, who is less charismatic but is definitely decent with words and speaking on camera. Hess is the more politically experienced of the two… but again, the robot thing.
If you’re voting primarily on core principles, note that Alvin Ray Yount seems to be playing up the God/Christian card fairly heavily, based on his website and opening remarks on the PBS debate. Whether this is bad/good is of course a matter of perspective. đ Â Personally I find it odd for a Libertarian candidate to be pushing this, and it has pissed me off to the point of dismissing him as a candidate. Cavanaugh… well, to be honest, doesn’t seem to be firmly on top of things in terms of both his knowledge and campaigning ability. So that only left Barry Hess and Bruce Olsen.
My biggest deciding factor for picking the next Arizona Governor is approach on fiscal solvency, most notably in balancing the state budget. (Both have various details worth reviewing on their respective websites.)Â Their approaches to border security are also considerably different. Olsen wants to build a fence; Hess is more interested in tech-based borders.
Arizona Voters: A .pdf (70MB) version of the giant tree-wasting booklet published by the Citizens Clean Election Commission that you may have received in the mail–the one with little blurbs/statements on all the candidates–can be found here. Other currently relevant publications from the AZ CCDC can be found here.
Interesting tidbits on Seoul for United States travelers:
The food is generally awesome, though the beef sucks and is more expensive. If you decide to try American-style fast food, expect variations customized to the locale. (For example, the McDonalds I tried had “Bulgogi Burgers” as the #1 combo item. Interesting to try, but still McDonalds.) If you eat a lot of wheats and grains, expect to switch over to many more rice-based foods such as rice noodles, pastries, and plain old rice. Seriously … that’s just the culture and you’d be wise to just deal with it.
With a few excepts–most notably watermelon–fruits are generally not served often. Many native and healthy vegetables are frequently served cold with most meals, generally covered with regional spices. The kimchi (êčìč) is generally excellent, as you’d probably suspect. If you haven’t ever had it… well, you’ll have plenty. đ It’s a huge cultural staple in Korea.
If you look white, people will generally do their best to speak English to you, if they can. If you look Korean, they’ll almost always speak Korean. The general rule of thumb is that the more a type of job makes, the more likely it is that the person will speak English. In other words, don’t expect English skills from store clerks and restaurant staff. For those people looking Japanese or Chinese I couldn’t discern any obvious prejudacies, though I’m very “white” looking and don’t speak the language so I could easily be missing obvious cues.
The subway system in Seoul is huge (as is Seoul itself with over 10 million people), and is akin to the systems in San Francisco, Chicago and New York. Most subway signs and ticketing machines have English, though announcements in Korean can be a little difficult to discern for native English speakers. I would advise at least learning the basics of the Korean alphabet (Hangul) and pronunciation rules so you at least sound out words only written in Korean, albeit extremely slowly and with a horrible accent.
WiFi connectivity in disappointingly similar to U.S. cities. That is, in urban areas it’s generally within range but paid hourly/daily (such as in hotels, Starbucks, coffee houses etc.), or if you’re lucky you’ll infrequently find a decent free open access point. It’s pretty much non-existent in rural areas.
Most sink faucet handle operate the reverse of U.S. handles to operate water flow. (In the U.S. you pull up or “lift” the handle to turn on the water, here you push down.)
Almost all places seem to have toilets available (as opposed to just squating over some sort of hole), so I wouldn’t worry about that. All respectable establishments seem to have toilets. Some have bidets.
For various cultural reasons, Koreans tend to be very clean, especially when it comes to floors. Remember to take your shoes off before entering peoples homes. Some restaurants will require you to do the same, particularly those here you sit on the floor, which makes sense.