/*
* Add this to the top of your post. This will get interpreted in and applies to your page
* e.g.
*
* (this code)
*
* # My Summer Vacation
*
* ## Grandma's House
*
* We left for Grandma's house at 2pm on Friday. I was so excited to see her pet Bear and Fox!
*/
var fixGistRules = [
".gist .gist-highlight { border-left: 3ex solid #eee; position: relative;}",
".gist .gist-highlight pre { counter-reset: linenumbers;}",
".gist .gist-highlight pre div:before { color: #aaa; content: counter(linenumbers); counter-increment: linenumbers; left: -3ex; position: absolute; text-align: right; width: 2.5ex;}" ];
var head = document.getElementsByTagName('head')[0],
style = document.createElement('style');
rules = new Array();
var i=0;
for ( i=0; i< fixGistRules.length; i++ ){
var fullrule = document.createTextNode(fixGistRules[i]);
rules.push(fullrule);
}
style.type = 'text/css';
for ( var i=0; i< rules.length; i++ ){
if(style.styleSheet){
style.styleSheet.cssText = rules[i].nodeValue;
}else {
style.appendChild(rules[i]);
head.appendChild(style);
}
}
I've recently started exploring the new(ish) programming language "Go". Go is intended to be a systems programming language and offers speed and low-level API along with some sweet features and the beginnings of a great standard library.
At Carbon Five we do most of our work in Ruby, JavaScript, Objective-C, and lately, node.js. I've really been enjoying Objective-C but realistically half the value is in the standard library, which is not public, which precludes its use in any kind of server environment to which we're likely to deploy (i.e. non-Mac). I also spent some time this year contributing C code to an open source project and remembering why I don't program in C, given the choice.
I'm exploring Go as a possible solution for times when I want to get close-to-the-metal and really control what's going on, but without having to reinvent the wheel. Example: having to write your own collection frameworks. Blehft.
I wrote a dupe checker in Ruby for a project recently and thought I'd write a Go port as an experiment. (In case you're curious about the motivation: tons of files get moved from a tree to a flat namespace, leading to collisions -- and confusion.)
I've written walkthroughs of the Ruby and Go versions below - please check it out.
Continue reading →