summaryrefslogtreecommitdiff
path: root/info/challenges/aro-bend/exercise.001
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/challenges/aro-bend/exercise.001
Initial commit
Diffstat (limited to 'info/challenges/aro-bend/exercise.001')
-rw-r--r--info/challenges/aro-bend/exercise.00181
1 files changed, 81 insertions, 0 deletions
diff --git a/info/challenges/aro-bend/exercise.001 b/info/challenges/aro-bend/exercise.001
new file mode 100644
index 0000000000..589c94f120
--- /dev/null
+++ b/info/challenges/aro-bend/exercise.001
@@ -0,0 +1,81 @@
+[Exercises 1,2,3 were originally posted together on 10 Oct 91]
+Date: Thu 10 Oct 91 09:51:32-EST
+From: Michael Downes <MJD@MATH.AMS.COM>
+Subject: Around the bend
+To: info-tex@shsu.edu
+
+Proposal for a regular feature:
+
+ AROUND THE BEND
+
+With the encouragement of George Greenwade (the INFO-TeX list owner), I
+would like to propose a regular department for INFO-TeX, called `Around
+the bend'. It will consist of macro-writing challenges on the level of
+the dangerous-bend exercises in the TeXbook, with interested parties
+invited to collaborate and/or compete to find the best solution. My
+motivation for doing this is partly selfish: to get more feedback from
+other macro writers about some of the interesting macro-writing
+problems that I run into.
+
+I originally approached George for advice about setting up a separate
+mailing list, but he thought that INFO-TeX and comp.text.tex readers
+would be interested. Since INFO-TeX mail is also channeled to
+comp.text.tex, readers of the latter should let me know if they don't
+want the extra traffic (although I don't expect it to be that much). I
+don't currently have access to read comp.text.tex directly, although
+George has been investigating the possibility of piping it through the
+INFO-TeX mailing list. So if you object by posting to comp.text.tex, I
+may not see your objection; send me mail, instead.
+
+The sample below should give a pretty good idea of what `Around the
+bend' would be like. Solutions should be sent to me instead of to
+INFO-TeX or comp.text.tex, on the premise that people usually won't want
+to read others' solutions until they've had a chance to try their own
+hand. A summary of the results would then be posted to the INFO-TeX
+list after two or three weeks; to those who submit solutions before the
+deadline, I could forward without delay solutions submitted by other
+people, for comparison.
+
+I will try to keep the difficulty of the exercises down to something
+reasonable, let's say, on the level of a homework assignment which a
+university student must complete in two weeks, finding time in the
+normal way from the usual busy schedule of other homework, class
+attendance, sports, and social life. However, be warned that the
+challenges will be hard. I'm planning to follow a `hard and fast'
+format: one or two hard questions, followed by one or two fast
+questions, where if you don't know the answer off the top of your head,
+you can either look it up in the TeXbook or find it by running a quick
+test.
+
+All right, here are the first three.
+
+**********************************************************************
+*** Exercise 1 (hard):
+Given arbitrary \b, \c, \d (macros without arguments), for example
+
+ \def\b{\c\c} \def\c{*} \def\d{\b\c}
+
+figure out how to define \a so that its replacement text consists
+of \b fully expanded plus \c not expanded plus \d expanded exactly once.
+I.e., with the above definitions the replacement text of \a
+should be
+
+ **\c\b\c
+
+You may not use \the or \noexpand in your solution. This is Exercise
+20.16 in the TeXbook, except that there's an added restriction: your
+answer must also not use the \halign ... \span method given in the
+answer to 20.16. (Yes, that means you can't use \valign either!)
+
+Why would anyone want to do such a hard exercise? Answer: advanced
+macro writing requires a thorough knowledge of expansion control
+principles.
+
+[Exercise 2 moved to exercise.002]
+[Exercise 3 moved to exercise.003]
+
+Send answers to:
+
+Michael Downes mjd@math.ams.com (Internet)
+
+A summary will be posted Friday, October 25, 1991.