Newbie Questions

Ross Boylan RossBoylan at stanfordalumni.org
Mon Mar 23 17:27:04 UTC 2009


On Mon, 2009-03-23 at 11:53 -0500, Chris Muller wrote:
> Hi Ross,
> 
> > Do you recommend using r41 or the r42beta?  I can be a bit of a guinea
> > pig, but I'm more concerned with getting my program working.
> 
> Definitely r42Beta2 (or higher, if available).  It has many
> improvements over r41 and I believe, despite its name, it is at least
> as stable, probably more.
> 
> > What channel should I use to get Magma?  I gather there are several
> > (SqueakMap, SqueakSource, UniverseBrowser).
> 
> All of the individual packages are always available on SqueakSource.
> In addition, I make available a "Monticello Configuration" which has
> the latest batch of packages for which I have run the test suite.
> However..
> 
> Just this last week, I put a bunch of work into a tool that lets me
> make a SAR very easily.  Therefore I intend to start keeping the
> version of Magma available on SqueakMap much more up to date; in fact,
> at this moment, SqueakMap is the *only* place to download r42 with one
> click.  I will plan to update the Monticello configuration today.
Is the SqueakMap version the latest r42?
> 
> > I'm thinking of using Damien's squeak-dev 3.10 image.  Should that work?
> 
> Please run the Magma test suite on that image.  It's really the best
> and only way to know.
> 
>   1)  Load Magma tester from SqueakMap
>   2)  MagmaTestCase fullSuite maDebug  "do it"
> 
> > I will be using DateAndTime and, probably, TimeSpan's (e.g., Date,
> > Month).  Since TimeSpan's are intervals, rather than points, I'm not
> > sure how or if they can be put in indices or used in queries.
I'm still wondering about the previous question.

http://wiki.squeak.org/squeak/5722 lists Date but not DateAndTime as
explicitly supported Magnitudes; presumably both qualify under "any
class that inherits from Object with only named instance variables."

http://wiki.squeak.org/squeak/2639 says "There are also an [sic] index
types for Dates, DateAndTimes, UUID's, Integers, and more." Dates are
now TimeSpans, though perhaps they were not when the page was written.

There are at least two scenarios where the width of the item being
indexed could be problematic.  Suppose the index is on intervals that
are TimeSpans.  For simplicity, I'll assume everthing is on the same
day.  Suppose one has a collection indexed on the TimeSpan with object a
having TimeSpan from 1 to 2 am.  If you ask for values at DateAndTime
1:30am, do you get a back?  Do you get an error about the query having
the wrong type?

Alternately, suppose you ask for values at a TimeSpan from 1:30-2:30am.
What happens?

Thanks.
Ross

> >
> > The documentation asks for attributes to be indexed.  Does this mean
> > instance variables, or can one index the results of methods?
> 
> It indexes based on the results of method calculations.  But perhaps
> the reason the word "attribute" was used is you have to be careful
> that if instVars change to cause the calculated value of your index
> value to change, you must inform Magma.
> 
> >  For
> > example, if an object has a TimeSpan instance variable and methods
> > #start and #end that give the start and endpoints of that variable, can
> > I index on start and end?
> 
> Yes of course, please see the docs for creaqting your own custom index type.
> 
> http://wiki.squeak.org/squeak/2668
> 
>  - Chris
> 



More information about the Magma mailing list