cursed-related erratum 

ah, phooey, I forgot to bind *package* in the _other_ one

more cursed, postamble 

@cwebber

(to-do some-function (arg1 arg2 arg3))

Golfing the last form down to fit inside one of these may have cost it not just reasonable locals but reasonable argument names, but by Zarf it still functions and the restart names are intact and that's more important

I am so sorry

more cursed (4/4) 

@cwebber
(defmacro to-do (f ll) (alexandria:with-gensyms (a r b) `(defun ,f (&rest ,a &aux (*n-i* (make-condition 'not-implemented :f ',f :ll ',ll :a ,a))) (prog () g (restart-case (error *n-i*) (eval-return (,r) :report "Return a result." :interactive i-r (return (values-list ,r))) (define-anew (,b) :report "Define the function." :interactive i-d (case ,b (abort (go g)) (t (fmakunbound ',f) (eval `(defun ,',f ,',ll ,@,b)) (return (apply ',f ,a))))))))))

more cursed (3/4) 

@cwebber
(defun i-d (&aux (f (n-i-f *n-i*)) (*package* (symbol-package f))) (format *query-io* "Enter body expressions for ~S ~:S. Enter ~S when done, ~S to abort.~%" f (n-i-ll *n-i*) 'return 'abort) (prog (form acc) again (write-string "> " *query-io*) (case (setf form (read *query-io*)) (return (return (list (nreverse acc)))) (abort 'abort) (t (push form acc) (go again)))))

more cursed (2/4) 

@cwebber
(defun i-r (&aux (ll (n-i-ll *n-i*))) (format *query-io* "Enter an expression to evaluate over ~:S: " ll) (handler-bind ((style-warning (muffle-warning))) (list (multiple-value-list (eval `(destructuring-bind ,ll ',(n-i-a *n-i*) ,(read *query-io*)))))))

more cursed (1/4) 

@cwebber
(define-condition not-implemented () ((f :type symbol :initarg :f :reader n-i-f) (ll :type list :initarg :ll :reader n-i-ll) (a :type list :initarg :a :reader n-i-a)) (:report (lambda (c s) (format s "Function ~S ~:S is not implemented." (n-i-f c) (n-i-ll c)))))

(defvar *n-i*)

```
(defmethod encode ((object float) &optional (stream *json-output*))
(let ((*read-default-float-format* 'double-float))
(format stream "~F" (coerce object 'double-float)))
object)
```

That's more like it! Haha! ☕ I'm not sure off the top of my head why it binds the reader setting there, probably in case of *print-readably* or something.

Show thread

Aha! It's been fixed later on! Only the common-lisp.net project directory is out of date because the project got -ified. Foo!

Show thread

(in package YASON, as part of a JSON encoder)

```
(defmethod encode ((object float) &optional (stream *standard-output*))
(princ (coerce object 'single-float) stream)
object)
```

.… you are kidding me. You are _kidding_ me. Oh, come _on_!

Today's fun command: `find / -mindepth 1 -maxdepth 1 \( -type d -not exec mountpoint -q {} \; \) -exec du -shx {} +`

(-xdev only prevents descending _into_ mountpoints; it doesn't prevent hitting the mountpoints themselves.)

Today in “ideas I vaguely had in the shower once upon a time but never developed, and which I am pleased to see someone actually doing”: supposedly Zoiper's push-notification handling does the sort of “client side keeps the actual credentials, push notification is only used for a sort of proxy/tunneling handoff” that seemed like the way to do “handling the push-centralization lockdown without going the full vertical integration route”: zoiper.com/en/support/home/art

just autodetected a .dir-locals.el file as Common Lisp rather than elisp even though I'm sure it knows the latter exists. I am amused and facepalming.

And the Arch `python-pip` package is a few months out of date, but also supposedly this is partially-fixed in 20.2.2 to at least only prompt once, but I have 20.2.4 from Arch and it still does the keyring unlock request a gazillion times. :oh_no:

Show thread

That is to say, it's apparently checking too aggressively for credentials that might be needed to retrieve some things…

Show thread

“The application '/usr/lib/python3.9/site-packages/pipenv/resolver.py' has requested to open the wallet 'kdewallet'.” Why‽ Aha… github.com/pypa/pip/issues/809 foo!

A thing I've just tentatively started doing with a person who has some work for me which I've been making on-and-off progress on: “overheard in the office” stream-of-consciousness about what I'm doing in occasional emails, the sort of thing I expect is more commonly done in side channels in collaboration chats. (This as an adjunct to and not replacement for more well-formed status updates, of course.) It feels very much in tune with the form of shared babble that exists in the current Internet era.

“The final sequence number in a range has the string "E0" appended to it, which doesn't affect its numeric value, but gives you something to search for if you want to exclude the endpoint.” Ah,

(But you'd think the same culture that resulted in the XML Namespaces specifications wouldn't shy away from putting together some complex shared infrastructure for that!)

Show thread

In particular it feels like this is mainly a way of short-circuiting the inherent extra resolution steps you'd ‘normally’ have to go through for “find the current authoritative documentation for this eternally-minted identifier”, because actually deploying that kind of resolution runs into ~“portable client-side extensibility doesn't exist” (hm, nowadays?). I wonder why this didn't get solved with, say, “several institutions mirror a database of these”—more complicated, admittedly.

Show thread

Something unsettles me about how much material defined in terms of xmlns, OWL, etc. uses http URIs for identifiers. TLS-related handwaves aside, not using a date stamp like tag URIs do seems like it leaves it all open to taking on new exciting ambiguities should any of the domain names lapse. (The alternative of creating exciting ways to find out that the domain name you just bought is covered with de facto holes in what you can define under it is arguably ‘better’ but still not good.)

Show older
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!