From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [External] : Re: What's missing in ELisp that makes people want to use cl-lib? Date: Sun, 12 Nov 2023 19:45:13 +0000 Message-ID: References: <871qd8sfdx.fsf@posteo.net> <838r7g8pys.fsf@gnu.org> <87bkcbrgnr.fsf@posteo.net> <25924.21015.19614.951576@orion.rgrjr.com> <87bkc4jpja.fsf@dataswamp.org> <12da6bcb-1818-7fbe-12af-8d4607724332@gutov.dev> <87il6bt4z0.fsf@yahoo.com> <8734xetjkk.fsf@yahoo.com> <87cywhsrcf.fsf@yahoo.com> <87cywgx1z0.fsf@web.de> <83wmuowwp3.fsf@gnu.org> <83leb3v5al.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2997"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "joaotavora@gmail.com" , "emacs-devel@gnu.org" To: Eli Zaretskii , "rms@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 12 20:46:35 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r2GPi-0000Wp-TY for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Nov 2023 20:46:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2GOh-0000nS-LZ; Sun, 12 Nov 2023 14:45:31 -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 1r2GOc-0000mv-4H for emacs-devel@gnu.org; Sun, 12 Nov 2023 14:45:30 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2GOV-0000C9-R1; Sun, 12 Nov 2023 14:45:25 -0500 Original-Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ACJd9Uv022944; Sun, 12 Nov 2023 19:45:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=Kp8a11AL0UciaEiMvF+Fcnf5dcaMtKLcOFbRCDoPcL8=; b=1RKMwi9+LMFFSbNJmpussB7YPvkQHrevgwM2GdTdSghuH/RDIs1tFThi3GfydumV+1O4 VR1gG+6Kc7PzvEIEfCXeb/Qp9eng5S+zj7+uuH21bbV5bm4xkhvVs/lKmNDR61AZ/b53 DLTkTtvC4ykc4N8m3B4+4HupJ+nta521eUEQ2j4OugYkXYCoP8x0d9ofYCLLYCwakWhB NjthuhZB/NudbVZElif654dNoH8DC4WAWll7QtFKiWVAe5np3s4RB+VCDUpnEOizDsTh rKN5ZztUAaj/0/8sHVyQ03FYk5ErC3Z4DfbMNQh7+tOq8A9/tHS9exfimy0p4v8uyklX Ng== Original-Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2qjhnjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 12 Nov 2023 19:45:16 +0000 Original-Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3ACH0VRT029854; Sun, 12 Nov 2023 19:45:16 GMT Original-Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uaxqp6htb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 12 Nov 2023 19:45:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nN+VX1PoS2ryoVmE4OPyYXu+iuf61LdZIDuMm3a31aIifa8xltJ1uSOKdZplWeWltWItrjYMt7+6BnDT2Pxaxqqjt9go0A1iXbl4pYLcnE9ALM0wXtpOnwmloxQjr5ujRUQEptT0qGMSBk7purg4rbkFhchzvA4/B9KXKDmYfg/L8g/Q6iyTHTlF8wI3jNWYCp4W6jp4RBBx0/oiFd+gaLUdSjq5FWde3jxT0JUVSt2R4HPyRRPL/GohPdjUen7lMNnJYHtpWXriE7I62bscpMYGU20G3n5f2tewtWe6hEMR4rrXPh+mZ65zh1cSjH/id1cheh6a6OO2PukEzm9ViQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Kp8a11AL0UciaEiMvF+Fcnf5dcaMtKLcOFbRCDoPcL8=; b=Co7KTW2O9pIl56XgQ6ycMgKUM+5yAAkgL0rsNCdWjV3BFEzSOL9Nqp32WEtGBYIIXqaVG9H0PPyx1BylUrrCDs+uXn54Gm8+iIVWNnylP2ba7LDwSdFOYPlswAuFdvlJm3mPY5vvdyTaqRwwCwYhPOfrGJX7578tV4ecjFLPM1At5QJ3f4mYw4rgf7cG2lX2ca+k/fSu3jKztUuGysu9pecDAD9TBvywZUA9SPHMcJWaAsYcUL304iFV1gwhQy/KvCrrp63cXGNPuvU8D/3ovFEzKCW53jG5V98wu4OlogYOvq8uPA671QogLC0upCCKtawMZQFHFigAxfc+uyO8Qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kp8a11AL0UciaEiMvF+Fcnf5dcaMtKLcOFbRCDoPcL8=; b=KGM5W3rlssr7dcqV879bVwlZgj6py20q3FUFEcXgWvi2Lpu7QuesPBUwupyTeI6OAJEtcJdLdQ/K1rPjOez/ONPW/LUCX0+Lfmo3/Km6QKpz0FlwriLVWRGfQ1v5LIbipGlaHxMp1qZY+IVrxEqJr2T+DSmj6khxhwSmKC6142Y= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MW4PR10MB6417.namprd10.prod.outlook.com (2603:10b6:303:1e9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Sun, 12 Nov 2023 19:45:13 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4%6]) with mapi id 15.20.6977.028; Sun, 12 Nov 2023 19:45:13 +0000 Thread-Topic: [External] : Re: What's missing in ELisp that makes people want to use cl-lib? Thread-Index: AQHaFTPFjpRulNjDjE6+e62dY4BDf7B3FcaQ In-Reply-To: <83leb3v5al.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|MW4PR10MB6417:EE_ x-ms-office365-filtering-correlation-id: 5a4e135d-f1f4-456c-bf77-08dbe3b7e354 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FFUXEzWOQ01o6n3SiXR0jfpeifxespivD9kN8HM5DEWxCnttO44DW0mYUL1W2jUAFmCbSl6jm9HQNd4g/CxIXsmbKSTabOA9bASLZlXnLfFf2xd7EyMP9fJizJuk+JdCRa31qHwZ/Anl5o9zGdIsMkOlHftOX6ZT57f2qvEaC7sT0v6/Wu5R1kYV/5R8ye1lqFQaGkFx7xBjKHMqPV6idNvDhLG14E0O1yMOcDrVpnGA2UmhLJ7wfeyVPiP3RNOURA1oeUWFtt6wq0AB6nN/7dZ4sADaQZ6LeX76wqajPFD4Y0UZGD8uWdr04oJoHLxkh4dRQel1Dv4HGIAqR3YpDhwJHBXngYSzjXNAe9hGPti4vfZ2Oy6PzZYgHicnp7zvkmwMxSh2KiF57b5zINpp5MP4jXTu4OLxQYyANIU2DQGMs2P9HvtEZTEVbr+GQGlAs84eOTe0PdSKA9ejD19lQ1t0jOPDoaDxvPpjqAn553454RvJ1TJVJukbjaMqE0RAbnwZWfNhg03hWd9zzvD8fL/VJNZvXiPLMSpQmyCHAaqg2mZXBwW+35gU1oVn/SjsMM373YkjWJ2QXQmXxCu8uVfVSYWEWXcadIWF7yKpFAc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(136003)(396003)(346002)(376002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(38070700009)(2906002)(44832011)(52536014)(71200400001)(5660300002)(86362001)(41300700001)(33656002)(26005)(110136005)(54906003)(66446008)(66556008)(66946007)(76116006)(66476007)(9686003)(316002)(55016003)(64756008)(38100700002)(966005)(478600001)(122000001)(7696005)(6506007)(8676002)(4326008)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1+fa4b4Fy52zhGxPHd+5g+MPf5tZk5uD2Ihh6iO+f1GVbA9BWu6fvIf9Vrpj?= =?us-ascii?Q?5vKNIEf0dt0EydpLJYeo06hkDwrDffAm+GcOj2mF4ClY2JQRPn8zOj4kh/B+?= =?us-ascii?Q?rU2H1K4/KVIeVL6QIwRGXfJrpQRz6Hr8dIjHqkpN3khoc4Vbwp+ayFSxhD7O?= =?us-ascii?Q?UKW40WzuflJzJhj7bOZfDnC+hGExd4myK1yiYBYX9D/8xCguSX+scwUD6Mv/?= =?us-ascii?Q?WTyIpH+RqV9ljQhiBWBhixpZ/8ayragXjYaBXb3jRUUNw6FXuekDuc3Lr04j?= =?us-ascii?Q?0RWcZcfV62Sn8S1y4nlEkWTlV6KDKASncvVOen6sQvOT5eb7NyK6xUcCCVa4?= =?us-ascii?Q?l0O+Vh4PBhER5VS+gCkXEXZHLHDNmU9fv9a0BLdwdkXhK4IjQSaJxHnVmKln?= =?us-ascii?Q?DAMfecdOvq0bMuSfMQXtir/v6f8t/dBLdDxT8AQwWE04gA4vjthDbc5kLNmf?= =?us-ascii?Q?hrhzxE3DnMyrzb1lsoRz614r0hOQ3IEjt1yVd+9MFJBjFYeWceiIvV1I4lIU?= =?us-ascii?Q?IjjuFH3ZjBdvj7MyL6hNGxWVdNOtdhLve4K2bays5jUuhP7HoCH8FPy6WN62?= =?us-ascii?Q?nosRNLMQENWXpj1Xtz5d1LigFIjyiMrnVwDvbSJf+ltdTcglJgi/KbLXPPiU?= =?us-ascii?Q?KP X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 9rtlNDl3Cj6Z1MbmY2DkJFpm0mSWmfuN82dnccEn8dJgtjXpB+wHXyAmjO551jvwA/TW+O/GG0c8mOknt0rF49D2/u8nW5GyvFAb7kwzYj9xbEo07wHRereSOe3p/qreepwTAFyv3lR1kB27hbEdUyReiD0DhXwvGSZLmQ45gydM+uSbX+NkjDtKA56zydBm8IihOTlr9CfAz8Hh8VjRufSwCy6AiJkQpR/hYwZPdJffYbXLEYk+RGCipG4+mmI7NOSRTDsOVdI9xF2lJH+bfsFCpvgQ2YHnCHmpbWx6lSaYN8m4UxZLLI22uzwpWyCg2qQRICVdqFGVX+f5R9+dY5t3A4o5mocSy76/bpZnhLzTY4qD2neJ8kP0ve+ugVVPkpFu96slhS51Kc4UimE2GsTj565b4vuBYcTHUtpQT4K3pkLrqjs6z1ny5IoMXk/3diz7y3QUeNo5ctH3qxT/AcAU7mzFpyXyEPR7wSFAh0qfy6NInnZgZbKdNbRC1Yy5WxkZz4KifGx/mPC2JGdVmUWOaCopTYczRguGX7uClkJYDrpD/Y0o2kqU95ZGMFHe3RLOrq48Cc0ZmZWMIRe0NZCznqlcRobXRZCAEbB4iLixuViGi+PcYQRTy6Kt2tCXFK75GL/3HAcckyfEFrAaVkoGhtBPPZtXqeOAKNCKluImQgeZDtLGevbeTb4yZI7tMh+CZYM4KHvt3jV1cn8ZeuIIEBziGdR5Eu5QE3qZIDn0pe XpqlA7CKdByftDYxDA9SzA+Jc28VmY6X1B7rG8xQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a4e135d-f1f4-456c-bf77-08dbe3b7e354 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2023 19:45:13.5217 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eiKzwhLhT2xSt7f2cu9h6du5Z9qag2PFnohrRemdT7jMROXYNh2c0ca4Xg8mdTMmYlXaPMhZ8kID1JH0WxU6Vw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6417 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-12_19,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=360 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311120172 X-Proofpoint-GUID: mWUM4kJv6SQVkQAgYyRZ2WJ158DvJnW8 X-Proofpoint-ORIG-GUID: mWUM4kJv6SQVkQAgYyRZ2WJ158DvJnW8 Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.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_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312661 Archived-At: > Btw, the above is a very simple use of cl-loop. We have quite a few > of much more complex ones. For example: >=20 > (cl-loop > with comp-ctxt =3D (make-comp-cstr-ctxt) > with h =3D (make-hash-table :test #'eq) > for (f type-spec) in comp-known-type-specifiers > for cstr =3D (comp-type-spec-to-cstr type-spec) > do (puthash f cstr h) > finally return h) >=20 > or this: >=20 > (cl-loop for i =3D 0 then (+ i (if (eq (nth i list) ?\\) 4 1)= ) > for var =3D (nth i list) > while (< i size) > if (eq var ?\\) > collect (string-to-number > (concat (cl-subseq list (+ i 1) (+ i 4))) 8= ) > else > collect var)) >=20 > or this: >=20 > (cl-loop > named loop > with above > for lane in (comp-cstr-ctxt-typeof-types comp-ctxt) > do (let ((x (memq type lane))) > (cond > ((null x) nil) > ((eq x lane) (cl-return-from loop x)) ;A base type: easy case. > (t (setq above > (if above (comp--intersection x above) x))))) > finally return above)) >=20 > It isn't an accident that the reference documentation of cl-loop in > cl.info takes a whopping 700(!) lines. FWIW: "Don't Loop, Iterate": https://iterate.common-lisp.dev/doc/Don_0027t-Loop-Iterate.html "The Iterate Manual": https://iterate.common-lisp.dev/iterate-manual.pdf