libera/#commonlisp - IRC Chatlog
Search
18:15:31
char[m]
Am I supposed to be able to define a :writer in a class slot then define a custom reader with the same name using defmethod?
18:16:28
Bike
char[m]: no. usually the reader would be named WHATEVER and the writer would be named (SETF WHATEVER). this is what :accessor whatever does.
18:17:48
char[m]
Right, but if I want the reader to do something funky, I need to define my own using defmethod, so :accessor isn't going to work. I know the writer is (setf whatever), but both are whatever.
18:21:36
char[m]
OH. I thought I could just do :writer whatever (like :accessor). Does omitting the setf mean anything?
18:22:55
Bike
If you do :writer foo, it will define a function called foo. It will have the same lambda list as any other writer, that being (new-value instance)
18:23:40
Bike
what i was trying to get across with the :accessor comment is that :accessor essentially adds the (setf ...) on the writer for you. sorry for not making that clear.
19:30:26
Fare
What are property based testing libraries for Common Lisp, in the style of Quickcheck? I see check-it...
19:47:42
foxfromabyss
Hi! :) Would anyone be so kind as to enlighten me how.. sketch (and probably the underlying C FFI?) manages to have a persistent window that gets re-rendered on reevalation? (as opposed to the window getting closed and opened again) I feel like there's some sort of trick but i haven't managed to find it in the source
19:53:55
yitzi
Sabra's testing framework comparison doesn't mention any other property based ones besides cl-quickcheck and check-it.
19:56:54
phoe
the window is opened when a function is called, the window is closed when a function is called
19:57:39
phoe
of course there can be caveats, such as needing to synchronize to some framerate or to draw only from a designated thread, but these are technical complications; the general idea is simple
19:57:51
foxfromabyss
so it's more of a common lisp property, rather than the particular implementation?
20:01:56
phoe
if you were writing in C and had some embedded REPL in it - lua, python, scheme, whatever - it would work the same