From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?B?VmluY2VudCBCZWxh72NoZQ==?= Newsgroups: gmane.emacs.devel Subject: RE: 5x5 Arithmetic solver Date: Sat, 21 May 2011 18:12:13 +0200 Message-ID: References: <80r57s4j82.fsf@gmail.com>,<4DD7CE04.3050707@ig.com.br> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_7b11258c-86ee-4b95-a4c0-8cbeefca7da1_" X-Trace: dough.gmane.org 1305994346 26926 80.91.229.12 (21 May 2011 16:12:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 May 2011 16:12:26 +0000 (UTC) Cc: emacs-devel To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 21 18:12:22 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QNomr-0004eD-4F for ged-emacs-devel@m.gmane.org; Sat, 21 May 2011 18:12:21 +0200 Original-Received: from localhost ([::1]:44579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNomq-0001Fj-5l for ged-emacs-devel@m.gmane.org; Sat, 21 May 2011 12:12:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNomm-0001FH-Ue for emacs-devel@gnu.org; Sat, 21 May 2011 12:12:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNoml-0004bx-BO for emacs-devel@gnu.org; Sat, 21 May 2011 12:12:16 -0400 Original-Received: from dub0-omc1-s29.dub0.hotmail.com ([157.55.0.228]:30946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNomk-0004bm-Ug for emacs-devel@gnu.org; Sat, 21 May 2011 12:12:15 -0400 Original-Received: from DUB102-W33 ([157.55.0.237]) by dub0-omc1-s29.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 21 May 2011 09:12:13 -0700 X-Originating-IP: [92.139.227.58] Importance: Normal In-Reply-To: <4DD7CE04.3050707@ig.com.br> X-OriginalArrivalTime: 21 May 2011 16:12:13.0574 (UTC) FILETIME=[D88EC260:01CC17D1] X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ X-Received-From: 157.55.0.228 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:139596 Archived-At: --_7b11258c-86ee-4b95-a4c0-8cbeefca7da1_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Could you please send me the diff compared to my contribution=2C rather tha= n compared to the official latest 5x5=2C that would help me understand your= suggestion. VBR=2C Vincent. > Date: Sat=2C 21 May 2011 11:36:52 -0300 > From: viniciusjl@ig.com.br > To: vincent.b.1@hotmail.fr > Subject: Re: 5x5 Arithmetic solver > CC: monnier@iro.umontreal.ca=3B emacs-devel@gnu.org >=20 > Hi Vincent=2C >=20 > Could I suggest the attached diff? >=20 > Vinicius >=20 >=20 > On 05/21/2011 04:15 AM=2C Vincent Bela=EFche wrote: > > Salut St=E9fan=2C > > > > Toujours aussi =E0 cheval sur les conventions de codage ! > > > >>> Please find herein attached a contribution to the 5x5 game. This is a= n > >>> arithmetic solver based on a matrix inversion in a (Z/2Z)^25 vector > >>> space. > >> Thanks. A few comments: > >> - avoid using a tarball and just attach the diff as-is=2C > >> makes it a lot easier to review. > > noted > > > >> - why 5x5-local-variables? > > That is used in 5x5-mode to imply that all listed variable are made > > local to that very 5x5 buffer. if after `M-x 5x5' you do a `M-x > > rename-uniquely' and then `M-x 5x5' again then you have have two > > independent games. > > > >> - explain the changes in the 5x5 function. > > I had to change slightly the order of operations because setting the > > mode has to be done before any buffer local 5x5 variable is touched=2C = as > > precisely those variables are made local by setting the mode > > > >> - many of your lines have trailing whitespace. I generally don't care > >> much=2C about it=2C but some people do=2C and it's usually preferabl= e to > >> avoid them. M-x picture-mode C-c C-c gets rid of them for you (as > >> a side-effect). > > Done > > > >> - try to keep the first line of docstrings as a self-sufficient senten= ce > >> (because M-x apropos only shows the first line). > > > > > >> - stay within 80 columns. > > Do you mean that we are still in the 80ies =3B-P ? > > > > Ok=2C done. > > > >> - your code is not properly indented (e.g. the `grid' argument in > >> 5x5-grid-to-vec). > > Done > > > >> - Please capitalize your comments and terminate them with a "." or som= e > >> other appropriate punctuation. > > Some comments by a variable name=2C so they are not capitalized. > > > > Some comments are equations like this: > > > > =3B=3B B:=3D targetv > > =3B=3B A:=3D transferm > > =3B=3B P:=3D base-change > > =3B=3B P^-1 :=3D inv-base-change > > =3B=3B X :=3D solution > > > > =3B=3B B =3D A * X > > =3B=3B P^-1 * B =3D P^-1 * A * P * P^-1 * X > > =3B=3B CX =3D P^-1 * X > > =3B=3B CA =3D P^-1 * A * P > > =3B=3B CB =3D P^-1 * B > > =3B=3B CB =3D CA * CX > > =3B=3B CX =3D CA^-1 * CB > > =3B=3B X =3D P * CX > > > > I don't think that this is common practice to use a punctuation at the > > end of an equation. > > > > Some other comment is commented out code like this: > > > > =3B=3B(ctransferm-1-2 (calcFunc-mcol ctransferm-1-: col-2)) > > > > This code is not there because I don't need that variable=2C but I foun= d > > useful to show how it would be defined. > > > > For all the remaining comments I have done it > > > >> - 5x5-solve-suggest should have a docstring. > > Done > > > >> - try C-u checkdoc-current-buffer. > > I get > > > > checkdoc-continue: Too many occurrences of \[function]. Use \{keymap} > > instead > > > > Because 5x5 is used many times as if it was > > > > > >> - we need a ChangeLog entry. > > Here it is: > > > > ----------------------------------------------------------------------- > > 2011-05-21 Vincent Bela=EFche > > > > * play/5x5.el: Add an arithmetic solver to suggest positions to > > click on. > > ----------------------------------------------------------------------- > > > >> - I don't understand the "solve step" message (e.g. it said 23 every > >> time=2C even though I followed its suggestions and finished in 12 mo= ves). > >> > >> > > Ask it to Jay=2C this message is output by Calc=2C not by 5x5. 23 is du= e > > to this that you have to invert a 23x23 matrix. Altough the 5x5 transfe= r > > matrix is 25x25=2C its rank is only 23=2C so I extract some submatrix t= o > > compute the solution. > > > >> Stefan > > Vincent. > > >=20 = --_7b11258c-86ee-4b95-a4c0-8cbeefca7da1_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Could you please send me the diff compared to my contribution=2C rather tha= n compared to the official latest 5x5=2C that would help me understand your= suggestion.

VBR=2C
 =3B =3B Vincent.

>=3B Date:= Sat=2C 21 May 2011 11:36:52 -0300
>=3B From: viniciusjl@ig.com.br
= >=3B To: vincent.b.1@hotmail.fr
>=3B Subject: Re: 5x5 Arithmetic sol= ver
>=3B CC: monnier@iro.umontreal.ca=3B emacs-devel@gnu.org
>=3B=
>=3B Hi Vincent=2C
>=3B
>=3B Could I suggest the attached= diff?
>=3B
>=3B Vinicius
>=3B
>=3B
>=3B On 05/= 21/2011 04:15 AM=2C Vincent Bela=EFche wrote:
>=3B >=3B Salut St=E9f= an=2C
>=3B >=3B
>=3B >=3B Toujours aussi =E0 cheval sur les c= onventions de codage !
>=3B >=3B
>=3B >=3B>=3B>=3B Please= find herein attached a contribution to the 5x5 game. This is an
>=3B = >=3B>=3B>=3B arithmetic solver based on a matrix inversion in a (Z/2Z= )^25 vector
>=3B >=3B>=3B>=3B space.
>=3B >=3B>=3B Than= ks. A few comments:
>=3B >=3B>=3B - avoid using a tarball and jus= t attach the diff as-is=2C
>=3B >=3B>=3B makes it a lot easier t= o review.
>=3B >=3B noted
>=3B >=3B
>=3B >=3B>=3B - = why 5x5-local-variables?
>=3B >=3B That is used in 5x5-mode to imply= that all listed variable are made
>=3B >=3B local to that very 5x5 = buffer. if after `M-x 5x5' you do a `M-x
>=3B >=3B rename-uniquely' = and then `M-x 5x5' again then you have have two
>=3B >=3B independen= t games.
>=3B >=3B
>=3B >=3B>=3B - explain the changes in t= he 5x5 function.
>=3B >=3B I had to change slightly the order of ope= rations because setting the
>=3B >=3B mode has to be done before any= buffer local 5x5 variable is touched=2C as
>=3B >=3B precisely thos= e variables are made local by setting the mode
>=3B >=3B
>=3B &= gt=3B>=3B - many of your lines have trailing whitespace. I generally don= 't care
>=3B >=3B>=3B much=2C about it=2C but some people do=2C = and it's usually preferable to
>=3B >=3B>=3B avoid them. M-x pi= cture-mode C-c C-c gets rid of them for you (as
>=3B >=3B>=3B a = side-effect).
>=3B >=3B Done
>=3B >=3B
>=3B >=3B>=3B= - try to keep the first line of docstrings as a self-sufficient sentence>=3B >=3B>=3B (because M-x apropos only shows the first line).>=3B >=3B
>=3B >=3B
>=3B >=3B>=3B - stay within 80 col= umns.
>=3B >=3B Do you mean that we are still in the 80ies =3B-P ?>=3B >=3B
>=3B >=3B Ok=2C done.
>=3B >=3B
>=3B >= =3B>=3B - your code is not properly indented (e.g. the `grid' argument in=
>=3B >=3B>=3B 5x5-grid-to-vec).
>=3B >=3B Done
>=3B= >=3B
>=3B >=3B>=3B - Please capitalize your comments and termin= ate them with a "." or some
>=3B >=3B>=3B other appropriate punc= tuation.
>=3B >=3B Some comments by a variable name=2C so they are n= ot capitalized.
>=3B >=3B
>=3B >=3B Some comments are equatio= ns like this:
>=3B >=3B
>=3B >=3B =3B=3B B:=3D targetv>=3B >=3B =3B=3B A:=3D transferm
>=3B >=3B =3B=3B P:=3D= base-change
>=3B >=3B =3B=3B P^-1 :=3D inv-base-change
>= =3B >=3B =3B=3B X :=3D solution
>=3B >=3B
>=3B >=3B = =3B=3B B =3D A * X
>=3B >=3B =3B=3B P^-1 * B =3D P^-1 * A * P *= P^-1 * X
>=3B >=3B =3B=3B CX =3D P^-1 * X
>=3B >=3B = =3B=3B CA =3D P^-1 * A * P
>=3B >=3B =3B=3B CB =3D P^-1 * B
&= gt=3B >=3B =3B=3B CB =3D CA * CX
>=3B >=3B =3B=3B CX =3D C= A^-1 * CB
>=3B >=3B =3B=3B X =3D P * CX
>=3B >=3B
>= =3B >=3B I don't think that this is common practice to use a punctuation = at the
>=3B >=3B end of an equation.
>=3B >=3B
>=3B >= =3B Some other comment is commented out code like this:
>=3B >=3B>=3B >=3B =3B=3B(ctransferm-1-2 (calcFunc-mcol ctransferm-1-: col-= 2))
>=3B >=3B
>=3B >=3B This code is not there because I don'= t need that variable=2C but I found
>=3B >=3B useful to show how it = would be defined.
>=3B >=3B
>=3B >=3B For all the remaining c= omments I have done it
>=3B >=3B
>=3B >=3B>=3B - 5x5-solve-= suggest should have a docstring.
>=3B >=3B Done
>=3B >=3B
= >=3B >=3B>=3B - try C-u checkdoc-current-buffer.
>=3B >=3B I g= et
>=3B >=3B
>=3B >=3B checkdoc-continue: Too many occurrence= s of \[function]. Use \{keymap}
>=3B >=3B instead
>=3B >=3B<= br>>=3B >=3B Because 5x5 is used many times as if it was
>=3B >= =3B
>=3B >=3B
>=3B >=3B>=3B - we need a ChangeLog entry.>=3B >=3B Here it is:
>=3B >=3B
>=3B >=3B --------------= ---------------------------------------------------------
>=3B >=3B = 2011-05-21 Vincent Bela=EFche<=3Bvincentb1@users.sourceforge.net>=3B>=3B >=3B
>=3B >=3B * play/5x5.el: Add an arithmetic solver t= o suggest positions to
>=3B >=3B click on.
>=3B >=3B -------= ----------------------------------------------------------------
>=3B = >=3B
>=3B >=3B>=3B - I don't understand the "solve step" message= (e.g. it said 23 every
>=3B >=3B>=3B time=2C even though I foll= owed its suggestions and finished in 12 moves).
>=3B >=3B>=3B
&= gt=3B >=3B>=3B
>=3B >=3B Ask it to Jay=2C this message is output= by Calc=2C not by 5x5. 23 is due
>=3B >=3B to this that you have to= invert a 23x23 matrix. Altough the 5x5 transfer
>=3B >=3B matrix is= 25x25=2C its rank is only 23=2C so I extract some submatrix to
>=3B &= gt=3B compute the solution.
>=3B >=3B
>=3B >=3B>=3B = Stefan
>=3B >=3B Vincent.
>=3B >=3B
>=3B
= = --_7b11258c-86ee-4b95-a4c0-8cbeefca7da1_--