From unknown Fri Aug 15 16:21:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21782 <21782@debbugs.gnu.org> To: bug#21782 <21782@debbugs.gnu.org> Subject: Status: 25.0.50; New functions nfront/front Reply-To: bug#21782 <21782@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:21:45 +0000 retitle 21782 25.0.50; New functions nfront/front reassign 21782 emacs submitter 21782 Tino Calancha severity 21782 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 05:55:00 2015 Received: (at submit) by debbugs.gnu.org; 29 Oct 2015 09:55:00 +0000 Received: from localhost ([127.0.0.1]:43241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrjvA-0000Uh-Ax for submit@debbugs.gnu.org; Thu, 29 Oct 2015 05:55:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32988) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrjv8-0000UY-8O for submit@debbugs.gnu.org; Thu, 29 Oct 2015 05:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrjv6-0004xd-SM for submit@debbugs.gnu.org; Thu, 29 Oct 2015 05:54:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrjv6-0004xZ-Om for submit@debbugs.gnu.org; Thu, 29 Oct 2015 05:54:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrjv5-0002ec-OR for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 05:54:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrjv1-0004wp-Nq for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 05:54:55 -0400 Received: from calancha-ilc.kek.jp ([130.87.234.234]:45136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrjv1-0004wQ-DP for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 05:54:51 -0400 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id E31E3B44B; Thu, 29 Oct 2015 18:57:59 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id CC651B447 for ; Thu, 29 Oct 2015 18:57:59 +0900 (JST) Date: Thu, 29 Oct 2015 18:57:59 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: bug-gnu-emacs@gnu.org Subject: 25.0.50; New functions nfront/front Message-ID: User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1468197610-578395305-1446112679=:4771" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --1468197610-578395305-1446112679=:4771 Content-Type: text/plain; format=flowed; charset=US-ASCII In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2015-10-29 Repository revision: 07830c3d5c801d7d55622215b46ba692c6afa1d2 I found very useful to define one function returning: (nreverse (last (nreverse list) N)) (for a given list and integer N) Maybe its already defined somewhere, but i cannot find it. Examples of the new function: (let ((ltest '( 1 2 3 4 5 6))) (nfront ltest 3)) (1 2 3) (let ((ltest '( 1 2 3 4 5 6))) (nfront ltest 1)) (1) (let ((ltest '( 1 2 3 4 5 6))) (nfront ltest 20)) (1 2 3 4 5 6) (let ((ltest '( 1 2 3 4 5 6))) (nfront ltest)) (1 2 3 4 5 6) --1468197610-578395305-1446112679=:4771 Content-Type: text/plain; charset=US-ASCII; name=subr.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=subr.patch ZGlmZiAtLWdpdCBhL2xpc3Avc3Vici5lbCBiL2xpc3Avc3Vici5lbA0KaW5k ZXggZWE5MjZhZS4uOTc2ZTRmZCAxMDA2NDQNCi0tLSBhL2xpc3Avc3Vici5l bA0KKysrIGIvbGlzcC9zdWJyLmVsDQpAQCAtNDA1LDYgKzQwNSwxOSBAQCBu YnV0bGFzdA0KIAkgICAoaWYgKD4gbiAwKSAoc2V0Y2RyIChudGhjZHIgKC0g KDEtIG0pIG4pIGxpc3QpIG5pbCkpDQogCSAgIGxpc3QpKSkpDQogDQorKGRl ZnVuIGZyb250KGxpc3QgJm9wdGlvbmFsIG4pDQorICAiUmV0dXJuIGEgY29w eSBvZiBMSVNUIHdpdGgganVzdCB0aGUgZmlyc3QgTiBlbGVtZW50cy4NCitJ ZiBOIGlzIG9taXR0ZWQgb3IgbmlsIHRoZSBmdWxsIGxpc3QgaXMgY29waWVk LiINCisobGV0ICgobSAobGVuZ3RoIGxpc3QpKSkNCisgIChpZiAoYW5kIG4g KDw9IG4gMCkpIGxpc3QNCisgICAgKG5mcm9udCAoY29weS1zZXF1ZW5jZSBs aXN0KSBuKSkpKQ0KKw0KKyhkZWZ1biBuZnJvbnQobGlzdCAmb3B0aW9uYWwg bikNCisgICJNb2RpZmllZCBMSVNUIHRvIHJlbW92ZSBhbGwgZWxlbWVudHMg YnV0IHRoZSBmaXJzdCBOLg0KK0lmIE4gaXMgb21pdHRlZCBvciBuaWwgdGhl IGZ1bGwgbGlzdCBpcyBjb3BpZWQuIg0KKyAgKGlmIChvciAobnVsbCBuKSAo YW5kIG4gKDw9IG4gMCkpKSBsaXN0DQorICAgIChucmV2ZXJzZSAobGFzdCAo bnJldmVyc2UgbGlzdCkgbikpKSkNCisNCiAoZGVmdW4gemVyb3AgKG51bWJl cikNCiAgICJSZXR1cm4gdCBpZiBOVU1CRVIgaXMgemVyby4iDQogICA7OyBV c2VkIHRvIGJlIGluIEMsIGJ1dCBpdCdzIHBvaW50bGVzcyBzaW5jZSAoPSAw IG4pIGlzIGZhc3RlciBhbnl3YXkgYmVjYXVzZQ0K --1468197610-578395305-1446112679=:4771-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 11:25:57 2015 Received: (at 21782) by debbugs.gnu.org; 29 Oct 2015 15:25:57 +0000 Received: from localhost ([127.0.0.1]:44432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrp5R-0001k6-BL for submit@debbugs.gnu.org; Thu, 29 Oct 2015 11:25:57 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:33403) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrp5P-0001jy-ET for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 11:25:55 -0400 Received: by lfbf136 with SMTP id f136so6463633lfb.0 for <21782@debbugs.gnu.org>; Thu, 29 Oct 2015 08:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=tsayIYMVr/nFf2n0HhYeH+KG00y3t7cUrOC8+JOFdJs=; b=SBHLVsbSCXiYTBZY2ULHzEZo56xPkeMlGqR5gRubchMr0GIE8wuybk2t0aYtCTgE4w aL8VD+Qb8OuPAHPxRRz/jh4NHVXu4KL0BffIEfF9moZQsf/f1cet05grJbKnVXCYaDrM 0DYso/kQWS7S4dyjQva1/EqxMkd0sa4nqOkjBWDPJmUb+4r5ciTqab5lk0/z77OOaAhl RN+xALol5zBLmqgcw90zpMAv695D5Gx8XKl/5tC07Pu4pF1oshWMVP5eN5L7OP/4LQCp hHe9Vs3m4mCVpD8mNeqXXItPlHRxj1X0wzK4oHAYP85/W/wlJysbat+2lAx1KmbgBks1 Y8nQ== MIME-Version: 1.0 X-Received: by 10.25.20.97 with SMTP id k94mr853934lfi.27.1446132354549; Thu, 29 Oct 2015 08:25:54 -0700 (PDT) Received: by 10.112.91.106 with HTTP; Thu, 29 Oct 2015 08:25:53 -0700 (PDT) Received: by 10.112.91.106 with HTTP; Thu, 29 Oct 2015 08:25:53 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Oct 2015 15:25:53 +0000 X-Google-Sender-Auth: SLq8W9_xNjEsjA2i7VHCHkJr6pg Message-ID: Subject: Re: bug#21782: 25.0.50; New functions nfront/front From: Artur Malabarba To: Tino Calancha Content-Type: multipart/alternative; boundary=001a11406b624a8ff405233fed3e X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21782 Cc: 21782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11406b624a8ff405233fed3e Content-Type: text/plain; charset=UTF-8 Hi Tino, thanks for the submission. I think this is already available in core as seq-take, from the seq package. --001a11406b624a8ff405233fed3e Content-Type: text/html; charset=UTF-8

Hi Tino, thanks for the submission.

I think this is already available in core as seq-take, from the seq package.

--001a11406b624a8ff405233fed3e-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 21:22:27 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 01:22:27 +0000 Received: from localhost ([127.0.0.1]:44976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZryOg-0002yH-Jm for submit@debbugs.gnu.org; Thu, 29 Oct 2015 21:22:27 -0400 Received: from calancha-ilc.kek.jp ([130.87.234.234]:42441) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZryOd-0002y7-UF for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 21:22:25 -0400 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 3418A9250; Fri, 30 Oct 2015 10:25:31 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 1D6209229; Fri, 30 Oct 2015 10:25:31 +0900 (JST) Date: Fri, 30 Oct 2015 10:25:31 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: 21782@debbugs.gnu.org Subject: Re: bug#21782: 25.0.50; New functions nfront/front In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1468197610-1087738362-1446168331=:10242" X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I think this is already available in core as seq-take, from the seq package. Thank you, you are right. Indeed, I found seq-take very nice: its more general because apply to sequences. There is one small difference: seq-take has no optional arguments. [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f92capac[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.8 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: 21782 Cc: Artur Malabarba X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --1468197610-1087738362-1446168331=:10242 Content-Type: text/plain; charset=US-ASCII; format=flowed > I think this is already available in core as seq-take, from the seq package. Thank you, you are right. Indeed, I found seq-take very nice: its more general because apply to sequences. There is one small difference: seq-take has no optional arguments. In addition, seq.el need to be loaded by the user. Yeah, not a big deal, but IMO such fundamental operation on a list as nfront implement, deserve to be available at the starting of the session. Putting a dedicated function in subr.el we save to load many stuff from seq.el that maybe we dont need. I would like nfront/front would behave as nbutlast/butlast concerning the N argument: *) N nil giving same output as N = 1. *) N <= 0 return the full list. (I choose the name of the function to somehow reflect such symmetry). I have modified my patch to accomplish such behaviour. With the new patch (let ((ltest '(1 2 3 4 5 6))) (nbutlast ltest nil)) (1 2 3 4 5) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest nil)) (1) (require 'seq) (let ((ltest '(1 2 3 4 5 6))) (seq-take ltest nil)); error: second argument is not optional (let ((ltest '(1 2 3 4 5 6))) (nbutlast ltest 0)) (1 2 3 4 5 6) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 0)) (1 2 3 4 5 6) (let ((ltest '(1 2 3 4 5 6))) (seq-take ltest 0)) nil (let ((ltest '(1 2 3 4 5 6))) (nbutlast ltest -1)) (1 2 3 4 5 6) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest -1)) (1 2 3 4 5 6) (let ((ltest '(1 2 3 4 5 6))) (seq-take ltest -1)) nil (let ((ltest '(1 2 3 4 5 6))) (nbutlast ltest 20)) nil (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 20)) (1 2 3 4 5 6) (let ((ltest '(1 2 3 4 5 6))) (seq-take ltest 20)) (1 2 3 4 5 6) --1468197610-1087738362-1446168331=:10242 Content-Type: text/plain; charset=US-ASCII; name=subr-2.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=subr-2.patch ZGlmZiAtLWdpdCBhL2xpc3Avc3Vici5lbCBiL2xpc3Avc3Vici5lbA0KaW5k ZXggZWE5MjZhZS4uZWY3MDVlYiAxMDA2NDQNCi0tLSBhL2xpc3Avc3Vici5l bA0KKysrIGIvbGlzcC9zdWJyLmVsDQpAQCAtMzkxLDEzICszOTEsMTUgQEAg bGFzdA0KIChkZWZ1biBidXRsYXN0IChsaXN0ICZvcHRpb25hbCBuKQ0KICAg IlJldHVybiBhIGNvcHkgb2YgTElTVCB3aXRoIHRoZSBsYXN0IE4gZWxlbWVu dHMgcmVtb3ZlZC4NCiBJZiBOIGlzIG9taXR0ZWQgb3IgbmlsLCB0aGUgbGFz dCBlbGVtZW50IGlzIHJlbW92ZWQgZnJvbSB0aGUNCi1jb3B5LiINCitjb3B5 Lg0KK1doZW4gTiBpcyA8PSAwIExJU1QgaXMgcmV0dXJuZWQuIg0KICAgKGlm IChhbmQgbiAoPD0gbiAwKSkgbGlzdA0KICAgICAobmJ1dGxhc3QgKGNvcHkt c2VxdWVuY2UgbGlzdCkgbikpKQ0KIA0KIChkZWZ1biBuYnV0bGFzdCAobGlz dCAmb3B0aW9uYWwgbikNCiAgICJNb2RpZmllcyBMSVNUIHRvIHJlbW92ZSB0 aGUgbGFzdCBOIGVsZW1lbnRzLg0KLUlmIE4gaXMgb21pdHRlZCBvciBuaWws IHJlbW92ZSB0aGUgbGFzdCBlbGVtZW50LiINCitJZiBOIGlzIG9taXR0ZWQg b3IgbmlsLCByZW1vdmUgdGhlIGxhc3QgZWxlbWVudC4NCitXaGVuIE4gaXMg PD0gMCBMSVNUIGlzIHJldHVybmVkIHVubW9kaWZpZWQuIg0KICAgKGxldCAo KG0gKGxlbmd0aCBsaXN0KSkpDQogICAgIChvciBuIChzZXRxIG4gMSkpDQog ICAgIChhbmQgKDwgbiBtKQ0KQEAgLTQwNSw2ICs0MDcsMjEgQEAgbmJ1dGxh c3QNCiAJICAgKGlmICg+IG4gMCkgKHNldGNkciAobnRoY2RyICgtICgxLSBt KSBuKSBsaXN0KSBuaWwpKQ0KIAkgICBsaXN0KSkpKQ0KIA0KKyhkZWZ1biBm cm9udChsaXN0ICZvcHRpb25hbCBuKQ0KKyAgIlJldHVybiBhIGNvcHkgb2Yg TElTVCB3aXRoIGp1c3QgdGhlIGZpcnN0IE4gZWxlbWVudHMuDQorSWYgaXMg b21pdHRlZCBvciBuaWwgY29weSBqdXN0IHRoZSBmaXJzdCBlbGVtZW50DQor V2hlbiBOIGlzIDw9IDAgdGhlIGZ1bGwgbGlzdCBpcyBjb3BpZWQuIg0KKyAg KGlmIChhbmQgbiAoPD0gbiAwKSkgbGlzdA0KKyAgICAobmZyb250IChjb3B5 LXNlcXVlbmNlIGxpc3QpIG4pKSkNCisNCisoZGVmdW4gbmZyb250KGxpc3Qg Jm9wdGlvbmFsIG4pDQorICAiTW9kaWZpZWQgTElTVCB0byByZW1vdmUgYWxs IGVsZW1lbnRzIGJ1dCB0aGUgZmlyc3QgTi4NCitJZiBOIGlzIG9taXR0ZWQg b3IgbmlsIHJlbW92ZSBhbGwgYnV0IHRoZSBmaXJzdCBlbGVtZW50DQorV2hl biBOIGlzIDw9IDAgTElTVCBpcyByZXR1cm5lZCB1bm1vZGlmaWVkLiINCisg IChvciBuIChzZXRxIG4gMSkpDQorICAoaWYgKDw9IG4gMCkgbGlzdA0KKyAg ICAobnJldmVyc2UgKGxhc3QgKG5yZXZlcnNlIGxpc3QpIG4pKSkpDQorDQog KGRlZnVuIHplcm9wIChudW1iZXIpDQogICAiUmV0dXJuIHQgaWYgTlVNQkVS IGlzIHplcm8uIg0KICAgOzsgVXNlZCB0byBiZSBpbiBDLCBidXQgaXQncyBw b2ludGxlc3Mgc2luY2UgKD0gMCBuKSBpcyBmYXN0ZXIgYW55d2F5IGJlY2F1 c2UNCg== --1468197610-1087738362-1446168331=:10242-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 21:34:23 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 01:34:23 +0000 Received: from localhost ([127.0.0.1]:44981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZryaF-0003IZ-9V for submit@debbugs.gnu.org; Thu, 29 Oct 2015 21:34:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55270) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZryZu-0003I0-Kz for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 21:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZryZt-0003ZA-H4 for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 21:34:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZryZr-0003YL-US; Thu, 29 Oct 2015 21:33:59 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZryZr-0005MR-GK; Thu, 29 Oct 2015 21:33:59 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Tino Calancha In-reply-to: (message from Tino Calancha on Thu, 29 Oct 2015 18:57:59 +0900 (JST)) Subject: Re: bug#21782: 25.0.50; New functions nfront/front References: Message-Id: Date: Thu, 29 Oct 2015 21:33:59 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21782 Cc: 21782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: rms@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] ISTR there are traditional names for those functions. I don't remember what they were, but if we are going to add them, we should use their traditional names. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 21:38:51 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 01:38:51 +0000 Received: from localhost ([127.0.0.1]:44985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZryeY-0003PI-RU for submit@debbugs.gnu.org; Thu, 29 Oct 2015 21:38:51 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36586) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZryeW-0003P7-Of for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 21:38:49 -0400 Received: by pacfv9 with SMTP id fv9so59531208pac.3 for <21782@debbugs.gnu.org>; Thu, 29 Oct 2015 18:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:subject:references:date:to:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=GVdLF6HuVTyVpfPM3l36iFGa1a21NglKR5tVwCuDQbs=; b=Vf5mpA2jzRC+McUEajIq/9broI9p2MVQtM5weaCbh0OLoAU59Mnee6Q5njhRVreXkv jhyXpjC2VsJh7fN04B/juimHqkpE8k2h9c+Y+QWZ6KLRouX3MjMFnSMOcWkJliykLFa8 SNtMa8+/ZfXAqR6lunv/3wth3N8pcZVDmSSDpT6fyCNA0avM2A6p9mCU4kJjiK/Iuz23 Aub9m6dSfWm7U0qILwoC/d8W4Z0M+MjcXJeTYQoeN25Gq7waIJaBt5AU6BYfd0hDhZXq Lrt92QXn5hbQtnadzgWZeyTnlbSd8xq610RhwOJYDti6wWivkeFgSGw1R8MMmcvo3cpG wfrQ== X-Received: by 10.68.100.228 with SMTP id fb4mr5512334pbb.25.1446169127883; Thu, 29 Oct 2015 18:38:47 -0700 (PDT) Received: from calancha-ilc.kek.jp (calancha-ilc.kek.jp. [130.87.234.234]) by smtp.gmail.com with ESMTPSA id z12sm4679281pbt.30.2015.10.29.18.38.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Oct 2015 18:38:47 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Subject: Re: bug#21782: 25.0.50; New functions nfront/front References: Date: Fri, 30 Oct 2015 10:41:55 +0900 To: 21782@debbugs.gnu.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Constantino Calancha" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (Linux) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21782 Cc: rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > ISTR there are traditional names for those functions. > I don't remember what they were, but if we are going to add them, > we should use their traditional names. Sure, i also prefer keep their original names. Considering my previous example: i disagree with myself about nfront being consistent with nbutlast. nfront should return nil when N<= 0 as seq-take does. Only when N is nil is when we provide the sensible default N=1 as nbutlast. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 22:07:40 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 02:07:40 +0000 Received: from localhost ([127.0.0.1]:45008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrz6S-0004Do-FL for submit@debbugs.gnu.org; Thu, 29 Oct 2015 22:07:40 -0400 Received: from calancha-ilc.kek.jp ([130.87.234.234]:42984) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrz6Q-0004Dg-6z for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 22:07:39 -0400 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 233F19255; Fri, 30 Oct 2015 11:10:47 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 0DDE8922A; Fri, 30 Oct 2015 11:10:47 +0900 (JST) Date: Fri, 30 Oct 2015 11:10:47 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: 21782@debbugs.gnu.org Subject: Re: bug#21782: 25.0.50; New functions nfront/front In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1468197610-1749251579-1446171047=:23447" X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The new patch has more sense to me. I correct my previous wish about the func. behaviour with respect N: *) N nil give same output as N = 1. *) N <= 0 return nil. (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 0)) nil (let ((ltest '(1 2 3 4 5 6))) (nfront ltest -1)) nil (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 3)) (1 2 3) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest)) (1) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 100)) (1 2 3 4 5 6) diff --git a/lisp/subr.el b/lisp/subr.el index ea926ae..cde4006 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -391, 13 +391, 15 @@ last (defun butlast (list &optional n) "Return a copy of LIST with the last N elements removed. If N is omitted or nil, the last element is removed from the -copy." +copy. +When N is <= 0 LIST is returned." (if (and n (<= n 0)) list (nbutlast (copy-sequence list) n))) [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f92capac[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.8 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: 21782 Cc: "C. Calancha" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --1468197610-1749251579-1446171047=:23447 Content-Type: text/plain; charset=US-ASCII; format=flowed The new patch has more sense to me. I correct my previous wish about the func. behaviour with respect N: *) N nil give same output as N = 1. *) N <= 0 return nil. (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 0)) nil (let ((ltest '(1 2 3 4 5 6))) (nfront ltest -1)) nil (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 3)) (1 2 3) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest)) (1) (let ((ltest '(1 2 3 4 5 6))) (nfront ltest 100)) (1 2 3 4 5 6) --1468197610-1749251579-1446171047=:23447 Content-Type: text/plain; charset=US-ASCII; name=subr-3.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=subr-3.patch ZGlmZiAtLWdpdCBhL2xpc3Avc3Vici5lbCBiL2xpc3Avc3Vici5lbA0KaW5k ZXggZWE5MjZhZS4uY2RlNDAwNiAxMDA2NDQNCi0tLSBhL2xpc3Avc3Vici5l bA0KKysrIGIvbGlzcC9zdWJyLmVsDQpAQCAtMzkxLDEzICszOTEsMTUgQEAg bGFzdA0KIChkZWZ1biBidXRsYXN0IChsaXN0ICZvcHRpb25hbCBuKQ0KICAg IlJldHVybiBhIGNvcHkgb2YgTElTVCB3aXRoIHRoZSBsYXN0IE4gZWxlbWVu dHMgcmVtb3ZlZC4NCiBJZiBOIGlzIG9taXR0ZWQgb3IgbmlsLCB0aGUgbGFz dCBlbGVtZW50IGlzIHJlbW92ZWQgZnJvbSB0aGUNCi1jb3B5LiINCitjb3B5 Lg0KK1doZW4gTiBpcyA8PSAwIExJU1QgaXMgcmV0dXJuZWQuIg0KICAgKGlm IChhbmQgbiAoPD0gbiAwKSkgbGlzdA0KICAgICAobmJ1dGxhc3QgKGNvcHkt c2VxdWVuY2UgbGlzdCkgbikpKQ0KIA0KIChkZWZ1biBuYnV0bGFzdCAobGlz dCAmb3B0aW9uYWwgbikNCiAgICJNb2RpZmllcyBMSVNUIHRvIHJlbW92ZSB0 aGUgbGFzdCBOIGVsZW1lbnRzLg0KLUlmIE4gaXMgb21pdHRlZCBvciBuaWws IHJlbW92ZSB0aGUgbGFzdCBlbGVtZW50LiINCitJZiBOIGlzIG9taXR0ZWQg b3IgbmlsLCByZW1vdmUgdGhlIGxhc3QgZWxlbWVudC4NCitXaGVuIE4gaXMg PD0gMCBMSVNUIGlzIHJldHVybmVkIHVubW9kaWZpZWQuIg0KICAgKGxldCAo KG0gKGxlbmd0aCBsaXN0KSkpDQogICAgIChvciBuIChzZXRxIG4gMSkpDQog ICAgIChhbmQgKDwgbiBtKQ0KQEAgLTQwNSw2ICs0MDcsMjAgQEAgbmJ1dGxh c3QNCiAJICAgKGlmICg+IG4gMCkgKHNldGNkciAobnRoY2RyICgtICgxLSBt KSBuKSBsaXN0KSBuaWwpKQ0KIAkgICBsaXN0KSkpKQ0KIA0KKyhkZWZ1biBm cm9udChsaXN0ICZvcHRpb25hbCBuKQ0KKyAgIlJldHVybiBhIGNvcHkgb2Yg TElTVCB3aXRoIGp1c3QgdGhlIGZpcnN0IE4gZWxlbWVudHMuDQorSWYgTiBp cyBvbWl0dGVkIG9yIG5pbCBjb3B5IGp1c3QgdGhlIGZpcnN0IGVsZW1lbnQN CitXaGVuIE4gaXMgPD0gMCByZXR1cm4gbmlsLiINCisoaWYgKG9yIChudWxs IG4pICg+IG4gMCkpDQorICAobmZyb250IChjb3B5LXNlcXVlbmNlIGxpc3Qp IG4pKSkNCisNCisoZGVmdW4gbmZyb250KGxpc3QgJm9wdGlvbmFsIG4pDQor ICAiTW9kaWZpZWQgTElTVCB0byByZW1vdmUgYWxsIGVsZW1lbnRzIGJ1dCB0 aGUgZmlyc3QgTi4NCitJZiBOIGlzIG9taXR0ZWQgb3IgbmlsIHJlbW92ZSBh bGwgYnV0IHRoZSBmaXJzdCBlbGVtZW50DQorV2hlbiBOIGlzIDw9IDAgcmV0 dXJuIG5pbC4iDQorICAob3IgbiAoc2V0cSBuIDEpKQ0KKyAgKGlmICg+IG4g MCkgKG5yZXZlcnNlIChsYXN0IChucmV2ZXJzZSBsaXN0KSBuKSkpKQ0KKw0K IChkZWZ1biB6ZXJvcCAobnVtYmVyKQ0KICAgIlJldHVybiB0IGlmIE5VTUJF UiBpcyB6ZXJvLiINCiAgIDs7IFVzZWQgdG8gYmUgaW4gQywgYnV0IGl0J3Mg cG9pbnRsZXNzIHNpbmNlICg9IDAgbikgaXMgZmFzdGVyIGFueXdheSBiZWNh dXNlDQo= --1468197610-1749251579-1446171047=:23447-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 22:38:41 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 02:38:41 +0000 Received: from localhost ([127.0.0.1]:45015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrzaT-0004yT-8F for submit@debbugs.gnu.org; Thu, 29 Oct 2015 22:38:41 -0400 Received: from mout.web.de ([212.227.17.11]:50022) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrzaR-0004yL-Uf for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 22:38:40 -0400 Received: from drachen.dragon ([90.186.1.82]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0M1oGM-1akE8C182s-00tor8; Fri, 30 Oct 2015 03:38:38 +0100 From: Michael Heerdegen To: Tino Calancha Subject: Re: bug#21782: 25.0.50; New functions nfront/front References: Date: Fri, 30 Oct 2015 03:38:33 +0100 In-Reply-To: (Tino Calancha's message of "Fri, 30 Oct 2015 10:25:31 +0900 (JST)") Message-ID: <87wpu5jd1y.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:JTmfvQ4/8dFRfjgGueA6tHoEc7ubtYNP/9nyu1AIPF72onIkZA5 1neCztp0aXEqs4bOltQUbYp8X7kgPEUfvnn6KnQncr2mUVRlM1qVwD5F9yiGR9qnN7wNINW SpoR3itQeGCQEwpmvDxPcZPT3D/K9oZMTlGzcYu4+e5Kacm1Xox/UXu+VF4bBdpz/lgyGKj KxLswpBK3s+CPoNR4F6uw== X-UI-Out-Filterresults: notjunk:1;V01:K0:vCiv0m6emL8=:AEYJw43pBa18ZdPonsTgWM iL3gjgm0epztTFJ14xoCavl/MZJCdmdXrvwSouFAathSQNCi3rV0IuP64ekjDI5C7s0972aCd ZVLXt25sQYA3MeWOF37ChKeq2+gqTh6jXoRQFH8WepMe8B2DfPt5l/SFv8KRrvAY1voMFltDT 5nslh+ahIqgob5WoCCVOTogcABxeWpxb/k7CKgy5cc34um++e3BJcyvExz3+LuIslAdIKM5O7 tcwQQ4NBadLuXY2xNwtq0XodxUeNRrOugp1pXK7fetQklOJIKeYjQtzE32Hlo6Xyv/+5IRlpw r1oHYEra58LU6c9/mM82Kbbg9+g+EYWT8qvY4HRdM4aiNxucU+lugWD2rKOeGcXzd9DpnO02R Bsba0R4+QnawpictM3NJRIOfg27TCoXXN/e5ts5g36Dag3oPmKOXfDgxcwIWHTcL/WmEc4alf QhgQaIOGxccdzIJXmJSGTs0LzM1NfxgApsO4R0q++s3SyULGvdqvTGhAMs1r6mR903uLA+Vun KGMFw+LhOFJ4zRoM3YkhEy3yz9cMUvkz+yrOHG3VcqSPviEs/jNlaFTHw2KQU/7FFb/Hj9ELD 6zGp+HeAiBpLr/lKNTpzp6eQd3NUkJB5G1OOgKqrzAQzjWnoFKyaACXz4hiEo0f7Ud1pszTVa ctyc/Jen600cgCmu1XubJFdjsZ6A4KKwpLONOKPVd+L1EUMF/dRUDxBltzNP5fBTG2v8ibcu5 yyVQGxbztCuUtvFmDxifa7/Mp6DCxkicRHU+nAHfzlSWBElSQEsdZQGl9sfFyvB1mksGIlXAP /ufU9Du X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21782 Cc: Artur Malabarba , 21782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tino Calancha writes: > + (nreverse (last (nreverse list) n)))) Isn't this horribly inefficient? It would be better to use `nthcdr' or a simple loop. Dunno if this should be in the core, I think having this functionality in "seq.el" is a good place. Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 22:50:26 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 02:50:26 +0000 Received: from localhost ([127.0.0.1]:45033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrzlq-0005Hy-5B for submit@debbugs.gnu.org; Thu, 29 Oct 2015 22:50:26 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34769) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrzln-0005Hl-SV for 21782@debbugs.gnu.org; Thu, 29 Oct 2015 22:50:24 -0400 Received: by padhk11 with SMTP id hk11so59051359pad.1 for <21782@debbugs.gnu.org>; Thu, 29 Oct 2015 19:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=PnT7nvEAYAiaxm4eBMNojCKM2h5zRldxTBZFZjI8bpg=; b=ecEmUd88qfAsHm44UDbzjw1R2BYwHbvB5iYjXFY8JkF/ctFhvLtsG0DkEl04yz2Wui KV+4lzfWr6JTLB8O69kSf4AcKVoU6AiTRwxlSMmMsVsHkhdwyWjaVv27ewUXI2KNzozl ZpqPcnRyh+IotJmlAroWkT9vpEL1tjfHaGQ126ssUj4Wrgg+JuPxt1V4okrZylwqVPyt pjaFbFsEVgteCTjQ2SBLPNpghvDqFD0BT+z7YuQ9fQ+fulZEoFctI3HdEf0ab12H+ro/ 6idI+U6FZaURKY8G0ZVEKc5WZmvz9R/hwv39FDqKL6xR+NXc/5GBamoUBfHbsLkAAWbF qg7g== X-Received: by 10.67.6.161 with SMTP id cv1mr5715848pad.131.1446173422842; Thu, 29 Oct 2015 19:50:22 -0700 (PDT) Received: from calancha-ilc.kek.jp (calancha-ilc.kek.jp. [130.87.234.234]) by smtp.gmail.com with ESMTPSA id fk8sm4846409pab.33.2015.10.29.19.50.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Oct 2015 19:50:22 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "21782@debbugs.gnu.org" <21782@debbugs.gnu.org> Subject: Re: bug#21782: 25.0.50; New functions nfront/front References: <87wpu5jd1y.fsf@web.de> Date: Fri, 30 Oct 2015 11:53:30 +0900 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Constantino Calancha" Message-ID: In-Reply-To: <87wpu5jd1y.fsf@web.de> User-Agent: Opera Mail/12.16 (Linux) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21782 Cc: f92capac@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Im sorry Michael, but i dont see your point: do you mean the fact to call nreverse twice? nreverse is in fact very efficient; and last already use nthcdr in its implementation. Please elaborate more. As i mentioned, they are not exactly the same function as seq-take. Why i need to pollute my global space with all seq.el just to use this fundamental operation on a list? I we want this in the core, we may also consider to implement such functionality in src/fns.c Tino On Fri, 30 Oct 2015 11:38:33 +0900, Michael Heerdegen wrote: > Tino Calancha writes: > >> + (nreverse (last (nreverse list) n)))) > > Isn't this horribly inefficient? It would be better to use `nthcdr' or > a simple loop. > > Dunno if this should be in the core, I think having this functionality > in "seq.el" is a good place. > > > Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 05:46:20 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 09:46:20 +0000 Received: from localhost ([127.0.0.1]:45295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6GJ-00079s-IO for submit@debbugs.gnu.org; Fri, 30 Oct 2015 05:46:19 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:36631) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6Fy-000794-BS for 21782@debbugs.gnu.org; Fri, 30 Oct 2015 05:46:17 -0400 Received: by lffz202 with SMTP id z202so30517092lff.3 for <21782@debbugs.gnu.org>; Fri, 30 Oct 2015 02:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=JFXos+TuPdUYVDxgCizuC4GbfnyB3Z/JWSheuzvzgcg=; b=hspMh5NFbt5NXH0KsnXI1J0Ycr6NV7qjQP7wfCrZ2mxRyRMQjH72ebRyq6XJu6YkU1 legmTFhlRJG96pSqgD7Gk9viZpqghbHk0adsEl9SI7u2DUBaaY+z1NZESZUcgN05FH6Y 6OOgqK/HMLQeB8oDjM8ayw5vTE3DOveeAs5qycjX/vKc0SindxS598ataPvCmxI/O/CC PIgXpdg9LRT+dbmpFcUbjtxG8mAg+5lZ1VfIGCDqrlFo/m91STNMLZVOOLK2nUt0ukaV KWFD1hcvhVdh2P7jzEQ6OFmVkz4ZjAMuMYRHSv/6b6Ftua3UdNp1uuf2nQB7f4IEySrO C9ZA== MIME-Version: 1.0 X-Received: by 10.25.20.97 with SMTP id k94mr2221774lfi.27.1446198357438; Fri, 30 Oct 2015 02:45:57 -0700 (PDT) Received: by 10.112.91.106 with HTTP; Fri, 30 Oct 2015 02:45:57 -0700 (PDT) Received: by 10.112.91.106 with HTTP; Fri, 30 Oct 2015 02:45:57 -0700 (PDT) In-Reply-To: References: <87wpu5jd1y.fsf@web.de> Date: Fri, 30 Oct 2015 09:45:57 +0000 X-Google-Sender-Auth: DUzkTQpM-_E6kEYM7ztsqK6xcWU Message-ID: Subject: Re: bug#21782: 25.0.50; New functions nfront/front From: Artur Malabarba To: Tino Calancha Content-Type: multipart/alternative; boundary=001a11406b625eb9ee05234f4b1a X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21782 Cc: 21782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11406b625eb9ee05234f4b1a Content-Type: text/plain; charset=UTF-8 On 30 Oct 2015 2:53 am, "Constantino Calancha" wrote: > Why i need to pollute my global space with all seq.el just to use this > fundamental operation on a list? I think, overall, sticking to seq-take has a smaller cost/benefit ratio than adding nfront. I state my logic below. These points are all a little subjective. So if you disagree and think that the slider falls closer to the other side, we can wait to hear more opinions (though at least Michael seems to agree). 1. While nfront is not identical to seq-take, it's similar enough that this would just be replicating functionality, which is ultimately a maintenance burden. 2. Seq is not a huge lib, so you're not polluting that much. Furthermore, all its functions are prefixed by "seq-", so you're polluting even less. Lastly, seq was added to core specifically with the purpose of being the goto sequences lib (and it's been doing that fine), so it wouldn't make sense to circumvent it now. 3. I'm of the opinion that we should be adding namespace prefixes as much as possible. Unprefixed names pollute much more and are harder to find. In any case, thanks for the suggestion. --001a11406b625eb9ee05234f4b1a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 30 Oct 2015 2:53 am, "Constantino Calancha" <= ;f92capac@gmail.com> wrote: > Why i need to pollute my global space with all seq.el just to use this=
> fundamental operation on a list?

I think, overall, sticking to seq-take has a smaller cost/be= nefit ratio than adding nfront. I state my logic below.

These points are all a little subjective. So if you disagree= and think that the slider falls closer to the other side, we can wait to h= ear more opinions (though at least Michael seems to agree).

1. While nfront is not identical to seq-take, it's simil= ar enough that this would just be replicating functionality, which is ultim= ately a maintenance burden.
2. Seq is not a huge lib, so you're not polluting that much. Furthermor= e, all its functions are prefixed by "seq-", so you're pollut= ing even less. Lastly, seq was added to core specifically with the purpose = of being the goto sequences lib (and it's been doing that fine), so it = wouldn't make sense to circumvent it now.
3. I'm of the opinion that we should be adding namespace prefixes as mu= ch as possible. Unprefixed names pollute much more and are harder to find.<= /p>

In any case, thanks for the suggestion.

--001a11406b625eb9ee05234f4b1a-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 06:03:58 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 10:03:58 +0000 Received: from localhost ([127.0.0.1]:45302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6XO-0007ZE-16 for submit@debbugs.gnu.org; Fri, 30 Oct 2015 06:03:58 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:40076) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6XM-0007Z6-1g for 21782@debbugs.gnu.org; Fri, 30 Oct 2015 06:03:56 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D83782080C for <21782@debbugs.gnu.org>; Fri, 30 Oct 2015 06:03:53 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 30 Oct 2015 06:03:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=4mnfpc/rw1rixadVIGrshxUuwbQ=; b=ZaTal FeyaIVMjl1U3Mf/FhPXFx3xtvQcHuPwFs4UopUAhJag0cvMlO1TGYg2SK0FMHq1n +ipG4qxU+3GUc+C2OUjdbqmjyuDSvxBzG8rmHqFl0dTOTFOk7O4ybr8BabQ5TlL1 +IOSHPZhXmFBuP5rpC75Y5uUB8hv5v8WA1h/6k= X-Sasl-enc: QQb1y+sXHqc5zDve8ddRw/pIFo5yh8ir7DHc5wP1Uii4 1446199433 Received: from blueberry (89-156-196-194.rev.numericable.fr [89.156.196.194]) by mail.messagingengine.com (Postfix) with ESMTPA id 3285C680116; Fri, 30 Oct 2015 06:03:53 -0400 (EDT) From: Nicolas Petton To: Constantino Calancha , "21782\@debbugs.gnu.org" <21782@debbugs.gnu.org> Subject: Re: bug#21782: 25.0.50; New functions nfront/front In-Reply-To: References: <87wpu5jd1y.fsf@web.de> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/25.0.50.3 (x86_64-unknown-linux-gnu) Date: Fri, 30 Oct 2015 11:03:50 +0100 Message-ID: <877fm4zn95.fsf@petton.fr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21782 Cc: f92capac@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Constantino Calancha writes: Hi, > As i mentioned, they are not exactly the same function as seq-take. I think adding these functions would mostly be code duplication. Please bear in mind that seq.el was written to provide a good built-in sequence library in Emacs. If seq-take doesn't provide exactly what you need, you could propose a patch to improve it instead. > Why i need to pollute my global space with all seq.el just to use this > fundamental operation on a list? All functions in seq.el are prefixed, so there's no global namespace polluting, and I consider many functions provided by seq.el to be fundamental operations on sequences. Also, seq.el is not pre-loaded today because it's a new library, so it is not widely used in Emacs yet, but that could change in the future. Nico --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJWM0CGAAoJECM1h6R8IHkQl4gH/2d/q9OZ3Jz0lphIACv4+fkQ qX/0TitEowsWGiLHWCb7pvkI1QBJxtxvJiSiFG0dkD/f1v1zIf8G/cFHYZOwdwfJ pM9DCAT3JrIh4AD5OW/HAp350WryHhPGrhQXVTa4X/kc9Zbd5K+EyMmQ4nZvV6U8 rGmZsEfXki3V3vmlEkQXFmWvyIFNj20WNChjmnn8OuMen+IxK2RYTLVyRGdqY2Kz vCR6TzU4sAJM1yeHRXzsq42+tUL+MIxUmS7nKia3VrlzEYUQ1+gUcCRZhXzj3bxj LbEylCr9FK/x3A1OGnYDQQAqq+cJfq/qRTnW+IbJNbetr7g1amK1iDk1MRq3/Ls= =DtQ0 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 06:06:55 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 10:06:55 +0000 Received: from localhost ([127.0.0.1]:45321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6aE-0007em-JZ for submit@debbugs.gnu.org; Fri, 30 Oct 2015 06:06:55 -0400 Received: from calancha-ilc.kek.jp ([130.87.234.234]:49067) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6aB-0007eb-S9 for 21782@debbugs.gnu.org; Fri, 30 Oct 2015 06:06:53 -0400 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id ADDCCB453; Fri, 30 Oct 2015 19:10:00 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 9FC63B449; Fri, 30 Oct 2015 19:10:00 +0900 (JST) Date: Fri, 30 Oct 2015 19:10:00 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: 21782@debbugs.gnu.org Subject: Re: bug#21782: 25.0.50; New functions nfront/front In-Reply-To: Message-ID: References: <87wpu5jd1y.fsf@web.de> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thank you. I agree with your 3 points. 1) Clearly replicate functionality 2) Yes, the prefix prevent to pollute. 3) Agree. My main concern is why seq-take is not auloaded at the start of the session. Its natural to have loaded such function always. [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f92capac[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.8 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: 21782 Cc: Tino Calancha , 21782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Thank you. I agree with your 3 points. 1) Clearly replicate functionality 2) Yes, the prefix prevent to pollute. 3) Agree. My main concern is why seq-take is not auloaded at the start of the session. Its natural to have loaded such function always. Anyway thank you very much. On Fri, 30 Oct 2015, Artur Malabarba wrote: > > On 30 Oct 2015 2:53 am, "Constantino Calancha" wrote: > > Why i need to pollute my global space with all seq.el just to use this > > fundamental operation on a list? > > I think, overall, sticking to seq-take has a smaller cost/benefit ratio than adding nfront. I state my logic below. > > These points are all a little subjective. So if you disagree and think that the slider falls closer to the other side, we can wait to hear more opinions (though at least Michael seems to > agree). > > 1. While nfront is not identical to seq-take, it's similar enough that this would just be replicating functionality, which is ultimately a maintenance burden. > 2. Seq is not a huge lib, so you're not polluting that much. Furthermore, all its functions are prefixed by "seq-", so you're polluting even less. Lastly, seq was added to core > specifically with the purpose of being the goto sequences lib (and it's been doing that fine), so it wouldn't make sense to circumvent it now. > 3. I'm of the opinion that we should be adding namespace prefixes as much as possible. Unprefixed names pollute much more and are harder to find. > > In any case, thanks for the suggestion. > > > From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 06:07:58 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 10:07:59 +0000 Received: from localhost ([127.0.0.1]:45328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6bG-0007gl-HA for submit@debbugs.gnu.org; Fri, 30 Oct 2015 06:07:58 -0400 Received: from calancha-ilc.kek.jp ([130.87.234.234]:49076) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zs6bE-0007gc-W8 for 21782@debbugs.gnu.org; Fri, 30 Oct 2015 06:07:57 -0400 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 96995B451; Fri, 30 Oct 2015 19:11:07 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 81792B449; Fri, 30 Oct 2015 19:11:07 +0900 (JST) Date: Fri, 30 Oct 2015 19:11:07 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: Nicolas Petton Subject: Re: bug#21782: 25.0.50; New functions nfront/front In-Reply-To: <877fm4zn95.fsf@petton.fr> Message-ID: References: <87wpu5jd1y.fsf@web.de> <877fm4zn95.fsf@petton.fr> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Also, seq.el is not pre-loaded today because it's a new library, so it > is not widely used in Emacs yet, but that could change in the future. I see. I think is worth to give it a try to this lib. Thank you. [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f92capac[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.8 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: 21782 Cc: Constantino Calancha , "21782@debbugs.gnu.org" <21782@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Also, seq.el is not pre-loaded today because it's a new library, so it > is not widely used in Emacs yet, but that could change in the future. I see. I think is worth to give it a try to this lib. Thank you. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 10:09:18 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 14:09:18 +0000 Received: from localhost ([127.0.0.1]:46302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsAMo-0006ez-Gp for submit@debbugs.gnu.org; Fri, 30 Oct 2015 10:09:18 -0400 Received: from mout.web.de ([212.227.17.11]:56198) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsAMm-0006eq-Ha for 21782@debbugs.gnu.org; Fri, 30 Oct 2015 10:09:16 -0400 Received: from drachen.dragon ([90.186.1.205]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MduMb-1a8IkB0udB-00PhUr; Fri, 30 Oct 2015 15:09:14 +0100 From: Michael Heerdegen To: Constantino Calancha Subject: Re: bug#21782: 25.0.50; New functions nfront/front References: <87wpu5jd1y.fsf@web.de> Date: Fri, 30 Oct 2015 15:09:10 +0100 In-Reply-To: (Constantino Calancha's message of "Fri, 30 Oct 2015 11:53:30 +0900") Message-ID: <87a8r0sb21.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:I/MHDT/ZerhVomJwWc4JIHuqvSD+QTehF47+77wX6c7hGaVqhSt ZFgja/SGdTzEzDdv6HfqvOIR3fN1gG6UeP1NW+FptEPwks4Dd0AeJEfHsWNNzv1dTu6IDIx 1ez1Ia1qwp8UyqxEtqPaLW2rvNKZxpVjfzh0nXRYwtKRDfindEMIE6iVVxLSd7ELdkqkvGm qmX3rAjZj0rBmlrAWbPxA== X-UI-Out-Filterresults: notjunk:1;V01:K0:K2GvLI99BLs=:AOfj5Qj4qCtRkqdYAjTtGF F+Ko3jEFyxNaju9HQTN38K4ljCA/N+uG/JDzch/V5ivDwBErxWoN7MMJJUDwI8OjDCDmSxzO1 uwU98Ba/UBSl6fP18zwMm5tDM4ibquiYQhEOVCHriV5p/rggu27seLo75ahx9umnOHOCv38uM TaEyoMCNrTdt4N8wZQsK9og3cLOLJ6/3q1U8TmFeUsaise6ZJsOEFEm2A9+mnoGZn3EPtL3yh QD1YxgEhxWC3LA3dRLMWiIT6l6rjkl+yn5eVuhP5+eKooZ63Didwpvo2Fu3VDsxBOg75z7DiO n77+5ENBpGCxpdpSKule71VxbX1tyX503+ZQu712mvmAGKCCGVNTV/xnkrIhzh8apMEXFWJxk LPBty1t9BhMW+FsylA42nlCPgH15gJY+t27CyhJTw6lh97EpM93YGoWdEju7efXNwKN1vw8d3 uQfLkluoxiCKUsS6MXTlI8ENErncS7AjBn3mUHvomnWt40iZpvAvUhO9JEEvsKH/y4vw0YV4A T+bf5jIiduwjWwIBVUrXcr5TZYL8JG64bM5E3qvDDl3qPH7jXrq14tgGksGOODGmQh/8imQNv xMq+oCvwOzu1zAxjHbaoQ5Lx2MgwAEDQ0TVXXhIp+ecM4hriau0VKRAkwhqhQKyT3fszhbUqe KbnB/tpHRYAS0SuYkcXOngt8ll6DGU88wv5ntc6SglOYtu5lTVAjK60ZGuWqEfsHS4aau8Zt6 ju0hM3dnFeu5x7I60KKROylv5SZpx2Uzri81oDembVLqodBYmSKA5Iaqz/+hzdnLf94Wi4FzJ CbHA+w7786TI6ZccmvF0DCCHe5wyQ== X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 21782 Cc: "21782@debbugs.gnu.org" <21782@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Constantino Calancha" writes: > Im sorry Michael, but i dont see your point: do you mean the fact to > call nreverse twice? nreverse is in fact very efficient; and last > already use nthcdr in its implementation. `nreverse` efficiently does what is supposed to do, yes. But it is O(l), where l is the length of the list arg. In addition, the newly created `nreverse'd list must be garbage collected. The `copy-sequence' call in `front' is bad for the same reason. OTOH nfront can be implemented in O(n), where n is the number argument to nfront. Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 14:03:34 2015 Received: (at 21782) by debbugs.gnu.org; 30 Oct 2015 18:03:34 +0000 Received: from localhost ([127.0.0.1]:46479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsE1V-0007Aj-Ke for submit@debbugs.gnu.org; Fri, 30 Oct 2015 14:03:34 -0400 Received: from calancha-ilc.kek.jp ([130.87.234.234]:51641) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsE1T-0007AZ-Rs for 21782@debbugs.gnu.org; Fri, 30 Oct 2015 14:03:32 -0400 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id A9C4692B7; Sat, 31 Oct 2015 03:06:40 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 93710286; Sat, 31 Oct 2015 03:06:40 +0900 (JST) Date: Sat, 31 Oct 2015 03:06:40 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: Michael Heerdegen Subject: Re: bug#21782: 25.0.50; New functions nfront/front In-Reply-To: <87a8r0sb21.fsf@web.de> Message-ID: References: <87wpu5jd1y.fsf@web.de> <87a8r0sb21.fsf@web.de> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 3.4 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > > `nreverse` efficiently does what is supposed to do, yes. But it is > O(l), where l is the length of the list arg. > > In addition, the newly created `nreverse'd list must be garbage > collected. > > The `copy-sequence' call in `front' is bad for the same reason. > > OTOH nfront can be implemented in O(n), where n is the number argument > to nfront. [...] Content analysis details: (3.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f92capac[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.4 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: 21782 Cc: Constantino Calancha , "21782@debbugs.gnu.org" <21782@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > > `nreverse` efficiently does what is supposed to do, yes. But it is > O(l), where l is the length of the list arg. > > In addition, the newly created `nreverse'd list must be garbage > collected. > > The `copy-sequence' call in `front' is bad for the same reason. > > OTOH nfront can be implemented in O(n), where n is the number argument > to nfront. Thank you Michael for the detail answer. I appreciate it a lot. Now i see clearly what you mean. For all the people: Efficiency implementations are very important, almost as important as have things available. One emacs user starting one session has no available seq-take. That is the first thing to care, efficiency comes later. Many users learn the lenguage autocompleting in the minibuffer. If it is not loaded the least people will realize such functions you are developping do exists. We develop tools to be used, not ust to be nice. IMOP, fundamental operations should be loaded by default. If this is not the case, that means the function should not be located in its corrent location: fair and simple. Please, consider make this fundamental operation being loaded at the beginning. Thanks. I finish here because i start to repeat myself. Thank you for the very nice chat; it has being very instructive for me and i enjoied very much. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 18:52:05 2015 Received: (at submit) by debbugs.gnu.org; 31 Oct 2015 22:52:05 +0000 Received: from localhost ([127.0.0.1]:47358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zsf0H-0001aT-7q for submit@debbugs.gnu.org; Sat, 31 Oct 2015 18:52:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40902) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zsezx-0001Zg-7U for submit@debbugs.gnu.org; Sat, 31 Oct 2015 18:52:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zsezv-0005Ct-Qf for submit@debbugs.gnu.org; Sat, 31 Oct 2015 18:51:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsezv-0005Cp-Nd for submit@debbugs.gnu.org; Sat, 31 Oct 2015 18:51:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsezu-00065F-Po for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 18:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zsezr-0005CT-Je for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 18:51:42 -0400 Received: from four.schnuerpel.eu ([2a01:4f8:120:9382::145]:57394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsezr-0005CO-Df for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 18:51:39 -0400 Received: from mail.muc.de (mail.muc.de [193.149.48.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by moderators.schnuerpel.eu (Postfix) with ESMTPS id DF30E793 for ; Sat, 31 Oct 2015 23:51:36 +0100 (CET) Received: (qmail 84591 invoked by uid 8); 31 Oct 2015 22:44:55 -0000 To: gnu-emacs-bug@moderators.isc.org Path: not-for-mail From: Alan Mackenzie Newsgroups: gnu.emacs.bug Subject: Re: bug#21782: 25.0.50; New functions nfront/front Date: Sat, 31 Oct 2015 22:44:55 +0000 (UTC) Organization: muc.de e.V. Lines: 30 Message-ID: References: NNTP-Posting-Host: news.muc.de X-Trace: colin.muc.de 1446331495 84589 193.149.48.2 (31 Oct 2015 22:44:55 GMT) X-Complaints-To: news-admin@muc.de NNTP-Posting-Date: Sat, 31 Oct 2015 22:44:55 +0000 (UTC) User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.1-RELEASE-p16 (amd64)) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Hello, Richard. Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > ISTR there are traditional names for those functions. > I don't remember what they were, but if we are going to add them, > we should use their traditional names. How about `firstn': "firstn n list Returns a list of length _n_, whose elements are the first _n_ elements of _list_. if _list_ is fewer than _n_ elements long, the remaining elements of the list are ni." [ Lisp Machine Manual, Sixth Edition, System Version 99, June 1984, by Richard Stallman, Daniel Weinreb and David Moon ] > -- > Dr Richard Stallman > President, Free Software Foundation (gnu.org, fsf.org) > Internet Hall-of-Famer (internethalloffame.org) > Skype: No way! See stallman.org/skype.html. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu May 18 00:09:08 2017 Received: (at 21782-done) by debbugs.gnu.org; 18 May 2017 04:09:08 +0000 Received: from localhost ([127.0.0.1]:51656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBCkO-0002R5-8a for submit@debbugs.gnu.org; Thu, 18 May 2017 00:09:08 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:33066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBCkM-0002Qb-8M for 21782-done@debbugs.gnu.org; Thu, 18 May 2017 00:09:06 -0400 Received: by mail-pg0-f49.google.com with SMTP id u187so16562544pgb.0 for <21782-done@debbugs.gnu.org>; Wed, 17 May 2017 21:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=qUiMiB7ljznUr/93QmQD2xrnsn3xjn32sX7zEz2X9YI=; b=enfbqY9FiXucnQRE6sjfiAMDiwkkLIZfFf5wAcMfOE432/odp9FqzW2IagqDtcFMsj WENe93HWjlcB+DMRprPkX7hNXmY5eRGaUflWg6iEQdkErX5nDhvlArORmeNNIEEtnMIg w1wips4JVT4t0jl1iTNAN1Ya/Ln/xgMGmU+Qz+0fDBMiaM/i4zPhvDKKDXMdXXbi0P1o JnsKMkztPJyRM33vTWSrac20nbsooc4ynp4d4QRleVmFimHTZs7Jl/wLOvx8qAQvrmWK V6CyRjgNkTnO+CkqS7FFkqvA/4mQw4ZVQrgBmZFXki+75YDCUF1/VuILpmZx0Iukxylq sQKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=qUiMiB7ljznUr/93QmQD2xrnsn3xjn32sX7zEz2X9YI=; b=bScLVYqwed+jpZFAdtpG0p/o535I/llpy70P90RdYK1Sy71BEeOHlndetn9i+Gm+G+ rw0ruyR3G4PHpaHf0G3KU4Xa+SGOWSEhFsaqXT3oQFsfS+YOfEAvbL7k1hTIKfVEFzfd DH/KJQLqpNu6fMShnmZtYjPki1v/7ExEYKzXAWbFZxQav8IFEvhVron669ZJf7Uzsrfb ckXj6KNxe8pNekZcCkZgQyvEmNKTq6PRa2jfMrZtVvJpDP6kiAXt6cWe1e6WOaepz2as I5B/Dzoha8I7fQpcLvXy72cd/wlZo4ahqKA4ps/2RHFrBFCvaCmEL/K4s00xFQB+vOpF By5g== X-Gm-Message-State: AODbwcAFEVG0EtWcNcrK6QcVTCrXR8KDZM9MQ/t6spnCEYwEDUs8XE3u cmSN4WF/ecfDb45a X-Received: by 10.98.49.198 with SMTP id x189mr2104401pfx.65.1495080540613; Wed, 17 May 2017 21:09:00 -0700 (PDT) Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id l67sm6101095pfc.18.2017.05.17.21.08.59 for <21782-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 May 2017 21:08:59 -0700 (PDT) From: Tino Calancha To: 21782-done@debbugs.gnu.org Subject: Re: bug#21782: 25.0.50; New functions nfront/front References: Date: Thu, 18 May 2017 13:08:57 +0900 In-Reply-To: (Tino Calancha's message of "Thu, 29 Oct 2015 18:57:59 +0900 (JST)") Message-ID: <87h90iiz6u.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21782-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Tino Calancha writes: > I found very useful to define one function returning: > (nreverse (last (nreverse list) N)) > (for a given list and integer N) > > Maybe its already defined somewhere, but i cannot find it. seq-take does the same thing, so i am closing this report. From unknown Fri Aug 15 16:21:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 15 Jun 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator