From: "Vincent Belaïche" <vincent.b.1@hotmail.fr>
To: emacs-devel@gnu.org , Stefan Monnier <monnier@iro.umontreal.ca>,
Jay P Belanger <jay.p.belanger@gmail.com>
Subject: Re: Contribution to SES (resend)
Date: Sat, 24 Apr 2010 21:35:59 +0200 [thread overview]
Message-ID: <80eii4hcdc.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2668 bytes --]
Hello Stef & al.
[...]
>
>Fine by me, as long as it only affects the function that inserts the
>"(ses-range ...)" string.
That was my intention.
>Of course, maybe we could change the default ordering of ses-range.
>IIUC it was chosen arbitrarily (the result of the implementation rather
>than of design, AFAICT) and I expect that very few users of ses-range
>depend on this ordering.
>
This would be acceptable to me, but we should ensure backward
compatibility: we could raise `SES file format' to 3, and if the file
format is < 3, then all (ses-range X Y) in the sheet would be replaced
by (ses-range X Y <^). I can correct this submission in that respect if
this principle is agreed.
>
>Using #N=..#N# in code won't save memory because the byte-compiler will
>treat each #N# as a separate copy.
[...]
I removed most of them, but for some I did not find a proper way to
factorise code without those constructs.
>
>No, it'd be OK.
>
>
> Stefan
Thanks,
Here is a corrected ses.el + proposed Changelog with the following
changes:
1. no co-existance ses-range + ses-list, but extension of ses-range
instead.
2. (eval (cdr (assq ...))) replaced by (case ...)
3. shorthand flags > < v ^ for one-dimensional ranges
4. _ flag to replace empty cells, with next item specifying the
replacement value.
Please note the following:
1. There are still some #N= ... #N# construct (any idea welcome, how to
remove them with keeping factorization and w/o using eval ---
duplication of code seems to me more evil than using those construct.
2. I did not implemented the defcustom for flags to auto-insert at range
insertion, I will do this in a subsequent submission.
3. How to change ses-range default readout direction is still open.
4. For this subsequent submission, I think it may be good to go even
further with Calc interworking. Jay: your opinion is welcome. We
could have in addition of vectorization some more of Calc packing,
like building complex numbers from two cells. You could have for
instance A1 -- D2 like this:
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
and (ses-range A1 D2 >v ** cx) would yield
[[ (1, 2), (3, 4)][(5, 6), (7, 8)]]
flag **, **1 and **2 would mean vectorization+packing, flag *- would
mean packing only, so that (ses-range A1 D2 >v *- cx) would yield:
( (cplx 1 2) (cplx 3 4) (cplx 5 6) (cplx 7 8))
packing type would be identified by some flag following **, **1, **2
or *- like this:
- cplx, cx or 1 => cartesian complex number
- polar, pr, or 2 => polar complex number
- hms, hs, or 3 => hms forms
- etc...
Any feedback welcome.
Vincent.
[-- Attachment #2: Contribution to ses (ses-range) --]
[-- Type: application/octet-stream, Size: 2200 bytes --]
next reply other threads:[~2010-04-24 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-24 19:35 Vincent Belaïche [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-06-20 17:34 Contribution to SES (resend) Vincent Belaïche
2010-04-23 17:45 Vincent Belaïche
2010-04-23 18:14 ` Stefan Monnier
2010-04-23 5:24 Vincent Belaïche
2010-04-23 6:24 ` Stefan Monnier
2010-04-22 7:56 Vincent Belaïche
2010-04-22 6:52 Vincent Belaïche
2010-04-22 21:54 ` Stefan Monnier
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=80eii4hcdc.fsf@gmail.com \
--to=vincent.b.1@hotmail.fr \
--cc=emacs-devel@gnu.org \
--cc=jay.p.belanger@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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).