docopt gets CLI argument parsing right

Brilliant ideas can be painfully obvious in retrospect. They’ll leave you thinking, “Why didn’t we I think of that before?!” Docopt is that for parsing CLI arguments.

Want to run SQL on a CSV file? #

Now you can with q, a Python lib.

q allows performing SQL-like statements on tabular text data.

It seems this idea isn’t restricted to Python either. TextQL is a project written in Go that promises to do roughly the same thing.

Generate 4 language bindings for your API in one Go #

You just built an API, and want to make sure everyone can use it. Building libraries in every language isn’t only going to be hard, its going to take a lot of time. Time you don’t have. This is where Alpaca can help.

You define your API according to the format, alpaca builds the API libraries along with their documentation. All you have to do is publishing them to their respective package managers.

Right now it can generate API clients in PHP, Python, Ruby, and JavaScript. You can see examples of the generated client libraries here. I can’t speak to the quality of all the generated language bindings, but I took a cursory look at the Python lib and it looks good. Looks like Alpaca could save us all a lot of time.

Go ahead, have an Angular Martini #

I’ve been wanting to team Go, AngularJS, and PostgreSQL to write a web app for a while now, so I’m quite excited by Robert Yakota’s Yeoman generator for AngularJS, Go, and Martini.

With this Yeoman generator in hand, it’s never been easier to get started using these tools together. Somebody please write an app with this stack and let us know how it goes. I have a feeling you’ll enjoy it.

Unclutter your .profile with direnv #

direnv is a rad looking shell extension that does some of the job of rvm, rbenv, or virtualenv in a language agnostic way.

Instead of putting all of your environment setup in your ~/.profile, direnv lets you use directory-specific .envrc files. Recently rewritten in Go, direnv works with bash, zsh, and fish shells. Check it out.

On Go’s Web Application Ecosystem

There’s something to be said about being able to write a lean, mean web application and serve a ton of requests without huge hardware requirements. Go just had its fourth birthday, and finding a lot of popularity as a systems/operations language. Special thanks to Matt Silverlock for contributing this post.

#108: Exercism.io with Katrina Owen

Adam and Jerod talk with Katrina Owen – Panelist on Ruby Rogues, Instructor at Jumpstart Lab and creator of Exercism.io, an open source platform for crowd-sourced code reviews on daily practice problems.

ngrok tunnels your localhost to the internet for sharing and replay #

Ever find yourself needing to

  • Temporarily share a website that is only running on your dev machine?
  • Demo an app at a hackathon without deploying?
  • Develop any services which consume webhooks (HTTP callbacks)?
  • Debug and understand a web service by inspecting the HTTP traffic?
  • Run networked services on machines that are firewalled off from the internet?

All of these use cases and more are served by ngrok, a reverse proxy written in Go that creates a secure tunnel between a public endpoint and a locally running web service. Need a visual?

ngrok overview

You download ngrok as a dependency-free binary, unzip it, and drop it in your $PATH. Then you’re up and running in a single command. For instance:

ngrok localhost:3000

The app shows you the URL to share and the web server to connect to for analysis:

ngrok-in-action

It has a free server component that doesn’t require signing up, but there are additional features if you have an account.

The entire code base is open source under the Apache license and available on GitHub.

Google Go GitHub #

go-github is a Go library for accessing the GitHub API.

This library is being initially developed for an internal application at
Google, so API methods will likely be implemented in the order that they are
needed by that application. You can track the status of implementation in
this Google spreadsheet. Eventually, I would like to cover the entire
GitHub API, so contributions are of course always welcome. The calling
pattern is pretty well established, so adding new methods is relatively
straightforward.

Aside from the fact that Google is shipping open source on GitHub — they’re using Google Spreadsheets to track the status of this library’s implementation.

Available BSD-style on GitHub.

#100: Go programming with Rob Pike and Andrew Gerrand

Andrew Thorp talks with Rob Pike and Andrew Gerrand about the history and latest updates to the Go programming language, an open source project developed from a team at Google and many contributors from the open source community. You can tune-in LIVE on Tuesday’s at 5pm CST. Become a member to show your support Signup […]

Revel is a high performance, comprehensive web framework that’s ready to Go #

While still in an early stage of development, Revel (a Go-based web framework by Rob Figueiredo) shows a lot of promise.

Revel features hot code reloading, high performance (3 to 10x Rails in recent benchmarks), synchronous programming style, and a comprehensive set of tools, including:

  • routing
  • parameter parsing
  • validation
  • session/flash
  • templating
  • caching
  • job running
  • a testing framework
  • internationalization

That’s pretty impressive from a project that hasn’t reach 1.0 yet. If you are big in to Go — or if you’re looking to learn — definitely check it out!

Revel is MIT licensed and hosted on GitHub.

Docker from dotCloud is now open source — the future of Linux containers? #

Last week, Y Combinator funded, dotCloud released what just might be “the future of Linux containers” — it’s called Docker.

At PyCon, Solomon Hykes showed off docker to the public for the first time and talked about Docker as the solution to hackers asking for that “low-level piece to do that magical thing” they do at dotCloud.

From the project’s homepage:

Docker complements LXC with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers.

Docker is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc.

Check out Docker’s homepage or source on GitHub to learn more.

Falcore – modular HTTP server framework for Go #

Dave Grijalva and Scott White from the engineering team at mobile app maker ngmoco have released Falcore a module HTTP server for Go. With built-in logging and performance tracking, Falcore provides hot restarts in a modular architecture. Much like Rack middleware stacks, Falcore components are written as request or response filters and arranged into upstream or downstream pipelines. HTTP requests can call pipelines conditionally via Falcore routers, as seen in this architecture diagram:

Falcore architecture

The GitHub repo contains a number of examples, including an obligatory Hello World server:

package main
import (
  "http"
  "flag"
  "fmt"

  "falcore"
)
// Command line options
var (
  port = flag.Int("port", 8000, "the port to listen on")
)

func main() {
  // parse command line options
  flag.Parse()

  // setup pipeline
  pipeline := falcore.NewPipeline()

  // upstream
  pipeline.Upstream.PushBack(helloFilter)

  // setup server
  server := falcore.NewServer(*port, pipeline)

  // start the server
  // this is normally blocking forever unless you send lifecycle commands 
  if err := server.ListenAndServe(); err != nil {
    fmt.Println("Could not start server:", err)
  }
}

var helloFilter = falcore.NewRequestFilter(func(req *falcore.Request) *http.Response {
  return falcore.SimpleResponse(req.HttpRequest, 200, nil, "hello world!")
})

The ngenunity blog has more background in the announcement post.

#3: Google’s Go Programming Language

Wynn and Adam caught up with Rob Pike, Principal Engineer at Google and Tech Lead for the Google Go team. The primary topic was, of course, Google’s new Open Source programing language, Go.

#2: First weekly show! (21:29)

In this episode we discuss: JAMMIT – Rails plugin for asset packaging Underscore.js the bowtie for jQuery’s tux Google Go Firefox 3.6 beta 2 Google Chrome OS creating “fancy buttons” with Compass and Sass