emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 5x5 Arithmetic solver


From: Stefan Monnier
Subject: Re: 5x5 Arithmetic solver
Date: Sat, 21 May 2011 20:29:11 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> - 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.

So those vars should always be buffer-local and it's a property of those
vars, rather than some kind of "configuration", so just add
(make-variable-buffer-local '<foo>) after each one of those variables.

>> - 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, as
> precisely those variables are made local by setting the mode

I see, thanks.

>> - stay within 80 columns.
> Do you mean that we are still in the 80ies ;-P ? 

Yup, humans's reading abilities are still the same as in the 80ies, sadly.

>> - try C-u checkdoc-current-buffer.
         ^^^
       C-x M-x

> I get 

> checkdoc-continue: Too many occurrences of \[function].  Use \{keymap}
> instead

> Because 5x5 is used many times as if it was 

Yes, the original code already raised some flags.  It's OK, these are
guidelines, which like all rules need to be broken every once in a while.

> -----------------------------------------------------------------------
> 2011-05-21  Vincent Belaïche  <address@hidden>

>       * play/5x5.el: Add an arithmetic solver to suggest positions to
>       click on.

The ChangeLog comment should be more detailed, see the megabytes of
ChangeLog in Emacs as examples, as well as
http://www.gnu.org/prep/standards/html_node/Change-Logs.html.
The ChangeLog should at the very least answer the questions I asked and
mention all the functions that are modified/added/removed.

>> - I don't understand the "solve step" message (e.g. it said 23 every
>> time, even though I followed its suggestions and finished in 12 moves).

> Ask it to Jay, this message is output by Calc, not by 5x5. 23 is due
> to this that you have to invert a 23x23 matrix. Altough the 5x5 transfer
> matrix is 25x25, its rank is only 23, so I extract some submatrix to
> compute the solution.

I see.  Short of changing Calc, you could add your own `message' after
the call to Calc that produces those messages, so it's a bit more clear
that these are intermediate messages not pertaining to the final answer.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]