From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.bugs Subject: bug#32841: assoc-set fails with dot notation association list Date: Mon, 21 Oct 2024 22:26:48 +0200 Message-ID: <875xpl8anr.fsf@wolfsden.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32256"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?UTF-8?Q?.%c2.=D0=BF.?= <2024110144@mails.szu.edu.cn> To: "32841" <32841@debbugs.gnu.org> Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Oct 21 22:28:01 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t2z0R-0008BP-Nf for guile-bugs@m.gmane-mx.org; Mon, 21 Oct 2024 22:28:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2z05-0001FO-Tc; Mon, 21 Oct 2024 16:27:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2z04-0001Ez-0y for bug-guile@gnu.org; Mon, 21 Oct 2024 16:27:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2z03-0005bn-OM for bug-guile@gnu.org; Mon, 21 Oct 2024 16:27:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=XlxJKoSrCwQ3f89uZJqCwxKmtIRo7BHfMgLniVni8VQ=; b=oBuTwrWOhF1Uq9IDFbtUsm9Ok1kQsZSTTzQrHMUwvfv49LDDDSywt8v1yGxuu4lVpQaSVrvXI9Dmvalwxe+mBsbUHgd7VilOYdLkhMBBHJzmboLYwsu40T02aLuRAYCO5B6NpjEI9V6UnZbyRrAY99cxRxBIhrQ9lqdPhZaUieCoBq+pBK+C7husGvfaGqkXynyjT/w5rSk3h+2H9/G8OoMCHoGYRH/XzhvPucbL8ZIrMip2n/DjlPn3qlTK/ZLTR0BeELwdfLs2YhGleVlwYYBIZniBlRkaM6vppyRfWnjfwEx20IfOtPwMzC/B5O116uqUBAzQnpBqdKRRIM68lQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2z0T-0004S6-Vq for bug-guile@gnu.org; Mon, 21 Oct 2024 16:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 21 Oct 2024 20:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32841 X-GNU-PR-Package: guile Original-Received: via spool by 32841-submit@debbugs.gnu.org id=B32841.172954244217054 (code B ref 32841); Mon, 21 Oct 2024 20:28:01 +0000 Original-Received: (at 32841) by debbugs.gnu.org; 21 Oct 2024 20:27:22 +0000 Original-Received: from localhost ([127.0.0.1]:53466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2yzq-0004R0-A8 for submit@debbugs.gnu.org; Mon, 21 Oct 2024 16:27:22 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]:58264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1t2yzn-0004Qo-Cc for 32841@debbugs.gnu.org; Mon, 21 Oct 2024 16:27:21 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id E223832FD6F; Mon, 21 Oct 2024 20:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1729542410; bh=eCVtyFMXccrzqLpxeXmEVwsIySFb3ESbCFQaJUtmaKg=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=sr7YlKlOITXbV0YO/8lbhq+cnnOMpmFiMNEE280NnLeuImXHEO2Ey5OKaUZtRY9MK ID7LXGrCVSBO3zHD2+oGWJpQ1ow/6wbNOkrx1Mw3a0nfb5yVJfmjPEwEKk2dH3Tf3F gQcaWabNm1+bStzyiPbjPzArltmNRube/zSwMmez4CcXFXUvjYZdWoi+m5JSmtYNwI 05tcBsxSJxI/nTVbT+F6SoV6qAkeCoRyAHIg3KXhj518bjf2SbYwwl9/AhqnCV6xpH hna9zOwxX4LD/NWRoHcUecVIG8HG/7oqQwReaHnoDnU6l+x7Sxf0HsH3UzCjjR1YHK UnXJrLr0TPwYtsAxhGq7zkantTHhPS/pr1bCmmOCVkz2z6OUtPWHuLr0N0oj4wDxwn 4ALU/6wKACUCetTQbWmbS/YtElIS7iXgetvSqktRpYihFE9mJxJ4acY4cQTphXYK2v 5CN62aHrnLpOGuRbcA23/Xma3CrO9XzNXxJTo1FETyQBmZACALn8Dt5bkv7GGIJLuC I9dgarRxz8mlJGHw5koKcz/w30cr1eaQNDymCfCQ7uaTLI6rkL6rmm6zAfRisMW4Xf uWk6klxOkCJ5GtXHayR14wWNzQ/WGwl6hj8joCgFW9HFGVRBtAboztOjhsB1wMCgTm Au84kPni5lbHQlanfOW76SWE= Original-Received: from localhost (unknown [193.32.127.157]) by wolfsden.cz (Postfix) with ESMTPSA id C988033094F; Mon, 21 Oct 2024 20:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1729542409; bh=eCVtyFMXccrzqLpxeXmEVwsIySFb3ESbCFQaJUtmaKg=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=E5T+sseIdIOoot2HXJkBwhTe1BZ5PYD3e+yW7Q9z317lugp8pCs7TMnjnSQ/dSOyz b95LciSY3xhUNQzbcoWiryJc4yFkemfNvnnGAeisAiuLlTEEA+1UDmjkM9gKXtAG3F tA93C/2+6GJhevKoW4K55ZRdTe8ZqDsy7O4svDDgvGF+1GdIgYYsNhYRpAxM/79HnF Ql/EPM/+MpE7XqfOPA3vGctymPpGlCV5giHAoVVzDCUmj3yYAcPOQYUkyBNXHZ0kUb tccYSawnktuZ1kJ+bpD6LSocaEpl4rYDos4XqY55kPRfOXuJxPtNdFRC1EaEKtNloA OOgTtcBEfSGxIH3L3oSQUcyT4Bl4Y194C9yG7VrUywD6TLbswVbYZBmUQS8JHs6F6P BKU98ipHwBCkLRGGQ1YUf5i63XLCLC4znyzkzbqacP/oh6OCoce/gNdpyLoLgmu12k Wls976/iYBKNxEwxxPqxzOE/pvrWdgb1gmRathOVBWnYUFGiPF83LUkeSoN+/zGzYu eFeMrUKIa4SB1EEcdVyZ5QFti1Oxiozt5ur0UXYBKnpHgnbzCnEzy/shsOvo6Xr0dq 8nVmp6AA4vX9WQX56KWgmPm03dyPJAK9OE8o/uFsM9ZPp1EwJS4Rtidw9zb62jdKMe RxEf3TtSHM0tNsDl6W7vcp0E= In-Reply-To: ("=?UTF-8?Q?.%c2.=D0=BF.?="'s message of "Mon, 21 Oct 2024 16:54:54 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11061 Archived-At: ".%c2.=D0=BF." via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" writes: > The thread and all replies were in 2018. Six years later, in 2024, Anyone= opening the up-to-date online manual still sees the old bad code there! Th= e manual is not adjusted even though previous emails had pointed the cause = and solution out! > Today, the page has a valid link of  https://www.gnu.org/sof= tware/guile/manual/html_node/Alist-Example.html  and still c= ontains > > 6.6.20.6  Alist Example > > Here is a longer example of how alists may be used in practice. > (define capitals '(("New York" . "Albany") ("Oregon" = . "Salem") ("Florida" . "Miami"))) ;; What's the capit= al of Oregon? (assoc "Oregon" capitals) =E2=87=93 ("Oregon" . "Salem"= ) (assoc-ref capitals "Oregon") =E2=87=93 "Salem" ;; We left out South Da= kota. (set! capitals (assoc-set! capitals "South Dakota" "Pierre")) c= apitals =E2=87=93 (("South Dakota" . "Pierre") ("New York" . "Albany") = ("Oregon" . "Salem") ("Florida" . "Miami")) ;; And we got Florida w= rong. (set! capitals (assoc-set! capitals "Florida" "Tallahassee")) c= apitals =E2=87=93 (("South Dakota" . "Pierre") ("New York" . "Albany") = ("Oregon" . "Salem") ("Florida" . "Tallahassee")) ;; After Oregon s= ecedes, we can remove it. (set! capitals (assoc-remove! capitals "Ore= gon")) capitals =E2=87=93 (("South Dakota" . "Pierre") ("New York" . "A= lbany") ("Florida" . "Tallahassee")) > > > >=20=20 > >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > =E6=B7=B1=E5=9C=B3=E5=A4= =A7=E5=AD=A6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 > =E9= =99=88 > =E6=9C=89=E9=AA=8F Your message is really hard to read, I cannot make heads or tails of the formatting. Could you please resend it formatted in a normal way? In particular, wrapping your text to 72 characters and properly formatting the code example will improve the readability a lot. Have a nice day, Tomas Volf --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.