From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Rationalising c[ad]\{2,5\}r. Date: Thu, 12 Mar 2015 00:36:00 +0100 Message-ID: <87sidbayzj.fsf@zigzag.favinet> References: <20150311214324.GA2952@acm.fritz.box> <87zj7jb2p2.fsf@zigzag.favinet> <20150311230054.GB2952@acm.fritz.box> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1426116768 20857 80.91.229.3 (11 Mar 2015 23:32:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2015 23:32:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 12 00:32:41 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YVq7F-00087i-63 for ged-emacs-devel@m.gmane.org; Thu, 12 Mar 2015 00:32:41 +0100 Original-Received: from localhost ([::1]:57423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVq7E-0000CX-FJ for ged-emacs-devel@m.gmane.org; Wed, 11 Mar 2015 19:32:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVq7A-0000CO-86 for emacs-devel@gnu.org; Wed, 11 Mar 2015 19:32:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVq76-0005LO-5C for emacs-devel@gnu.org; Wed, 11 Mar 2015 19:32:36 -0400 Original-Received: from mail.agora-net.com ([67.59.132.6]:47144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVq76-0005LG-1d for emacs-devel@gnu.org; Wed, 11 Mar 2015 19:32:32 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.71) (envelope-from ) id 1YVq75-0002L3-2j for emacs-devel@gnu.org; Wed, 11 Mar 2015 19:32:31 -0400 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1YVqAc-0000uR-E0 for emacs-devel@gnu.org; Thu, 12 Mar 2015 00:36:10 +0100 Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <20150311230054.GB2952@acm.fritz.box> (Alan Mackenzie's message of "Wed, 11 Mar 2015 23:00:54 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 67.59.132.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183795 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Alan Mackenzie () Wed, 11 Mar 2015 23:00:54 +0000 Thanks, I didn't know about `number-sequence'. I'll start using it. Just one thing, though, since `number-sequence' is also defined in subr.el, I'd have to wrap it in `eval-and-compile' to be able to use it in my macros. Hmm. > (defun gen-cXXr--make-seq (bits) > "Generate a list of all integers with BITS bits, in ascending order= ." > (number-sequence 0 (1- (lsh 1 bits)))) That's short enough that I might not really need the function `gen-cXXr--make-seq'. Less is more! `iota'? A Greek letter, or a tiny amount. I'm afraid you've lost me. ;-) I first heard of =E2=80=98iota=E2=80=99 in Scheme: (iota 8) =3D> (0 1 2 3 4 5 6 7) which was inspired by APL (i believe): https://en.wikipedia.org/wiki/APL_(programming_language) although the APL =E2=80=98iota=E2=80=99 (written "=CE=B9" (U+03b9)) produces a 1-based sequence instead of 0-based. I wonder what the Common Lisp idiom for this functionality would be... =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlUA0WQACgkQZwMiJEyAdQI4NgCfbnj6JwKNN46r7oW+6SZmDiGt 00EAnR0xIcT3sNoOsTmhKoGIkI5M7/Xy =F9VQ -----END PGP SIGNATURE----- --=-=-=--