unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Rationalising c[ad]\{2,5\}r.
Date: Thu, 12 Mar 2015 00:36:00 +0100	[thread overview]
Message-ID: <87sidbayzj.fsf@zigzag.favinet> (raw)
In-Reply-To: <20150311230054.GB2952@acm.fritz.box> (Alan Mackenzie's message of "Wed, 11 Mar 2015 23:00:54 +0000")

[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]

() Alan Mackenzie <acm@muc.de>
() 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 ‘iota’ in Scheme:

 (iota 8) => (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 ‘iota’ (written "ι" (U+03b9)) produces
a 1-based sequence instead of 0-based.  I wonder what the
Common Lisp idiom for this functionality would be...

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2015-03-11 23:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 21:43 Rationalising c[ad]\{2,5\}r Alan Mackenzie
2015-03-11 22:00 ` Drew Adams
2015-03-11 22:54   ` Artur Malabarba
2015-03-12  1:51     ` Drew Adams
2015-03-12  9:54       ` Artur Malabarba
2015-03-12 14:01         ` Drew Adams
2015-03-12  4:34     ` Stephen J. Turnbull
2015-03-12 10:15       ` Artur Malabarba
2015-03-12 10:30   ` Alan Mackenzie
2015-03-12 14:03     ` Drew Adams
2015-03-11 22:15 ` Thien-Thi Nguyen
2015-03-11 23:00   ` Alan Mackenzie
2015-03-11 23:36     ` Thien-Thi Nguyen [this message]
2015-03-12  1:35       ` Samuel W. Flint
2015-03-12  0:52     ` Artur Malabarba
2015-03-12  8:56       ` Alan Mackenzie
2015-03-12 10:15         ` Artur Malabarba
2015-03-12 13:53     ` Stefan Monnier
2015-03-13 16:41       ` Alan Mackenzie
2015-03-13 16:47         ` Drew Adams
2015-03-13 20:38         ` Stefan Monnier
2015-03-13 21:36           ` Alan Mackenzie
2015-03-13 23:00             ` Stefan Monnier
2015-04-05 13:00               ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sidbayzj.fsf@zigzag.favinet \
    --to=ttn@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).