--- In squeak@yahoogroups.com, Brian Rice <water@...> wrote:
This sounds nice. Some comments:
- I can't load it. Adding the repository via Monticello and trying
to even select the version in the Monticello browser leads to the attached error stack.
We created the monticello file with Squeak 3.9Alpha. I just try it out on 3.8 and it does not work as you say. We will upload a new file for 3.8. Thanks!!
- How does it relate to Helge Horch's Squeak port of Andrew Brault's
Dolphin package? Did you know of this package?
I did not know about it. Thank you for the link! We'll take a look. All the models we know that treat this problem are in the FAQ, under the question "Are there other models of the same problem?"
The code looks more elaborate and complicated (350 kb of source is not lightweight compared to 51 kb in Helge's package and 21 kb for the equivalent Slate code) but has the same class names in several places. However, I cannot tell if this complication is valuable or wasteful, because there are not enough comments in the source file (actually it looks like there are NO comments).
Yeah, there are no comments. We are not use to comment the methods, we only doit when there is something difficult to understand. Anyhow, you have the test cases, there are plenty of them where you can look for good examples. Also, in the FAQ I wrote some examples you may find interesting.
A lot of the extra work appears to be a huge unit-test suite, which is good. There is also some kind of graph model and some evaluation/ thunking mini-library.
Yeah, the graph model (very simple one) is to convert measures from different "domains". This is usefull when you have financial measures like "10 * dollar" and want to convert that to Euros. In this case the conversion is not fixed (like in all physical measures) and depends on different forces, like the financial market, date-time, etc.
These seem to be useful only for portability (since you are not using other equivalent Squeak packages), so you may want to separate them for clarity.
Thanks, we will think about it.
I also am not an ACM member, so I cannot read your paper until OOPSLA.
I'm not sure I can't send it... I have to see the copyright (I hate all this copyright stuff...)
- I like the MeasureBag idea. Does it work for non-Integer values
and why or why not?
What do you mean with non-Integer values?. Let me give you some examples: (20 * dollar) + (10 * euro) --> Returns a measure bag with 20 dollars and 10 euros (20 * dollar) + 1 --> Returns a measure bag with 20 dollars and the number 1 (20 * apple) + (5 * orange) --> Returns a bag with 20 apples and 5 oranges
Again, this is useful for financial measures. It does not make sense for example with physical measures.
- "Measure" suggests measurement, which has precision and tolerance.
We have struggle with the name for a while. We don't use measurement (althoug we used to use it) because it suggests an action (a verb). We use Measure becuase it is a noum. We almost call it Quantity, but the name does not comunicate well... Because it is not a measurement, it does not have a precision and tolerance.
Do you take these into consideration? If not, why name it Measurement
Remember is not measurement but measure.
instead of DimensionedUnit or something? It will be confusing if someone makes a separate type system that /does/ handle precision and tolerance.
I'm not sure DimensionedUnit is a better name, becuase it puts the attention on the unit but we want to put it on the measures... but I would like to listen to other peoples opinion, names for me are very important...
Thanks again, Hernan.
Thanks!
On Mar 27, 2006, at 2:17 PM, Hernan Wilkinson wrote:
Hi, we create a packaged named Aconcagua at SqueakSource. This model represents measures as first class objects, that is, an object that encapsulates a number with its unit. We uploaded a FAQ to its SqueakSource wiki, with some examples. The model includes almost 600 tests that can be used as examples also. We use this model in many of the financial applications we wrote and it is used by the Gregorian Calendar model we are going to upload soon (the one presented at ESUG last year). The package is going to be available for VisualAge, GemStone, VisualWorks and Dolphin. (Right now only on Squeak, VisualAge and GemStone). There is also a practitioner report we wrote for OOPSLA about this model: (http://portal.acm.org/citation.cfm? id=1094964&coll=ACM&dl=ACM&CFID=72196433&CFTOKEN=8952623 <http:// portal.acm.org/citation.cfm? id=1094964&coll=ACM&dl=ACM&CFID=72196433&CFTOKEN=8952623>) We hope you like it. Bye, Hernan.
-- -Brian http://tunes.org/~water/brice.vcf