From a1011cbac02b5187b79dd904493df7f0452638bd Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 28 Aug 2023 23:28:40 -0500 Subject: Update README --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ff7f66b..b667597 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Schmaltz -## Render embedded scheme in texts +## Render embedded Scheme in texts -Schmaltz is a way to embed scheme code in text files using escape characters. This makes it a decent templating language à la PHP or shell here-documents. +Schmaltz is a way to embed Scheme code in text files using escape characters. This makes it a decent templating language à la PHP or shell here-documents. ## Rationale -Schmaltz was inspired by shell here-documents as well as CHICKEN's extension to scheme string literals, which looks like this: +Schmaltz was inspired by shell here-documents as well as CHICKEN's extension to Scheme string literals, which looks like this: ```scheme (define some-string #<#end -Here is a multiline string literal with #(display "embedded") scheme code. +Here is a multiline string literal with #(display "embedded") Scheme code. 1 + 2 = #(+ 1 2), etc. end ) @@ -33,7 +33,7 @@ EOF In shell here-documents, however, every expanded form is executed in a sub-shell, meaning that variable assignments and function definitions are not persistent across the document. -Schmaltz attempts to fix all of these problems. In fact, within a schmaltz-powered document you should have all of the power of scheme within rendered forms, as well as persistence of environment and access to the rest of your scheme system. Here is a schmaltz document in the same format as the above for illustration: +Schmaltz attempts to fix all of these problems. In fact, within a schmaltz-powered document you should have all of the power of Scheme within rendered forms, as well as persistence of environment and access to the rest of your Scheme system. Here is a schmaltz document in the same format as the above for illustration: ``` #,(define word "expansion") @@ -77,7 +77,7 @@ Perform `render`, returning a string with the output. Takes the same arguments Perform `render-string`, returning a string with the output. Takes the same arguments as `render-string`. #### `render-specials` *parameter* -Special characters to trigger expansion. Every expansion begins with `#`, then another character, then a scheme form. `render-specials` is an alist where CARs is a character literal and CDRs are procedures of one parameter, an input port. +Special characters to trigger expansion. Every expansion begins with `#`, then another character, then a Scheme form. `render-specials` is an alist where CARs is a character literal and CDRs are procedures of one parameter, an input port. `render-specials` defaults to @@ -94,7 +94,7 @@ String results not to include in the rendered output. For example, `define` mig #### `(unprintable/skip . _)`, `(unprintable/backtrack char)` *procedures* Helper procedures for definitions in `render-unprintables`. See the example below for usage ideas. -`unprintable/skip` skips whatever output is given from the rendered scheme code and prints nothing. `unprintable/backtrack` skips the output, but backtracks to output the character triggering the expansion as well as the preceding `#`. +`unprintable/skip` skips whatever output is given from the rendered Scheme code and prints nothing. `unprintable/backtrack` skips the output, but backtracks to output the character triggering the expansion as well as the preceding `#`. #### `render-environment` *parameter* The environment to evaluate rendered forms in. Defaults to `interaction-environment`. @@ -134,7 +134,7 @@ It wraps the form in an implicit `quasiquote` so you can include (string) variab (cons "#!eof" unprintable/backtrack)) ``` -The above skips printing unspecified values altogether, and the end-of-file marker backtracks to print the (non-)escaping `#` at the input's end. +The above skips printing unspecified values altogether, and the end-of-file marker backtracks to print the (non-)escaping `#` at the input's end. I'd recommend doing the same for any Scheme implementation, but I don't know how they might display unspecified, void, or end-of-file characters. ### License -- cgit 1.4.1-21-gabe81