Openly certifying your Rubies

Posted by s.f. on June 14, 2011

If you’re using the MacPorts version of OpenSSL, and have a Ruby installed either by MacPorts or RVM, you’ve probably clashed with the dreaded “SSLv3 read server certificate B: certificate verify failed” message
(Or you’ve forced the verification check off, which is not a good idea )

Quick fix:

port install curl curl-ca-bundle

ln -s /opt/local/share/curl/curl-ca-bundle.crt /opt/local/etc/openssl/cert.pem

(using sudo as needed)

Continue reading…

No, We Really Mean “Vendor It”

Posted by s.f. on June 13, 2011

(Originally posted on tumblr)

Now that we have both RVM and Bundler, you’re following the advice in this article and keeping all your gems in source control, right?

No? Why not? “I have a custom fork that I don’t want to put on a public server”? Pfshaw!

1. Put a ‘:git’ option in your Gemfile pointing to your local repo:

gem ‘my_custom_gem’, ’1.0.0′, :git=>’file://path/to/your/repo’

2. Follow the steps in the article:

bundle install –path vendor’

bundler package

Make sure the gem file for your custom gem is in vendor/cache.

3. Remove the :git flag in your Gemfile

gem ‘my_custom_gem’, ’1.0.0′

4. Run

bundle install –path vendor

again to remove the git references from Gemfile.lock.

5. Check in vendor/cache/*, Gemfile, Gemfile.lock, and .bundle/config to source control.

There now, that wasn’t so hard. And now you don’t have to worry about losing the original git repo, or reinstalling the custom gem on every deploy.

Wax eloquently, wistfully

Posted by s.f. on April 20, 2011

On April 17th, 2011, Tom Music passed away.

Continue reading…

For the last time, wheel-stop

Posted by s.f. on April 13, 2011

Fifty years ago, one man became the first to fly into space.

Five weeks ago, I watched Space Shuttle Discovery’s final launch with a group of dear friends.

And one month ago, Discovery made its final touchdown at Kennedy Space Center.

Continue reading…

I have been in a Strange Loop 1

Posted by s.f. on October 29, 2010

About three months ago while browsing Proggit, I came across a thread titled simply “This is an awesome conference”. Idly browsing the speaker list, I stopped dead at the first two.

I still haven’t gotten around to working through SICP, but I’ve wanted to hear Guy Steele talk ever since reading “Growing a Language”. The sheer amount and variety of the other speakers and subjects gave me pause–most software conferences that I knew of were either heavily buzzword-based(JavaOne), expensive(RailsConf), or both(again, JavaOne). Hitting up my boss for support was comically easy after showing him the registration fee and location.

Continue reading…

peg-trees and you

Posted by s.f. on June 11, 2009

Recently at work, I needed to parse ugly data files from an ancient classified-ads database that a predecessor devoted an entire Ruby application to. While painstakingly building regexes, I remembered looking at Treetop a few months ago.

Treetop is a Ruby library for writing Parsing expression grammars. PEGs are another way of constructing grammars and could be thought of as super-regexes: they don’t allow left-lookup or ambiguity in the parse tree, making them not so useful for natural language but killer for computer languages. Around 40 lines of code and 7 rules took the place of what the original author devoted dedicated tempfiles and regex arrow code to.

That being said, PEGs are conceptually harder to get grips on, and Treetop’s documentation is not entirely clear on some hangups you might find. Most of which you can solve using the excellent mailing list, but I know I wished during the past few days that I could get it summed up for me.
Continue reading…

live a live (a-go-go)

Posted by s.f. on May 17, 2009

I’m flattered that the previous article has been showing up in a few blogs and forums. Interestingly, it’s being used as an insight for newbies into VO:OT’s movement schema, and in one case an entertaining dismissal of the non-explanatory bits as “hardcore religious twinstick nonsense” :D

I’m still planning on adapting my Saturn sticks, as an opportunity to improve my hardware-hacking skills by building a Universal PCB adapter. Progress and pics on this to follow as things are developed.

As can be seen in the sidebar, I’ve acquired both an Xbox 360 and a Live account, and have been well pleased by the VO:OT 5.66 port. While using the 360 pad has crippled my quick-step reflexes(for now), it’s forced me to use more long-range characters that I haven’t made a habit of playing. This in turn has exposed some longstanding bad habits in my play style: repeated side-to-forward Watari dashing and constant rushdown attempts. It helps that there’s a lot of good Japanese players hanging around, and willing to school you without trash-talking or ragequitting.

So in spite of my noting of VOOT’s design dependency on sticks, don’t let that stop you from joining in! If you’ve ever played any Virtual On game and come away pleased, or if you’re looking for a grueling-yet-rewarding learning curve, this is an excellent time to start. The VO community is breathing again and it’s always a good day to SELECT YOUR VIRTUAROID and GET READY.

Two Sticks of Fury 7

Posted by s.f. on March 13, 2009

The upcoming re-release of Cyber Troopers: Virtual On Oratorio Tangram(lovingly abbreviated as “VOOT”) has begun a revitalizing of a long-dormant community.
However, the unique control system for Oratorio Tangram(or OraTan for the short-short abbreviation) may not be ported over and I wanted to explain exactly how two digital sticks are the very heart and soul of Virtual On.
Continue reading…

reeses or tabasco?

Posted by s.f. on December 29, 2008

Everybody’s talking about it. Couple of days in jail, whole town changes, etc.

There are two camps over this currently: the Rails side(“Whoo! Chocolate in my peanut-butter! Less magic and plugins that don’t explode randomly between versions!”), and the Merb side(“DHH is going to defenestrate us all! They won’t taste great! These books from the tech section are out-of-date six months earlier than usual!”

I’m mostly in the Rails camp(due to work), with a little of the Merb camp. It would be nice to keep them existing as separate frameworks, if only because of the other elephant in the room: the Rails-branding(read: money) and need to provide splashdown points for decamping Java webapp programmers. However, the Merb team seems to think this won’t be an issue, so I’ll reserve judgment for when the behemoth finally appears.

In any case, the fact that DHH and the Rails team are willing to adopt formal APIs, clearly define module boundaries, and leave monkey-patching behind is a welcome sign.

a huge beanie is approaching fast 1

Posted by s.f. on November 25, 2008

In Rails, one form helper(well, besides a broken date_select) stands alone as cruel, sadistic, and impossible-to-please with just a simple hash. That form helper’s name: option_groups_from_collection_for_select.

It’s so painful that most people would re-implement it, rather than fall victim to its NoMethodError wails. But that’s not the path for us. When you’re using something like Base Without Table to clean up your email contact forms, you don’t have time to mess around with o_g_f_c_f_s’ hunger for has_many. That’s when you pull out OpenStruct, and cleave the beast in twain.
Continue reading…