about summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorCase Duckworth2023-06-08 23:27:32 -0500
committerCase Duckworth2023-06-08 23:27:32 -0500
commitc258fe7f2347f03bf7b0ab02ac1596c65a072c1e (patch)
treea6b37ee6382a7fd98f4def83d01058f566cd6a53 /README.md
parentRewrite; rename to chicken-scratch (diff)
downloadchicken-scratch-c258fe7f2347f03bf7b0ab02ac1596c65a072c1e.tar.gz
chicken-scratch-c258fe7f2347f03bf7b0ab02ac1596c65a072c1e.zip
Add egg and makefile and program
Diffstat (limited to 'README.md')
-rw-r--r--README.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..6aec41f --- /dev/null +++ b/README.md
@@ -0,0 +1,35 @@
1# CHICKEN-SCRATCH --- heredocs for CHICKEN
2
3written by Case Duckworth <acdw@acdw.net> off an idea by evhan
4
5Licensed under BSD-3. See COPYING for details.
6
7CHICKEN has "[Multiline string constants with embedded expressions][multiline]"
8syntax, which is basically shell here-doc syntax but schemier and with a real
9programming langugage to embed. evhan's [beaker tool][beaker] (which is great,
10btw) uses this facility to do a quick-and-dirty templating for wiki generation.
11I realized that I could use the same facility for the same kind of heredoc-style
12templating I have done in various other SSGs like [unk][] and [vienna][], but
13with scheme. Thus, CHICKEN-SCRATCH was born.
14
15[multiline]: http://wiki.call-cc.org/man/5/Extensions%20to%20the%20standard#multiline-string-constant-with-embedded-expressions
16[beaker]: https://git.sr.ht/~evhan/beaker
17[unk]: https://git.acdw.net/unk/
18[vienna]: https://git.acdw.net/vienna/
19
20## Usage
21
22`expand-string` is the main entry point to this module. It takes a string and
23returns a string with all `#( ... )` forms expanded according to the CHICKEN
24rules. `expand-port` is a port version of `expand-string`.
25
26To enable truly invisible definitions within the expanded string, the `def`
27macro is provided which performs a `set!` on its variables, then returns a
28string guaranteed not to be in the input string, which is then filtered out
29in the expanded string.
30
31Finally, to enable CHICKEN-SCRATCH to be used in a shebang, if the first line
32of the input string begins with `#!`, it's deleted from the input.
33
34## Installation
35