Blog: 2009-04

Latest  2014  2013  2012  2011  2010  2009  2008  2007  2006  2005  2004  2003  2002  2001
-12  -11  -10  -09  -08  -07  -06  -05  -04  -03  -02  -01

Nice Notes & Leaving Stuff on the Web

Every now and then, I get an email from someone, just to tell me they're using something that I made. It's always a day-brightener.

Today's such email was someone thanking me for distributing something that I'd considered taking down a couple months ago: SICP in Texinfo format. Moreover, he found it useful for a reason I hadn't anticipated.

Eight years ago, the mysterious Lytha Ayth converted the HTML-and-GIF version of SICP to Texinfo format, including redrawing the figures using ASCII text characters. The stated intention was to make SICP accessible to students who could not afford to buy the printed book and whose computers were too modest to run both a Web browser and Scheme development tools at the same time.

The note I just got was from someone who is blind, who says that Texinfo format is easier to navigate using Emacspeak, and that the ASCII art figures let him read the equations that he could not in the HTML+GIF format.

I'm a Sucker for this Sort of Thing

 [video frame grab of Susan Boyle on stage] Susan Boyle on Britain's Got Talent

Bonnie Bassler on Bacteria Coordination

I think you'll like this talk.

Bonnie Bassler: Discovering bacteria's amazing communication system

Crowd Studies, Zach Braff, and Celebrity News

 [photo of crowd moving through Harvard Square] Back when I was playing photojournalist, I shot a street festival in Harvard Square. I had moved to the edge of the festival, and was probably taking a mental step back to think about what other kinds of shots I should be looking to get at this event, when I felt the crowd movement dynamics changing. I moved out of the crowd to get a better vantage on what was happening. A space opened up in the crowd, and then a very different crowd emerged, marching down a closed-off street. I waited for a clearing, then moved in front for a straight-on wide shot of the mass, before moving out of the way. Then someone else distracted me, so I didn't chase after the group to ask what was going on.

When I got home and reviewed my shots, I couldn't figure out whether or who was leading that group. My favorite wild guess was that the guy in the black tie was a distinguished guest speaker at Harvard, who had just announced that it was too nice a day to be cooped up in a lecture hall, and was leading the group to sit on the grass outside or to get ice cream.

So I sent that shrunk image plus a 100% crop of the faces to a friend who was a real photojournalist, for his interpretation. He immediately identified "Scrubs" and "Garden State" star Zach Braff at the front of the crowd, and found that Braff was at an event entirely separate from the street festival.

That spoiled my interest, since I think celebrity 'news' epitomizes one of the core cultural failings of contemporary America, and I had a strict rule against shooting celebrities unless they were doing something genuinely newsworthy.

I was reminded of that photo because I finally discovered this Scrubs show myself. I took another look at the photo, and found that I really liked the frozen instant of facial expressions and interactions, so I decided to post it after all. My favorite is the woman biting her sleeve.

XML DTDs Still Bite

XML is ill-suited for its intended purpose in many ways (which is an artifact of its basis in SGML). However, I have been able to look past those flaws while working on a new Scheme S-expression-based encoding of XML. The Scheme representation at least hides much of the syntactic badness of XML.

Look past-- until now. As I was finishing up the reference implementation of the XML writer, and getting into the finer points of !DOCTYPE DTD inner-subsets, I bumped into this:

<?xml version='1.0'?>
<!DOCTYPE test [
<!ELEMENT test (#PCDATA) >
<!ENTITY % xx '&#37;zz;'>
<!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
<test>This sample shows a &tricky; method.</test>

That %xx; is a use of a semantic atrocity. Beyond its offensiveness from a theoretical standpoint, it complicates the S-expression-based language and tools.

If we represent the problematic DTD fragment without touching the entity values, we get:

(!entity % xx "&#37;zz;")
(!entity % zz "&#60;!ENTITY tricky \"error-prone\" >")
(% xx)

In this case, to actually interpret the S-expression representation of the DTD, such as we might want to do for validation, we need an XML parser.

Encoding DTD in our S-expression language isn't really viable, for a number of reasons, including the problem of how to represent something like:

<!ENTITY % a '&#60;EN' >
<!ENTITY % b '&a;TITY c "ddd" >' >

I'm leaning towards making the inner-subset part of a !doctype form be uninterpreted strings of XML syntax.

Scheme Multiple Values and Arguments

Someone was asking about Scheme multiple values late last night, so, at 4am, I was inspired to kludge up a new application syntax that permitted multiple-value returns to be used as application arguments, one argument per value.

(define-syntax app
 (syntax-rules ()
   ((_ PROC)         (PROC))
   ((_ PROC ARG ...) (%app:1 (ARG ...) () (PROC)))))

(define-syntax %app:1
 (syntax-rules ()
   ((_ () (BIND ...) (PROC VAR ...))
    (let (BIND ...)
      (apply PROC (append VAR ...))))
   ((_ (ARG0 ARG1 ...) (BIND ...) (PROC VAR ...))
    (%app:1 (ARG1 ...)
            (BIND ... (actual (call-with-values (lambda () ARG0) list)))
            (PROC VAR ... actual)))))

(app vector 1 (values 2 3) 4 (list 5) (values 6 7))
⇒ #(1 2 3 4 (5) 6 7)

You could export this syntax as #%app for a PLT #lang language, though I wouldn't recommend that.

YouTube and Single Points of Failure

 [screenshot of Web browser with internal error page] YouTube went down, just after 1am EDT.

Most non-corporate video content in the history of all human existence... gone.

Google has an odd sense of humor for April Fool's Day pranks.

Earlier to... 2009-03

© Copyright Neil Van Dyke      Contact