smetana.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <html><head>
  2. <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1">
  3. <title>Cat's Eye Technologies: The SMETANA Language</title>
  4. </head>
  5. <body bgcolor="#ffffff" text="#000000" link="#439773"
  6. vlink="#ac9444" alink="#0cd490"
  7. background="/img/sinewhite.gif" >
  8. <h1>SMETANA</h1>
  9. <P>Chris Pressey, 1994(ish)
  10. <hr>
  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. <p>&nbsp;&nbsp;1. Swap steps one and two.
  17. <br>&nbsp;&nbsp;2. Flap wings.
  18. <br>&nbsp;&nbsp;3. Go back to step one.
  19. <p>It then occurred to me that reducing
  20. this form to the absurd (removing
  21. the "Flap wings" instruction) just <i>might</i>
  22. fail to yield a totally untractable language.
  23. <p>I originally wrote the interpreter as a Visual Basic
  24. application and named it SMETANA - both an acronym
  25. for "Self-Modifying, Extremely Tiny AutomatoN
  26. Application", and a reference to the composer of
  27. the same name.
  28. <ul><p><i>Turns out that the word</i> smetana <i>is
  29. also Russian for</i> sour cream<i>. What do you know?
  30. Finally, I join the all-too-exclusive club of people
  31. who have invented a language
  32. named after a foodstuff!</i></ul>
  33. <p>The dsitribution available here is a much better
  34. implementation of the SMETANA interpreter in
  35. a much more device-independent and scalable form.
  36. I have retained the English syntax exactly. The
  37. program ends when it tries to peform step
  38. number <i>n</i>, where <i>n</i> is one plus the number
  39. of steps given in the source.
  40. <!--
  41. <p>Todo: mine information about SMETANA's Turing-Complete
  42. status from the e-mail archives
  43. -->
  44. <p>Syntax of the SMETANA Language:
  45. <pre> Smetana ::= Step {".\n" Step} ".".
  46. Step ::= "Step" Integer "." (GoTo | Swap).
  47. GoTo ::= "Go" "to" "step" Integer.
  48. Swap ::= "Swap" "step" Integer "with" "step" Integer.
  49. Integer ::= "0".."9" {"0".."9"}.</pre>
  50. </body></html>