freenode/#lisp - IRC Chatlog
Search
1:16:46
mrcom
minion: memo for Josh_2: Other notes: looks like you're trying to set up a circular dependency with VALIDATE-SUPERCLASS. "`',slot-names-lock-alist" isn't... what you want. The INITFUNCTION is the proper way to do it, completely overriding :INITFORM and :INITARG.
1:27:44
mrcom
minion: memo for Josh_2: And I suspect your end goal is automatically thread-safe slots. This is a common thought, but kind of a dead-end. The primary issue with thread-safety isn't reading or updating a single slot. It's the higher-level cross-slot operations (e.g. changing STREET-ADDRESS and CITY), cross-object (updating object's address and the ADDRESS-HASH-TABLE that points to it), and global (making sure there's only one obje
1:30:45
mrcom
minion: memo for Josh_2: You'll probably find you need a single mutex per object, and one or more global mutexes. Most importantly, you'll need to define atomic functions/generic functions, and these will be completely aware of the mutexes.
1:31:47
mrcom
minion: memo for Josh_2: In other words, you aren't going to need a broad superclass which invisibly adds lock slots.
6:16:22
beach
This one is for discussions about the language, implementations of the language, and implementations of applications written in Common Lisp.
6:35:14
tourjin
quicklisp install fails on (quicksisp-quickstart:install) with error of Condition of type: idxu INVALID-ARGUMENT-ERROR Socket error in "socket": EINVAL (Invalid argument)
6:46:53
tourjin
in ecl (require 'ecl-quicklisp) returns loading #p"/data/blhablha/ecl-20.4.24/ecl-quicklisp.fas, ecl-curl.fas, sockets.fas"
10:35:40
minion
Josh_2, memo from mrcom: EFFECTIVE-SLOT-DEFINITION is a virtual class and should not be directly instantiated. See https://stackoverflow.com/questions/21986977/additional-properties-to-slot-definition
10:35:40
minion
Josh_2, memo from mrcom: Other notes: looks like you're trying to set up a circular dependency with VALIDATE-SUPERCLASS. "`',slot-names-lock-alist" isn't... what you want. The INITFUNCTION is the proper way to do it, completely overriding :INITFORM and :INITARG.
10:35:40
minion
Josh_2, memo from mrcom: And I suspect your end goal is automatically thread-safe slots. This is a common thought, but kind of a dead-end. The primary issue with thread-safety isn't reading or updating a single slot. It's the higher-level cross-slot operations (e.g. changing STREET-ADDRESS and CITY), cross-object (updating object's address and the ADDRESS-HASH-TABLE that points to it), and global (making sure there's only one obje
10:35:40
minion
Josh_2, memo from mrcom: You'll probably find you need a single mutex per object, and one or more global mutexes. Most importantly, you'll need to define atomic functions/generic functions, and these will be completely aware of the mutexes.
10:35:40
minion
Josh_2, memo from mrcom: In other words, you aren't going to need a broad superclass which invisibly adds lock slots.
10:40:02
Josh_2
mrcom: I can get slot-value to grab a mutex using an :around on slot-value-using-class. I guess this could just be one aspect of a library I could create to aid with making parallel systems, because handling locks is such a pita
10:42:01
Josh_2
I'm also not trying to add additional properties to my slot definition, i simply want to append an extra slot
10:53:12
phoe
2) you can use with-slots based on the fact that, even though it's undefined by the standard, the last time I checked *ALL* implementations defined SLOT-VALUE on structures in a meaningful way, the same that you could expect from standard objects.
10:53:39
phoe
and suggesting option 2) is going to get me a real good scolding from beach in a few moments
10:59:28
jackdaniel
I think that it is a pretty bold omission to not even mention the structure-class metaclass in mop
11:39:00
Josh_2
I added a method for my metaclass and it worked just as expected, when I call slot-value slot-value-using-class was called (in sbcl)
11:39:50
jackdaniel
"Although no implementation is required to do so, implementors are strongly encouraged to implement the function slot-value using the function slot-value-using-class described in the Metaobject Protocol. "
12:49:51
tourjin
clang-10: error: linker commnad failed with exit code 1 ( use -v to see invocation)
12:51:48
mrcom
Josh_2: Yep, you're approaching the problem from bottom-up. You'll learn a lot about MOP in the process. Just warning you that you'll discover locking individual slots doesn't buy you much.
12:51:59
jackdaniel
that means that clang failed to link some objects after compiling them, this error doesn't allow to infere more from that
12:56:50
phoe
Josh_2: (defun frobnicate (object x y) (setf (slot-value object 'foo) x (slot-value object 'bar) y))
12:57:27
phoe
even if both slots are synchronized you still can get race conditions from two simultaneous calls to FROBNICATE
12:59:14
tourjin
document says sbcl can be compiled with ecl. so I tryed all day but only failed with several warnings and clang-10 error