@mdhughes Arrokoth -> use asdf I also renamed run-arrokoth to just run, so the invocation would be arrokoth:run instead of arrokoth:run-arrokoth (honorable mention: arrokoth/arrokoth:run-arrokoth) . The big useage difference is that the README line is now sbcl --noinform --eval '(asdf:load-system :arrokoth)' --eval '(arrokoth:run)' Or in development: sbcl (require :arrokoth) or (asdf:load-system :arrokoth)
@ksaj@phoe So there are only these special cases: (format t "~b" #b10) = (format t "~2r" #b10) (format t "~o" #o10) = (format t "~8r" #o10) (format t "~x" #x10) = (format t "~16r" #x10) If you want base 3, as we often do, we're stuck with just (format t "~3r" 3)
@ksaj We can run an arbitrary function in format: (defun new-thing (stream arg colonp atsignp)) (format t "~/new-thing/" 'foo) but I'm not quite sure what we would want it to do. Also, only the natural bases have their own format directives, the rest just get shoed into ~r along with base ten noun and adjective wordses and roman numerals. @phoe@r
@ksaj@screwtape Doing means that you can no longer have a symbols named I, V, X, M, and so on. It would suck if you could no longer (LOOP FOR I BELOW 100) because that would be equivalent to (LOOP FOR 1 BELOW 100) which is invalid.
@phoe@ksaj I swear I saw this somewhere else, and please do not consider it my original work ;p : CL-USER> (defun worst-roman-reader (s c n) (declare (ignore c n)) `(loop :with num := (symbol-name ',(read s t t t)) :for x :from 1 :below most-positive-fixnum :for rom := (format nil "~@r" x) :when (string= num rom) :return x) ) WORST-ROMAN-READER CL-USER> (set-dispatch-macro-character #\# #\r #'worst-roman-reader) T CL-USER> #RCCLV 255
@ksaj@phoe I think ksaj probably meant these actually: CL-USER> (format t "~o" #xFF) 377 NIL CL-USER> (format t "~x" #o377) FF NIL CL-USER> (format t "~@r" #o377) CCLV NIL
so I'm going to say because ~r is choose-your-own-base radix, with @r being roman numerals. Not like binary, hex and octal which have special readers as well as format directives.
@ksaj I look forward to your roman numeral read macro. CL-USER> (format t "~16r" #o10) 8 NIL CL-USER> (format t "~8r" #x10) 20 NIL CL-USER> (format t "~@r" #o10) VIII NIL
Straight from the stands to your feed ⚽🔥 All the goals, beefs, and bangers that matter. No fluff, just footy – real, raw, relentless.
follows me on the mastodon. I like to think they're a malware author still powered by tinyscheme lisp (famous javascript malware), and so they unironically listen to the show.
@dougmerritt Thanks and thanks for your advice on cursors in NUD. I had been imagining doing this to find cursors: CL-USER> '(#:foo #:bar #:cursor #:baz) (#:FOO #:BAR #:CURSOR #:BAZ) CL-USER> (find 'cursor * :key 'symbol-name :Test 'string=) #CURSOR perhaps with multiple uninterned cursors, which is why I had the funny cursor symbols actually swapping their way through conses but then I realised I can just do @kentpitman@ksaj@TheGibson@mdhughes@baruchel@nosrednayduj@ratxue@hairylarry