After much too long time, I've finally gotten back to programming
something others might find useful... The first calculator I ever owned was a HP-35, one of the first RPN machines available. I fondly remember it, and occasionally long for it when I need to do some math work. Face it, the standard Windows calculator just doesn't cut it. So I built my own. This calculator is based on an HP-35 simulator written for the HP Museum. Thanks a lot to Blair for providing me the code snippets I needed to grok how to use bitmap resources in-image. I couldn't have done this without his help. http://www.metaprog.com/Smalltalk/HP35.zip For ease of deployment, the bitmaps for the calculator above are stored in the Smalltalk image. This is the tool I used to suck'em in. The Bitmap Persistance Tool provides an interface for embedding bitmap resources (.bmp, .jpg, .gif files) in a Smalltalk image. The resources are stored as ByteArrays in class methods. Many thanks to Blair, who gave me some excellent example code. http://www.metaprog.com/Smalltalk/bpt.zip Have fun! Cheers Joseph |
Joseph,
This was also my first calculator. I worked an entire summer to earn the money for it (like some guys do for their first car). A couple proposals: (1) initialize the registers to zero to avoid a walkback if no value has been entered; and (2) show zero when the view is first displayed. James "Joseph Pelrine" <[hidden email]> wrote in message news:89a63$44b3b096$d59e9950$[hidden email]... > After much too long time, I've finally gotten back to programming > something others might find useful... > > The first calculator I ever owned was a HP-35, one of the first RPN > machines available. I fondly remember it, and occasionally long for it > when I need to do some math work. Face it, the standard Windows calculator > just doesn't cut it. So I built my own. > > This calculator is based on an HP-35 simulator written for the HP Museum. > > Thanks a lot to Blair for providing me the code snippets I needed to grok > how to use bitmap resources in-image. I couldn't have done this without > his help. > > http://www.metaprog.com/Smalltalk/HP35.zip > > For ease of deployment, the bitmaps for the calculator above are stored in > the Smalltalk image. This is the tool I used to suck'em in. > > The Bitmap Persistance Tool provides an interface for embedding bitmap > resources (.bmp, .jpg, .gif files) in a Smalltalk image. The resources are > stored as ByteArrays in class methods. > > Many thanks to Blair, who gave me some excellent example code. > > http://www.metaprog.com/Smalltalk/bpt.zip > > Have fun! > > Cheers > Joseph |
Hi James!
James Foster wrote: > Joseph, > This was also my first calculator. I worked an entire summer to earn the > money for it (like some guys do for their first car). Yep - we have the same bald spots :-) A couple proposals: > (1) initialize the registers to zero to avoid a walkback if no value has > been entered; and (2) show zero when the view is first displayed. Thanks for the suggestions. That's why I posted the code. The first one is definitely necessary. I'm not sure about the second one, though. The HP-35 didn't show anything when first displayed. Initalizing the x and display registers to 0 would be the easiest solution to both of your points, however, it wouldn't emulate the original behaviour any more. What do you suggest? BTW - this is the first step towards emulating something like the HP-41, a programmable calculator :-) Cheers Joseph |
Joseph,
I hadn't remembered that the original behavior was to have a blank display when turned on. If so, then that authenticity is probably appropriate. The next suggestion is that you remove the package's postinstall script (that calls #initModesDictionary). It appears that you are saving this package from an image that has Modes already defined as a PoolConstantsDictionary. The system properly files that out (from your image) in a way that preserves the PoolConstantsDictionary characteristics. Once you run the postinstall script, Modes is replaced with a plain Dictionary, and the filing out process does not handle it the same. A subsequent file-in results in several methods that don't compile. Removing the script seems to make things fine. James "Joseph Pelrine" <[hidden email]> wrote in message news:c7240$44b3f995$d59e9950$[hidden email]... > Hi James! > James Foster wrote: >> Joseph, >> This was also my first calculator. I worked an entire summer to earn the >> money for it (like some guys do for their first car). > Yep - we have the same bald spots :-) > > A couple proposals: >> (1) initialize the registers to zero to avoid a walkback if no value has >> been entered; and (2) show zero when the view is first displayed. > > > Thanks for the suggestions. That's why I posted the code. The first one is > definitely necessary. I'm not sure about the second one, though. The HP-35 > didn't show anything when first displayed. Initalizing the x and display > registers to 0 would be the easiest solution to both of your points, > however, it wouldn't emulate the original behaviour any more. What do you > suggest? > > BTW - this is the first step towards emulating something like the HP-41, a > programmable calculator :-) > > Cheers > Joseph > |
In reply to this post by Joseph Pelrine-7
Joseph,
I get a walkback displaying the reciprocal (1/x) of 64. It appears to be an issue of newly calculated negative exponents. James "Joseph Pelrine" <[hidden email]> wrote in message news:89a63$44b3b096$d59e9950$[hidden email]... > After much too long time, I've finally gotten back to programming > something others might find useful... > > The first calculator I ever owned was a HP-35, one of the first RPN > machines available. I fondly remember it, and occasionally long for it > when I need to do some math work. Face it, the standard Windows calculator > just doesn't cut it. So I built my own. > > This calculator is based on an HP-35 simulator written for the HP Museum. > > Thanks a lot to Blair for providing me the code snippets I needed to grok > how to use bitmap resources in-image. I couldn't have done this without > his help. > > http://www.metaprog.com/Smalltalk/HP35.zip > > For ease of deployment, the bitmaps for the calculator above are stored in > the Smalltalk image. This is the tool I used to suck'em in. > > The Bitmap Persistance Tool provides an interface for embedding bitmap > resources (.bmp, .jpg, .gif files) in a Smalltalk image. The resources are > stored as ByteArrays in class methods. > > Many thanks to Blair, who gave me some excellent example code. > > http://www.metaprog.com/Smalltalk/bpt.zip > > Have fun! > > Cheers > Joseph |
James,
Thanks for catching this one. It's a problem in the display register. I'll let you know when I have a bug fix - probably this weekend. Joseph James Foster wrote: > Joseph, > > I get a walkback displaying the reciprocal (1/x) of 64. It appears to be an > issue of newly calculated negative exponents. > > James > > "Joseph Pelrine" <[hidden email]> wrote in message > news:89a63$44b3b096$d59e9950$[hidden email]... > >>After much too long time, I've finally gotten back to programming >>something others might find useful... >> >>The first calculator I ever owned was a HP-35, one of the first RPN >>machines available. I fondly remember it, and occasionally long for it >>when I need to do some math work. Face it, the standard Windows calculator >>just doesn't cut it. So I built my own. >> >>This calculator is based on an HP-35 simulator written for the HP Museum. >> >>Thanks a lot to Blair for providing me the code snippets I needed to grok >>how to use bitmap resources in-image. I couldn't have done this without >>his help. >> >>http://www.metaprog.com/Smalltalk/HP35.zip >> >>For ease of deployment, the bitmaps for the calculator above are stored in >>the Smalltalk image. This is the tool I used to suck'em in. >> >>The Bitmap Persistance Tool provides an interface for embedding bitmap >>resources (.bmp, .jpg, .gif files) in a Smalltalk image. The resources are >>stored as ByteArrays in class methods. >> >>Many thanks to Blair, who gave me some excellent example code. >> >>http://www.metaprog.com/Smalltalk/bpt.zip >> >>Have fun! >> >>Cheers >>Joseph > > > |
Free forum by Nabble | Edit this page |