A moonew language for itneraction.
So, in lisp we like to write new languages until we don't have to write lisp any more, at which point we are done writing lisp.
My last nightmare devlog was basically that. What I wanted to happen (broooadly) was happening, but it was unnatural to write. So I wrote
(defun mooread (s c) (declare (ignore c)) (let ((list (loop :collecting (handler-case (read s t nil t) (end-of-file () (return vals))) :into vals))) (append (list 'verb-plist :verb `(quote ,(intern (format nil "~@{~a~^-~}" 'com (symbol-name (car list))))) :dobj `(quote ,(cadr list)) :prep `(quote ,(caddr list)) :iobj `(quote ,(cadddr list))) (nthcdr 4 list)))) (set-macro-character #\{ #'mooread)
Clumsy but explicit! After which I can
{ @create $object :named sandwich
instead of
(verb-plist :verb 'com-@create :dobj '$object :prep ':named :iobj 'sandwich)
but they are equivalent. The former is simply a language for creating the latter.
Further keys can be explicitly specified, but their values are evaluated since I imagine they might come from variables.
{ @create $object :named sandwich :caller 'screwtape
Well, I thought it fixed the ugliness from last time. The other underlying issue is that the way command tables are populated is traumatic for the lisp compiler, but that issue is outside the scope of the jam.
Tomorrow I should be able to finish jamming, simply by writing these lovely { readchar extended mooese and little or nothing else.
Get lispmoo2
lispmoo2
Status | Prototype |
Author | screwtape |
Tags | common-lisp, emacs, lisp, mcclim, moo, new-kind-of-society, swank, Text based |
More posts
- LISPMOO2 INSTRUCTIONS (IMPORTANT)31 days ago
- repeatedly-eval-qt - good old-fashioned AI, in my lispmoo2?34 days ago
- Richard Waters' Series and lispmoo235 days ago
- Itches Of Mine Lispmoo2 Scratches36 days ago
- Princess revisited36 days ago
- My very own computing revolution47 days ago
- Defining north between two rooms with the low engine50 days ago
- Figuring out how my moonclimb worked50 days ago
- LISP kind of society urgently needed58 days ago
Leave a comment
Log in with itch.io to leave a comment.