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)9 hours ago
- repeatedly-eval-qt - good old-fashioned AI, in my lispmoo2?3 days ago
- Richard Waters' Series and lispmoo24 days ago
- Itches Of Mine Lispmoo2 Scratches5 days ago
- Princess revisited5 days ago
- My very own computing revolution16 days ago
- Defining north between two rooms with the low engine19 days ago
- Figuring out how my moonclimb worked19 days ago
- LISP kind of society urgently needed27 days ago
Leave a comment
Log in with itch.io to leave a comment.