The Changelog - Open Source moves fast. Keep up.

Open source moves fast. Keep up.

Brought to you by Adam and Wynn, The Changelog is what's fresh and new in open source.

/* 2010.03.09 */
2

NoRM - Bringing MongoDB to .NET, LINQ, and Mono

NoRM logo

Just because you’re slinging C# doesn’t mean that Microsoft SQL Server is the only database in town, you know. Want to play with MongoDB? Then give NoRM from Andrew Theken a look. NoRM aims to:

  • Wrap the standard MongoDB operations in a strongly-typed interface
  • Provide ultra fast serialization of BSON to .NET CLR types and back
  • LINQ-to-Mongo support
  • Mono compatability

A quick code example from the Wiki:

//open collection
var coll = (new MongoServer()).GetDatabase("Northwind")
                  .GetCollection<Product>();
//create a new object to be added to the collection
var obj = new Product();
obj._id = BSONOID.NewOID();
obj.Title = "Shoes";
//save the object
coll.Insert(obj);
//find the object
var obj2 = coll.FindOne(new { _id = obj._id}).First();

Glad to see Northwind Traders has upgraded to MongoDB…

[Source on GitHub]

/* 2010.03.08 */
1

Episode 0.1.6 - Ajax.org frameworks with Ruben Daniels and Rik Arends

Adam and Wynn caught up with Ruben Daniels and Rik Arends from Ajax.org and talked about APF and O3, their frameworks for both browser and server based JavaScript applications.

Mentioned in the show:

1

Git clone some nostalgia - NCSA Mosiac

When many of us started working on the web it was an untamed land of center-justified slate gray pages. Now you can relive those days when you clone and fire up Mosaic, the browser that started it all.

Mosaic screenshot

[Source on GitHub]

/* 2010.03.07 */
8

Ghost means never having to touch /etc/hosts again

Ghost from Bodaniel Jeanes is a Ruby gem that lets you manage your local host names without futzing with /etc/hosts.

To install:

sudo gem install ghost

And then from the command line:

$ ghost add mydevsite.local
  [Adding] mydevsite.local -> 127.0.0.1

$ ghost add staging-server.local 67.207.136.164
  [Adding] staging-server.local -> 67.207.136.164

$ ghost list
Listing 2 host(s):
  mydevsite.local      -> 127.0.0.1
  staging-server.local -> 67.207.136.164

$ ghost delete mydevsite.local
  [Deleting] mydevsite.local

Aside from basic list, add, and delete options, Ghost provides powerful import and delete_matching operations to import files or delete entries based on pattern matching.

[Source on GitHub]

4

Prism - command line and Ruby library parser for Microformats

Prism from Mark Wunsch is a cool Ruby library and command line tool for parsing Microformats. It even supports vCard export:

twitter_contacts = Prism.find 'http://twitter.com/markwunsch', :hcard
me = twitter_contacts.first
me.fn
#=> "Mark Wunsch"
me.n.family_name
#=> "Wunsch"
me.url
#=> "http://markwunsch.com/"
File.open('mark.vcf','w') {|f| f.write me.to_vcard }
## Add me to your address book!

Or if the command line is your bag:

$: prism --hcard http://markwunsch.com > ~/Desktop/me.vcf

or using STDIN and cURL:

$: curl http://markwunsch.com | prism --hcard > ~/Desktop/me.vcf

Prism also includes a DSL for parsing your own POSH formats:

class Navigation < Prism::POSH::Base
    search {|document| document.css('ul#navigation') }
    # Search a Nokogiri document for nodes of a certain type

    validate {|node| node.matches?('ul#navigation') }
    # Validate that a node is the right element we want

    has_many :items do
        search {|doc| doc.css('li') }
    end
    # has_many and has_one define properties, which themselves inherit from
    # Prism::POSH::Base, so you can do :has_one, :has_many, :search, :extract, etc.
end

[Source on GitHub] [Docs] [Mark Wunsch on Twitter]

/* 2010.03.05 */

QR - Easy Redis queues with Python

QR from Ted Nyman makes it simple to create double ended queues, queues, and stacks in Redis from Python. Double ended queues allow items to be added to the beginning or end of the queue while normal queues and stacks are first-in-first-out (FIFO) and last-in-first-out (LIFO) respectively.

To create a queue simply import QR:

>> from qr import Queue

and create the queue:

>> bqueue = Queue('Beatles', 3)

Here we created a regular Queue, but you can also create a double ended queue with Dequeue or stack with Stack.

To added data, use push:

>> bqueue.push('Ringo')
PUSHED: 'Ringo'

>> bqueue.push('Paul')
PUSHED: 'Paul'

>> bqueue.push('John')
PUSHED: 'John'

>> bqueue.push('George')
PUSHED: 'George' 
'Ringo'

To grab the next item simply call pop:

>> bqueue.pop()
'Paul'

You can also grab all items in the queue, even as JSON:

>> beatles_queue.elements()
['Ringo', 'John', 'George']

>> beatles_queue.elements_as_json()
'['Ringo', 'John', 'George']'

Another cool feature of QR is that all three queue varieties may be set up as bounded or unbounded:

  • Bounded: once the DQS reaches a specified size of elements, it will pop an element.

  • Unbounded: the DQS can grow to any size, and will not pop elements unless you explicitly ask it to.

[Source on GitHub]

/* 2010.03.03 */
1

Faye - dirt simple pub/sub for Rack and Node.js

Two way communication in the browser isn’t easy. James Coglan brings aims to change that with Faye:

Faye is an implementation of the Bayeux prototcol, a publish-subscribe messaging protocol designed primarily to allow client-side JavaScript programs to send messages to each other with low latency over HTTP.

Essentially, Bayeux lets applications publish and subscribe to data in named channels, both in the browser and the server:

fayeClient.subscribe('/path/to/channel', function(message) {
  // process received message object
});

fayeClient.publish('/some/other/channel', {foo: 'bar'});

Faye supports long polling and callback polling, depending on if you would like to keep a persistent HTTP connection open in the browser or use a JSONP callback.

The really cool part is that Faye ships with functionally identical server implementations for both Rack and Node.js.

We just might have to try this out to enhance Tail.

Source on GitHub James Coglan on Twitter

/* 2010.02.27 */
1

Mongrations - migrations for MongoMapper

Why would a schema-less database need migrations? Simple: to help you keep old data fresh as you change your data format. Recently added new columns to your MongoMapper model and need to update old values in your MongoDB collection? Terry Heath gives you Mongrations:

script/generate mongration update_followers_count_for_existing

You’ll get a new file with the familiar Rails migration format:

class UpdateFollowersCountForExisting < MongoMapper::Mongration
  def self.up
  end

  def self.down
  end
end

Just add your own code to manipulate your data and call rake db:mongrate. Mongrations include rake tasks for db:mongrate:redo, db:mongrate:up, db:mongrate:down, db:mongrate:rollback.

[Source on GitHub] [Blog post]

Episode 0.1.5 - Leah Culver on OAuth, Hurl.it, Baconfile, and more

Adam and Wynn caught up with Leah Culver and talked about startups, APIs, and her open source work on OAuth, oEmbed, Hurl.it, Baconfile, and more.

  • OAuth An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications.
  • oEmbed oEmbed is a format for allowing an embedded representation of a URL on third party sites.
  • 90210 One of Adam’s favorite TV shows from the 90s
  • Beverly Hillbillies For the previous generation
  • Boxee Open Source media on your TV or PC/Mac
  • Hurl.it Test APIs from your browser
  • Charles Proxy Monitor or proxy HTTP and SSL / HTTPS traffic between your machine and the Internet.
  • Gowalla’s API explorer Neat way to test your Gowalla API calls
  • Baconfile Share files simply on your own S3 account
  • Chunky Baconfile Wynn’s wrapper for Baconfile, a naming tribute to _why
  • Motion Community microblogging on the TypePad API written in Django.
  • TypeKit Legally embed fonts from the largest foundries
  • Node.js The streak continues!
  • How to Node Learn Node.js open blog from Tim Caswell and Micheil Smith. And it’s pronounced Michael, sorry, mate.

/* 2010.02.26 */
3

Delorean - mock Ruby's Time.now with style

Delorean photo courtesy Giancarlo Pitocco

At The Changelog, we give bonus points for witty project names. How could we pass up a repo named Delorean.

Delorean is a smart way to mock Ruby’s Time.now method thereby allowing you to travel in time. Why is this helpful? Testing. Consider the following spec from the README:

it "should show latest created user" do

  time_travel_to(3.minutes.ago) { create_user :name => "John"  }
  time_travel_to(5.minutes.ago) { create_user :name => "Chris" }

  get 'show'

  response.should have_text("John")
  response.should_not have_text("Chris")

end

Want to get back to 1985?

after(:each) { back_to_the_present }

Brilliant!

[Source on GitHub] [Back to the Future on IMDB for you youngsters]

/* 2010.02.23 */
1

Ajax.org O3: Collection of C++ components exposed through a JavaScript API

While at FOWA 2010, Adam Stacoviak caught up with the guys and gals at Ajax.org. And since we’ve been on this Node.js kick for a bit now, maybe it’s time we introduce you to the guys at Ajax.org and what they’ve been doing with C++ and JavaScript to make the Ajax.org Platform APF and Ajax.org O3 provide developers with easy to use libraries and tools in order to make the browser the dominant application platform.

Definitely check out their codes and follow them on Twitter @ajax_org.

Photo courtesy of our friend Kevin Milden of New Leaders.

Oh, and for those VC’s or groups that provide funding to companies that are developing Open Source software, Ruben (CEO) and Rik (CTO) are looking to gain funding to take them to the next level.

Ajax.org O3

Ajax.org O3 is a collection of C++ components which are exposed through a JavaScript API. On top of that it’s also a library that allows you to create those components. Ajax.org O3 allows you to run the same code anywhere:

  • Optimized for speed and security
  • Same API’s everywhere
  • Runtime environments

Example of the O3 File API

var root = o3.fs;
var files = root.children;

//Iterating the files in a folder
o3.out("Current dir: " + root.path);
files.each(function(file){
    o3.out([
        file.name, 
        file.size, 
        file.modifiedDate
    ].join(", "));
});

//Read a file
o3.out(root.get("file.txt").data);

//Create and write a new (or existing) file
root.get("newfile.txt").data = "test";

//Append to a file
if (root.get("newfile.txt").exist)
    root.get("newfile.txt").data += "test";

//Write binary data
var img = new o3.image();
//fill img data here
root.get("photo.jpg").data = img;

//Or access the blob directly:
root.get("photo.jpg").blob = img.blob;

Ajax.org Platform

Ajax.org Platform is a pure javascript application framework for creating real-time collaborative applications that run in the browser. Ajax.org Platform radically changes the way you write applications:

  • Live markup
  • Markup and JSON api
  • Collaborative backbone
  • 100% open source software

[Homepage] [O3 on GitHub] [Ajax.org O3] [Ajax.org Platform]

/* 2010.02.18 */

Episode 0.1.4 - Andy Gross and Sean Cribbs on Riak

Adam and Wynn caught up with Andy Gross from Basho and Sean Cribbs, a freelance Ruby developer, to discuss Riak, the new Erlang-based NoSQL store and Ripple, Sean’s new Ruby wrapper for Riak.

Items mentioned in the show:

Tip: Use filters when tailing The Changelog

It seems our settings icon on http://tail.thechangelog.com is a bit too subtle so we recorded a quick screencast to show you how you can filter the GitHub firehose to see only the open source events you actually care about.