From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#16963: A patch to create a list-with-tail primitive. Date: Fri, 28 Mar 2014 18:48:09 -0700 Message-ID: <53362659.8030106@dancol.org> References: <1394200708.1710.4.camel@localhost.localdomain> <5330EDB0.1070406@dancol.org> <1395963445.1956.2.camel@localhost.localdomain> <5334B66A.1040908@dancol.org> <1396057618.8469.0.camel@localhost.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EwC8ngmkbcMmwcOTmijqPguqp7rCK93Om" X-Trace: ger.gmane.org 1396057750 8844 80.91.229.3 (29 Mar 2014 01:49:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 01:49:10 +0000 (UTC) Cc: 16963@debbugs.gnu.org To: Demetrios Obenour Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 02:49:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WTiOd-0006yK-9P for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Mar 2014 02:49:19 +0100 Original-Received: from localhost ([::1]:36846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTiOc-0008Ni-Ut for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Mar 2014 21:49:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTiOT-0008NX-N4 for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:49:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTiON-0005Dh-6t for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:49:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTiOM-0005Dc-Th for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WTiOM-0006GN-GC for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Mar 2014 01:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 16963-submit@debbugs.gnu.org id=B16963.139605771124026 (code B ref 16963); Sat, 29 Mar 2014 01:49:02 +0000 Original-Received: (at 16963) by debbugs.gnu.org; 29 Mar 2014 01:48:31 +0000 Original-Received: from localhost ([127.0.0.1]:55271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTiNq-0006FS-OQ for submit@debbugs.gnu.org; Fri, 28 Mar 2014 21:48:31 -0400 Original-Received: from dancol.org ([96.126.100.184]:39170) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTiNn-0006FG-9U for 16963@debbugs.gnu.org; Fri, 28 Mar 2014 21:48:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=9CXOU6eUR1SxyVayH7wudaGFgGMkIgKuW5yc3NWtTQ0=; b=iDDY8NsBzFiGtzHVp9AkK95IXBoEYyjk0A5wX0+Fjq9vGLFKR+rQ2pnmIXeAA2p+o2F75ldE15f9W4mQCG+SdJb7HjxhHAOW6Vy4fkO31MjiC9y2qyz8DtkCdoeib3GBgidv7XWax5wwSyCj6bXbb9T8Zjcjiq1k4x/rh4ftl9QZLIOo5HcZa8o0pkEmE14KEGdVWjTrie377bFtNXD+Y1BJ178Xxkxw9Q49Mo46t2PYNIk6d3QDAgxfX+2+cOOHAo3wBiqeeUGZKELyYKuARwTDE3dpgZwiQ22qIk/y9tCloiryGkYmhHuDl/InYOeSm9PC2/QFSSgsKJRigdm1+A==; Original-Received: from ip-64-134-226-73.public.wayport.net ([64.134.226.73] helo=[192.168.5.69]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WTiNk-0000ww-1f; Fri, 28 Mar 2014 18:48:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <1396057618.8469.0.camel@localhost.localdomain> X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87507 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EwC8ngmkbcMmwcOTmijqPguqp7rCK93Om Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/28/2014 06:46 PM, Demetrios Obenour wrote: > On Thu, 2014-03-27 at 16:38 -0700, Daniel Colascione wrote: >> On 03/27/2014 04:37 PM, Demetrios Obenour wrote: >> > On Mon, 2014-03-24 at 19:45 -0700, Daniel Colascione wrote: >> >> On 03/24/2014 07:10 PM, Stefan wrote: >> >>>> Since a comment in backquote.el said that backquote-list* needed = to be a >> >>>> primitive, here is an implementation of it as one, under the name= >> >>>> list-with-tail. >> >>> >> >>> I think it would make more sense to call it `list*'. Also it migh= t make >> >>> sense to change backquote.el so it uses this `list*' (tho probably= only >> >>> when passed with enough arguments). >> >> >> >> Agreed. On more that one occasion, I've wished we had a CL-less `li= st*'. >> >> If you do add this feature, please make sure the existing list* com= piler >> >> macros keep working. >> >> >> > What about just deleting these compiler macros, and making cl-list* = an >> > alias for list*? >> >=20 >> > There seems to be little point in keeping them if list* is a primiti= ve. >>=20 >> The new list* doesn't have an opcode, but cons does. >>=20 > Good point! My testing showed four nested cons calls to be much faster > than list* with five arguments by several dozen times. >=20 > Maybe list* should be a macro instead? No, list* as a function is perfectly fine --- we might want to call it indirectly sometimes, e.g., with apply. The compiler macro is sufficient to convert it to cons calls when we know it's safe. M-x disassemble is your friend. :-) --EwC8ngmkbcMmwcOTmijqPguqp7rCK93Om Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTNiZZAAoJEMAaIROpHW7IaksQAI21i8FVEOuWWb/35KhGwRcH nwIL3oplY/zwhSGvrLVhkF9q90gtI1UWFlnldBlAZTbJHJZsUmTnoh/DJ7tIAn7+ OXA7mJ3Po4IJcPdoEsxPy2aN+j8wk0hS2tTS4qpradO8EeXIRnrwzcLy4/ypdPJa PpvoAt/jvPrnKo2LE1OaZOqb+Xnn7ee3rCFVJSN3aMUBh4R6XCkQx1IxvtxOdI6X OaAGp7DG5AvhNgrH9AT8qcLfo/MnLqjnO5DrjliBLYbZySXNIJh5QBWHZms0SQBN llkS6r6KJYQmCT96wuf1SuZGfo6/swPcoi+vqeodyz9vF1Srur/CbrkjitjdcI75 /snLwFyf3TmejpBv19/JPEADxU2TUCgUtxMjounQBsoU3wq6zsKKE4Dht4+GxMoe bdo9CvpdiLzJQuf5F+LujwvGWTATS2BWWlmdlmBs/tFe6nVtp9PURKf6C/pzt6fc dD6IuC5immnlziAQZS3Ka5FBamdiwD+3vPkhipagfelJuN82toURkbysgKw+GW+f xfN6mt0x11AJ4+KJb3Uhh+plgKC42feE0d87ukjGjUIqVgMEdXJyOx0nE+M5P8yL MOGWICHvAYxJ8G9y5BIaL8vPlZaHss8wwzg2cFW2PErEaAYybPYN0hO6Zhq7pgJv Zwvh3IkhmTDBgDPU5JMr =H8wi -----END PGP SIGNATURE----- --EwC8ngmkbcMmwcOTmijqPguqp7rCK93Om--