libera/commonlisp - IRC Chatlog
Search
10:58:58
splittist
Gah! Why is colour so hard? Back in the day I'm sure cmyk to rgb was easy, but now it's all "it depends"...
11:03:21
splittist
I guess (a) devices started being able to represent lots of colours, so the idea of machine-controlled 'accuracy' arose, then (b) a huge accretion of 'knowledge' meant all programs dealing with colour had to account for the possibility of being used as the input to a vastly-sophisticated multi-millions press, rather than just throwing any old thing into a bitmap to be displayed on a device that has never been, and never will be,
11:27:39
splittist
Shinmera: I get no-applicable-method, with colored:convert [thing created with colored:cmyk c m y k] 'colored:rgb (:
11:41:28
splittist
Shinmera: fair enough. The super-naive don't care version is easy enough for even me to write. colored will help with the hard bits (:
12:18:03
hayley
A sufficiently low-bandwidth channel with chroma encoded in-band is indistinguishable from colour.
14:11:12
kevingal
When you recompile a function in Emacs with C-c C-c, how is it decided which package to bind the function in? SLIME/SBCL seems to know if there's an (in-package ...) earlier in the file and uses that package.
14:12:03
kevingal
I thought that maybe it would search back through the file for the previous (in-package ...).
14:15:44
beach
But it does not bind the function in a package. It just sets the *PACKAGE* variable so that READ can do the right thing.
14:21:25
edgar-rft
the current CL package is probably not detected by SLIME but by SWANK (the CL code in the slime directory) which highly likely just returns the value of the CL: *PACKAGE* variable
14:22:15
beach
edgar-rft: But it doesn't use the current package. It uses the package indicated by the IN-PACKAGE form in the file.
14:29:51
_death
what's interesting is that the heuristic includes a forwards search as well.. so evaluating the defun form in "(defun foo () 42) (in-package :bar)" would happen in bar
14:51:58
kevingal
Found the answer: https://github.com/slime/slime/blob/e193bc5f3431a2f71f1d7a0e3f28e6dc4dd5de2d/slime.el#L1986-L1992
14:52:43
kevingal
"The current package is defined as the buffer-local value of `slime-buffer-package' if set, and otherwise the package named by the nearest IN-PACKAGE as found by text search (cl-first backwards, then forwards)."