Loading ...
Sorry, an error occurred while loading the content.

design patterns

Expand Messages
  • James McCartney
    Have there been any papers written on implementing design patterns in delegation/object based languages? I m interested in how delegation or object based
    Message 1 of 24 , Jan 2, 2003
    • 0 Attachment
      Have there been any papers written on implementing design patterns in
      delegation/object based languages? I'm interested in how delegation or
      object based inheritance can simplify design. For example these
      patterns from the Gamma, et al book seem to become non-issues in such a
      language :
      Prototype - built in to object based languages.
      Singleton - built in to object based languages.
      Chain of Responsibility - can be done easily by delegating to next
      object in chain.
      State - can be done easily with an assignable parent slot.
      Strategy - can be done easily with an assignable parent slot.
      Decorator - can be done easily with an assignable parent slot.
      Proxy - proxy can delegate to the other object.
      But I am also and perhaps more interested in design idioms that
      naturally arise out of differential programming, beyond the few that
      are mentioned in the papers on the Self site.

      --- james mccartney
    • Albertina Lourenci
      James McCartney wrote: Dear James: It is curious but there is a general trend in all new computational paradigms (AOSD, HyperJ, etc) to be unable to discard
      Message 2 of 24 , Jan 3, 2003
      • 0 Attachment
         

        James McCartney wrote:
        Dear James:

        It is curious but there is a general trend in all new computational paradigms
        (AOSD, HyperJ, etc)
        to be unable to discard design patterns and assert it is possible to simplify
        them at least! And of course they forget that doing this introduce the same
        faults they are critcizing in design patterns in the new techniques.
        In the chapter about Does Aspect Oriented Programming make sense ? in
        my Scientific Report Devising a generative morphodynamic level, see
        homepage: http://www.lsi.usp.br/~lourenci  I have tried to cover the most
        intriguing papers relating design patterns and other viewpoints about them (and
        at least the references make evident if read carefully what I state above. They
        complicate things instead of making things simple, and holistic and worse do not
        complexify the world.)
        In the  deep discussion with Jim Coplien who spearheaded the design pattern
        movement, I finally realized there is indeed something special about the design
        patterns.I believe James Noble( who was part of the prototype community)
        and Robert Biddle  have been trying to unravel the design patterns' true nature.
        This is rather concerned with the nature of literature I mean the fact literature
        feeds on figural language especially metaphor and metonymy. A wonderful
        book about this is Paul de Man's Allegories of Reading Figural language
        in Rousseau, Nietzche, Rilke and Proust.The preface is orgasmic!
        After twelve years old, I suffocated all my romantic trends especially
        poetry! However since I am an architect and an architectural language
        has the nature of Chinese, I mean obviously poetry, I reencountered
        in part this split in my research. Having abandoned verbal languages,
        I went so far that right now I am applying modulation to architecture,
        symmetry groups of the plane and the dotless plane and computer science!
        There is a trend to consider the aesthetic superiority of metaphor over
        metonymy.Our first examples dealing with the rhetorical
        questions were rhetorizations of grammar, figures generated
        by syntactical paradigms, wehreas the Proust example could be
        better described as a grammatization of rhetoric. By passing
        from a paradigmatic structure based on contingent association
        'such as metonymy, the mechanical, repetitive aspect of
        grammatical forms is shown to be operative in a passage that
        seemed at first sight to celebrate the self-willed and autonomous
        inventiveness of a subject....Yet our reading of the Proust passage
        shows that precisely when the highest claims are being made for
        the unifying power of metaphor, these very images rely in fact on
        the deceptive use of semi-automatic grammatical patterns. The
        deconstruction of metaphor and of all rhetorical patterns such
        as mimesis, paronomasia, or personification that use resemblance
         as a way to disguise differences, takes us back to the impersonal
        precision of grammar and of a semiology derived from
        grammatical patterns.
        There seems to be a difference then between what I called the
        rhetorization of grammar (as in rhetorical question) and
        the grammatization of rhetoric, as in the readings of the
        type sketched out in the passage from Proust.

        Hence after the rhetorical reading of the Proust passage,
        we can no longer believe the assertion made in this passage
        about the intrinsic metaphysical superiority of metaphor over
        metonymy.
        What is implied here, is that I abandoned the direct  concern
        with metaphor and centered my attention on the pragmatic
        metonymic modes. Something like Rauschenberg's did (see
        my III Scientific REport). Whilst Alexander embraced metaphor
        in the A pattern language which inspired the design patterns!
        Or better this tunes with Agile Software Development. Not being able to
        define the essence and not feeling confident on metaphors let's look
        for situations where art and poetry can occur! This is exactly what
        Alistair Cockburn does!

        And curiously this opened the gate for discourse!

        And of course there are many leaps in the reasoning here but concluding
        when I introduce modulation into my ecodesign model and its underlying
        geometric model, that necessarily must be implemented by computer
        I am introducing rhetorics into software systems or the multiplicity
        of meanings!!!
        And obviously all my attempt is to deconstruct "class-based languages"
        A class for me is simply a pattern!
        The non-attractive metonymic nature of  prototype based language especially
        Self  is the key for expressiveness!!!Its hermeneutic nature or its nature
        of a game, allowing the multiplicity of discourse through Kansas it doesn't matter
        where you are sitting down in the world opens the gate to the multiplicity of
        discourse and reaches the core of the Peircean semiotics based on the interpretant!

        So please when you simplify don't forget that metaphor and metonymy are different
        faces of the same coin. One cannot live without the other! I mean the what (Jim
        Coplien's efforts in software) and the how (Alistair's efforts in software) must be
        intertwined! (see my paper for rOOts conference in my homepage!).

        I am sure software is inaugurating a luminous era and I hope 2003 will
        be a bright Year for software development!

        Best wishes,
        Albertina

        Have there been any papers written on implementing design patterns in
        delegation/object based languages? I'm interested in how delegation or
        object based inheritance can simplify design. For example these
        patterns from the Gamma, et al book seem to become non-issues in such a
        language :
        Prototype - built in to object based languages.
        Singleton - built in to object based languages.
        Chain of Responsibility - can be done easily by delegating to next
        object in chain.
        State - can be done easily with an assignable parent slot.
        Strategy - can be done easily with an assignable parent slot.
        Decorator - can be done easily with an assignable parent slot.
        Proxy - proxy can delegate to the other object.
        But I am also and perhaps more interested in design idioms that
        naturally arise out of differential programming, beyond the few that
        are mentioned in the papers on the Self site.

        --- james mccartney
         
         

        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

      • Jecel Assumpcao Jr
        ... You might want to search the archives of this list for design patterns . There were several interesting discussions, including the one starting at
        Message 3 of 24 , Jan 3, 2003
        • 0 Attachment
          On Thursday 02 January 2003 19:20, James McCartney wrote:
          > Have there been any papers written on implementing design patterns in
          > delegation/object based languages? I'm interested in how delegation
          > or object based inheritance can simplify design.

          You might want to search the archives of this list for "design
          patterns". There were several interesting discussions, including the
          one starting at http://groups.yahoo.com/group/self-interest/message/841
          and http://groups.yahoo.com/group/self-interest/message/882

          > For example these
          > patterns from the Gamma, et al book seem to become non-issues in such
          > a language :
          > Prototype - built in to object based languages.
          > Singleton - built in to object based languages.
          > Chain of Responsibility - can be done easily by delegating to next
          > object in chain.
          > State - can be done easily with an assignable parent slot.
          > Strategy - can be done easily with an assignable parent slot.
          > Decorator - can be done easily with an assignable parent slot.
          > Proxy - proxy can delegate to the other object.

          Exactly - see my own list in message 882.

          > But I am also and perhaps more interested in design idioms that
          > naturally arise out of differential programming, beyond the few that
          > are mentioned in the papers on the Self site.

          I can't think of any new patterns enabled by Self right now, but it
          would be interesting to look into this.

          Note that on the other hand there are a few patterns that are required
          by Self due to "The Power Of Simplicity". Inheritance of structure (or
          shape) is a pattern, shared behavior in traits trees is a pattern and
          so on. Which is a good thing. A language can't and shouldn't have
          everything and what is left out will have to be dealt with somehow.

          -- Jecel
        • James McCartney
          Thanks for the ref. One thing about using delegation for something like Chain of Responsibility: If you ve delegated to a parent and that parent has its own
          Message 4 of 24 , Jan 3, 2003
          • 0 Attachment
            Thanks for the ref.

            One thing about using delegation for something like Chain of
            Responsibility: If you've delegated to a parent and that parent has its
            own methods and state, then that parent may want to have self refer to
            the parent instead of the original receiver in order that there are no
            unintended naming conflicts with other parents of the receiver or the
            receiver itself. How is this normally dealt with?

            On Friday, January 3, 2003, at 01:24 PM, Jecel Assumpcao Jr wrote:

            > You might want to search the archives of this list for "design
            > patterns". There were several interesting discussions, including the
            > one starting at http://groups.yahoo.com/group/self-interest/message/841
            > and http://groups.yahoo.com/group/self-interest/message/882
            --
            --- james mccartney james@... <http://www.audiosynth.com>
            SuperCollider - a real time synthesis programming language for the
            PowerMac.
            <ftp://www.audiosynth.com/pub/updates/SC2.2.16.sea.hqx>
          • Jecel Assumpcao Jr
            ... I would say that this is not normally dealt with. You know the old joke: Doctor, it hurts when I do this. Then don t do that! You avoid the problem by
            Message 5 of 24 , Jan 7, 2003
            • 0 Attachment
              On Friday 03 January 2003 21:39, James McCartney wrote:
              > One thing about using delegation for something like Chain of
              > Responsibility: If you've delegated to a parent and that parent has
              > its own methods and state, then that parent may want to have self
              > refer to the parent instead of the original receiver in order that
              > there are no unintended naming conflicts with other parents of the
              > receiver or the receiver itself. How is this normally dealt with?

              I would say that this is not normally dealt with. You know the old joke:

              "Doctor, it hurts when I do this."
              "Then don't do that!"

              You avoid the problem by a careful selection of method names so there is
              no conflict. Yes, I know that this is impossible in the general case.
              But I am not sure changing the meaning of "self" will help that much.

              obj1 = (| chain* <- (| m1 = (m2+1). m2 = (42) |).
              m3 = (m1/2).
              otherParent* = xxx
              |)

              I am supposing you are worried that obj1 might inherit a different "m2"
              from otherParent and want to force "m1" to call the one in the chain
              object and not any other. One solution is to use directed resend:

              m1 = (chain.m2+1)

              though this will only work if all children refer to this object via a
              "chain*" slot and it will fail if the method is invoked on the chain
              object itself. Another issue is that "self" is only changed in the
              lookup of "m2" and any messages sent inside "m2" will use obj1 as
              "self" instead. That might be what you want, but I suspect it isn't.

              Explicit delegation will change "self" for all further sends inside the
              invoked method:

              m1 = (chain m2+1)

              but, once again, we are counting on a particular structure in the
              children. More generic solutions will be very awkward and involve
              reflection, while simpler solutions are possible for particular cases
              (a global oddball object normally has a name that it can use to refer
              to itself, for example).

              -- Jecel
            • Paul Chapman
              (I ve sent Harald a private email about this.) New to the group! I m very new to Cygwin, and my Unix skills have rusted for 15 years or more. I m trying to
              Message 6 of 24 , Apr 14, 2003
              • 0 Attachment
                (I've sent Harald a private email about this.)

                New to the group!

                I'm very new to Cygwin, and my Unix skills have rusted for 15 years
                or more. I'm trying to get Self/x86 running, having been interested
                in it for some time (Smalltalk is my current language of choice).

                I'm running Windows 98. I have dowloaded and installed the latest
                versions of Cygwin and XFree. I've downloaded the latest version of
                Self/x86, with the bugfix mentioned in this thread, and moved the
                files to /usr/self.

                Typing

                cd /usr/self
                ./Self -c -s Demo.snap

                in the bash window in X produces

                "Self VM fatal error (../../../vm/src/any/zone/zone.cpp, line 155): i
                and stub zones overlap"

                Anyone got any clues? Thanks for any help.

                Cheers, Paul
              • Brian T Rice
                ... I do not have a Windows installation, but I ve noticed that the Demo image often doesn t work with Self/x86 while the barebones image does. Can you get the
                Message 7 of 24 , Apr 14, 2003
                • 0 Attachment
                  On Mon, 14 Apr 2003, Paul Chapman wrote:

                  > Typing
                  >
                  > cd /usr/self
                  > ./Self -c -s Demo.snap
                  >
                  > in the bash window in X produces
                  >
                  > "Self VM fatal error (../../../vm/src/any/zone/zone.cpp, line 155): i
                  > and stub zones overlap"
                  >
                  > Anyone got any clues? Thanks for any help.

                  I do not have a Windows installation, but I've noticed that the Demo image
                  often doesn't work with Self/x86 while the barebones image does. Can you
                  get the latter to load?

                  --
                  Brian T. Rice
                  LOGOS Research and Development
                  mailto:water@...
                  http://tunes.org/~water/
                • Paul Chapman
                  Brian, ... Demo image ... Can you ... Nope. I ve just redownloaded everything, and used Unix tools (gunzip, tar) under Cygwin exclusively to unpack the files,
                  Message 8 of 24 , Apr 14, 2003
                  • 0 Attachment
                    Brian,

                    > I do not have a Windows installation, but I've noticed that the
                    Demo image
                    > often doesn't work with Self/x86 while the barebones image does.
                    Can you
                    > get the latter to load?

                    Nope.

                    I've just redownloaded everything, and used Unix tools (gunzip, tar)
                    under Cygwin exclusively to unpack the files, just to be sure WinZip
                    wasn't screwing with them.

                    Same error message on both Demo.snap and Empty.snap.

                    Thanks anyway. :)

                    Had a bad few days all round: trying to find an incremental, OO,
                    platform-independent (or at least multi-platform) environment for a
                    project. Talks2 looked good but is flakey and incomplete. DSelf
                    same. No luck with Sun's Self, as you can see. Thinking of having
                    another look at Squeak, but last time I was overwhelmed by its
                    features and had trouble finding how to do the simple stuff. :)

                    Cheers, Paul
                  • Jecel Assumpcao Jr
                    ... I haven t tried Self on Windows myself, but did use an older version of Cygwin to get Little Smalltalk and GNU Smalltalk to run in Windows. It wasn t too
                    Message 9 of 24 , Apr 14, 2003
                    • 0 Attachment
                      On Monday 14 April 2003 17:32, Paul Chapman wrote:
                      > I've just redownloaded everything, and used Unix tools (gunzip, tar)
                      > under Cygwin exclusively to unpack the files, just to be sure WinZip
                      > wasn't screwing with them.

                      I haven't tried Self on Windows myself, but did use an older version of
                      Cygwin to get Little Smalltalk and GNU Smalltalk to run in Windows. It
                      wasn't too easy to get all the details right.

                      The Mac version of Self is also a bit complicated to set up. The Sparc
                      and the Linux versions are the easiest - just download and go.

                      What is the "-c" option? The versions I use don't have that.

                      > Same error message on both Demo.snap and Empty.snap.

                      What happens if you run Self without any snapshot at all? Do you get to
                      the VM# prompt ok?

                      > Had a bad few days all round: trying to find an incremental, OO,
                      > platform-independent (or at least multi-platform) environment for a
                      > project. Talks2 looked good but is flakey and incomplete. DSelf
                      > same. No luck with Sun's Self, as you can see. Thinking of having
                      > another look at Squeak, but last time I was overwhelmed by its
                      > features and had trouble finding how to do the simple stuff. :)

                      Io (http://www.iolanguage.com/) is a good scripting level language, more
                      like GNU Smalltalk than Squeak or Self (for now, at least).

                      I hope that someone figures out your problem so you can try Self - it is
                      certainly worth looking into even if you then decide to use something
                      else.

                      -- Jecel
                    • Paul Chapman
                      Jecel, ... Not sure. ... get to ... Didn t know you could do that. I get the same error message. I guess it s not a snapshot problem, then. ... it is ...
                      Message 10 of 24 , Apr 15, 2003
                      • 0 Attachment
                        Jecel,

                        > What is the "-c" option? The versions I use don't have that.

                        Not sure.

                        > What happens if you run Self without any snapshot at all? Do you
                        get to
                        > the VM# prompt ok?

                        Didn't know you could do that. I get the same error message. I
                        guess it's not a snapshot problem, then.

                        > I hope that someone figures out your problem so you can try Self -
                        it is
                        > certainly worth looking into even if you then decide to use
                        something
                        > else.

                        I've been itching to play with it ever since first discovering it a
                        year ago.

                        Cheers, Paul
                      • harald@gliebe.de
                        Paul, I m afraid the cygwin version of Self is currently broken - probably because of some changes in memory allocation within cygwin.dll (cygwin 1.3.19 is the
                        Message 11 of 24 , Apr 15, 2003
                        • 0 Attachment
                          Paul,

                          I'm afraid the cygwin version of Self is currently broken - probably
                          because of some changes in memory allocation within cygwin.dll (cygwin
                          1.3.19 is the last version I'v used successfully). Unfortunatly I'm not
                          able to spend more time on this problem at the moment.

                          To try out Self you could try to go back 1.3.19 (I'm not sure if you can
                          still find it).
                          Alternatively, to try the more stable Linux version without installing
                          Linux, is to use Knoppix, a bootable CD image with a fully configured
                          Linux-System:
                          http://www.knopper.net/knoppix/index-en.html


                          Regards,

                          Harald


                          Paul Chapman <yahoo@...> schrieb am 15.04.2003, 11:42:35:
                          > Jecel,
                          >
                          > > What is the "-c" option? The versions I use don't have that.
                          >
                          > Not sure.
                          >
                          > > What happens if you run Self without any snapshot at all? Do you
                          > get to
                          > > the VM# prompt ok?
                          >
                          > Didn't know you could do that. I get the same error message. I
                          > guess it's not a snapshot problem, then.
                          >
                          > > I hope that someone figures out your problem so you can try Self -
                          > it is
                          > > certainly worth looking into even if you then decide to use
                          > something
                          > > else.
                          >
                          > I've been itching to play with it ever since first discovering it a
                          > year ago.
                          >
                          > Cheers, Paul
                          >
                          >
                          >
                          >
                          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                        • Jan Bryscejn
                          ... Hello When I found out that Self can now run on cygwin platform, I have decided to try out. (the linux engine on Mandrake 9.1 linux distribution runs fine
                          Message 12 of 24 , Jun 5, 2003
                          • 0 Attachment
                            --- In self-interest@yahoogroups.com, <harald@g...> wrote:
                            >
                            > Paul,
                            >
                            > I'm afraid the cygwin version of Self is currently broken - probably
                            > because of some changes in memory allocation within cygwin.dll (cygwin
                            > 1.3.19 is the last version I'v used successfully). Unfortunatly I'm not
                            > able to spend more time on this problem at the moment.
                            >
                            > To try out Self you could try to go back 1.3.19 (I'm not sure if you can
                            > still find it).
                            > Alternatively, to try the more stable Linux version without installing
                            > Linux, is to use Knoppix, a bootable CD image with a fully configured
                            > Linux-System:
                            > http://www.knopper.net/knoppix/index-en.html
                            >
                            >
                            > Regards,
                            >
                            > Harald
                            >

                            Hello

                            When I found out that Self can now run on cygwin platform, I have
                            decided to try out. (the linux engine on Mandrake 9.1 linux
                            distribution runs fine on my machine). So I have downloaded the latest
                            version of cygwin (1.3.22), and it was not working. (I got a lot of
                            messages like VM error signal 11... etc.)

                            So reading properly messages in this archive, (I subscribed just now)
                            I discovered that the problem is with version of cygwin lib. So I need
                            the older version of cygwin (1.3.19, as Harald said).

                            But where to get this version of cygwin? It is problem because cygwin
                            has its own install program which (I suppose after some experiments
                            done) do not support installing of older versions. Also, in ftp
                            archives one can not find the complete older version.

                            Good news are that there is a simple way to change existing
                            installation of new cygwin (1.3.22) to the older (1.3.19), and it
                            really works and Self is running!

                            I have discovered this way only a few hours ago, so maybe some
                            problems may exist here; just try out....

                            The cookbook:

                            1) suppose you have installed current cygwin to f:\cygwin
                            2) look to http://cygwin.com/mirrors.html to find some mirror of ftp
                            with the cygwin distribution. I have used
                            ftp://ftp.fit.vutbr.cz/pub/systems/cygwin/
                            address (in Czech Republic), you probably will choose another.
                            3) go to the release/cygwin directory, where you can find some files
                            like cygwin-1.3.19-1.tar.bz2 (and other versions). Get this file!
                            4) Extract files contaned in this archive. You get usr/ directory with
                            some files and subdirs.
                            5) Look into extracted usr\bin directory. There are 17 files for
                            version 1.3.19 of cygwin, including cygwin1.dll
                            6) Backup newer files in your f:\cygwin\bin, and replace them by older
                            version files.
                            7) start cygwin and try $cygcheck -s |less . Somewhere in the text you
                            can read "Cygwin DLL info: DLL version 1.3.19 ....". That's exactly
                            what we wanted.
                            8) start out XFree and run Self:
                            startx
                            cd self
                            ./Self -c -s Empty.snap
                            9) Enjoy!

                            You can replace files in f:\cygwin\bin with the backed up files of new
                            version of cygwin when necessary to get your cygwin system back to its
                            initial state. All this hacking is not very clear to cygwin system,
                            but it works and I did not encountered any problems. The discussion
                            forum at cygwin.com maybe contains relevant information, but it seems
                            to me that they are hard to find.

                            Let me know, if this cookbook helped!

                            Regards,

                            Jan Bryscejn
                          • Paul Chapman
                            Jan, I know it s been 6 months, but I kinda gave up on Self back then. :) But today I decided I really ought to try it out, since I m designing Caper based on
                            Message 13 of 24 , Nov 18, 2003
                            • 0 Attachment
                              Jan,

                              I know it's been 6 months, but I kinda gave up on Self back then. :)

                              But today I decided I really ought to try it out, since I'm designing Caper based on some of its ideas.

                              Anyway...

                              > The cookbook:
                              >
                              > 1) suppose you have installed current cygwin to f:\cygwin
                              > 2) look to http://cygwin.com/mirrors.html to find some mirror of ftp
                              > with the cygwin distribution. I have used
                              > ftp://ftp.fit.vutbr.cz/pub/systems/cygwin/
                              > address (in Czech Republic), you probably will choose another.
                              > 3) go to the release/cygwin directory, where you can find some files
                              > like cygwin-1.3.19-1.tar.bz2 (and other versions). Get this file!
                              > 4) Extract files contaned in this archive. You get usr/ directory with
                              > some files and subdirs.
                              > 5) Look into extracted usr\bin directory. There are 17 files for
                              > version 1.3.19 of cygwin, including cygwin1.dll
                              > 6) Backup newer files in your f:\cygwin\bin, and replace them by older
                              > version files.
                              > 7) start cygwin and try $cygcheck -s |less . Somewhere in the text you
                              > can read "Cygwin DLL info: DLL version 1.3.19 ....". That's exactly
                              > what we wanted.
                              > 8) start out XFree and run Self:
                              > startx
                              > cd self
                              > ./Self -c -s Empty.snap
                              > 9) Enjoy!

                              I followed this carefully, but I still get the same Self VM error: "i and stub zones overlap". I'm using Self VM 4.1.10.

                              Is this your setup still? Do I need an earlier Self version too?

                              TIA.

                              Cheers, Paul
                            Your message has been successfully submitted and would be delivered to recipients shortly.