[Newbies] Chess Object problem

Ron Teitelbaum Ron at USMedRec.com
Wed Jun 7 23:36:47 UTC 2006


Hi Kevin,

I'm really glad you asked this question.  Because I didn't and here is the
response I got!

The fix which is referenced above is actually the worst one of all of them
(sorry to say that Ron ;-) since it not only uses the non-primitive version
(bad for speed) but also adds to the allocation overhead by converting the
byte array to a string. And unless I'm mistaken this alone will slow down
the chess game by a factor of two (because this code is soooo heavily used
in the game). I have actually sped up the whole game by a factor of four (no
kidding!) by carefully avoiding allocations in the move generator.

http://bugs.impara.de/view.php?id=1879 

See the bug for the patch or the chess game is working fine in 3.9b.

Now to your questions:

> 1) If this is a known problem with a known fix, how
> could I have discovered that?

Go to www.squeak.org and look at the right side bar at the bottom.  You will
notice a Bug Reporting link.  Go ahead and sign up to Mantis, you should
also consider signing up at squeakPeople, and squeakSource.  

Once there you can query for bugs to see if the issues have been solved.  If
you are really looking for a solved issue then remember to clear the filter
that filters out closed bugs.  By querying for Chess on closed bugs you will
find the one I reported.

As you also found out asking on the squeak-dev or even here is a good way to
know.  For most of the current development you will find someone that knows.


> 2) Is there a way to save/update code from the
> debugger? (I made the change in the class browser.)

Yes and you have to pause for a second to think about what a wonderful thing
it is that changes can be made to a running system.  **Pausing to reflect**

Ok to change a method in the debugger right click and accept just like
anywhere else.  Amazing !!

> 3) If this is not a known problem, where/how do I make
> my fix available for everyone?

The best thing to do is attach a change set or Monticello file, fileout or
even just paste the code to the bug report and let who ever is the package
maintainer look at your fix and decide if it's a good one.  Ken will usually
come along and assign the bug to someone.  The package maintainer will work
with someone to harvest the fix into the dev release.  That all works in
theory unless you mention this on Squeak-Dev.  Then what you get is argument
about who maintains what, is it an efficient system, why is there only one
group responsible for harvesting, and we need more help doing the
harvesting.  Still that's my recommendation.

Hope that helps and Great question, 

Happy coding,

Ron Teitelbaum
President / Principal Software Engineer
US Medical Record Specialists
Ron at USMedRec.com 

> -----Original Message-----
> From: beginners-bounces at lists.squeakfoundation.org [mailto:beginners-
> bounces at lists.squeakfoundation.org] On Behalf Of Kevin Kingdon
> Sent: Wednesday, June 07, 2006 3:14 PM
> To: beginners at lists.squeakfoundation.org
> Subject: [Newbies] Chess Object problem
> 
> I just downloaded the latest stable (3.8) version of
> squeak for Linux and for Windows. After a little
> exploration, I found the chess object. I dragged it to
> the desktop, but the first time I touched a piece, it
> threw an exception (smallInteger>>asciiValue not
> understood). A couple of days later, after
> (re-)learning some Smalltalk, I found where a byte
> array was being passed to a String method that
> expected a String parameter. A small fix later
> (sending "asString" to the byte array) and the chess
> program seemed to be working.
> 
> A few of questions:
> 1) If this is a known problem with a known fix, how
> could I have discovered that?
> 
> 2) Is there a way to save/update code from the
> debugger? (I made the change in the class browser.)
> 
> 3) If this is not a known problem, where/how do I make
> my fix available for everyone?
> 
> Thanks,
> Kevin W. Kingdon
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners




More information about the Beginners mailing list