Archive for the 'Ruby' Category
Thursday, February 21st, 2008
This is why people get annoyed about the silly gem install dependency mess (esp WRT hoe):
$ gem install heckle
Need to update 31 gems from http://gems.rubyforge.org # fair enough, you’re allowed
………………………….
complete
Install required dependency ruby2ruby? [Yn] Y # Yeah, I know you need these
Install required dependency ParseTree? [Yn] Y [...]
Posted in Ruby, Whining, Work | 2 Comments »
Thursday, January 24th, 2008
As of the beginning of 2007, ISBN10 is dead. Now we’re in a world that allows “979″ prefixes, though the following code doesn’t expect them yet…
Here’s some stuff to turn your 10-digit ISBNs into 13-digit ISBNs, naively assuming “978″, following an the API post doing the same from LibraryThing. There’s another one at isbn.org for [...]
Posted in Code, Ruby, Work | No Comments »
Saturday, November 3rd, 2007
Ed Borasky: Profiling and Tuning Ruby 1.8
Slides are available here. Cougar is the name of the project that this is coming from?
Is Ruby 1.8 Slow?
To benchmark: Collect a set of benchmark times, then normalize them, then compute the geometric mean of the ratios.
Alioth is a popular (if controversial) set of benchmarks. Using gcc as the [...]
Posted in Code, Conferences, Ruby, RubyConf2007 | 1 Comment »
Saturday, November 3rd, 2007
John Lam: State of IronRuby
Photo by dwortlehock
Who works on IronRuby? The core is: John Lam, Hiabo Luo, Tomas Matousek, & John Messerly.
Why did John move from Toronto to Seattle to start working at Microsoft on IronRuby? He was in love with RubyCLR and couldn’t turn down the opportunity to work on a “real” implementation.
Goals
John [...]
Posted in Code, Conferences, JRuby, Ruby, RubyConf2007 | No Comments »
Friday, November 2nd, 2007
Nathaniel Talbott: Why Camping Matters
“I don’t know about you, but I am totally psyched about this conference!” Nathaniel has spoken at every RubyConf.
Photo by laurafries.com
Every talk needs a metaphor, and this talk’s will be the bacon, egg, and cheese biscuit.
Bacon
The bacon is the connection to the creator, and to chunky bacon. It’s a 4k [...]
Posted in Code, Conferences, Ruby, RubyConf2007 | No Comments »
Friday, November 2nd, 2007
I’m at RubyConf 2007 for the next few days. Here’s a stream-of-consciousness blog of the first morning’s talks. Apparently there will eventually be video of the talks online.
Photo by jremsikjr
David Black kicks it off
This year is bigger than ever, with attendance 15 times greater than the first one in 2001. New tracks have been added [...]
Posted in Code, Conferences, Ruby, RubyConf2007 | No Comments »
Tuesday, July 10th, 2007
Just like the folks from Jane Street Capital, Swivel really knows how to write good, eye-catching ad copy (for some crazy subset of the population):
Posted in Clever, Links, Ruby | No Comments »
Wednesday, June 6th, 2007
I finally figured out how to get JRuby to serve a Jetty servlet today (thanks to Charles). The key was flipping what I’d been trying to do for a while (getting Jetty to run JRuby). Here’s code that implements the AbstractHandler interface pretty trivially:
$ cat jetty_example.jrb
require ‘java’
include_class ‘javax.servlet.ServletException’
include_class ‘javax.servlet.http.HttpServlet’
include_class ‘javax.servlet.http.HttpServletRequest’
include_class ‘javax.servlet.http.HttpServletResponse’
include_class ‘org.mortbay.jetty.Server’
include_class ‘org.mortbay.jetty.servlet.Context’
include_class ‘org.mortbay.jetty.servlet.ServletHolder’
include_class ‘org.mortbay.jetty.handler.AbstractHandler’
class [...]
Posted in Code, JRuby, Ruby | No Comments »
Tuesday, May 1st, 2007
[UPDATE: Added a link to the categorized CSV file below]
Here’s some of the nitty-gritty behind DocBook Elements in the Wild. We’re trying to get a count of all of the element names in a set of 49 DocBook 4.4 <book>s.
First, go ask the O’Reilly product database for all the books that were sent to the [...]
Posted in AtomPub, Code, DocBook, Ruby, Work, XML | No Comments »
Friday, April 13th, 2007
Inspired by how easy it was to get JFreeChart working and some code from former colleague Andrew Bruno, I thought it’d be nice to write some JRuby to generate Edward Tufte’s Sparklines.
Here’s some simple example code on a semi-random dataset:
# Mostly inspired by
# http://left.subtree.org/2007/01/15/creating-sparklines-with-jfreechart/
# have JFreeChart in your classpath, obviously, as well [...]
Posted in Code, JRuby, Ruby | 6 Comments »