Single Status Update
That I can do this sort of thing in Lisp, with the macro remaining type-safe and also being confined to a single block, still blows my mind to this day. And this isn't even impressive code.
(macrolet ((update-project-dir (arg-name accessor) `(progn ;; Update the directory if an argument calls for it (when (cl-arg-parser:get-argument-value args ,arg-name) (setf (,accessor project) (cl-fad:pathname-as-directory (cl-arg-parser:get-argument-value args ,arg-name)))) ;; Merge in the project's base directory, then remove cruft (setf (,accessor project) (cl-fad:merge-pathnames-as-directory proj-dir (,accessor project))) (setf (,accessor project) (cl-fad:canonical-pathname (,accessor project)))))) (update-project-dir "wave-folder" source-dir) (update-project-dir "resampled-folder" resampled-dir) (update-project-dir "mp3-folder" mp3-dir) (update-project-dir "vorbis-folder" vorbis-dir) (update-project-dir "opus-folder" opus-dir) (update-project-dir "flac-folder" flac-dir))
- Show previous comments 2 more
By a long time ago, I mean 1988. That Lisp a programming language, not a macro language, and it was supposed to be good for AI. I never used it since then, so I remember very little about it.
I remember reading that somebody had made a version of it with every letter S replaced with TH, and he called it Lithp. That was very thilly of him.
Yeah, well... I have no idea what's going on there, so it looks impressive to me.