<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://dynamo.iro.umontreal.ca/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;feed=atom&amp;action=history</id>
		<title>Programming language shootout: spectral norm - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;action=history"/>
		<updated>2013-05-20T14:30:24Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.4</generator>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;diff=84&amp;oldid=prev</id>
		<title>Bjlucier: Fix totally screwed up earlier entry</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;diff=84&amp;oldid=prev"/>
				<updated>2008-02-26T15:21:52Z</updated>
		
		<summary type="html">&lt;p&gt;Fix totally screwed up earlier entry&lt;/p&gt;
&lt;a href=&quot;http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;amp;diff=84&amp;amp;oldid=74&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;diff=74&amp;oldid=prev</id>
		<title>Bjlucier: correct link to alioth</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;diff=74&amp;oldid=prev"/>
				<updated>2008-02-22T22:05:38Z</updated>
		
		<summary type="html">&lt;p&gt;correct link to alioth&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:05, 22 February 2008&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;gp4&lt;/del&gt;/benchmark.php?test=spectralnorm&amp;amp;lang=all spectral-norm] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;gp4sandbox&lt;/ins&gt;/benchmark.php?test=spectralnorm&amp;amp;lang=all spectral-norm] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==The program==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==The program==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;diff=60&amp;oldid=prev</id>
		<title>Bjlucier: Spectral norm benchmark from alioth</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_spectral_norm&amp;diff=60&amp;oldid=prev"/>
				<updated>2008-02-22T21:44:59Z</updated>
		
		<summary type="html">&lt;p&gt;Spectral norm benchmark from alioth&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnorm&amp;amp;lang=all spectral-norm] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;br /&gt;
&lt;br /&gt;
==The program==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!gsi-script&lt;br /&gt;
&lt;br /&gt;
;; The Computer Language Benchmarks Game&lt;br /&gt;
;; http://shootout.alioth.debian.org/&lt;br /&gt;
;;&lt;br /&gt;
;; Derived by Bradley Lucier from the Ikarus variant&lt;br /&gt;
;; derived by Michael D. Adams from the MzScheme variant&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(declare (standard-bindings)(extended-bindings)(block)(fixnum)(not safe))&lt;br /&gt;
&lt;br /&gt;
(define-macro (unless test . body)&lt;br /&gt;
  `(if (not ,test)&lt;br /&gt;
       (begin&lt;br /&gt;
	 ,@body)))&lt;br /&gt;
&lt;br /&gt;
(define translation (make-vector 128))&lt;br /&gt;
&lt;br /&gt;
(for-each&lt;br /&gt;
 (lambda (from-to)&lt;br /&gt;
   (let* ([char (lambda (sym) (string-ref (symbol-&amp;gt;string sym) 0))]&lt;br /&gt;
          [from (char (car from-to))]&lt;br /&gt;
          [to (char-upcase (char (cadr from-to)))])&lt;br /&gt;
     (vector-set! translation (char-&amp;gt;integer from) to)&lt;br /&gt;
     (vector-set! translation (char-&amp;gt;integer (char-upcase from)) to)))&lt;br /&gt;
 '([a t]&lt;br /&gt;
   [c g]&lt;br /&gt;
   [g c]&lt;br /&gt;
   [t a]&lt;br /&gt;
   [u a]&lt;br /&gt;
   [m k]&lt;br /&gt;
   [r y]&lt;br /&gt;
   [w w]&lt;br /&gt;
   [s s]&lt;br /&gt;
   [y R]&lt;br /&gt;
   [k M]&lt;br /&gt;
   [v b]&lt;br /&gt;
   [h d]&lt;br /&gt;
   [d h]&lt;br /&gt;
   [b v]&lt;br /&gt;
   [n n]))&lt;br /&gt;
&lt;br /&gt;
(define (put-whole-string s) (write-substring s 0 (string-length s)))&lt;br /&gt;
&lt;br /&gt;
(define (output lines)&lt;br /&gt;
  (if (&amp;gt; (length lines) 2)&lt;br /&gt;
      (let* ([pos (- (string-length (cadr lines)) (string-length (car lines)))]&lt;br /&gt;
             [put-first-half&lt;br /&gt;
              (lambda (s i) (write-substring s 0 i))]&lt;br /&gt;
             [put-second-half&lt;br /&gt;
              (lambda (s i) (write-substring s i (string-length s)))])&lt;br /&gt;
        (put-whole-string (car lines))&lt;br /&gt;
        (put-first-half (cadr lines) pos)&lt;br /&gt;
        (newline)&lt;br /&gt;
        (let loop ([l (cdr lines)])&lt;br /&gt;
          (cond&lt;br /&gt;
           [(null? (cdr l))&lt;br /&gt;
            (put-second-half (car l) pos)&lt;br /&gt;
            (newline)]&lt;br /&gt;
           [else&lt;br /&gt;
            (put-second-half (car l) pos)&lt;br /&gt;
            (put-first-half (cadr l) pos)&lt;br /&gt;
            (newline)&lt;br /&gt;
            (loop (cdr l))])))))&lt;br /&gt;
&lt;br /&gt;
(define (main . args)&lt;br /&gt;
  (let loop ([accum '()])&lt;br /&gt;
    (let ([l (read-line)])&lt;br /&gt;
      (if (eof-object? l)&lt;br /&gt;
	  (output accum)&lt;br /&gt;
	  (cond&lt;br /&gt;
	   [(and (not (zero? (string-length l)))&lt;br /&gt;
		 (eqv? #\&amp;gt; (string-ref l 0)))&lt;br /&gt;
	    (output accum)&lt;br /&gt;
	    (put-whole-string l)&lt;br /&gt;
	    (newline)&lt;br /&gt;
	    (loop '())]&lt;br /&gt;
	   [else&lt;br /&gt;
	    (let* ([len (string-length l)]&lt;br /&gt;
		   [dest (make-string len)])&lt;br /&gt;
	      (let loop ([i 0][j (- len 1)])&lt;br /&gt;
		(unless (= i len)&lt;br /&gt;
			(string-set! dest j&lt;br /&gt;
				     (vector-ref translation&lt;br /&gt;
						 (char-&amp;gt;integer (string-ref l i))))&lt;br /&gt;
			(loop (+ i 1) (- j 1))))&lt;br /&gt;
	      (loop (cons dest accum)))]))))&lt;br /&gt;
  (force-output))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Compiling==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gsc spectral-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Running==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gsi spectral-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	</feed>