Posted by colby

While working on rgslffiGSL4r, I needed to define a mapping for the gsl_complex struct (we'll ignore for now that gsl_complex is potentially platform dependent).

Here's my attempt:

  class GSL_Complex < ::FFI::Struct
    layout :dat, [:double, 2]

    R = 0
    I = 1

    def real()
      return self[:dat][R]
    end

    def imag()
      return self[:dat][I]
    end

    def equals( a )
      return ( a[:dat][R] == self[:dat][R] && a[:dat][I] == self[:dat][I] )
    end

    def set( r, i )
      self[:dat][R] = r
      self[:dat][I] = i
      return self
    end

    def set_real( r )
      self[:dat][R] = r
    end

    def set_imag( i )
      self[:dat][I] = i
    end

    def to_s()
      return "(#{self[:dat][R]},#{self[:dat][I]})"
    end
  end
Posted by colby

I was stumped for a few hours on passing FFI::Structs into external routines, luckily, this post, 'Functions returning structures' (groups/google/ruby-ffi), tipped me off by showing how to return a struct by value:

From the C code:

...
    typedef struct
    { 
        int r, g, b, a; 
    } ALLEGRO_COLOR; 
...

setiquest launches

08 Feb 2010
Posted by colby

Each year, the non-profit "Technology, Entertainment, Design" or TED Group, holds a conference with invited speakers from around the world, in a kind-of "Big Thinkers" hoedown.

In 2009, Jill Tarter, a director and co-founder of the SETI Institute in Mountain View, CA, won a TEDPrize, which comes with funding to help jump start a wish that the prize winner would like to see fulfilled. Jill's wish is being fleshed out by the work of Avinash Agrawal and the creation of http://www.setiquest.org

A major part of setiquest will be to take raw data from the Allen Telescope Array and load it into cloud computing services donated by Amazon. Those who sign up with setiquest will then help create algorithms to search for signals that might be hidden in the noise.

log4r 1.1.5 released

08 Feb 2010
Posted by colby

credit:C G-K

Now available, the 1.1.5 release of log4r (See: http://log4r.rubyforge.org or gem install -r log4r)

Addressed in 1.1.5:
FileOutputter no longer truncates files by default
Syntax fixed up in GDC/NDC classes to work in Ruby 1.9 as well as 1.8

I'm also quite happy about the move to hosting ruby gems at http://gemcutter.org. Its helped me become aware of how widely log4r is a pre-requisite for other software. Since I started new releases last September (2009), it was downloaded over 21,000 times, with the 1.1.4 release on January 12, 2010, downloaded 12,000+ times alone.

*nervous*

Posted by colby

I've noticed two articles[1],[2] in the last few weeks that have a picture from the old millimeter-wave array at Hat Creek Radio Observatory (HCRO), confused with the Allen Telescope Array[3],[4].


source: guardian.co.uk

What you see in the Guardian and derStandard are 10+ year old images of an array that was used at HCRO until 2004. The telescopes were moved from HCRO in 2004 down near Bishop, CA (about 15 miles east of Big Pine, CA). These telescopes are now part of what is called the Combined Array for Research in Millimeter Astronomy (CARMA)[5],[6],[7]. Also, please der Standard, change your background color away from that vomit inducing cyanishness.

Depressingly, a Google image search for "Allen Telescope Array" turns up handsome examples of the ATA immediately...

Posted by colby

UPDATE 01 Mar 2010:

Bug has been fixed on Linux/MacOSX/Windows! Woo!

Shift-reload is embedded in the muscle-memory of anyone who has done more than an hour of web oriented development.

Chrome, doesn't didn't support: http://code.google.com/p/chromium/issues/detail?id=1906

There is only one solution. Star. This. Bug.

(please)

Also, nice tab behavior of chrome:


Chrome Tabs behavior, voice: me. (click here if you're unable to see the embedded video)

i <3 twilight

22 Jan 2010
Posted by colby

source: comixed.com
Posted by colby

Older news from the Orbital Debris Quarterly News, Volume 12, Issue 1, January 2008:

Early impact test results suggest that the particle size was approximately 1.5mm to 2.0mm in diameter, assuming that the particle was orbital debris.

An impactor, maybe 1.5-2.0mm wide, creating a hole ~1⁄3 in wide through thin layers of an aluminum honeycomb radiator and silver teflon tape.

Posted by colby

http://www.matthewrobinson.co.uk/projects/measuring-type/

A selection of the most commonly used typefaces were compared for how economical they are with the amount of ink which they use at the same point size. Large scale renditions of the typefaces were drawn out with ballpoint pens, allowing the remaining ink levels to display the ink efficiency of each typeface.

Via: Kottke