git @ Cat's Eye Technologies SMETANA / f6f4ead
Convert documentation to Markdown; use env to find perl. Cat's Eye Technologies 10 years ago
3 changed file(s) with 38 addition(s) and 61 deletion(s). Raw diff Collapse all Expand all
0 SMETANA
1 =======
2
3 Chris Pressey, 1994(ish)
4
5 * * * * *
6
7 A long time ago (about six years ago), I was writing some amusing notes
8 to myself and among them was an "algorithm that'll never fly," which
9 went something like:
10
11 1. Swap steps one and two.
12 2. Flap wings.
13 3. Go back to step one.
14
15 It then occurred to me that reducing this form to the absurd (removing
16 the "Flap wings" instruction) just *might* fail to yield a totally
17 untractable language.
18
19 I originally wrote the interpreter as a Visual Basic application and
20 named it SMETANA - both an acronym for "Self-Modifying, Extremely Tiny
21 AutomatoN Application", and a reference to the composer of the same
22 name.
23
24 The distribution available here is a much better implementation of the
25 SMETANA interpreter in a much more device-independent and scalable form.
26 I have retained the English syntax exactly. The program ends when it
27 tries to peform step number *n*, where *n* is one plus the number of
28 steps given in the source.
29
30 Syntax of the SMETANA Language:
31
32 Smetana ::= Step {".\n" Step} ".".
33 Step ::= "Step" Integer "." (GoTo | Swap).
34 GoTo ::= "Go" "to" "step" Integer.
35 Swap ::= "Swap" "step" Integer "with" "step" Integer.
36 Integer ::= "0".."9" {"0".."9"}.
+0
-60
doc/smetana.html less more
0 <html><head>
1 <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1">
2 <title>Cat's Eye Technologies: The SMETANA Language</title>
3 </head>
4 <body bgcolor="#ffffff" text="#000000" link="#439773"
5 vlink="#ac9444" alink="#0cd490"
6 background="/img/sinewhite.gif" >
7 <h1>SMETANA</h1>
8 <P>Chris Pressey, 1994(ish)
9 <hr>
10
11 <p>A long time ago (about six years ago),
12 I was writing some amusing notes to
13 myself and among them was an "algorithm
14 that'll never fly," which went
15 something like:
16
17 <p>&nbsp;&nbsp;1. Swap steps one and two.
18 <br>&nbsp;&nbsp;2. Flap wings.
19 <br>&nbsp;&nbsp;3. Go back to step one.
20
21 <p>It then occurred to me that reducing
22 this form to the absurd (removing
23 the "Flap wings" instruction) just <i>might</i>
24 fail to yield a totally untractable language.
25
26 <p>I originally wrote the interpreter as a Visual Basic
27 application and named it SMETANA - both an acronym
28 for "Self-Modifying, Extremely Tiny AutomatoN
29 Application", and a reference to the composer of
30 the same name.
31
32 <ul><p><i>Turns out that the word</i> smetana <i>is
33 also Russian for</i> sour cream<i>. What do you know?
34 Finally, I join the all-too-exclusive club of people
35 who have invented a language
36 named after a foodstuff!</i></ul>
37
38 <p>The dsitribution available here is a much better
39 implementation of the SMETANA interpreter in
40 a much more device-independent and scalable form.
41 I have retained the English syntax exactly. The
42 program ends when it tries to peform step
43 number <i>n</i>, where <i>n</i> is one plus the number
44 of steps given in the source.
45
46 <!--
47 <p>Todo: mine information about SMETANA's Turing-Complete
48 status from the e-mail archives
49 -->
50
51 <p>Syntax of the SMETANA Language:
52
53 <pre> Smetana ::= Step {".\n" Step} ".".
54 Step ::= "Step" Integer "." (GoTo | Swap).
55 GoTo ::= "Go" "to" "step" Integer.
56 Swap ::= "Swap" "step" Integer "with" "step" Integer.
57 Integer ::= "0".."9" {"0".."9"}.</pre>
58
59 </body></html>
0 #!/usr/bin/perl -w
0 #!/usr/bin/env perl
11
22 ### BEGIN smetana.pl ###
33