Kurt Stephens

Nerd Up!

The only way to implement the future is to avoid having to predict it. -- Piumarta
Fighting entropy one day at a time...

Naming of Spirit and Opportunity

Kurt on Mon, 2010-01-04 00:57.

An inspired essay by a young student named the “Spirit” and “Opportunity” Mars Rovers.

From http://en.wikipedia.org/wiki/Mars_Exploration_Rover#Naming_of_Spirit_and...

Naming of Spirit and Opportunity

The Spirit and Opportunity rovers were named through a student essay competition. The winning entry was by Sofi Collis, a third-grade Russian-American student from Arizona.

I used to live in an orphanage. It was dark and cold and lonely. At night, I looked up at the sparkly sky and felt better. I dreamed I could fly there. In America, I can make all my dreams come true. Thank you for the ‘Spirit’ and the ‘Opportunity.’

Emacs Flymake Ruby Mode

Kurt on Mon, 2009-12-28 03:40.

Adds automatic syntax checking and error highlighting to Ruby code:

http://github.com/purcell/emacs.d/raw/master/site-lisp/flymake-ruby/flym...


Robots of 2009

Kurt on Thu, 2009-12-24 14:47.

http://singularityhub.com/2009/12/22/a-review-of-the-best-robots-of-2009/

Ruby 1.8: Improved Rational performance by 15%

Kurt on Wed, 2009-12-23 21:27.

This should also speed up DateTime. This will not help 1.9 performance.

The attached file is based on MRI 1.8.6 rational.rb.

 > ruby rational_performance.rb 
                                              user     system      total        real
test_it                                  32.930000   3.030000  35.960000 ( 35.971832)
test_it                                  33.840000   2.910000  36.750000 ( 36.758585)
test_it ks_rational                      29.110000   2.460000  31.570000 ( 31.572762)

Overview:

  • case x; when Foo; ...; end is faster than if Foo.kind_of?(x).

Trinity, Help!

Kurt on Sat, 2009-12-12 11:58.

Trevor Boyd and Steve Ilett


Abstraction .vs. Optimization

Kurt on Mon, 2009-11-30 01:10.

http://www.computerworld.com/comments/node/9141465#comment-553333

Abstractions can lead to greater flexibility and correctness at the expense of speed or size — there are good reasons that most programs are not crafted in machine code.

The key to improving an abstraction’s performance is to compile it. Dynamic environments like Common Lisp are superior to languages and tools like: Java, C++, and C#, in this regard, because one can create abstractions that compile to efficient code.

If the abstraction is cumbersome it might be a poor abstraction or its platform is poor for abstraction. Environments that give seamless access to a language’s compiler from inside the language itself are superior platforms for abstraction.

Ruby: Caching #to_s for immutables (and a possible future for constant-folding)

Kurt on Mon, 2009-11-23 02:07.

Reference: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/26869

I have a proof-of-concept patch to MRI that caches #to_s values for immutable values. It is implemented using a few fixed-size hash tables.

It reduces the number of #to_s result objects by 1890 during the MRI test suite for NilClass#to_s, TrueClass#to_s, FalseClass#to_s, Symbol#to_s, and Float#to_s.

It requires a minor semantic change to Ruby core. This minor change could cascade into a huge performance improvement for all Ruby implementations — as will be illustrated later:

#to_s may return frozen Strings.

Captain Forever

Kurt on Mon, 2009-11-23 01:44.

http://www.captainforever.com/captainforever.php

Really cool 2D shooter w/ construction and physics.


Primary links

Syndicate

Syndicate content

Browse archives

« September 2010  
Mo Tu We Th Fr Sa Su
    1 2 3 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30