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

Re: [self-interest] Assignement return value

Expand Messages
  • Tripp Lilley
    ... Here is a capture of my session: $ Self Self Virtual Machine Version 4.1.10, Sun 16 Jan 00 23:19:07 Solaris 2.x (svr4) Copyright 1989-95: The Self Group
    Message 1 of 9 , Sep 9, 2000
      On Sun, 10 Sep 2000, Marko Mikulicic wrote:

      > can anybody with a running self system evaluate this expression:

      Here is a capture of my session:

      $ Self
      Self Virtual Machine Version 4.1.10, Sun 16 Jan 00 23:19:07 Solaris 2.x
      (svr4)
      Copyright 1989-95: The Self Group (type _Credits for credits)

      VM# ( | method = ( | a | a: 3 ) | ) method
      <0>: ( | method = <a method>. | )
      VM# ( | method = ( | a | a: (a: 3) . a ) | ) method
      <1>: ( | method = <a method>. | )
      VM#


      Note that I'm playing dumb monkey here. I typed what you typed, and you're
      seeing what I saw :) Interpretation is left as an exercise for the
      (presumably less ignorant than I) reader.

      --
      Fun-Loving * Tripp Lilley * http://stargate.eheart.sg505.net/~tlilley/
      ------------------------------------------------------------------------------
      "Technology makes it possible to have our appendices out when they get
      infected, so that we are able to live long enough to get our heads out
      of our asses and learn about the world."

      - Neal Stephenson
    • Tripp Lilley
      ... Indeed. After 2+ years of writing Selfish.pm and selfish.py without it, it s certainly nice to finally have one. ... Amen. ... Certainly. Actually, as soon
      Message 2 of 9 , Sep 9, 2000
        On Sun, 10 Sep 2000, Marko Mikulicic wrote:

        > You must be happy to have a sparc machine to play around.

        Indeed. After 2+ years of writing Selfish.pm and selfish.py without it,
        it's certainly nice to finally have one.


        > Trying to write an implementation of Self without having it can be a
        > pain in the sparc :-)

        Amen.


        > Thanks a lot, it helped make my head clear!

        Certainly. Actually, as soon as I get SSH installed on the beast (which is
        likely to be a while as I'm pretty overwhelmed), I'd be glad to make
        accounts for self-interest folks who don't have access to a Sparc and are
        working on things that they can do from the CLI. I don't have enough
        bandwidth to push out X or VNC connections, sadly :(

        --
        Fun-Loving * Tripp Lilley * http://stargate.eheart.sg505.net/~tlilley/
        ------------------------------------------------------------------------------
        "Technology makes it possible to have our appendices out when they get
        infected, so that we are able to live long enough to get our heads out
        of our asses and learn about the world."

        - Neal Stephenson
      • Tripp Lilley
        ... Another amen. ... Cool. As soon as I get around to getting the beast (wonderclam) in somewhat presentable, working order, I ll post to the list with
        Message 3 of 9 , Sep 9, 2000
          On Sun, 10 Sep 2000, Marko Mikulicic wrote:

          > If I could buy some time, I'll be a clochard nowadays... :-)

          Another amen.


          > > I'd be glad to make
          > > accounts for self-interest folks who don't have access to a Sparc and are
          > > working on things that they can do from the CLI.
          >
          > That would be fantastic!!
          > My interest in practically only text based :-)
          > Once the VM is running porting the gui is a joke, since both linux and Solaris
          > use X windows.

          Cool. As soon as I get around to getting the beast (wonderclam) in
          somewhat presentable, working order, I'll post to the list with
          destructions and misdirections.

          --
          Fun-Loving * Tripp Lilley * http://stargate.eheart.sg505.net/~tlilley/
          ------------------------------------------------------------------------------
          "Technology makes it possible to have our appendices out when they get
          infected, so that we are able to live long enough to get our heads out
          of our asses and learn about the world."

          - Neal Stephenson
        • Marko Mikulicic
          Hello, can anybody with a running self system evaluate this expression: ( | method = ( | a | a: 3 ) | ) method Under JSelf it returns nil. This means that the
          Message 4 of 9 , Sep 9, 2000
            Hello,

            can anybody with a running self system evaluate this expression:

            ( | method = ( | a | a: 3 ) | ) method

            Under JSelf it returns nil. This means that the assignement primitive in

            expression "a: 3" returns the
            "self" and not the new value of "a". Is this correct ?

            and: ( | method = ( | a | a: (a: 3) . a ) | ) method

            should return also "self". (JSelf can't execute this one).

            thanks


            Marko
          • Marko Mikulicic
            ... You must be happy to have a sparc machine to play around. Trying to write an implementation of Self without having it can be a pain in the sparc :-)
            Message 5 of 9 , Sep 9, 2000
              Tripp Lilley wrote:

              > On Sun, 10 Sep 2000, Marko Mikulicic wrote:
              >
              > > can anybody with a running self system evaluate this expression:
              >
              > Here is a capture of my session:
              >
              > $ Self
              > Self Virtual Machine Version 4.1.10, Sun 16 Jan 00 23:19:07 Solaris 2.x
              > (svr4)
              > Copyright 1989-95: The Self Group (type _Credits for credits)
              >
              > VM# ( | method = ( | a | a: 3 ) | ) method
              > <0>: ( | method = <a method>. | )
              > VM# ( | method = ( | a | a: (a: 3) . a ) | ) method
              > <1>: ( | method = <a method>. | )
              > VM#
              >
              > Note that I'm playing dumb monkey here. I typed what you typed, and you're
              > seeing what I saw :) Interpretation is left as an exercise for the
              > (presumably less ignorant than I) reader.

              You must be happy to have a sparc machine to play around.
              Trying to write an implementation of Self without having it can be a pain in the
              sparc :-)

              Thanks a lot, it helped make my head clear!

              Marko
            • Marko Mikulicic
              ... If I could buy some time, I ll be a clochard nowadays... :-) ... That would be fantastic!! My interest in practically only text based :-) Once the VM is
              Message 6 of 9 , Sep 9, 2000
                Tripp Lilley wrote:

                > Certainly. Actually, as soon as I get SSH installed on the beast (which is
                > likely to be a while as I'm pretty overwhelmed),

                If I could buy some time, I'll be a clochard nowadays... :-)

                > I'd be glad to make
                > accounts for self-interest folks who don't have access to a Sparc and are
                > working on things that they can do from the CLI.

                That would be fantastic!!
                My interest in practically only text based :-)
                Once the VM is running porting the gui is a joke, since both linux and Solaris
                use X windows.


                > I don't have enough
                > bandwidth to push out X or VNC connections, sadly :(

                I don't have it to pull in neither :-)
                I'm living in a retarded country which is now having it's ISDN boom,
                but the prices are prohibitive....
                having 1-3 KB/s for me telnet is a nightmare :-)

                Marko
              • Marko Mikulicic
                ... I hope it will be not it s first date.... :-) I think it should be all right in a working dress, without makeup, but tell her to be careful when driving
                Message 7 of 9 , Sep 9, 2000
                  Tripp Lilley wrote:

                  >
                  >
                  > Cool. As soon as I get around to getting the beast (wonderclam) in
                  > somewhat presentable, working order, I'll post to the list with
                  > destructions and misdirections.

                  I hope it will be not it's first date.... :-)
                  I think it should be all right in a working dress, without makeup, but
                  tell her to be careful when driving that hell of a ssh'ell , she may crash.... :-{)

                  Hm, it's five in the mornig here, I think I'm going to bed, or crazy, no matter...


                  Marko
                • David Ungar
                  Just to try to clear things up, the assignment primitive should return the receiver of the assignment. So (| method = (|a| a: 3|) method does the following:
                  Message 8 of 9 , Sep 10, 2000
                    Just to try to clear things up,
                    the assignment primitive should return the receiver of the assignment.
                    So (| method = (|a| a: 3|) method does the following:

                    The message send of "method" runs the method with the object
                    (| method = ...|) as receiver.
                    The assignment returns the receiver and the method returns last
                    expression, namely the receiver.
                    So the code should return just the same (| method = ...|) object as
                    was sent the original method.

                    Why did we specify Self this way?
                    The idea is that anything that does not return a particular,
                    interesting value, just returns the receiver and we wanted to be
                    consistent.

                    That way, you would expect the same result value from "a: 3" as from
                    "foo: bar" or even
                    "display: something". The idea was to unify assignment with a message
                    that only took one argument and it would have been weird for random,
                    one-argument messages to return the argument as their result.

                    Was it the best choice?

                    Beats me, but I still like it.

                    BTW, all this interest is really gratifying.

                    Anyone coming to OOPSLA?

                    - Dave




                    At 4:17 AM +0000 9/10/00, Marko Mikulicic wrote:
                    >Hello,
                    >
                    >can anybody with a running self system evaluate this expression:
                    >
                    > ( | method = ( | a | a: 3 ) | ) method
                    >
                    >Under JSelf it returns nil. This means that the assignement primitive in
                    >
                    >expression "a: 3" returns the
                    >"self" and not the new value of "a". Is this correct ?
                    >
                    >and: ( | method = ( | a | a: (a: 3) . a ) | ) method
                    >
                    > should return also "self". (JSelf can't execute this one).
                    >
                    >thanks
                    >
                    >
                    >Marko

                    --


                    David Ungar
                    Sun Microsystems Laboratories
                    (650) 336-2618
                  • Marko Mikulicic
                    ... The fact that in Self a method returns the last value without an explicit return made me think that the situation with the assignment primitive is also
                    Message 9 of 9 , Sep 12, 2000
                      David Ungar wrote:

                      >
                      > Why did we specify Self this way?
                      > The idea is that anything that does not return a particular,
                      > interesting value, just returns the receiver and we wanted to be
                      > consistent.

                      The fact that in Self a method returns the last value without an explicit
                      return made me think that the situation with the assignment primitive is
                      also different that from smalltalk's accessors...

                      >
                      > Was it the best choice?

                      It's ok because it's consistent. It works well in this situations
                      " (foo a: 1) b: 2 " where receiver based cascading is implemented without
                      temps.
                      But the pseudo code " foo a: (b := c)" must be written as " b: c . foo a:
                      b" wich means that
                      the compiler must be smarter to not duplicate code that re-reads the slot
                      "b".
                      (not an big execution problem since the value of "b" is on the processor
                      cache", but it increases the code size
                      and the pipelines could be longer :-).

                      Does the Self 4.0 compiler optimizer handle this situation ?


                      >
                      >
                      > Beats me, but I still like it.
                      >
                      > BTW, all this interest is really gratifying.

                      Self is THE language. This research for simplicity but power makes it great.

                      I can't judge the framework build upon it since I haven't a running system
                      to explore,
                      but you can build infinite frameworks on top of a language. But a flexibile
                      language structure
                      behind the scene makes the real power go out.
                      Some people criticise C because of his standard library and search for new
                      language changing a little bit of
                      syntax, build a new framework and voila', you got a new language that
                      inherits all the great mistakes of the past.
                      I didn't have the time to check out, but I have an opinion that this extreme
                      situation is happening with the ms's language C#
                      (and previously, but less extreme, by Java).


                      >
                      >
                      > Anyone coming to OOPSLA?

                      I'm really sad, but I can't.


                      Marko
                    Your message has been successfully submitted and would be delivered to recipients shortly.