From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: Re: Contribution to SES (resend) Date: Fri, 23 Apr 2010 07:24:34 +0200 Message-ID: <80sk6mspv1.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272000302 6245 80.91.229.12 (23 Apr 2010 05:25:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Apr 2010 05:25:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 23 07:25:01 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O5BNt-0004sz-1F for ged-emacs-devel@m.gmane.org; Fri, 23 Apr 2010 07:25:01 +0200 Original-Received: from localhost ([127.0.0.1]:35894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5BNs-00065r-Cb for ged-emacs-devel@m.gmane.org; Fri, 23 Apr 2010 01:25:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5BNi-00063a-Pp for emacs-devel@gnu.org; Fri, 23 Apr 2010 01:24:50 -0400 Original-Received: from [140.186.70.92] (port=37510 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5BNg-000618-Ib for emacs-devel@gnu.org; Fri, 23 Apr 2010 01:24:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5BNe-0003Dg-OT for emacs-devel@gnu.org; Fri, 23 Apr 2010 01:24:48 -0400 Original-Received: from smtp27.orange.fr ([80.12.242.95]:51681) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5BNe-0003DW-GP for emacs-devel@gnu.org; Fri, 23 Apr 2010 01:24:46 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2711.orange.fr (SMTP Server) with ESMTP id 7A61A1C00098 for ; Fri, 23 Apr 2010 07:24:45 +0200 (CEST) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2711.orange.fr (SMTP Server) with ESMTP id 6C7471C00152 for ; Fri, 23 Apr 2010 07:24:45 +0200 (CEST) Original-Received: from CHOUNEK (ARennes-353-1-5-82.w86-214.abo.wanadoo.fr [86.214.200.82]) by mwinf2711.orange.fr (SMTP Server) with ESMTP id 0F53D1C00098 for ; Fri, 23 Apr 2010 07:24:44 +0200 (CEST) X-ME-UUID: 20100423052445628.0F53D1C00098@mwinf2711.orange.fr X-Antivirus: avast! (VPS 100422-1, 22/04/2010), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124099 Archived-At: Thanks for your kind feedback. >> I would like to make a contribution to SES, a user of which I am. > >I like it, but I have a few comments: >- What's the difference btw ses-range and ses-list? I mean, ses-list > seems like a superset, so why not extend ses-range instead? This was my orginal idea, but then I thought that ses-range being a slightly faster implementation, it might be valuable to keep it. Actually the very main reason for both to coexist is that the default orientation for ses-range is `<^', while the default for ses-list is `>v'. I find it very convenient to have >v because this is the usual orientation in the Western world (even though this is not universal, I am a westerner after all). And all spreadsheets I know have cell (0,0) in the top left corner, so it is good to have this orientation by default. On the other hand, some people might have already used ses-range with `apply' of non commutative operators, so changing the orientation of ses-range is not backward compatible. I don't think it would be a good idea. In a nutshell, this is why some ses-range + ses-list co-existance is needed. Maybe there could be some message like "ses-range" is deprecated, use "ses-list", and some function to replaced all (ses-range X Y) by (ses-list X Y <^). I don't know. Maybe some people want to keep the speed and code simplicity of ses-range (but how faster is ses-range over ses-list ?) >- Hmmm.... #N= + #N# in source code ... I'd rather avoid it. Does the compiler factorize code well ? If yes I am OK to make that change, although duplication of code is *EVIL*, and too many defsubst may not be a good idea either (for it creates an intern symbol memory overhead). On the other hand the only reason for those #N= #N# is to make `or''s, so if I replace (see your next comment) `(eval (assq ...))' by `(cond ...)', I would just do or's or eq's. >- Do we really need to distinguish ^> from >^ when the user can just > (reverse ...) the result? I guess it's OK. Well, we have to keep in mind that simple emacs speadsheet documents, and spreadsheet documents in general, are often quick hacks, and should remain so. A complex spreadsheet is very hard to maintain, when you reach this complexity limit of ease of maintenance it is better to make some small script program for the same purpose. This is one reason why I like SES, it obliges you too make only simple spread sheets. So, having said that, I frankly prefer to type `(ses-list X Y >^)' than `(nreverse (ses-list X Y ' is not the reverse of `>^'. Take the following example: | 1 | 2 | |---+---| | 3 | 4 | ^> readout is (3 1 4 2), and >^ readout is (3 4 1 2). >- please use `case' rather than assq+eval (I usually dislike `eval'). Do you mean `cond', not `case' ? Please clarify. Why do you dislike `eval' ? (I am a curious one). The motivation for the assq was that I thought it was faster than a cond, because the eq is done in C. >- The !0 and !. should be replaced by a single flag that comes with > the default value to use. OK, I like your idea. So `!' could be to remove nil and *skip* and `_ 0' would replace them by 0, and, if `_' is last, default of default would be 0. Would this be fine (notably `_' to mean blanking by some default). >- I'm not convinced I like those special symbols (but I don't have > a good counter-proposition either). > Please feel free to make one. I was thinking first of taking the picture orientation symbols > < ^ . / \ ' and `. But then I find that those I proposed are easier to understand: you don't read a table in diagonal, don't you (I don't know whether you can say that in English "lire en diagonale", to mean "read without carefull attention"). Maybe we could also have those shorthands : | one letter symbol | meaning | |-------------------+---------| | > | >v | | < | | | ^ | ^> | Would this make sense (notably for one row, or one col tables where you don't care the other direction) ? > > Stefan > > I will wait for your feedback, and that we converge one some conclusion before making any updates (including texinfo manual). Vincent. PS: I have not yet tested the rellocation is not broken, this was a first disclosure to get feedback on the idea.