Saturday, August 29, 2009

Temerity

I added a column to my Scheme Implementation spreadsheet. That is ‘Arbitrary Metric A’ As the name suggests, it is arbitrary. However, it is also a metric. My opinion about the merits of any particular scheme implementation was not a factor.

Metric A sucks. It cannot be independently verified, it's relevancy cannot be determined, the bias is unknown. It has exactly one virtue: it has a value. I'd like to come up with something better, but until I do, here it is.

If you have an objective metric, give me the values, (or better yet, tell us how to derive them!!!) and I'll add a column for that.


Not only did I have the temerity to measure Scheme implementations on a hidden scale (it could have been a Ouija board), I had the temerity to rank the implementations. Furthemore, I divided them into four broad tiers.

Tier 1 is the powerhouse implementations. Of course PLT scheme is the most popular scheme. I was surprised to find that Gauche is tremendously popular. I've heard of it, but never used it. I was also surprised, but pleased to see MIT Scheme is still popular enough to stand out from the crowd.

Tier 2 is the usual suspects. These implementations are well known and have a solid following. The surprise here is that EdScheme is in this tier but Chez Scheme is not and that Scsh is here but Scheme 48 is not.

Tier 3 is the genus omne.

Tier 4 is the obscure implementations.

Friday, August 28, 2009

Stupid software

I'm getting old and I can't work these newfangled “web” applications. Let me try again.

http://spreadsheets.google.com/pub?key=twRSWnj1h-j_F3IHRXxwrmg&output=html

Please email me if you have problems.

Thursday, August 27, 2009

A list of Scheme implementations

I've made a list of Scheme Implementations at this incredibly ugly URL: http://spreadsheets.google.com/ccc?key=0Aozj6rF-PmISdHdSU1duajFoLWpfRjNJSFJYeHdybWc.

This list is not meant to be exhaustive, but I'd like it to include all the Scheme implementations that are likely to affect, or to be affected by, the next Scheme standard.

For the moment, I just want to make a list of active implementations. I don't want to compare features, or list conformance. I'll add these later if they seem relevant.

Please send me email if I have omitted things, got things wrong, or included abandoned implementations. Thank you for your time.

Saturday, August 22, 2009

A harder puzzle

The previous puzzle was inspired by this one:
(define (f l)
  (if (null? l) 
      #f
      (let ((r (fold-left kernel k0 l)))
        (f (if (car r) (cadr r) (caddr r))))))

(define (kernel l e)
  (list (not (car l))
        (if (car l) (cons e (cadr l)) (cadr l))
        (cons e (cons e (cons e (caddr l))))))

(define k0 (list #f '() '(#t #t #t)))
Q1 (easy): Show that for any non-negative integer n, (f (make-list n)) can return no value other than #f.

Q2 (very hard): Show that for any non-negative integer n, (f (make-list n)) returns #f.


Friday, August 21, 2009

A small puzzle

I got this from Marshall Spight today.
(define (f a b)
  (if (zero? b)
      a
      (f (logxor a b)
         (* (logand a b) 2))))

Q: F is better known as ______ ?

You may need these auxiliary functions.

(define (logand a b)
  (cond ((zero? a) 0)
        ((zero? b) 0)
        (else
         (+ (* (logand (floor (/ a 2)) (floor (/ b 2))) 2)
            (if (or (even? a)
                    (even? b))
                0
                1)))))

(define (logxor a b)
  (cond ((zero? a) b)
        ((zero? b) a)
        (else 
         (+ (* (logxor (floor (/ a 2)) (floor (/ b 2))) 2)
            (if (even? a)
                (if (even? b) 0 1)
                (if (even? b) 1 0))))))

And please don't just post a spoiler. If you just want ‘first credit’, email me directly.

What's amusing to me is that it isn't obvious if F even terminates.

Tuesday, August 18, 2009

Hyperspec search engine

For those of you who like this sort of thing, I have a “Google Custom Search Engine” for searching the Hyperspec and the AMOP. You can put it on your home page or on your web site with some simple Javascript:
<form action="http://www.google.com/cse" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="008072110934663485714:6gce0ybe318" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>

<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
If you are adventurous, you can use the AJAX api and build your own interface to it.

Saturday, August 8, 2009

I'm on You Tube

I was an extra in this very short commercial.