From 617ef60ecba6061b227fd0667bc55f50ff251268 Mon Sep 17 00:00:00 2001 From: Greg Hendershott Date: Wed, 24 Oct 2012 21:24:44 -0400 Subject: [PATCH] Add author and updated. Suppress Racket version. --- index.html | 3 ++- main.rkt | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 3ce6c7b..6c9caf3 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ -Fear of Macros
Version: 5.3

Fear of Macros

Copyright (c) 2012 by Greg Hendershott. All rights reserved.

    1 Introduction

    2 The plan of attack

    3 Transformers

      3.1 What is a syntax transformer?

      3.2 What is the input?

      3.3 Actually transforming the input

      3.4 Compile time vs. run time

    4 Pattern matching: syntax-case and syntax-rules

      4.1 Patterns and templates

        4.1.1 "A pattern variable can’t be used outside of a template"

    5 Syntax parameters

    6 Robust macros: syntax-parse

    7 Other questions

      7.1 What’s the point of with-syntax?

      7.2 What’s the point of begin-for-syntax?

      7.3 What’s the point of racket/splicing?

    8 References/Acknowledgments

    9 Epilogue

1 Introduction

I learned Racket after 25 years of doing C/C++ imperative programming.

Some psychic whiplash resulted.

"All the parentheses" was actually not a big deal. Instead, the first +Fear of Macros

Fear of Macros

Greg Hendershott

Copyright (c) 2012 by Greg Hendershott. All rights reserved. +
Last updated 2012-10-24 21:23:46

1 Introduction

I learned Racket after 25 years of doing C/C++ imperative programming.

Some psychic whiplash resulted.

"All the parentheses" was actually not a big deal. Instead, the first mind warp was functional programming. Before long I wrapped my brain around it, and went on to become comfortable and effective with many other aspects and features of Racket.

But two final frontiers remained: Macros and continuations.

I found that simple macros were easy and understandable, plus there diff --git a/main.rkt b/main.rkt index 5ec7231..ff07b37 100644 --- a/main.rkt +++ b/main.rkt @@ -1,7 +1,8 @@ #lang scribble/manual @(require racket/sandbox - scribble/eval) + scribble/eval + racket/date) @(define evaluator (parameterize ([sandbox-output 'string] [sandbox-error-output 'string]) @@ -10,10 +11,12 @@ @(define-syntax-rule (i body ...) (interaction #:eval evaluator body ...)) -@title{Fear of Macros} - +@title[#:version ""]{Fear of Macros} +@author{Greg Hendershott} @smaller{Copyright (c) 2012 by Greg Hendershott. All rights reserved.} - +@para[@smaller["Last updated " + (parameterize ([date-display-format 'iso-8601]) + (date->string (current-date) #t))]] @table-of-contents{}