From 31a933ffe1617cf912dea58b8bb856183f7668f1 Mon Sep 17 00:00:00 2001 From: Darren Bane Date: Mon, 18 Jan 2021 09:57:31 +0000 Subject: Commit local changes before pulling from upstream --- cecho.lisp | 10 ++++++++++ cxdrt.lisp | 3 +++ doc/breaking_rules.md | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 cecho.lisp 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). -- cgit 1.4.1-2-gfad0