about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDarren Bane <darren.bane@emdalo.com>2021-01-18 09:57:31 +0000
committerDarren Bane <darren.bane@emdalo.com>2021-01-18 09:57:31 +0000
commit31a933ffe1617cf912dea58b8bb856183f7668f1 (patch)
treef8d40e324d62d4c0d45b749f87b7625b2f49898e
parent207cda23007f05dd954ee82511babba457465265 (diff)
downloadlsp-31a933ffe1617cf912dea58b8bb856183f7668f1.tar.gz
Commit local changes before pulling from upstream
-rw-r--r--cecho.lisp10
-rw-r--r--cxdrt.lisp3
-rw-r--r--doc/breaking_rules.md4
3 files changed, 15 insertions, 2 deletions
diff --git a/cecho.lisp b/cecho.lisp
new file mode 100644
index 0000000..9624712
--- /dev/null
+++ b/cecho.lisp
@@ -0,0 +1,10 @@
+(ql:quickload "jsonrpc")
+(require "jsonrpc")                     ; Required?
+(defun main ()
+  (let ((server (jsonrpc:make-server)))
+    (jsonrpc:expose server "subtract" (lambda (args)
+                                        (- (gethash "l" args) (gethash "r" args))))
+    (jsonrpc:expose server "add" (lambda (args)
+                                   (+ (gethash "l" args) (gethash "r" args))))
+    (jsonrpc:expose server "quit" (lambda (args) (quit)))
+    (jsonrpc:server-listen server :port 8192 :mode :tcp)))
diff --git a/cxdrt.lisp b/cxdrt.lisp
index 6c84657..3e95334 100644
--- a/cxdrt.lisp
+++ b/cxdrt.lisp
@@ -1,3 +1,6 @@
+;;; Depends on the "frpc" package from QuickLisp
+(ql:quickload "frpc")
+
 (defun xwrt (fname)
   (with-open-file (f fname :direction :output :if-exists :supersede :element-type '(unsigned-byte 8))
     (frpc:write-xtype :int32 f 1234)
diff --git a/doc/breaking_rules.md b/doc/breaking_rules.md
index 0c34594..0eb3474 100644
--- a/doc/breaking_rules.md
+++ b/doc/breaking_rules.md
@@ -88,7 +88,7 @@ Even though this is a prototype, attention should be paid to basic craftsmanship
 
 * Divide the system into packages, using the subset of CL that is
   supported by OpenLisp
-* Write one-sentence docstrings for at least each public fun and class
+* Write one-sentence docstrings for at least each public fun, class, and package
 * Use `declare`
   to check the types of parameters in public interfaces (see below).
 * Indent all the source code using Emacs.
@@ -194,7 +194,7 @@ But it's not worth writing custom rules.
 ### UI
 
 ltk is great for local GUIs.
-However, a product may require HTMX and the platform.sh stack.
+However, a product may (or may not) require HTMX and the platform.sh stack.
 Note that I prefer HTMX & ReST (following Fielding) to single-page applications
 (outside the very specific case of drawing on a canvas using ParenScript).