Sujet : Re: lisp-sound v0.2.1
De : johan (at) *nospam* freecol.be (zara)
Groupes : comp.lang.lispDate : 17. Feb 2025, 09:55:15
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <m2h64tuf0s.fsf@freecol.be>
References : 1 2 3 4 5 6
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/25.3.50 (darwin)
Hi,
Kaz Kylheku <
643-408-1753@kylheku.com> writes:
On 2025-02-14, zara <johan@freecol.be> wrote:
Hi,
>
Kaz Kylheku <643-408-1753@kylheku.com> writes:
>
On 2025-02-14, zara <johan@freecol.be> wrote:
>
Here's the example of the dictionary actor without CLOS :
>
Your approach has a giant bug, which is fixable.
>
;;
;; -- start of file --
;;
(defun make-dictionary ()
(let ((*dict ()))
>
(defun add (value)
(setq *dict (append *dict (list (length *dict) value))))
>
These defuns are defining and later redefining global function
bindings.
>
>
I know dynamic binding but using the actor there is little error.
Block scoping using the #'dispatch should almost always call
the defined add, get-with-index methods etc. not something
from environments above the lexical scope.
>
I can't make heads or tails of this paragraph, but it sounds as if you
might be trying to convince me that your little coding tidbit isn't
incorrect. Are /you/ even convinced?
>
Make a test case which makes two dictionaries:
>
(let ((dict1 (make-dictionary))
(dict2 (make-dictionary)))
...)
>
In the ... part, write some tests which show that an operation on
dict1 has no effect on a lookup in dict1.
>
Every time you do make-dictionary it updates its local *dict. You do not
call anything dynamic binded, the meaning is to have a method you call
in an actor class instance, which is block scoped (OOP class and actor).
If you do not field the message the actor has it not but it is a feature of
the Lisp language not of my OOP Lisp.
(I mean if you call a message from dispatch, you better define
your called method locally).
>
That's the thing; you've not defined anything locally other
than the dict* variable.
>
defun is not a form which has a local effect.
>
That's it, literally.
I know, but it was just an example. AFAIK I am correct, and you have a
new Actor system for Common Lisp (e.g. bare bones systems).
>
In AFAIK, what exactly do you mean by K, know?
>
It used to work on 2019 clisp with a string not just the symbol,
which is now correct.
You are not correct, therefore if you "know" you are correct, there is
something wrong with how you determine when you know something
and when you don't.
See the clisp output.
zara
-- My software & art company : http://ko-fi.com/brandywine9