E-Mail:

ruby

Language spaghetti - what’s your favorite?

The programming world has come a long way since Donald Knuth made his arguments for limited use of go-to statements.
People are starting to think less about execution speed and memory consumption and more about readability and conciseness. Scripting languages are being used more and more for the following reasons, among others:

We don’t want to compile [...]

Find and delete empty directories

I had iTunes “help” me organize my musik for a while. Now I’ve abandoned it for this reason, among others (e.g. it’s terribly slow and playback stutters).
I’ve used http://musicbrainz.org/ products to clean up the mess, but only to be left with a bunch of empty directories (thanks again, iTunes). I wrote up this ruby script [...]

Transform ruby array to tex table

This has probably been written in many projects, anyways here is the code I wrote up to convert a ruby table / 2-dimensional array / array of arrays to a tex table:
def to_tex(table, user_opts = {})
default_opts = {:center => true, :sep_cols => true, :col_align => ‘l’}
opts = default_opts.merge(user_opts)
lines = [...]

23 queries / 0.112 seconds.