What are syntax-case pattern variables?

I asked here:

syntax-case takes a syntax object as an argument and destructures it via pattern matching into pattern variables.
What are pattern variables composed of?
syntax takes a template, and the pattern variables in it, to produce a syntax object that has the same lexical scoping as that of the pattern variable, so where does that lexical scope get stored?

and then Ryan explained:

The short answer is that syntax objects store scoping information and
that pattern variables have nothing to do with it.
Here’s a longer answer:
A pattern variable is essentially bound to an ellipsis-depth n and syntax object(s). If the pattern variable doesn’t have ellipses after it, then n is 0 and the pattern variable refers to a single syntax object. If it has one ellipsis after it, then n is 1 and there is a list of syntax objects. And so forth.
The ‘syntax’ form is like ‘quasiquote’, except that there is no explicit ‘unquote’; rather, pattern variables are automatically substituted, and the rest of the template becomes syntax object literals (via ‘quote-syntax’) that remember the bindings in scope where they occurred.
So pattern variables, while convenient, are not necessary for writing macros. You could do just the same with ‘quote-syntax’, ‘syntax-e’, ‘datum->syntax’, ‘car’, etc.
Lexical scoping is managed by the syntax objects. The macro arguments already have their lexical contexts embedded in them, and that is preserved as the macro takes them apart and puts them together with new syntax. This new syntax mostly comes from syntax literals.
The essence of the algorithm is explained in “Syntactic Abstraction in Scheme” by Dybvig et al.

A Scheme program that drives wheelchairs

You can read about a Scheme program that drives wheelchairs using machine learning and induction here:


;; Larceny version.
;; This program is part of a pattern recognition
;; system that drives a wheel-chair for quadriplegic
;; people: www.ciaem.org.br/ciaem.qps/Ref/QUIS-7GJP7J
;; A description of the complete system, written in
;; Scheme by Philippos, will be published in a paper
;; by Marcus Vinicius dos Santos, that can be reached
;; at web.mac.com/marcusvsantos/iWeb/Site/About%20Me.html
;; The wheel chair learns how to recognize EMG signals
;; from facial muscles. A neural network recognizes
;; the coeficients of a polynomial approximation of
;; the signal, and drives the chair accordingly.
;; The chair will be available soon, although the
;; pattern recognition version needs a special
;; order, and user training. This Larceny version
;; is not used in the chair prototype.
;; Store in file larcenet.scm

Already Postive Change for R7RS

The R7RS steering committee will be updating the charter to allow for another two members in the steering committee: Olin Shivers and Chris Hanson. Two more members is a good thing. Additionally, the post hints that the passionate discussion on the R6RS mailing list may have payed off with changes to the process that will better represent all of the community. I look forward to what comes of this.

(via PLT)

Most programming languages are created without any theory

The argument is made in this quote that most programming languages are created without any theory, and end up looking for it later, and rarely find it.

Here is the quote from Robin Milner:

Is there any lesson from the research field that you don’t see applied?

Robin: Most programming languages have been desgined without first thinking about the theory on which the meaning would be based. So, very often a language gets designed and implemented, and then what it means, what is supposed to happen when every program is run, is not necessarily predicted. Of course it was in some cases wonderfuly predicted, for example, in ALGOL60; the ALGOL60 report of 1960 was so accurate that one could follow it and find out what was going to happen. This isn’t always the case. Even in the good languages, the formal basis is not there before the language arrives, so what people do is later to retrofit a theory of meaning to the language, and maybe that means that the design could not take advantage of theoretical understanding.

Emulating the CRT for Video Games That Need It

Here is a good article about an effort that was made to make Stella, an Atari 2600 emulator, render the screen according the behavior of a CRT rather than an LCD. The differences are clear, and perhaps more interesting to folks who grew up playing games on such consoles :).
Whatever this case, this must have been an interesting programming problem.