Recently Written · git

blaher

Gilbert Baumann's blaher

git clone https://github.com/equwal/blaher

Log | Files | Refs


commit 8e4877fdd0a7f514c1f56313142e25299f713cf3
Spenser Truex <truex@equwal.com>
2023-05-27 18:44:42 -0300

Add readme.

 README.md | 35 +++++++++++++++++++++++++++++++++++
 blah.lisp |  8 --------
 2 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1840df2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
+Blaher
+---
+
+Say stuff with a template that has variables inside. It's like
+cowsay. Plus it's a macro, which is neat.
+
+Examples
+---
+
+```lisp
+(with-output-to-string (bag) (blah bag "Hi {{person}}!" :person "Joe")); => "Hi Joe!"
+
+(blah t "Hi {{person}}! I am {{computer-assistant}}, here to help you, {{person}}, with all of your problems."
+     :person "Fred"
+     :computer-assistant "Eliza")
+
+; => Hi Fred! I am Eliza, here to help you, Fred, with all of your problems.
+```
+```lisp
+(blaher "Hi {{person}}! I am {{computer-assistant}}, here to help you, {{person}}, with all of your problems.")
+```
+macro expands to:
+```lisp
+(LAMBDA (#:STREAM.6790 &KEY ((:COMPUTER-ASSISTANT #:G6791))
+         ((:PERSON #:G6792)))
+  (PRINC "Hi " #:STREAM.6790)
+  (PRINC #:G6792 #:STREAM.6790)
+  (PRINC "! I am " #:STREAM.6790)
+  (PRINC #:G6791 #:STREAM.6790)
+  (PRINC ", here to help you, " #:STREAM.6790)
+  (PRINC #:G6792 #:STREAM.6790)
+  (PRINC ", with all of your problems." #:STREAM.6790))
+```
+
+[source](http://localhost/bauhh/bauhh.dyndns.org_8000/gilbert)
diff --git a/blah.lisp b/blah.lisp
index 0967da8..ca359ba 100644
--- a/blah.lisp
+++ b/blah.lisp
@@ -32,14 +32,6 @@
                                 :keyword)
                         (parse-blah string (+ p2 2)))))))
 
-;; (with-output-to-string (bag) (blah bag "Hi {{person}}!" :person "Joe")) => "Hi Joe!"
-
-;; (blah t "Hi {{person}}! I am {{computer-assistant}}, here to help you, {{person}}, with all of your problems."
-;;      :person "Fred"
-;;      :computer-assistant "Eliza")
-
-;; => Hi Fred! I am Eliza, here to help you, Fred, with all of your problems.
-
 ;; (blaher "Hi {{person}}! I am {{computer-assistant}}, here to help you, {{person}}, with all of your problems.")
 
 ;; macro expands to: