libera/#commonlisp - IRC Chatlog
Search
6:48:23
pl
someone k-lined irccloud on one of the servers (someone pulling the plug on leenode? no idea)
6:56:48
ecraven
does slime/swank support sending text with text-properties to emacs, for displaying?
6:57:07
ecraven
so I'd like to generate some text in lisp, then send it to emacs to display with some formatting already applied
7:05:50
beach
This is not what you want of course, but I am just pointing out how much easier stuff like that would be with CLIM/McCLIM.
13:47:59
Josh_2
https://github.com/K1D77A/cl-coinpayments can someone give this a once over and tell me if they see anything wrong? or if they notice anything I can improve?
15:29:04
Josh_2
set-funcallable-instance-function is used to make an instance of an object funcallable right?
15:32:15
beach
What happens (I guess in most implementations) is that you will copy two items from the function you give as an argument to the FUNCALLABLE-STANDARD-OBJECT, namely the entry point and the static environment.
15:33:11
phoe
note that in about 99% cases the function that is set is actually a closure over the object itself, in order to be able to access its slots et al
15:33:12
beach
So the function given as an argument is not stored in the FUNCALLABLE-STANDARD-OBJECT.
15:34:56
phoe
then, unless you run into one of the edge cases I am thinking of, just use a function object then
15:39:45
beach
SICL bootstrapping uses a lot of FUNCALLABLE-STANDARD-OBJECT in the host system, because these objects are both host functions to be executed during bootstrapping by the host, and objects representing target functions with additional slots in them.
16:01:44
beach
And, yes, when the FUNCALLABLE-STANDARD-OBJECT represents a SICL generic function, the instance function is a closure over the FUNCALLABLE-STANDARD-OBJECT, so that the target methods can be accessed in order to construct discriminating functions and such.
16:05:04
Josh_2
No need for that for me as the objects are just being used to represent hooks, no need for them to contain the object themselves
16:07:06
beach
Another piece of information: All SICL function classes are subclasses of FUNCALLABLE-STANDARD-OBJECT. The only reason I can see not to do that are historical, i.e. that the implementation had a FUNCTION class before CLOS was added, perhaps in the form of PCL.
16:08:56
beach
I mean, a function needs to store things like the entry point(s), the static environment, and perhaps debugging information, GC information, etc. Might as well do that as slots of a standard object.
16:11:32
beach
There is obviously a class FUNCTION as required by the MOP, but it is a protocol class.