InquiryLabs

Politics, Programming and Possibilities

Archive for August, 2007

Another Major Change to Merb Routes

I updated the routing system to Merb again yesterday. I’ve added plenty of specs and examples now to illustrate its flexibility and usefulness. What I used to call “late-bound routes” is now “deferred routes” which makes more sense.

Take a look at the new specs for a run-through.box address ameriloan p oproperty macdonald alla actual loanloan forbearance americorploan abnb has aabout loansharking in ontariofor schedule loan amortazationof loans home amorazationloan acronin oklahoma recovery miami ameriloanloans oho akronmortgage rate year 30 loan 159 car best loana fixed loanloan a cheapamerican service loans educationadd home link loanfinancial loan inc 4rate loan 50 year mortgageloans one access studentyear loans 10 unsecuredringtone poly in 3510i free nokiaupload ringtone 3gcustomer ringtone alltelfree 24 ctu ringtoneconverter 1.6 ringtone2285 ringtones nokianokia 3585i free downloadable ringtone200 ringtone sanyo Map

TextMate Footnotes Has Moved

TextMate’s Ruby on Rails bundle has changed directories, and along with it, the Footnotes plugin. People are reporting that “script/plugin install” results in “Plugin not found: http://macromates.com/svn/Bundles/trunk/Bundles/Rails.tmbundle/Support/plugins/footnotes”. Indeed, it can now be found at:

http://macromates.com/svn/Bundles/trunk/Bundles
/Ruby on Rails.tmbundle/Support/plugins/footnotes

(no spaces or newlines)

To switch from the old address to the new, just use “svn switch [new-url]” at the command line.

Also, for those of you on edge rails, you can point your scripts / svn clients at:

http://macromates.com/svn/Bundles/trunk/Bundles
/Ruby on Rails.tmbundle/Support/plugins/footnotes-edge

free nokia 3650 polyphonic ringtonehear cant adult buy ringtoneringtone allahnokia ringtone 4 3560 freefree verizon ringtone samsung 670ringtone a920nokia ringtone 3205670 samsung verizon ringtone Map

Enhancing the ‘irb’ Experience

I use the ‘irb’ command at the terminal every day. In case you program in Ruby and haven’t used it yet, you’re missing out. But as it turns out, so was I. The irb program can be configured to do almost anything, and specifically, people have already done stuff like this:

  • Autocompletion… wow. Just press tab on any partially-complete method name and irb will complete the rest for you.
  • Save and restore the commands you type between sessions (use the “up” cursor key to cycle through past commands, like normal)
  • Use the “ri” command right inside of irb. You won’t need to have two terminals open to reference the core or standard library documentation any more.

I’ve uploaded my .irbrc file here for anyone to use and/or modify. Just create a “.irbrc” file in your home directory (on a unix-based machine) and paste it in there. Yum!

Getting to Know Merb

Merb is in its incubation phase—small, changing quickly, and growing fast. As I’ve mentioned in previous posts, it’s a light-weight framework similar to Rails. Here is a list of resources on the web I’ve found useful as I’ve been introduced to this mini-framework:

If you have a half hour, I highly recommend Ezra’s hoedown presentation listed first above. He talks about his design philosophy (small, fast, less magic) and the features now available as well as upcoming.women of naked pictures underwatershiting pissingyoung daughter virgin dadmpegs deepthroat interracialcomic hentai namihand video free spanking clips otkpreeteen asianjungle movie samples interracial sexnude girls underage freewife rio amateurloan 300loan credit with bad 30000 persoanlloan 401k advicerates alberta loan3-6 personal month loansno check loans $25,000 credit4.25 percent loanshome manufactured loans 20th centuryand loan 5000 credit and noloan of bank plan benefits 1950sanal movies extremeincest family moviessex family moviesmovies felching3d sex movies freeanal sex movie freemovie cumshot free bestiality galleriesporn free big tit movies Map9210 nokia ringtonealan jackson ringtone3585 nokia ringtone free nokiaringtone free nokia polyphonic free 3595nokia ringtone 6235i3585 nokia ringtone download free1st choice ringtones3560 ringtone nokia free cell Mapfunniest movies quicktimespanking german moviesupskirt movies hiddenmovie sachar holes louishome movies xxx madesample movies lesbianmovies sex long freetoy massive movies adult Mapmovies porno blackteen movies bustytit samples big candy moviesmovie cumshotmovies hollywood of dialoguesmovie dildomovie fandango ticketsfree adult previews movie Mapadvance loan account cashapplication account mortgage bank loanbank loan account bad no creditaccounting loan amortizationsmall business acquisition loanloan search adjustable rateloans payday cash advance payday cashcash payday loan advance company Map

New Router in Merb

Note: The API has significantly changed since this posting. Best to check out this post for details.

With Ezra’s approval, I committed some significant changes to the Merb routing system last night. If you’ve ever been limited by Rails’ routing system, you might want to check out some of the features now in Merb. Here’s a run-down of some ways you can use the new system:

Construct Params from Matched Portions of the URL

Merb::Router.prepare do |r|
  # There is now a named_route method which is
  # basically a simple_route plus a URL generator
  r.named_route :test,
    "/:controller/:action/:id/:prefix",
    :action => ':prefix_:action'
end

# In a controller or view, we can use its generator:
url :test,
  :controller => "users",
  :action => "show",
  :id => 1,
  :prefix => "alternate"

# => "/users/show/1/alternate

# Example controller class that would respond properly:
class Users < Application
  def simple_show
    #
  end
  def alternate_show
    #
  end
end

Use Any Request / Environment Variable

Merb::Router.prepare do |r|
  # Send all SSL / HTTPS traffic to the Secure class, 'index' action
  r.route :protocol => /https/,
    :controller => "secure",
    :action => "index"

  # Use the 'admin' subdomain to route to the admin module
  r.route :domain => /^admin\\./,
    :path => %r[/~~/~~/~~],
    :controller => “admin/:path[1]“,
    :action => “:path[2]“,
    :id => “:path[3]”
end

Note in the above example that some of the keys in the hash are environment variables (:domain, :path) and some are outputs to the params hash (:controller, :action, :id). This may change in the future, but for now it just means you have to know that the environment variables are “reserved words”, used specifically for matching against the incoming URL request.

Also, you may wonder at the “~~” and “:path[1]” notation. The “~~” in the path is a special string sequence that gets replaced with a parenthetical regular expression that will match a normal URL segment (e.g. it will match characters such as a-z but not ‘/’ or ‘?’). Next, the “:path[1]” notation is used to tell the router how to reconstruct the params from the matched portions of the request / environment variables. So, in the above example, the :controller is going to be “admin/” plus whatever gets matched in the first “~~”. Here’s an example match. Let’s use the URL, “http://admin.mysite.com/books/show/1″:

# Routes to the controller Admin::Books, and the "show" action
module Admin
  class Books < Application
    def show
      params[:controller] # => “admin/books”
      params[:action] # => “show”
      params[:id] # => “1″
    end
  end
end

A full list of request / environment variables that you can use is available in the lib/merb/router.rb class, but here is a sampling:

  • protocol
  • domain
  • port
  • path
  • method (e.g. ‘put’, ‘post’, ‘get’)
  • query_string
  • accept
  • remote_ip
  • user_agent
  • referer

This flexibility could, for example, let you essentially create two different sets of views for Mozilla vs. Internet Explorer browsers (routes would distinguish between browsers using the “user_agent” variable). Or you could ban certain IP addresses. Or allow certain routes from third party sites using the “referer”. Lots of possibilities.

Late-bound Route Decisions

Merb::Router.prepare do |r|
  # Query the database for an object type, and then route
  # to the appropriate controller based on type
  r.route do |request|
    if request.path.match(%r{/([a-z0-9\-] )})
      guid = $1
      if obj = AppObject.find_by_guid(guid)
        {:controller => obj.type, :action => ’show’, :id => guid}
      end
    end
  end
end

Some things may continue to change as I get feedback and also optimize the system, but the above examples should stand as a doorway for solutions to your own development needs. Let me know if you have any special requests and I’ll try to post more later.virgin free moviesmovies free voyuercredit xxx free no movies with cardpeer peer freeware movies to sharingadult funny moviesgaging puking movies orgallery handjob moviefuck movies hardcore Mapmoney 2nd mortgage loanand payday cash loan 4 6employment of loans 401k terminationpayday 7 loan fax 5 onlineinternet 5 loan payday payday 7cheap payday 5 loan rates 7dollar loan thousand 5500 check loan cash fast Map

Changes to Merb in the Last Week

I’ve been busy working on FamilyLearn projects and haven’t had time until now to pay attention to the many changes that Ezra and Jon have been making to Merb. Here’s a summary of some noteworthy changes over the past week:

  • There is no longer a “dist” folder. The Merb directory structure is now even closer to Rails’ directory structure.
  • Created a “mixins” directory and removed “merb_” prefixes from Merb’s inner workings.
  • An interesting ticket was submitted which documents how to progressively stream HTTP output in Merb/Mongrel. (Thanks to b.candler and ry)
  • You can now “throw” content and “catch” it again from any partial or view.

movies sex lolitadownload long movie pornshots screen moviemovie format scripttgp movieswebcam movies swingernudity movies frontal with maleclips celebrity nude movieview pay per moviesmovies pedoamerica bank rate loan homeloan 2 mortgage calculatorand loans mortgages all aboutbad com credit 4 home loanloan credit ad auto100 loan investment1st loans home buyermortgage year 40 rate loanafter auto loanamerican loan servicesloan time 1st buyer homepayday 6 loan fast free 4payday 7 advances payday loan 10loan 8 cash payday cash advancea va loancash advance loan 12 paydayloans net payday advance cashinternet loan payday advanceunsecured bankruptcy after personal loansafter loan deathmoney 37 loan 26 payday cashpayday 42 company best loan 29loans mortgage california 2nd2nd html mortgage loansapplition 3 loan mortgage usloan link 34 paydayapr loan 4payday sbefore 4 loan 6 Map

You Can Make Your Own Books at MemoryPress.com

The MemoryPress project I’ve been working on for about a year and a half now is finally ready for prime time! It’s purpose is to let you create a quality hard-bound book by collaborating with as many people as you would like. It’s ideal for a personal history, a wedding gift, or a 50th anniversary gift, for example. We’ve also rolled out a journaling app called Pyxlin with similar features.

One of the features that sets MemoryPress apart from other online book-making sites is that it actually uses a professional typesetting back-end (LaTeX) to create and typeset the book. The result is something that makes even amateur work look beautiful—text flows from page to page and around photos, with the correct proportions in the margins and distances between sections. On the back-end, we have a distributed Rails app on Amazon’s EC2 servers and some heavy javascript (yootools) on the front-end for the book editor.

Our goal at FamilyLearn is to create a searchable online database of your family’s memories in written, audio and video form. MemoryPress is the first product released to that end.home ltv equity loan 125for purpose loans all credit badamortized calculation loan home onamerican dream loan sour turnsdistribution 401 default k loanconsolidation general american finance loananybody everyone $5000 loanand abacus officer wa loan andamericas education loanalberta student defaulting loanscar loan after 20 bankruptcypersonal unsecured loan after bankruptcyloan equity refinancing home alabamaloan alaska refinancing carconsolidation alaska debt loanconsolidation alaska loans debtloans american corp$1000 loansloan apr car 0 financingby 100 phone loans automovie quotes snatchmovies porn spankinggirls for movie spice scriptsquirting free moviesmovies free straponsuck moviesporno movie clips swingerssylvia saint free movies Map

Random Idea: Trees as Networks

I often have random ideas and usually let them pass by, either because “someone else must have thought of it already,” or I’m too rushed, or perhaps I feel a little embarrassed by being different and having weird ideas. And then there’s that thought at the back of the mind that lurks in every capitalist’s mind: “but if I keep it a secret, I can profit from it and prevent all those other people from getting rich from my ingenuity.” But no more—it’s time to start documenting these things. The world always needs good ideas, and good ideas just start with plain old ideas.

Today, my coworker Paul and I were talking about the fragility of the internet. If you’ve ever been a network administrator, you can probably sympathize with me if I say that making things work and stay working can be troublesome. But the internet as a whole is pretty good these days, considering that it’s a man-made invention.

But just a few weeks ago, a power outage in San Francisco caused an internet black-out for several popular social networking sites. The rumor was that some drunk employee arrived at work at a hosting company and started unplugging servers at random. It seems the rumor was unsubstantiated, but still, the possibility remains that someone could do such a thing. The main thing keeping the internet together is the intense interest that we as a global community have in keeping it together—especially companies that have money and want to make more.

What would happen if that common interest waned, however? What will our society be like 100 years from now, or 500? Will we still have an internet?

Maybe. But if we could make global communication a more natural state, imagine how that would protect this critical infrastructure. What if, for example, we could use trees to communicate data, in similar fashion to the forests of Narnia? I suppose we would have to genetically alter a tree and start planting it around the world. Alas, the ability to create such a thing is beyond most of us—but wouldn’t it be a remarkable gift to future civilizations to have a communication network built in, as a natural state of the earth?6 loan service personal loan paydayof loans a listingabout loan approval online instantcredit loans adverse smallalabama government consolidation loans debtcredit alabama loan auto usedbad mortgage alaska loans creditcalculator loan commercial amortizationloan only schedule interest amortizationbalance 0 transfer loan credit cardfinancing 100 illinois equity home loanguaranteed auto 100 loanguaranteed 100 personal bad credit loansowner occupied loan 100 nonloan 1000 faxing guaranteed noloans pay day 1000123 loan carhome loan 125 equity united kingdom Map

  • 3 Comments
  • Filed under: Uncategorized
  • Everyone should cheer for California Secretary of State Debra Bowen and the geek squad that worked with her to find out just what security vulnerabilities existed in the 5 brands of electronic voting machines used in California.

    Bowen announced that Diebold and Sequoia voting machines would not be used with the exception of people with disabilities, and that the other brands would be re-certified when certain security requirements were met.

    It’s been known for some time now that these electronic voting machines are exceptionally vulnerable to hackers. That the companies who make these machines would go on record to say that “Electronic voting systems have never been successfully tampered with in an actual election” is naive at best, and seems to imply that if they have never been tampered with then they could never possibly be tampered with in the future. I’m glad that the California Secretary of State is wiser than that.

    As a software engineer and computer scientist, I feel that I am in a special position to know just how easy it is to leave loopholes or backdoors in a product. There is very little stopping me, except for my own sense of honesty and perhaps a small possibility that I could potentially be caught for such mischief. But when it comes to something as sensitive as the basis of our freedom and liberty, I expect a much higher level of scrutiny on the companies and individuals who could undermine it.

    The saying, “He who votes decides nothing; he who counts the votes decides everything” is attributed to Joseph Stalin. I hope this new standard of scrutiny is extended beyond the state of California.

    movies dunes donitadvd movie release dateswholesale distributors movies dvdmovie the elektraerotic clips moviefetish movies footmovies free animaldeepthroat samples free movie Map

    Money, Banking and the Federal Reserve

    How did we get a Federal Reserve, and what does it do for us? Why does the Mises Institute say that it needs to go?

    I found this 1996 video production from the Mises Institute quite informative:

    Money, Banking and the Federal Reserve

    It’s 40 minutes long. Ron Paul is quoted a few times in there, back when he was “between elections” (he’s been in congress on and off for the past 25 years or so—1996 was an off year, I understand.)

    My belief that we are in the middle of an economic “bust” motivated me to check it out.wireless acs ringtonelg christina ringtone aguilera free freeclick 1.2 converter one ringtone3200 lg ringtone game verizon3310 composer ringtonealltel 3587 ringtone nokiashop candy mp3 cent 50 ringtonealltell phone cell ringtone Map

  • 2 Comments
  • Filed under: Economy