Daemmerung
; @echo off && REM -*- scheme -*-
; if not "%MZSCHEME%" == "" goto :run
; set MZSCHEME=mzscheme.exe
; :run
; "%MZSCHEME%" "%~f0" %*
; exit /b
#lang scheme
(require xml)
(permissive-xexprs #t)
;(read-comments #t)
;;; Filter to scrub whitespace
;;;
(define f
(eliminate-whitespace
'(project path target property fileset condition copy exec cvs commandline tar classpath
tarfileset manifest section junit jar java and or not uptodate javac javadoc delete move)
(lambda (x) x)))
;;; Move "name" attribute to the beginning of any attribute list in an xexpr
;;;
(define (name-first-attrib l)
(letrec
;; take attribute list, move any "name" element to its car
((reorder-attrs (lambda (alist)
(cond
((null? alist) alist)
((assq 'name alist) => (lambda (el) (cons el (remove 'name alist (lambda (x y) (eq? x (car y)))))))
(else alist))))
;; process any element (tag attrs el*)
(process-element (lambda (el)
(cons (car l) (cons (reorder-attrs (cadr l)) (map name-first-attrib (cddr l)))))) )
(if (pair? l)
(process-element l)
l)))
(define (process in out)
(pretty-print (name-first-attrib (xml->xexpr (f (document-element (read-xml in))))) out))
;;; Open input file before output file, so that an error upon opening input doesn't create a zero-length output file
;;; If either parameter is #f, default to stdin/stdout
;;;
(define (call-filter-with-files in-file out-file proc)
(let ((output-processing-thunk (lambda (from)
(if out-file
(call-with-output-file out-file (lambda (to) (proc from to)))
(proc from (current-output-port))))))
(if in-file
(call-with-input-file in-file output-processing-thunk)
(output-processing-thunk (current-input-port)))))
(define input-file (make-parameter #f))
(define output-file (make-parameter #f))
(command-line
#:program "ant-make-scm"
#:once-each
(("--output" "-o") filename "Create S-expression format Ant buildfile" (output-file filename))
#:args (build.xml) (unless (string=? "-" build.xml) (input-file build.xml)))
(call-filter-with-files (input-file) (output-file) process)I've been working with SISC Scheme on Android, where it is truly slow. At the moment it is little more than a toy, a Schemely palmtop calculator.
Personally, I'd rather see that app on the Kindle DX, or a device with a similar screen. My eyes suffer enough already from all their computer time.
(If the app were on an Android device such as the Nook, I'd turn the pages with voice commands.)
http://jlongster.com/blog/2009/06/17/write-apps-iphone-schem...
I personally find this heartbreaking.
American Scientist, for science written for generalists. Bimonthly, so I'm not drowning in unread back issues (ever tried staying abreast of Nature?). To my eye, less sensational than New Scientist, and less editorializing than Scientific American. Worth it for the columns by Henry Petroski and Brian Rice even if you read nothing else.
Reason, for American libertarian political trash talk. I maintain the subscription only because my not-exactly-libertarian wife enjoys it. Domestic front propaganda, if you will.
If all three were taken from me, I would miss American Scientist very much. Highly recommended.
I shall plan my cousin's escape from that Murray Hill mad-house, and together we shall go to marvel-shadowed Cambridge. We shall take the T out to that brooding lab near the Charles and dive down through black abysses to Cyclopean and many-threaded CSAIL, and in that lair of the Bearded Ones we shall dwell amidst wonder and glory for ever.
Cheers!
I've tried using XKeymacs (http://www.cam.hi-ho.ne.jp/oishi/indexen.html) to this end, but had problems with the previous Thunderbird. Perhaps I should try again with 3.0.
Don't I wish....
;; The purpose of this compiler is to demonstrate
;; the most direct possible mapping of Scheme into C.
;; Toward that end, the compiler uses only two
;; intermediate transformations: mutable-variable
;; elimination and closure-conversion.(And don't get me started about the Judean People's Front....)
The just-released game QuantZ (http://www.gamerizon.com/gamerizon-news-and-media.html) was written almost entirely in Gambit Scheme (per https://webmail.iro.umontreal.ca/pipermail/gambit-list/2009-...). Your Scheme factoid for the day.
Increasing reading speed is a process of controlling fine motor movement--period.
as if the most important part of reading were increasing the rate at which symbols mechanically tickle your retinas.
This essay more closely reflects my experience. Create an environment that improves concentration, that allows focus, and the effective reading rate will skyrocket. We battle endless distractions that all conspire to prevent submersion in a text.
They're great fun as river shoes, though I have to guard my toes with greater care than I did with worn-out trail runners (my previous river shoe of choice).
Now, I didn't attend an elite prep school (quite the converse), nor did I remain in the academy after graduating (no loss for the academy, given my GPA...). So perhaps I received a subtherapeutic dose of whatever has saddled him with such despair. But I have no problem communicating with my fellow rural firefighters, a merry mix of garbagemen, carpenters, surveyors, innkeepers, pastors, snowplow repairmen, and the occasional stray programmer. I can take commands from an irrigation pipe salesman or a backhoe operator. They can do things I can't do, while I can do things they can't do; there is mutual respect. Occasionally they tease me for employing a sixty-four dollar word when a ninety-eight cent word would do, but we maintain communication, and we value our differences.
Certainly, my experience as as member of the pampered elite must have been very different from his. Am I the outlier, or is he?
When manipulating something small or fine on the screen with a coarse fingertip, it can be difficult to know if you actually have a 'grip' on it, or precisely which face/edge of it you're pushing/pulling. (In the physical world, we receive tactile feedback through our fingertips that helps us grasp things.) Frustrating, since much of the promise of multi-touch systems is in modeling physical-world manipulation.
Also, PC touch screens can quickly get greasy, worsening visibility even when your hands aren't on it. I developed for a PC-based multitouch environment last fall; by the end of a debugging session on the test system, its screen would be difficult to read. If I ever do that again I will buy silk gloves and learn to type in them (and hope that they are fine enough not to block input on a capacitive touchscreen).
Programming while out of doors may not be as satisfying as you might think. One is still very sedentary for very long periods: hot weather feels hotter, cold weather much colder, and buzzing insects more annoying. You may miss having a whiteboard or your printed-matter library handy. Also, outdoor furniture typically makes a terrible substitute for proper office furniture.
On the plus side, eye strain is less of a problem given the built-in eye relief of long focus outdoor viewing. And trees and birds make very pleasant office companions who will always respect your privacy.
Ultimately, I find the out of doors better for reading (email, tech papers, the occasional HN link) or reviewing code than actually programming.
I am also very fond of Emily Buehler's "Bread Science" (http://www.twobluebooks.com/book.php), particularly as a gift for precise individuals new to bread baking who might be put off by the length and depth of Hamelman.