So I'm sitting down to work on the Exception hierarchy, and wondering about the nuances of Redline syntax.
Specifically: 1. I see that notation for subclassing seems to be, e.g.,
ProtoObject < #Object instead of ProtoObject subclass: #Object Does this latter (more obviously Pharo-compatible) syntax also work?
2. I don't see any examples in the runtime classes yet (unless I missed an obvious one) for establishing instance variable names, class variable names, pool dictionaries, and category. Would this work:
Object < #MySubclass instanceVariableNames: 'foo bar' classVariableNames: 'baz' poolDictionaires: 'FooConstants' category: 'Foobar-Bazbot'
...methods... ??? -- Bob |
On Fri, Dec 23, 2011 at 7:29 AM, Robert Calco <[hidden email]> wrote:
So I'm sitting down to work on the Exception hierarchy, and wondering about the nuances of Redline syntax. So. category is dead. The metadata story for Redline has yet to be written. Current we are doing something like this:
Object < #MyClass instanceVariableNames: ''; classVariableNames: ''; classInstanceVariableNames: ''; poolDictionaries: ''.
where you only cascade the ones you are setting. The subclass: one was added in september and currently appears to be broken. As its test doesn't pass.
|
Sean,
On Fri, Dec 23, 2011 at 12:47 PM, Sean Allen <[hidden email]> wrote:
Hmmm. How are packages going to be managed?
What work is needed to round out Redline's metadata story?
Hmm. OK. Good to know; will play around with that too and see if I can figure out why. - Bob |
On Fri, Dec 23, 2011 at 8:04 AM, Robert Calco <[hidden email]> wrote:
Sean, Are you referring to how monticello uses category for creating packages?
Lots of thinking really. My general thought process is something like this:
We need a way to attach metadata to any object. I'm thinking a key value pair would work. So take a class or a method. I can attach different sorts of metadata to any object and retrieve it based on key.
The current state of Smalltalks with category providing some metadata and pragmas in methods, is a mess. I think step 1 is to come up with a bunch of metadata use cases and make sure any solution works
for that. Then determining the least intrusive way to introduce that into the syntax. -Sean- |
If there is a big call to support the older subclass keywords then we can add it in.
On Saturday, December 24, 2011, Sean Allen <[hidden email]> wrote: > > > On Fri, Dec 23, 2011 at 8:04 AM, Robert Calco <[hidden email]> wrote: >> >> Sean, >> >> On Fri, Dec 23, 2011 at 12:47 PM, Sean Allen <[hidden email]> wrote: >>> >>> So. category is dead. The metadata story for Redline has yet to be written. >> >> Hmmm. How are packages going to be managed? > > Are you referring to how monticello uses category for creating packages? > >> >> What work is needed to round out Redline's metadata story? > > Lots of thinking really. > My general thought process is something like this: > We need a way to attach metadata to any object. > I'm thinking a key value pair would work. > So take a class or a method. > I can attach different sorts of metadata to any object and retrieve it based on key. > The current state of Smalltalks with category providing some metadata and pragmas in methods, > is a mess. > I think step 1 is to come up with a bunch of metadata use cases and make sure any solution works > for that. Then determining the least intrusive way to introduce that into the syntax. > -Sean- |
I imagine it would be added eventually as an easier to port consideration.
There hasn't been much demand for it yet.
On Fri, Dec 23, 2011 at 4:12 PM, James Ladd <[hidden email]> wrote: If there is a big call to support the older subclass keywords then we can add it in. |
In reply to this post by James Ladd
Well, again, as with the +/- syntax, I don't mind the < shorthand. But I think for maximum Pharo compatibility, having it makes sense.
Are we planning to support fileIn/fileOut chunk formats?
- Bob
On Fri, Dec 23, 2011 at 9:12 PM, James Ladd <[hidden email]> wrote: If there is a big call to support the older subclass keywords then we can add it in. |
There is a hacked together exporter for Pharo in /extras/ that I plan on looking at in the next couple days.
I think it is still correct. It should also work in any recent Squeak. It gives you a right click menu on a class to export it in a Redline format which appears in your standard file out directory.
On Fri, Dec 23, 2011 at 4:16 PM, Robert Calco <[hidden email]> wrote: Well, again, as with the +/- syntax, I don't mind the < shorthand. But I think for maximum Pharo compatibility, having it makes sense. |
O I should add, the exporter doesn't know anything about Traits, it uses the end compiled class with traits already in it.
On Fri, Dec 23, 2011 at 4:19 PM, Sean Allen <[hidden email]> wrote: There is a hacked together exporter for Pharo in /extras/ that I plan on looking at in the next couple days. |
Think I might use this myself - if I can work out how to get the extra into pharo
On Saturday, December 24, 2011, Sean Allen <[hidden email]> wrote: > O I should add, the exporter doesn't know anything about Traits, it uses the end compiled class with traits already in it. > On Fri, Dec 23, 2011 at 4:19 PM, Sean Allen <[hidden email]> wrote: >> >> There is a hacked together exporter for Pharo in /extras/ that I plan on looking at in the next couple days. >> I think it is still correct. It should also work in any recent Squeak. >> It gives you a right click menu on a class to export it in a Redline format which appears in your standard file out directory. >> >> On Fri, Dec 23, 2011 at 4:16 PM, Robert Calco <[hidden email]> wrote: >>> >>> Well, again, as with the +/- syntax, I don't mind the < shorthand. But I think for maximum Pharo compatibility, having it makes sense. >>> Are we planning to support fileIn/fileOut chunk formats? >>> - Bob >>> >>> On Fri, Dec 23, 2011 at 9:12 PM, James Ladd <[hidden email]> wrote: >>>> >>>> If there is a big call to support the older subclass keywords then we can add it in. >>>> >>>> >>>> On Saturday, December 24, 2011, Sean Allen <[hidden email]> wrote: >>>> > >>>> > >>>> > On Fri, Dec 23, 2011 at 8:04 AM, Robert Calco <[hidden email]> wrote: >>>> >> >>>> >> Sean, >>>> >> >>>> >> On Fri, Dec 23, 2011 at 12:47 PM, Sean Allen <[hidden email]> wrote: >>>> >>> >>>> >>> So. category is dead. The metadata story for Redline has yet to be written. >>>> >> >>>> >> Hmmm. How are packages going to be managed? >>>> > >>>> > Are you referring to how monticello uses category for creating packages? >>>> > >>>> >> >>>> >> What work is needed to round out Redline's metadata story? >>>> > >>>> > Lots of thinking really. >>>> > My general thought process is something like this: >>>> > We need a way to attach metadata to any object. >>>> > I'm thinking a key value pair would work. >>>> > So take a class or a method. >>>> > I can attach different sorts of metadata to any object and retrieve it based on key. >>>> > The current state of Smalltalks with category providing some metadata and pragmas in methods, >>>> > is a mess. >>>> > I think step 1 is to come up with a bunch of metadata use cases and make sure any solution works >>>> > for that. Then determining the least intrusive way to introduce that into the syntax. >>>> > -Sean- >> > > |
Its a monticello package.
I guess I might need to do a write up.
On Fri, Dec 23, 2011 at 4:27 PM, James Ladd <[hidden email]> wrote: Think I might use this myself - if I can work out how to get the extra into pharo |
Funny how you say monticello package like I an meant to know how to use it.
On Sat, Dec 24, 2011 at 10:03 AM, Sean Allen <[hidden email]> wrote: Its a monticello package. |
Open the monticello browser.
Add a directory repository for where the package is in extras. Load it. Now in the system browser when you right click on a class there is an export to redline option.
On Fri, Dec 23, 2011 at 9:17 PM, James Ladd <[hidden email]> wrote: Funny how you say monticello package like I an meant to know how to use it. |
As a general reference for others who aren't familiar with Monticello ->
It is the version control system for Pharo, Squeak, Cuis et al now as well as for Gemstone.
So, if you don't know it, eventually that link is going to come in handy. If you run into problems or have questions about it, catch me on #redline-st
On Fri, Dec 23, 2011 at 10:40 PM, Sean Allen <[hidden email]> wrote: Open the monticello browser. |
Free forum by Nabble | Edit this page |