freenode/#lisp - IRC Chatlog
Search
11:42:12
Xach
|3b|: fyi http://report.quicklisp.org/2020-06-12/failure-report/3b-hdr.html#3b-hdr_test
12:42:43
flip214
COMPILE returns multiple values, for warnings etc. Is there a way to get these as conditions?
12:48:05
|3b|
guess i could try using just enough d3d or vk to talk to that and do the rendering in GL, assuming they haven't added it by the time i get back to VR coding
14:48:52
pjb
But for an English speaking person, it's strange to say it's French, since English is the most latin german language, and French is the most german latin language. Basically English and French are the same, only English got the pronounciation all wrong.
14:51:52
pjb
You could say it's heptapod language to you. :-) https://www.wired.com/2016/11/arrivals-designers-crafted-mesmerizing-alien-alphabet/
15:37:24
Josh_2
With the MOP could I create a superclass that creates a lock for each slot within my class?
15:38:10
Josh_2
perhaps using the reader I could determine whether atomic operations could be used instead
15:39:28
phoe
you can create custom slot classes, create a custom metaclass to generate the locks, and modify the slot access protocol on the custom slots to perform (with-lock-held (...) (call-next-method))
15:39:30
pjb
Josh_2: AFAIK, this lock would only work around slot-value. This design would probably be very defective when you use other accessors.
15:41:03
phoe
if they do, then custom methods on SLOT-VALUE-USING-CLASS will have a chance to be invoked
15:41:16
pjb
Josh_2: probably, but specifically in the cases where it becomes difficult, it's the programmer who writes the accessor.
15:42:41
Josh_2
I use locks quite a lot and It's a bit of a pita, so something like this is certainly a future project idea
15:45:14
pjb
(defclass bank-accound () ((balance :initform 0)) (movements :initform '())) (defmethod deposit (b a) (incf (slot-value b 'balance) a) (push `(deposit ,a) (slot-value b 'movmements))) (defmethod movements (b) (decf +get-movements-fee+ (slot-value b 'balance)) (copy-list (slot-value b 'movements)))
15:46:29
Josh_2
well if I can't change the default behaviour of (slot-value ..) with this class then I'll just say "don't use slot-value" xD
15:51:13
Bike
you can change what slot-value does. i think pjb is attempting to describe the classic bank account problem: https://en.wikipedia.org/wiki/Concurrent_computing#Coordinating_access_to_shared_resources
15:51:31
Bike
in which locking around individual accesses to the quantities is not sufficient to ensure correct behavior
15:56:35
aeth
Don't name your slots the same as their accessors. I always prefix them with %, e.g. (%foo :accessor foo :initform 42)
15:57:46
aeth
But you can do more, e.g. I guard the setting of slot-value (mainly so I can cover both the initial set and the later accessors) with https://gitlab.com/zombie-raptor/zr-utils/-/blob/master/metaobject.lisp
16:04:54
aeth
Your situation would require more, though, since all I'm trying to do with my MOP manipulation is ensure that the type remains unchanged so that I only have to typecheck once. (I came up with my system because I kept getting random NILs and they're particularly annoying in a game engine since they freeze the whole thing and they're never where the NIL was produced.)
16:06:27
aeth
You are probably going to end up having to write custom sequences if you want to guarantee locking and you use sequences.
16:34:35
pjb
Bike: well, the classic bank account transfer operation involves two bank account objects. My example is worse: it's a single operation on a single object, but it involves two slots.
16:34:57
pjb
Monitors don't put locks around slot-value or accessors, but around all the methods of the object.
16:35:31
pjb
My example would be solved by monitors. The classic bank account transfer operation wouldn't be solved by monitors. This is probably why monitors are not in widespread use.
19:14:43
edgar-rft
seok: I think the minimum is 1) lisp-mode (comes with Emacs), 2) Slime for the communication with the external Lisp process, and 3) Quicklisp on the CL side, everything else is optional.
19:23:36
White_Flame
my installation steps are typically emacs, then quicklisp, then https://github.com/quicklisp/quicklisp-slime-helper
19:35:52
mrcom
seok: Other useful packages: company, ethan-wspace, hungry-delete. If using sly: sly-company, sly-quicklisp.
19:42:44
mrcom
seok: Other useful cemacs.d tweaks: cua settings (enabling/disabling Windows/Mac style cut/paste/delete); indent-tabs-mode; mouse-whell-scroll-amount; toggle-comment-on-line; recentf-save-file. If using ethan-wspace: (setq mode-require-final-newline nil)
19:47:23
mrcom
seok: Slime stuff I had enabled before switched to sly: (setq slime-contribs '(slime-editing-commands slime-typeout-frame slime-fancy-inspector slime-repl slime-trace-dialog slime-sprof slime-scratch slime-presentations slime-c-p-c slime-xref-browser slime-autodoc slime-references inferior-slime slime-asdf))
19:55:36
mrcom
seok: (setq slime-net-coding-system 'utf-8-unix) (setq slime-scratch-file "~/.slime-scratch") (setq slime-autodoc-use-multiline-p t)