HN user

Daemmerung

77 karma
Posts0
Comments33
View on HN
No posts found.

Ah. I completely misunderstood the question, having just finished reading The Man Who Loved Only Numbers, which had a brief digression on Fibonnaci's evangelism of Arabic numerals to the Pisan mercantile class. Mea culpa.

I whipped it with PLT Scheme in an afternoon. Trivial, like you said. This is my ant-make-scm.bat:

  ; @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)
C++ vs. Lisp 16 years ago

Most of the articles of any size on that site have been cut-and-pasted from elsewhere. Maybe it's a splog-in-training.

There is no JIT-compiler on Dalvik, and its garbage collector is a very slow mark-sweep. Both are known deficiencies being addressed by the Android team.

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.

The iPad's the right size (ever balanced a laptop on its side on a piano's music desk?), and a touchscreen would certainly be convenient for turning pages and annotating scores.

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.)

APL would seem to offer a solution to the challenges of programming on a 240-pel-wide device. Unfortunately, WinMo doesn't offer any way of extending its HR. So Pocket APL users must enter APL characters by hunt and peck on a soft on-screen input panel.

I personally find this heartbreaking.

Yet another Economist subscriber here, for international affairs.

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.

... The tense extremes of horror are lessening, and I feel queerly drawn to recursive expressions instead of fearing them. I read and code strange things in sleep, and awake with a kind of exultation instead of terror. I do not believe I need to read all of SICP. If I did, my father would probably shut me up in a C++ shop as my poor little cousin is shut up. Stupendous and unheard-of splendors await me below, and I shall seek them soon. Defun progn r'assoc-if rplaca a ia! Defsetf! No, I shall not manage my own callstack-- I cannot be made to manage my own callstack!

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.

The last time I noticed Matt Might's name, it was as a grad student advisee to Olin Shivers-- last surviving keeper of the CPS flame!-- writing a hairy dissertation on control-flow analysis in higher-order programs. So at some level, it amuses to see that this particular didactic-purposes toy compiler does /not/ transform its source into CPS or any variant, and does /not/ perform any control-flow analysis.

  ;; 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.

If you are learning Scheme by reading SICP, you might want to install MIT/GNU Scheme. Otherwise, let me join the bandwagon in endorsing PLT. The PLT camp has its own favored textbook, qv http://www.htdp.org/ .

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.

Yesterday's "speed reading" seed article claimed:

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.

"Strips of old tire" (from your cited article) would be thicker than the soles of my Fivefinger Sprints. All of my running surfaces are rocky or gravelly, and the Sprints do not provide enough protection for me against stone bruising. Perhaps my feet will toughen, with more miles in these shoes... I don't know.

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).

Neurotic indeed. The author was born in 1964 (source: http://en.wikipedia.org/wiki/William_Deresiewicz), which makes him the same age as me. Thus we probably attended Yale as undergraduates at the same time. Yet I recognize absolutely none of the dynamics that he describes. It is never quite clear what he is narrating from his own remembered student experience versus what he is surmising from observing Lit students around him.

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?

Not only are fingers very low-resolution input devices, but they're opaque and attached to a big meaty human hand, obscuring your view of whatever you're manipulating. The visibility problem worsens with multiple touch, since you may have both hands between your eyes and the screen.

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).

I do a little of this, using a Dell D630 ATG (reasonable review: http://www.ruggedpcreview.com/3_notebooks_dell_ATG630.html) to supply screen visibility in full sunlight.

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.