* Old programmers never die ...
@ 2013-01-29 16:25 Mike H
2013-01-29 17:23 ` Patrick
2013-02-01 13:22 ` Stephen Leake
0 siblings, 2 replies; 6+ messages in thread
From: Mike H @ 2013-01-29 16:25 UTC (permalink / raw)
Good afternoon all,
For some time now, my wife has been in need of a Sudoku checker. Or to
be more exact, I was in need of a Sudoku checker into which I could feed
her solutions from a text file that contains a string of 81 numeric
digits.
Yes, you have guessed it. The checker was straight forward and the
temptation to try a solver was overwhelming. I now have one, but must
confess I have not yet dared to try it on a puzzle of difficulty level
"Diabolical".
It is at least twenty years since I was paid to write a line of Ada code
so I hope you will indulge an old man who is delighted to find that he
is not quite as senile as he had feared. Now he is in need of an
audience that he hopes might be sympathetic to a bit of boasting ;-)
--
Time flies like an arrow. Fruit flies like a banana.
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Old programmers never die ...
2013-01-29 16:25 Old programmers never die Mike H
@ 2013-01-29 17:23 ` Patrick
2013-01-29 20:33 ` Mike H
2013-02-01 13:22 ` Stephen Leake
1 sibling, 1 reply; 6+ messages in thread
From: Patrick @ 2013-01-29 17:23 UTC (permalink / raw)
Cc: Mike Hopkins
Hi Mike
Did you post in online by chance ?
is it gui based ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Old programmers never die ...
2013-01-29 17:23 ` Patrick
@ 2013-01-29 20:33 ` Mike H
2013-02-01 13:22 ` Stephen Leake
0 siblings, 1 reply; 6+ messages in thread
From: Mike H @ 2013-01-29 20:33 UTC (permalink / raw)
In message <2e4c2077-76aa-4787-8f2e-572552903f47@googlegroups.com>,
Patrick <patrick@spellingbeewinnars.org> writes
>Hi Mike
>
>Did you post in online by chance ?
>
>is it gui based ?
First things first. This version runs from the command line and that is
where it displays the results. Apart from line feeds, the input is an
unformatted string of '1' .. '9' and ' '. I have just broken it with a
"Diabolical" (or rather it ran out of steam) so there is more work to do
on the logic and a few more number crunching tricks to learn. The bit of
theory that I have studied so far has convinced me that recursion and
trial and error are routes to be avoided.
The fun has been the intellectual exercise of dealing with alternative
views of the grid as 9 lines, 9 columns or 9 blocks (of 3x3). I soon
found it useful to use strict typing to define the position of each of
the 81 cells in three dimensions (line, column, block). By the rules of
Sudoku, the other 25 cells that make up those three dimensions interact;
more fun!
A GUI may come later, if at all. I suspect that will be an entirely new
ball game and, for the time being, that aspect does not excite me. I am
in my eightieth year and am doing this for my own amusement. Perhaps one
reason for a lack of enthusiasm is that about 8 years ago I started, but
never finished, a (model) railway signalling exercise. The logic was
trivial but I got bogged down in trying to get an aesthetically pleasing
display. Perhaps I was using the wrong tool, it was JEWL.
--
Mike
Swim? Naturally at Severn Vale
<http://www.severnvalesc.org/>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Old programmers never die ...
2013-01-29 20:33 ` Mike H
@ 2013-02-01 13:22 ` Stephen Leake
2013-02-01 23:35 ` Randy Brukardt
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2013-02-01 13:22 UTC (permalink / raw)
Mike H <postmaster@ada-augusta.demon.co.uk> writes:
> First things first. This version runs from the command line and that
> is where it displays the results. Apart from line feeds, the input is
> an unformatted string of '1' .. '9' and ' '. I have just broken it
> with a "Diabolical" (or rather it ran out of steam) so there is more
> work to do on the logic and a few more number crunching tricks to
> learn. The bit of theory that I have studied so far has convinced me
> that recursion and trial and error are routes to be avoided.
That's a _real_ program :)
> A GUI may come later, if at all. I suspect that will be an entirely
> new ball game and, for the time being, that aspect does not excite me.
> I am in my eightieth year and am doing this for my own amusement.
> Perhaps one reason for a lack of enthusiasm is that about 8 years ago
> I started, but never finished, a (model) railway signalling exercise.
> The logic was trivial but I got bogged down in trying to get an
> aesthetically pleasing display. Perhaps I was using the wrong tool, it
> was JEWL.
GUI's are a pain; I have yet to see a GUI framework that actually makes
it easy. I was excited about the Android framework, but it turns out to
have too many bugs to be easy. And they change it too fast. (when was
the last time an API in the Ada standard _changed_?).
See http://www.enjoysudoku.com/ for my recommendation for a Sudoku
player.
So unless you really don't like any of the available Sudoku GUI's, don't
waste your time on it; that's for minor programmers who can't handle Ada ;).
--
-- Stephe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Old programmers never die ...
2013-02-01 13:22 ` Stephen Leake
@ 2013-02-01 23:35 ` Randy Brukardt
0 siblings, 0 replies; 6+ messages in thread
From: Randy Brukardt @ 2013-02-01 23:35 UTC (permalink / raw)
"Stephen Leake" <stephen_leake@stephe-leake.org> wrote in message
news:85obg41848.fsf@stephe-leake.org...
...
> GUI's are a pain; I have yet to see a GUI framework that actually makes
> it easy. I was excited about the Android framework, but it turns out to
> have too many bugs to be easy. And they change it too fast. (when was
> the last time an API in the Ada standard _changed_?).
Answer to probably rhetorical question:
The parameter mode of Flush was changed from "in out" to "in" in 1999. "not
null" was added to the specifications of the Stream attributes in 2006. Both
of these were thought to not be incompatible for various reasons. The most
recent case I can find is the addition of a discriminant to Group_Budget
(that's a 2010 change). It's compatible in most uses as it has a default.
More importantly, there are many occurrences of routines being added to a
package, which is potentially incompatible for users that use "use" clauses.
In any case, I think this proves your point -- it's not very often. :-)
Randy.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Old programmers never die ...
2013-01-29 16:25 Old programmers never die Mike H
2013-01-29 17:23 ` Patrick
@ 2013-02-01 13:22 ` Stephen Leake
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2013-02-01 13:22 UTC (permalink / raw)
Mike H <postmaster@ada-augusta.demon.co.uk> writes:
> For some time now, my wife has been in need of a Sudoku checker. Or to
> be more exact, I was in need of a Sudoku checker into which I could
> feed her solutions from a text file that contains a string of 81
> numeric digits.
>
> Yes, you have guessed it. The checker was straight forward and the
> temptation to try a solver was overwhelming. I now have one, but must
> confess I have not yet dared to try it on a puzzle of difficulty level
> "Diabolical".
Excellent! Writing Ada to satisfy an itch is one of the best pleasures
around :).
--
-- Stephe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-01 23:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-29 16:25 Old programmers never die Mike H
2013-01-29 17:23 ` Patrick
2013-01-29 20:33 ` Mike H
2013-02-01 13:22 ` Stephen Leake
2013-02-01 23:35 ` Randy Brukardt
2013-02-01 13:22 ` Stephen Leake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox