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
- Add Another System Definition to Arrokoth PR3 days ago
- NUD GOLF graphics choices and more on the live show in a mo'4 days ago
- NUD GOLF 2 more nconc5 days ago
- NUD GOLF6 days ago
- A sidescrolling game as a Pratt parser7 days ago
- LISPMOO2 INSTRUCTIONS (IMPORTANT)66 days ago
- repeatedly-eval-qt - good old-fashioned AI, in my lispmoo2?69 days ago
- Richard Waters' Series and lispmoo270 days ago
- Itches Of Mine Lispmoo2 Scratches71 days ago
- Princess revisited71 days ago
Leave a comment
Log in with itch.io to leave a comment.