From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: Appending lists Date: Wed, 16 Jun 2021 13:01:10 +0000 Message-ID: <87im2eufop.fsf@posteo.net> References: <4tl1yvylvg1fxx5eefjs9mnk.1623688568572@email.android.com> <87o8c8l32h.fsf@posteo.net> <87zgvs2bup.fsf@zoho.eu> <87y2bby1kr.fsf@zoho.eu> <20210615091834.GB24886@tuxteam.de> <87im2ewr3k.fsf@zoho.eu> <20210616072819.GB17919@tuxteam.de> 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="26308"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 16 15:07:35 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ltVGZ-0006eJ-AA for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 15:07:35 +0200 Original-Received: from localhost ([::1]:55296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltVGY-0002Sp-99 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 09:07:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltVAU-0003Lg-AP for help-gnu-emacs@gnu.org; Wed, 16 Jun 2021 09:01:19 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:57809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltVAQ-0007xb-NR for help-gnu-emacs@gnu.org; Wed, 16 Jun 2021 09:01:17 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 1CD49240100 for ; Wed, 16 Jun 2021 15:01:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1623848472; bh=e7hHJFpgaUI4G0YwXSbFr7liOEjJqFWn8wlkDDPhOZA=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=oItVASjkZQnqoLQ8qB2AdYBhyvsHbcHX/WJbk1GFVwacBmIUepdmQS3dabRVSDLEi IYx8fl2oyksgZVEmaAar8R8m+luOyzH/bhfj8ePOZC83Xfiz2BJ49NBgGRhldX7ew6 +o8Nd3dLmPln4szduZVRWwXVisVF7sjSeYNLSyPCO/38swVAiECpvvCjSC5xFTPqAJ vPz8P/RuMLUnrTVc0rkIpDJcjyBXgbEPPcrO1kwosa+Vm+qiAYXlfiBcM4kWnerXsP M641ibMwc8AQNpsE/F8Zv7Z3uQUIDQBde1Ku7S/Z2kpsZ/ex20pjEg2JS/eVl/Hdi8 a/uk1pOA+zBZg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4G4lgC0j1fz6tmD; Wed, 16 Jun 2021 15:01:11 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=mutual; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: (Jean Louis's message of "Wed, 16 Jun 2021 14:30:51 +0300") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130903 Archived-At: Jean Louis writes: > * Yuri Khan [2021-06-16 14:18]: >> On Wed, 16 Jun 2021 at 16:35, Jean Louis wrote: >>=20 >> > What is it doing in background, or underground, does not really matter >> > for user, what matters is that `x' in following example is changed: >>=20 >> See, that=E2=80=99s your problem: You think there *is* an underground. >>=20 >> Lisp starts with symbols and cons cells and that=E2=80=99s the ground le= vel. >> It then builds up from that to lists and trees and associative lists. >> And when you have an associative list binding a symbol to a value, >> that=E2=80=99s when you get variables, some three floors above the groun= d. > > That is why I leave that to engineers like you. You see, today my > friend was mentioning how he does not like one but the other webmail > system. He has no clue about the underlying software, what he wants it > functionality.=20 > >> And then, when you invoke =E2=80=98nreverse=E2=80=99 on a list pointed t= o by a >> variable, you, from high up above, can see it scurrying down there and >> re-routing the =E2=80=98cdr=E2=80=99s of the cons cells comprising the l= ist, but not >> touching the one link from the variable to whatever cons cell had been >> the first in the list. > > I like your smartness, though I would like to have more practical use > of it. Thomas said that `nconc' does not change `list', unless it is > special form. And I can practically see this: > > (setq list '(A B C)) =E2=87=92 (A B C) > (nconc list '(1 2 3)) =E2=87=92 (A B C 1 2 3) > list =E2=87=92 (A B C 1 2 3) Change that to (let* ((list-1 '(a b c)) (list-2 (nconc list-1 '(1 2 3)))) (eq list-1 list-2)) ;; =3D> t and the point should be obvious. This is a confusion on a superficial level, just like how beginners in C-like languages find it weird that you can write something like x =3D x + 1 > So maybe he was thinking that symbol `list' does not change, and I > understood it that variable value does not change. > > Why not come back to that and explain me how the variable `list' did > not change from (A B C) to (A B C 1 2 3)? --=20 Philip K.