[squeak-dev] Closure testers needed

Ken Causey ken at kencausey.com
Thu Jul 16 17:33:16 UTC 2009


On Thu, 2009-07-16 at 11:59 -0500, Ken Causey wrote:
> On Thu, 2009-07-16 at 10:23 -0400, Ian Trudel wrote:
> > SqueakVM-Win32-3.11.3-bin.zip
> > Squeak3.10-7159-basic.image
> > SqueakV39.sources
> > 
> > All updates applied according to the given protocol.
> > 
> > fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]].
> > fib value: 10.
> > 
> >  89
> > 
> > Slight problem here...
> > 
> > /* wxMaxima 0.8.0
> > 
> > (%i1) fib(10);
> > (%o1) 55
> > 
> > Ian.
> 
> The problem here is the fib implementation and not closure support, you
> will get the same result in any Smalltalk implementation.  It defines
> the fib value: 0 as 1 and not 0 so as a result the implementation is off
> by one step at every point.
> 
> Ken

It was pointed out to me that it is my reading comprehension skills that
need some work as this implementation comes from Andreas' original
email.  I'm not sure his point with this example other than that if it
does not fail catastrophically, then it is a success.

Ken

P.S. I am currently testing the closure stuff on 32-bit linux using a
Bryce VM from

http://ftp.squeak.org/Exupery/vms/exupery-vm-0.15.1-linux.tz

and will report back.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090716/a142c4f0/attachment.pgp


More information about the Squeak-dev mailing list