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
- GUI table of unicode common lisp interface manager cat adventure7 days ago
- Drawing really a lot of love hearts26 days ago
- LISP CLIM LOVE HEART DRAWING 2: [DOUG'S] RECKONING27 days ago
- Hearter than I thought: LISP McCLIM DRAWING28 days ago
- Lengthy detailed GIT and ASDF LISP story30 days ago
- Add Another System Definition to Arrokoth PR36 days ago
- NUD GOLF graphics choices and more on the live show in a mo'37 days ago
- NUD GOLF 2 more nconc38 days ago
- NUD GOLF39 days ago
- A sidescrolling game as a Pratt parser40 days ago
Leave a comment
Log in with itch.io to leave a comment.