Kyle R. Burton on 4 Feb 2008 19:30:59 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: good example of macros?

  • From: "Kyle R. Burton" <kyle.burton@gmail.com>
  • To: philly-lambda@googlegroups.com
  • Subject: Re: good example of macros?
  • Date: Mon, 4 Feb 2008 22:30:48 -0500
  • Authentication-results: mx.google.com; spf=pass (google.com: domain of kyle.burton@gmail.com designates 64.233.184.236 as permitted sender) smtp.mail=kyle.burton@gmail.com; dkim=pass (test mode) header.i=@gmail.com
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to:received:received:received-spf:authentication-results:received:dkim-signature:domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:reply-to:sender:precedence:x-google-loop:mailing-list:list-id:list-post:list-help:list-unsubscribe; bh=uPYj3Cble4t6f1j2G19pAtansdtBeij5+Zl9C7ehJ20=; b=oFbbaVP5ageLsPgw/sSNs5//cNLKD3rdzmwg8v2mh9o20hDZY0Dz31BUdJl2b11U+KYbJudyDO9WhWF7nDCLkKuX1gvMsOudUM2vPNlRzQGf4El4z4vR16UvCftZo+8LWAL363JqsrKbrAS8ma3lXiQXDnMRymiN0avXXu9JdA8=
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=9oiqdul+u7riE2v0ibCy4hbaW55drg4MZ6hRP6vrja4=; b=YsmHOBP2/UB1i7xwxgwjkwR1w7ztsaP11B4bNyRCoEC+YHusFkv9r4/qDUSKzGY3tSKA6zDuvuHWbiImk6mBnPOKL9ZNC/zo8q/jj180LtdjOE/hLddOF0I+Q1dtfWHHupA41e4zKvb7tOXzFNHwv9Knb9fS3Ysyz5Pzt1REI+c=
  • Mailing-list: list philly-lambda@googlegroups.com; contact philly-lambda-owner@googlegroups.com
  • Reply-to: philly-lambda@googlegroups.com
  • Sender: philly-lambda@googlegroups.com

> > One set of macros that has always interested me was the automata
> > example in this paper:
> > http://www.cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macros/paper.pdf
> > by Shriram Krishnamurthi.
> >
> > It really shows the power of what can be done. cut, while a great
> > macro and a way to save some keystrokes really doesn't do macros
> > justice.

What that paper shows is a great example of macros - though, I wonder
how well it'd fit (time wise) into the introduction to lisp
presentation - perhaps into a presentation on more intermediate or
advanced topics (like macros)?  Also, do you have any references for
define-syntax, syntax-rules, and let-syntax?  The best one I'd found
so far is JRM's syntax-rules primer:

  http://www.xs4all.nl/~hipster/lib/scheme/gauche/define-syntax-primer.txt

Are there any others that you can recommend?  I can be prepared to
talk through that paper -- if that is what the group wants, I think I
know enough about define-syntax syntax-rules that I can lead you
through what it means, what the various expansions look like and the
basics of how it works.  define-syntax / syntax-rules are in many ways
amazing compared to defmacro.  Not that they're not isomorphic, but
syntax-rules' pattern matching and auto-hygene are great features.

Kyle