Re: lisp-sound v0.2.1

Liste des GroupesRevenir à cl lisp 
Sujet : Re: lisp-sound v0.2.1
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.lisp
Date : 17. Feb 2025, 02:01:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250216165611.690@kylheku.com>
References : 1 2 3 4 5
User-Agent : slrn/pre1.0.4-9 (Linux)
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.

(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.

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?

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.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
10 Feb 25 * lisp-sound v0.2.114zara
10 Feb 25 `* Re: lisp-sound v0.2.113Kaz Kylheku
11 Feb 25  +- Re: lisp-sound v0.2.11Madhu
14 Feb 25  `* Re: lisp-sound v0.2.111zara
14 Feb 25   `* Re: lisp-sound v0.2.110Kaz Kylheku
14 Feb 25    `* Re: lisp-sound v0.2.19zara
16 Feb 25     +* Re: lisp-sound v0.2.15Madhu
16 Feb 25     i`* Re: lisp-sound v0.2.14zara
16 Feb 25     i +- Re: lisp-sound v0.2.11Madhu
16 Feb 25     i `* Re: lisp-sound v0.2.12tpeplt
16 Feb 25     i  `- Actor object System in LISP without CLOS (dictionary example) - was Re: lisp-sound v0.2.11zara
17 Feb 25     `* Re: lisp-sound v0.2.13Kaz Kylheku
17 Feb 25      `* Re: lisp-sound v0.2.12zara
17 Feb 25       `- Re: lisp-sound v0.2.11Kaz Kylheku

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal