-
February 28th, 2008
Sam Ruby on the trials of getting Ape to run from SVN:
If you do manage to check the file out, you see a Rakefile. This would imply that one might want to use rake. Trying it results in a message “You are missing a dependency required for meta-operations on this gem. No such file to load — echoe”
Unfortunately that’s the case with too many Ruby projects.
When you gem install, you get all the necessary runtime dependencies; svn checkout doesn’t have quite the same effect. And starting with the gem before diving head into source doesn’t always work: runtime and build dependencies are not the same.
What wrong with a few undocumented, tedious, manual steps? As the corollary to Blodgett’s First Law says:
Any step in a process that could be automated must be automated.
We ran into the same problem in Buildr, as luck would have it, fixed it today. Victor Hugo Borja came up with the code snippet below that works on both RubyGems 0.9.5 and 1.1.0.
Now all you have to do is svn checkout, followed by rake setup and you’re good to go.
desc "If you're building from source, run this task first to setup the necessary dependencies."
task 'setup' do
gems = Gem::SourceIndex.from_installed_gems
# Runtime dependencies from the Gem's spec.
dependencies = spec.dependencies
# Add build-time dependencies, like this:
dependencies << Gem::Dependency.new('highline', '~>1.4')
dependencies.each do |dep|
if gems.search(dep.name, dep.version_requirements).empty?
puts "Installing dependency: #{dep}"
begin
require 'rubygems/dependency_installer'
Gem::DependencyInstaller.new(dep.name, dep.version_requirements).install
rescue LoadError # < rubygems 1.0.1
require 'rubygems/remote_installer'
Gem::RemoteInstaller.new.install(dep.name, dep.version_requirements)
end
end
end
end
Most likely your Rakefile will not load at all without some of these dependencies, so code defensively:
begin
require 'highline'
rescue LoadError
puts 'HighLine required, please run rake setup first'
end
Check for build dependencies early and often, fix Rakefile when necessary, your community will thank you.
Posted by Assaf
Filed in general, ruby
-
February 26th, 2008

Social source. Tired of Facebook? Try some social source control network for a change. GitHub in this case, and I’ll let Ryan Tomayko explain.
Social tables. Hat Factory and Citizen Space in a NYT article about co-working. (Nagistration required, but I’m making an exception)
Guilty as charged. Taking 1/3 the blame for Engtech’s I Can Has Ruby tumblr. The other 2/3 goes to Reg and Giles, good company to be in. Also, for my dumbed-down undo plugin that motivated Pascal to create a more sophisticated rails-undo-redo. Also echoing Pascal, now that RubyGems is packaged with JRuby and 1.9, will we start seeing more Gems and less plugins?
Service Oriented Agility. Sometimes, technology is not about what you do, but how you do things. InfoWorld reports that SOA spend up despite unclear benefits, one reason:
Findley noted that the projects don’t happen faster because of code reuse. Instead, it is the changed mindset that SOA brings to development and management of technology as a whole that provides the real benefit, Findley said.
SOA adopters do typically see that improved agility, regardless of what led them to SOA, Findley said: “Very few decide it’s not worth it.”
I’d buy that.
You had to ask? Turns out, when looking at the entire body of collective research, antidepressants are no more effective than placebos. Seriously. I’m thinking, lots of money and people’s time wasted running clinical trials, when all you have to do is ask. If antidepressants made people happy, they would be the ultimate party drugs.
Picture, test or else (via Jim Weirich)
Posted by Assaf
Filed in general
-
February 26th, 2008

The young may scoff, but I remember back in the days, decades before Optimus Maximus, when we had to carry ten keyboards with our non-portables, one keyboard for each application we used. Uphill. Both ways. Snow. Yes, you’ve got it easy, and you don’t even know how much!
Above, a polariod of The Original Digg Keyboard.
(Via, the Emacs keymap rant)
Posted by Assaf
Filed in general
-
February 21st, 2008

HTML 4.5. Rob Sayre compiled a list of things that don’t belong in HTML5, in the name of getting it finished this decade. I don’t think HTML 5 will be much interesting without some of these items, but IrDA support is definitely not a feature that should hold back the spec. Anyone using it?Favorite part, though, is Rob’s blog tagline:
“Firefox” is an application which was downloaded from the Internet. Are you sure you want to open it?
Code worthy. Couple of code-laden posts worth sharing. Dominiek ter Heide on building a TwitterBot using XMPP4R, and manitoba98’s Rails messaging tutorial.
Reverse engineered. Using Ruby2Ruby to figure out what your code really does, after all the meta-programming took its toll.
Not so secret after all. How to circumvent disk encryption.
Defining moment. Things to do today: get to know yourself better reading Stuff White People Like. For example, did you know (#71) that ….
In most situations, white people are very comforted by seeing their own kind. However, when they are eating at a new ethnic restaurant or traveling to a foreign nation, nothing spoils their fun more than seeing another white person.
(Via Giles)
Above, poor screenshot quality but the message is clear. Makes me like crash-prone Beta 3 even more.
Posted by Assaf
Filed in general
-
February 20th, 2008

Test on Windows, run on Linux. These and more interesting discoveries, in Alfresco’s Open Source Barometer:
“Users evaluate on a Windows laptop and deploy on Linux” – 41% of evaluations were on Windows, dropping to 26% for deployments, whereas 51% of deployments were on Linux.
“Open Source creates a clear leader at each level in the stack.” – Red Hat Enterprise Linux (RHEL), MySQL, JBoss, Tomcat.
Sex appeal. Although nothing comes close to actually using one, Wil Shipley’s review of the MacBook Air is the place to start:
When it gets hot, it starts venting out the bottom-back. … Throwing off your comforter and getting nakeder with your Air is the only solution at this point, and also, it feels… so deliciously wrong.
Untangled. Roy Fielding’s blogs.
Blue it is. The porn industry has cast its vote, war over, but it still is a damn good DVD player.
When memory is not enough. Memcache to disk with memcachedb.
Picture, because sometimes Eclipse doesn’t cut it.
Posted by Assaf
Filed in general
-
February 17th, 2008
Cover your eyes, you’re about to see some blatant XML abuse. With your eyes closed, create the file /Library/LaunchDaemons/ruby.gem.server.plist and place this into the file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>ruby.gem.server</string>
<key>ProgramArguments</key><array><string>/usr/bin/gem</string><string>server</string></array>
<key>KeepAlive</key><true/>
<key>RunAtLoad</key><true/>
</dict>
</plist>
Save and open your eyes. From the command line, change ownership on the file, and load to launchd:
$ chown root:wheel /Library/LaunchDaemons/ruby.gem.server.plist
$ launchctl
launchd% load /Library/LaunchDaemons/ruby.gem.server.plist
launchd% exit
Open your browser to http://localhost:8808/. Bask in the glory.
Update: Or you can just use Lingon which reduces all of this to a few clicks, no need for XML or chown heroics (thanks Matt).
Posted by Assaf
Filed in general, ruby
-
February 12th, 2008

(R)Spec. Looks like RSpec is becoming the reference implementation for modern test frameworks. Besides the copious Ruby clones, and the various language ports (from Scala to FORTRAN), it’s also used with blatant disregard for language boundaries. Here’s RSpec for C/C++.
Firefox 3. Absolutely. Brilliant. There are some improvements to the UI, nothing big if you’re counting features, but having used it for a while, feels like a significant upgrade. Native UI integration is sweet. It’s fast, fast, fast, and doesn’t slow down for all my open tabs. Most extensions don’t work yet and it crashes once a day, but it’s still beta. Can’t wait for the final release.
CouchDB goes Apache. Vote just passed.
Overheard on Twitter. Via Mathew Ingram:
@spdemac: If MS and Yahoo merge, their search will be know as “Microwho?”. Small, forgettable and unused.
Reverse eval. The opposite of eval, parsing code back to source, is an interesting idea with few practical applications. But if you build it, they will come. Check out how Assert 2.0 does away with assert_* overload.
Picture above, Precisely What the Author Had in Mind. If you’re into typography, check out the rest of H&FJ.
Posted by Assaf
Filed in general
-
February 5th, 2008
- Don’t call it SSD. It’s NinjaDisk! That thing is deadly quiet, smooth as silk, and can go about its business while hanging upside down or flipping in the air. Just brilliant. Also overpriced as hell for a measly 55gb (real capacity).
- Works nicely with the Franklin CDU680 (review pending), in fact the cramped USB port forces the card to hang out at the perfect angle.
- First notebook that feels like … well, a notebook. Even the svelte SZ carbon, the previous 13″ lightweight around here, feels like a coffee table book in comparison.
- About the battery life … someone with a strong reality distortion field decided it’s good for five hours. Yeah, right. And the new Migration Assistant and RemoteDisk install were obviously sourced from Redmond … even repeated reboots won’t convince them to work.
- A moment of appreciation:
cd buildr
rake spec
Vaio SZ360, 2ghz Core Due 2, 5400rpm, Fedora: 140sec
Air 1st Gen, 1.8ghz Core Due 2, SSD, Leopard: 140sec
- Beryl still better then Leopard, Leopard still slicker than Linux, MacPorts a poor man’s apt-get, but iTerm and Vim.app kick ass.
- MagSafe. Ginormous trackpad. Aluminum construction. Ambient sensitive lighting. Leather seats not included.
- No blue screen of death! It’s grey and it actually looks like a scary Halloween mask. Three times on day 1.
- Finally, a usable machine that doesn’t come with a cup holder!
Posted by Assaf
Filed in general
-
February 2nd, 2008

Pinning commentary by Dion Almaer.
Posted by Assaf
Filed in general
|
|