From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Navigating Lisp data structures Date: Mon, 05 Dec 2022 01:46:20 +0100 Message-ID: <875yeqfyte.fsf@fastmail.fm> References: <184de82cf09.eebfb5c8843687.6482234845227025147@excalamus.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.3; emacs 28.1.91 Cc: help-gnu-emacs@gnu.org To: Matt Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 05 02:03:07 2022 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 1p1zsu-0009cT-Pm for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 02:03:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1zrr-0004CY-4G; Sun, 04 Dec 2022 20:01:59 -0500 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 1p1zrp-0004CB-1x for help-gnu-emacs@gnu.org; Sun, 04 Dec 2022 20:01:57 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1zrn-0002dk-CW for help-gnu-emacs@gnu.org; Sun, 04 Dec 2022 20:01:56 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 51C875C007C; Sun, 4 Dec 2022 20:01:53 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 04 Dec 2022 20:01:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1670202113; x=1670288513; bh=w+vHJesHAw RfQM5ceTxZKJ3KqytLEFfKOVMZPFjOdLM=; b=LPuTc2iDR5ZKt5DqluEzKHQkiR MVEt1v2oM6XnPygUjrVh4m43SBxad/IIhNwLdIJYPmYIestZxkvl1FIP+7eJndqo Tlr0agqJd2aiEnnh3nZ7MP1EsBUFmIGvw/EkcXiKr2FyvC3OXizkx0JDFhdwUMQM uefHD4z3X/aIQcTrzuHal7prOZi93Lt9A2hJW+HKlZRFDgJx10Ds0vPCAFsTZbHf PgNVkGwRXXUo/QPB1DQG8frMElVxEB64nz5Udtmu2wcSq7EHIlxnfMQ3lkeSevVY kD8St2jNUNtGoToVtAHOSn2ezfhX4EDEZC0v6MM8picKpjz5VgxlaIC/MwFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1670202113; x=1670288513; bh=w+vHJesHAwRfQM5ceTxZKJ3KqytL EFfKOVMZPFjOdLM=; b=rNRf7f5dJ32k5u2Jv0KXIfpyvqCsKillHs6H4noObtS5 cSLMfxj+502CNOeg7d0VK5zuKfsrYNPrahVrPNXl+Geo09zhQ2wQK5My7xh0ORgM IPi1MpSAKInCdyH9BpvSf5Xsmpiu08ptJf+wBzKXJYq+Dzslksv9O0Q+YixJm1Ay kuuz0TCTG4rBK+d7FVC7q3QCKN1fS6tEYEnRc2X5YPlnltsOd0sWVQwOyrISsZ6H eWruB/FgjJzvYdtB71duzDwHAIphzoFd+H8nf6wB40cmPyZ7h2OUZm7sCLvu2TOs ijqoQNBojzjQgOgkrMo912+Ule7Hq2Cfz/5xOFGMRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudefgddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvvefuffgjkfggtgesthdtre dttdertdenucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhrvghm vghrshesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepgfeihfdutdetle ejheevkeejtdffueehfffhffefteeiteefhedtkedtiedtkeffnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhsse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 4 Dec 2022 20:01:52 -0500 (EST) In-reply-to: <184de82cf09.eebfb5c8843687.6482234845227025147@excalamus.com> Received-SPF: pass client-ip=66.111.4.27; envelope-from=joostkremers@fastmail.fm; helo=out3-smtp.messagingengine.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141378 Archived-At: On Sun, Dec 04 2022, Matt wrote: > I'm obviously looking at the problem through the lens of Python key-value > structures. When I try to translate the data structure to something like > nested plists, it feels messy. Maybe that's me simply being uncomfortable with > nested lists? When I mix list types (e.g. an alist of plists), the lookup > syntax becomes inconsistent (a mix of assocs and plist-gets, scattered with > cars and cdrs Note that there's also `alist-get`, which should at least help in reducing the number of cars and cdrs. You may also want to check out `let-alist`, which actually gives a nice way to access the elements inside a nested alist. -- Joost Kremers Life has its moments