Re: [Newbies] Collection subclasses

2008-04-02 Thread Bert Freudenberg
On 03.04.2008, at 04:52, Rob Rothwell wrote: On Wed, Apr 2, 2008 at 10:48 PM, Randal L. Schwartz <[EMAIL PROTECTED] > wrote: > "Rob" == Rob Rothwell <[EMAIL PROTECTED]> writes: Rob> Is one not supposed to make subclasses of these classes, and if so, why not? Generally, your object "has

Re: [Newbies] Efficient date parsing

2008-04-02 Thread Bert Freudenberg
On 03.04.2008, at 07:49, Ramon Leon wrote: Yeah, shortly after I posted that, I remembered that. :) Also, for the beginners. you need to initialize dateCache to a Dictionary. the normal way to do that is to have an instance side method called #initialize: initialize super

RE: [Newbies] ActiveRecord?

2008-04-02 Thread Ramon Leon
> Sure, for simple stuff, one-class-is-one-table might make > sense, but pay attention to the other kinds of mapping > styles. Lots of power in there. It's how an ORM *should* be done. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - Rails has made it pretty clear that *m

RE: [Newbies] Efficient date parsing

2008-04-02 Thread Ramon Leon
> > Yeah, shortly after I posted that, I remembered that. :) > > Also, for the beginners. you need to initialize dateCache to > a Dictionary. > the normal way to do that is to have an instance side method called > #initialize: > > initialize > super initialize. "NEVER NE

Re: [Newbies] ActiveRecord?

2008-04-02 Thread Randal L. Schwartz
> "Rob" == Rob Rothwell <[EMAIL PROTECTED]> writes: Rob> Has anyone written anything like the ActiveRecord for Glorp? Using something like ActiveRecord for Glorp would be like buying an airplane just to taxi around the airport without ever lifting off the ground. The big plus in Glorp that I

Re: [Newbies] Collection subclasses

2008-04-02 Thread Rob Rothwell
On Wed, Apr 2, 2008 at 10:48 PM, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: > > "Rob" == Rob Rothwell <[EMAIL PROTECTED]> writes: > > Rob> Is one not supposed to make subclasses of these classes, and if so, > why not? > > Generally, your object "has a" collection, but doesn't qualify to be

[Newbies] ActiveRecord?

2008-04-02 Thread Rob Rothwell
Has anyone written anything like the ActiveRecord for Glorp? VW7.6 has something, but it would be slightly painful to port (for me at least) as it uses VW Package definitions and a few other things I am not familiar with. I know Ramon did something that used Magritte, but I am not using that in m

Re: [Newbies] Collection subclasses

2008-04-02 Thread Randal L. Schwartz
> "Rob" == Rob Rothwell <[EMAIL PROTECTED]> writes: Rob> Is one not supposed to make subclasses of these classes, and if so, why not? Generally, your object "has a" collection, but doesn't qualify to be "is a" collection. If you really want to subclass collection classes, you need to peer d

[Newbies] Collection subclasses

2008-04-02 Thread Rob Rothwell
If I create a simple object subclassed from Collection, SequenceableCollection, or ArrayedCollection called CollectionObject, with CollectionObject>>#initialize self halt. and execute: CollectionObject new. the halt is executed. Whereas, if I subclass CollectionObject from: Set Dictionar

Re: [Newbies] Efficient date parsing

2008-04-02 Thread Randal L. Schwartz
> "Ramon" == Ramon Leon <[EMAIL PROTECTED]> writes: Ramon> Or more idiomatic... Ramon> ^dateCache at: dateString ifAbsentPut: [Date from: dateString]. Yeah, shortly after I posted that, I remembered that. :) Also, for the beginners. you need to initialize dateCache to a Dictionary. the norm

RE: [Newbies] Efficient date parsing

2008-04-02 Thread Ramon Leon
> > Implement a simple cache: > >^dateCache at: dateString ifAbsent: > [dateCache at: dateString put: (Date from: dateString)]. > > something like that. > > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> Or more idiomatic... ^dateCach

Re: [Newbies] Efficient date parsing

2008-04-02 Thread Randal L. Schwartz
> "stan" == stan shepherd <[EMAIL PROTECTED]> writes: stan> Is there a more efficient way? Is there a standard method I've missed? One thing you should ensure is that you're not converting the same date twice. Typical logs have thousands of entries all with the same date, and I've seen far to

RE: [Newbies] Efficient date parsing

2008-04-02 Thread Ramon Leon
cient date parsing > > > I have a large file with dates in the format '2001-11-04'. As > I couldn't find a method to change to date, I'm doing: > date := self dateFrom: (dateString subStrings: '-'). > > dateFrom: anArray > "anArray should be like #('2005' '09' '06')" > ^Date

[Newbies] Efficient date parsing

2008-04-02 Thread stan shepherd
I have a large file with dates in the format '2001-11-04'. As I couldn't find a method to change to date, I'm doing: date := self dateFrom: (dateString subStrings: '-'). dateFrom: anArray "anArray should be like #('2005' '09' '06')" ^Date year: anArray first asInteger month

Re: [Newbies] Examples of GUI programs developed in Squeak

2008-04-02 Thread karl
David Finlayson wrote: I am considering developing an application in Squeak for the analysis and processing of sonar data. The most interesting part of the program is a visual analysis tool that would be used for filtering, mosaicking and GIS-type analysis. Superficially, it would resemble and in

[Newbies] Examples of GUI programs developed in Squeak

2008-04-02 Thread David Finlayson
I am considering developing an application in Squeak for the analysis and processing of sonar data. The most interesting part of the program is a visual analysis tool that would be used for filtering, mosaicking and GIS-type analysis. Superficially, it would resemble and indeed work a lot like a ph