The Importance of Terminology's Quality

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    #46
    Re: The Importance of Terminology's Quality

    szr wrote:
    Arne Vajhøj wrote:
    >Stephan Bour wrote:
    >>Lew wrote:
    >>} John Thingstad wrote:
    >>} Perl is solidly based in the UNIX world on awk, sed, bash and C.
    >>} I don't like the style, but many do.
    >>}
    >>} Please exclude the Java newsgroups from this discussion.
    >>>
    >>Did it ever occur to you that you don't speak for entire news groups?
    >Did it occur to you that there are nothing about Java in the above ?
    >
    Looking at the original post, it doesn't appear to be about any specific
    language.
    That does not make it on topic in the Java group.

    And the subthread Lew commented on most certainly is not.

    Arne

    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #47
      Re: The Importance of Terminology's Quality

      szr wrote:
      Peter Duniho wrote:
      >On Fri, 30 May 2008 22:40:03 -0700, szr <szrRE@szromanM O.comVEwrote:
      >>Arne Vajhøj wrote:
      >>>Stephan Bour wrote:
      >>>>Lew wrote:
      >>>>} John Thingstad wrote:
      >>>>} Perl is solidly based in the UNIX world on awk, sed, } bash
      >>>>and C. I don't like the style, but many do.
      >>>>}
      >>>>} Please exclude the Java newsgroups from this discussion.
      >>>>>
      >>>>Did it ever occur to you that you don't speak for entire news
      >>>>groups?
      >>>Did it occur to you that there are nothing about Java in the above ?
      >>Looking at the original post, it doesn't appear to be about any
      >>specific language.
      >Indeed. That suggests it's probably off-topic in most, if not all,
      >of the newsgroups to which it was posted, inasmuch as they exist for
      >topics specific to a given programming language.
      >
      Perhaps - comp.programmin g might of been a better place, but not all
      people who follow groups for specific languages follow a general group
      like that - but let me ask you something. What is it you really have
      against discussing topics with people of neighboring groups? Keep in
      mind you don't have to read anything you do not want to read. [1]
      I very much doubt that the original thread is relevant for the Java
      group.

      But the subthread Lew commente don was about Perl and Unix. That is
      clearly off topic.

      Personally I am rather tolerant for topics. But I can not blame Lew
      for requesting that a Perl-Unix discussion does not get cross posted
      to a Java group.
      >Regardless, unless you are actually reading this thread from the
      >c.l.j.p newsgroup, I'm not sure I see the point in questioning
      >someone who _is_ about whether the thread belongs there or not.
      >
      I would rather have the OP comment about that, as he started the thread.
      But what gets me is why you are against that specific group being
      included but not others? What is so special about the Java group and why
      are you so sure people there don't want to read this thread? [1] What
      right do you or I or anyone have to make decisions for everyone in a
      news group? Isn't this why most news readers allow one to block a
      thread?
      I doubt Lew read any of the other groups, so it seems quite
      natural that he did not comment on the on/off topic characteristics
      in those.
      >And if it's a vote you want, mark me down as the third person reading
      >c.l.j.p that doesn't feel this thread belongs. I don't know whether
      >Lew speaks for the entire newsgroup, but based on comments so far,
      >it's pretty clear that there unanimous agreement among those who have
      >expressed an opinion.
      >
      Ok, so, perhaps 3 people out of what might be several hundred, if not
      thousand (there is no way to really know, but there are certainly a lot
      of people who read that group, and as with any group, there are far more
      readers than there are people posting, so, again, just because you or
      two other people or so don't want to read a topic or dislike it, you
      feel you can decide for EVERYONE they mustn't read it? Again, this is
      why readers allow you to ignore threads. Please don't force your views
      on others; let them decide for themselves. [1]
      And I am sure that Lew did not intended to pretend to speak for
      the entire group. He spoke for himself.

      I believe there has been several posts that agreed with him and none
      that disagreed, so it seems very plausible that the group indeed agree
      with him.

      Arguing that a huge silent majority has a different opinion
      than those speaking up is a very questionable argument. Everybody
      could try and count them for their view. The only reasonable
      thing is not to count them.

      Arne

      Comment

      • szr

        #48
        Re: The Importance of Terminology's Quality

        Peter Duniho wrote:
        On Sat, 31 May 2008 23:27:35 -0700, szr <szrRE@szromanM O.comVEwrote:
        >
        >[...]
        >>But the subthread Lew commente don was about Perl and Unix. That is
        >>clearly off topic.
        >>
        >I agree with and understand what you are saying in general, but
        >still, isn't it possible that were are people in the java group (and
        >others) who might of been following the thread, only to discover
        >(probably not right away) that someone decided to remove the group
        >they were reading the thread from? I know I would not like that,
        >even if it wasn't on topic at the branch.
        >
        All due respect, I don't really care if those people find the thread
        gone. And no one should.
        I prefer to be considerate of others.
        Each individual person has a wide variety of interests. A thread
        that is off-topic in a newsgroup may in fact be concerning a topic of
        interest for someone who just happened to be reading that newsgroup.
        Well if a thread has absolutely no relation to a group, then yes,
        cross-posting to said group is inappropiate, and setting follow ups may
        well be warrented. But when there is some relation, sometimes it may be
        better to mark it as [OT] i nthe subject line, a practice that is
        sometimes seen, and seems to suffice.
        What if someone cross-posted a thread about motorcycle racing in the
        Perl newsgroup as well as an actual motorcycle racing newsgroup?
        You are comparing apples and oranges now; sure, if you post about
        motorcycles (to use your example) it would be wildly off topic, but the
        thread in question was relating to programming (the naming of functions
        and such) in general.
        Does that justify the thread continuing to be cross-posted to the Perl
        newsgroup? No, of course not.
        but who decides this? And why does said individual get to decide for
        everyone?
        So please. Quit trying to justify a thread being cross-posted to a
        newsgroup that you aren't even reading
        You do not know what groups I read. And I am not attempting to justify
        cross posting at all. Rather I am arguing against deciding for a whole
        news group when a thread should be discontinued.

        --
        szr


        Comment

        • Robert Maas, http://tinyurl.com/uh3t

          #49
          Re: The Importance of Terminology's Quality

          From: dkco...@panix.c om (David Combs)
          Lisp is *so* early a language (1960?), preceeded mainly only by
          Fortran (1957?)?, and for sure the far-and-away the first as a
          platform for *so many* concepts of computer-science, eg lexical vs
          dynamic ("special") variables, passing *unnamed* functions as
          args ... maybe is still the only one in which program and data
          have the same representation -- that it'd seem logical to use it's
          terminology in all languages.
          Yeah, but why did you cross-post to so many newsgroups? Are you
          trying to run a flame war between advocates of the various
          languages? (Same accusation to the OP moreso!)
          From C is the very nice distinction between "formal" and "actual" args.
          I think Lisp already had that nearly 50 years ago. Function
          definition (lambda expression) has formal args, EVAL recursively
          calls EVAL on sub-forms to create actual args and calls APPLY on
          them and whatever function is named in the CAR position of the form.
          Whether anybody bothered to use that specific jargon, or it was
          just so obvious it didn't need jargon, I don't know.
          And from algol-60, own and local -- own sure beats "static"!
          Yeah. But now that you mention it and I think about it, what's
          really meant is "private persistent". Global variables are public
          persistent. Local variables and formal args to functions are
          private transient (they go away as soon as the function returns).
          but OWN variables are private to the function but stay around
          "forever" just like globals do, so that side effects on the OWN
          variables that occurred during one call can persist to affect the
          next call. Lexical closures in Common Lisp go one step further,
          allowing private persistent variables to be shared between several
          functions. All those functions share access to the private variable
          which they co-OWN. Another way in which OWN or lexical-closure
          variables aren't like what the word "own" means in ordinary
          language is that it's possible to transfer ownership by selling or
          giving something to somebody else, but not with OWN variables or
          lexical-closure variables. So even though I like the word OWN
          better than the word STATIC for this meaning, I'm not totally
          comfortable with that jargon. But "persistent private" is a
          mouthful compared to "OWN", and I doubt anyone can find a word of
          appx. 3 characters that conveys the intended meaning so we're
          probably stuck with "OWN" as the best short term.

          Comment

          • Jon Harrop

            #50
            Re: The Importance of Terminology's Quality

            Robert Maas, http://tinyurl.com/uh3t wrote:
            >From: dkco...@panix.c om (David Combs)
            >Lisp is *so* early a language (1960?), preceeded mainly only by
            >Fortran (1957?)?, and for sure the far-and-away the first as a
            >platform for *so many* concepts of computer-science, eg lexical vs
            >dynamic ("special") variables, passing *unnamed* functions as
            >args ... maybe is still the only one in which program and data
            >have the same representation -- that it'd seem logical to use it's
            >terminology in all languages.
            >
            Yeah, but why did you cross-post to so many newsgroups? Are you
            trying to run a flame war between advocates of the various
            languages?
            What would be the point? We all know that Java, Perl, Python and Lisp suck.
            They don't even have pattern matching over algebraic sum types if you can
            imagine that. How rudimentary...

            --
            Dr Jon D Harrop, Flying Frog Consultancy
            Business Das perfekte Beratungsgespräch: Tipps und Tricks Sabine Henschel4. Juli 2024 Business Mindset Coach: Ihr Schlüssel zu einem neuen Denken Sabine Henschel4. Juli 2024 Familie Kollegiale Beratung in der Pflege: Zusammen stark Sabine Henschel3. Juli 2024 Familie Was kostet eine Beratung beim Notar wegen Erbrecht: Ein Ratgeber Sabine Henschel2. Juli 2024 Business Was kostet eine

            Comment

            • jon.harrop.ms.sharp@gmail.com

              #51
              Re: The Importance of Terminology's Quality

              On 5 Giu, 12:37, Jon Harrop <j...@ffconsult ancy.comwrote:
              [...]
              P.S. Please don't look at my profile (at google groups), thanks!

              Jon Harrop

              Comment

              • John W Kennedy

                #52
                Re: The Importance of Terminology's Quality

                David Combs wrote:
                passing
                *unnamed* functions as args (could Algol 60 also do something like that,
                via something it maybe termed a "thunk")
                No, the "thunks" were necessary at the machine-language level to
                /implement/ ALGOL 60, but they could not be expressed /in/ ALGOL.

                --
                John W. Kennedy
                "The first effect of not believing in God is to believe in anything...."
                -- Emile Cammaerts, "The Laughing Prophet"

                Comment

                • Robert Maas, http://tinyurl.com/uh3t

                  #53
                  Re: The Importance of Terminology's Quality

                  Why this response is so belated:
                  <http://groups.google.c om/group/misc.misc/msg/cea714440e591dd 2>
                  = <news:rem-2008jun25-003@yahoo.com>
                  Date: Thu, 05 Jun 2008 11:37:48 +0100
                  From: Jon Harrop <j...@ffconsult ancy.com>
                  We all know that Java, Perl, Python and Lisp suck.
                  Well at least you're three-quarters correct there.
                  But Lisp doesn't suck. That's where you're one quarter wrong.
                  They don't even have pattern matching over algebraic sum types if
                  you can imagine that.
                  I'm still waiting for you to precisely define what you mean by
                  "pattern matching" in this context. All I've heard from you so-far
                  are crickets. If you've set up a Web page with your personal
                  definition of "pattern matching" as you've been using that term
                  here, and you've posted its URL in a newsgroup article I didn't
                  happen to see, please post just the URL again here so that I might
                  finally see it. Or e-mail me the URL.

                  -
                  Nobody in their right mind likes spammers, nor their automated assistants.
                  To open an account here, you must demonstrate you're not one of them.
                  Please spend a few seconds to try to read the text-picture in this box:

                  /----------------------------------------------------------------------------\
                  | ,-.-. | |
                  | | | |, . ,---.,---.,---. ,---.,---.,---.,---|,---. |
                  | | | || | `---.| || | | ||---'|---'| |`---. |
                  | ` ' '`---| `---'`---'` ' ` '`---'`---'`---'`---' |
                  | `---' |
                  | | | o | | |
                  | |---.,---.| ,---. .,---. ,---.| ,---.,---. |---.,---.,---. |
                  | | ||---'| | | || | ,---|| | ||---'---| || ,---| |
                  | ` '`---'`---'|---' `` ' `---^`---'`---|`---' `---'` `---^ | |
                  | | `---' ' |
                  | | | | |
                  | ,---.,---.|--- . . .,---.,---.,---|,---.,---. |---.,---.,---. |
                  | | || || | | || || || ||---'| ---| || ,---| |
                  | ` '`---'`---' `-'-'`---'` '`---'`---'` `---'` `---^o |
                  \--------(Rendered by means of <http://www.schnoggo.co m/figlet.html>)--------/
                  (You don't need JavaScript or images to see that ASCII-text image!!
                  You just need to view this in a fixed-pitch font such as Monaco.)

                  Then enter your best guess of the text (40-50 chars) into this TextField:
                  +--------------------------------------------------+
                  | |
                  +--------------------------------------------------+

                  Comment

                  • Robert Maas, http://tinyurl.com/uh3t

                    #54
                    Re: The Importance of Terminology's Quality

                    Why this response is so belated:
                    <http://groups.google.c om/group/misc.misc/msg/cea714440e591dd 2>
                    = <news:rem-2008jun25-003@yahoo.com>
                    Date: Thu, 5 Jun 2008 06:17:01 -0700 (PDT)
                    From: jon.harrop.ms.s h...@gmail.com
                    P.S. Please don't look at my profile (at google groups), thanks!
                    Please don't look at the orange and green checkered elephant
                    playing a harp off-key while sitting on a toilet and passing wind.

                    Comment

                    • Robert Maas, http://tinyurl.com/uh3t

                      #55
                      Re: The Importance of Terminology's Quality

                      Why this response is so belated:
                      <http://groups.google.c om/group/misc.misc/msg/cea714440e591dd 2>
                      = <news:rem-2008jun25-003@yahoo.com>
                      Date: Tue, 24 Jun 2008 18:42:15 -0400
                      From: John W Kennedy <jwke...@attglo bal.net>
                      ... the "thunks" were necessary at the machine-language level to
                      /implement/ ALGOL 60, but they could not be expressed /in/ ALGOL.
                      Ah, thanks for the clarification. Is that info in the appropriate
                      WikiPedia page? If not, maybe you would edit it in?

                      Comment

                      • Lew

                        #56
                        Re: The Importance of Terminology's Quality

                        Robert Maas wrote:
                        /----------------------------------------------------------------------------\
                        | ,-.-. | |
                        | | | |, . ,---.,---.,---. ,---.,---.,---.,---|,---. |
                        | | | || | `---.| || | | ||---'|---'| |`---. |
                        | ` ' '`---| `---'`---'` ' ` '`---'`---'`---'`---' |
                        | `---' |
                        | | | o | | |
                        | |---.,---.| ,---. .,---. ,---.| ,---.,---. |---.,---.,---. |
                        | | ||---'| | | || | ,---|| | ||---'---| || ,---| |
                        | ` '`---'`---'|---' `` ' `---^`---'`---|`---' `---'` `---^ | |
                        | | `---' ' |
                        | | | | |
                        | ,---.,---.|--- . . .,---.,---.,---|,---.,---. |---.,---.,---. |
                        | | || || | | || || || ||---'| ---| || ,---| |
                        | ` '`---'`---' `-'-'`---'` '`---'`---'` `---'` `---^o |
                        \--------(Rendered by means of <http://www.sc********* ********.html>)--------/
                        (You don't need JavaScript or images to see that ASCII-text image!!
                        You just need to view this in a fixed-pitch font such as Monaco.)
                        >
                        Then enter your best guess of the text (40-50 chars) into this TextField:
                        +--------------------------------------------------+
                        | Your son totally needs a Wonder-Bra(r), double-D |
                        +--------------------------------------------------+
                        --
                        Lew

                        Comment

                        • John W Kennedy

                          #57
                          Re: The Importance of Terminology's Quality

                          Robert Maas, http://tinyurl.com/uh3t wrote:
                          Why this response is so belated:
                          <http://groups.google.c om/group/misc.misc/msg/cea714440e591dd 2>
                          = <news:rem-2008jun25-003@yahoo.com>
                          >Date: Tue, 24 Jun 2008 18:42:15 -0400
                          >From: John W Kennedy <jwke...@attglo bal.net>
                          >... the "thunks" were necessary at the machine-language level to
                          >/implement/ ALGOL 60, but they could not be expressed /in/ ALGOL.
                          >
                          Ah, thanks for the clarification. Is that info in the appropriate
                          WikiPedia page? If not, maybe you would edit it in?
                          It is explained s.v. "thunk", which is referenced from "ALGOL 60". The
                          ALGOL "pass-by-name" argument/parameter matching was perhaps the most
                          extreme example ever of a language feature that was "elegant" but
                          insane. What it meant, in effect, was that, unless otherwise marked,
                          every argument was passed as two closures, one that returned a fresh
                          evaluation of the expression given as the argument, which was called
                          every time the parameter was read, and one that set the argument to a
                          new value, which was called every time the parameter was set.

                          See <URL:http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html >.

                          ALGOL 60 could not create generalized user-written closures, but could
                          create one no more complex than a single expression with no arguments of
                          its own simply by passing the expression as an argument. But it was not
                          thought of as a closure; that was just how ALGOL 60 did arguments.
                          --
                          John W. Kennedy
                          "Give up vows and dogmas, and fixed things, and you may grow like
                          That. ...you may come to think a blow bad, because it hurts, and not
                          because it humiliates. You may come to think murder wrong, because it
                          is violent, and not because it is unjust."
                          -- G. K. Chesterton. "The Ball and the Cross"

                          Comment

                          • Robert Maas, http://tinyurl.com/uh3t

                            #58
                            Re: The Importance of Terminology's Quality

                            ... the "thunks" were necessary at the machine-language level to
                            /implement/ ALGOL 60, but they could not be expressed /in/ ALGOL.
                            Ah, thanks for the clarification. Is that info in the appropriate
                            WikiPedia page? If not, maybe you would edit it in?
                            From: John W Kennedy <jwke...@attglo bal.net>
                            It is explained s.v. "thunk", which is referenced from "ALGOL
                            60". The ALGOL "pass-by-name" argument/parameter matching was
                            perhaps the most extreme example ever of a language feature that
                            was "elegant" but insane. What it meant, in effect, was that,
                            unless otherwise marked, every argument was passed as two closures,
                            one that returned a fresh evaluation of the expression given as the
                            argument, which was called every time the parameter was read, and
                            one that set the argument to a new value, which was called every
                            time the parameter was set.
                            Wow! All these years when I occasionally heard of a "thunk" I never
                            was told, until now, what it really meant. Thanks for the info!!

                            Followup question #1: I assume these are lexical closures in the
                            environment of the point of the call, right?

                            Followup question #2: For simple arithmetic expressions, I can
                            possibly understand how the UPDATE closure might be implemeted
                            (expressed in Lisp to make the intent clear):
                            Call form: MyFunction(X+2) ;
                            GET closure: (+ closedX 2)
                            UPDATE closure: (lambda (newval) (setf closedX (- newval 2))
                            Thus from inside MyFunction where formal parameter Arg1 is bound
                            to actual parameter X+2, after doing Arg1 := 7; X will have the
                            value 5 so that calling Arg1 will return 7 as expected, right?
                            But if the actual argument is something complicated, especially if
                            it makes a nested function call, how can that possibly be
                            implemented? Given an arbitrary expression that calls some external
                            function, how can assigning a value to that expression make
                            sufficient changes in the runtime environment such that
                            subsequently evaluating that expression will yield the expected
                            value i.e. the value that had been assigned?
                            Or is the default of passing two closures (GET and UPDATE) *only*
                            if the actual-argument expression is simple enough that it's
                            invertible, and in complicated cases only a GET closure is passed
                            (or the UPDATE closure is simply a signal of a runtime error
                            that you're not allowed to assign a value to a complicated expression)?

                            IMO the "right" way to pass parameters that can be modified is to
                            use "locatative s" as in the Lisp Machine. That converts the idea of
                            a "place" (as used by SETF in Common Lisp) into a "first class
                            citizen" which can be passed around and stored etc., compared to a
                            SETF place which is merely a compiletime-macro trick to convert
                            place-references in source code into direct calls to the
                            appropriate accessor just above the place followed by specialized
                            SETter call to do the act. A hack to emulate a locative in CL would
                            be to pass a closure where the code to find the object directly
                            containing the place, and any parameters needed to find that place,
                            and the function needed to perform the act. Then the called
                            function would need to know it's going to get such a thunk-like
                            closure, but since it's expecting to modify one of its parameters
                            anyway, that's reasonable. Sketch of implementation (two special cases):
                            (defun make-thunk-cadr (topptr)
                            (let* ((midptr (cdr topptr))
                            (getclo (make-getter-closure :PARENT midptr :GETTERFN #'car
                            :PARMS nil))
                            (setclo (make-setter-closure :PARENT midptr :SETTERFN #'rplaca
                            :PARMS nil)))
                            (make-thunk getclo setclo))
                            (defun make-thunk-aref1 (topptr arrindex1)
                            (let ((getclo (make-getter-closure :PARENT topptr :GETTERFN #'aref1
                            :PARMS (list arrindex1)))
                            (setclo (make-setter-closure :PARENT midptr :SETTERFN #'setaref1
                            :PARMS (list arrindex1))))
                            (make-thunk getclo setclo))
                            (defun swap (thunk1 thunk2)
                            (prog (tmp)
                            (setq tmp (thunk-get thunk1))
                            (thunk-set thunk1 (thunk-get thunk2))
                            (thunk-set thunk2 tmp)))
                            ;Definitions of make-getter-closure make-setter-closure make-thunk
                            ; thunk-get thunk-set not shown because they depend on whether
                            ; closures and thunks are implemented via tagged assoc lists or
                            ; DEFSTRUCT structures or CLOS objects or whatever. But I made the
                            ; call to the constructors explicit enough that it should be obvious
                            ; what components are inside each type of object. Note that with
                            ; CLOS objects, this could all be condensed to have a single CLOS
                            ; object which is the thunk which has two methods GET and SET, no
                            ; need to make closures for get and set separately, templates for
                            ; those closures are made automatically when the CLOS class is
                            ; defined, and closures are generated from those templates whenever
                            ; a new CLOS thunk-object is made. Thus:
                            ; ... (make-CLOS-thunk :PARENT topptr :GETTERFN #'aref1 :SETTERFN #'setaref1
                            ; :PARMS (list arrindex1)) ...

                            ;Example that should actually work:
                            (format t " arr: ~S~% ixs: ~S~%" arr ixs)
                            arr: #'(3 5 7 11 13))
                            ixs: (2 4)
                            (setq arr #'(3 5 7 11 13))
                            (setq ixs (list 2 4))
                            (setq thunkcadr (make-thunk-cadr ixs))
                            ;Locative to the 4 in ixs
                            (setq thunkaref (make-thunk-aref1 arr (thunk-get thunkcadr)))
                            ;Locative to the 11 in the array
                            (swap thunkcadr thunkaref)
                            (format t " arr: ~S~% ixs: ~S~%" arr ixs)
                            arr: #'(3 5 7 4 13))
                            ixs: (2 11)
                            I haven't implemented this. I'm just specifying what the behaviour should be
                            and giving a sketch how it ought to be easily doable in Common Lisp.

                            And I'm not going to implement it because I have no use for this way
                            of coding, at least not currently or in the foreseeable future.
                            <tmiGenerally my abstract data type is at a higher level where the
                            caller doesn't know that a single place is going to need to be
                            SETFed, so there's no point in getting a locative to work with.
                            Instead there's some *kind* of update to do, and parameters to
                            that *kind* of update; what really happens internally (one or more
                            SETFs, or alternately re-build anything that changed and share what
                            didn't change) doesn't need to be known by the caller. All the
                            caller needs to know is generically whether the update is in-place
                            or non-destructive. (If it's non-destructive, then the new edition
                            of the data structure is one of the return values. If it's
                            in-place, then there's no need to bother with setq of the new
                            value, because my structures always have a header cell that has a
                            tag for the intentional datatype, and that header cell always
                            points to either the in-place-modified object or the
                            latest-edition-of-object.) </tmi>
                            <mtmiI'd rather program in "paranoid" mode than in "risk shoot foot" mode.
                            The CAR of each ADT object is a keyword identifying the
                            intentional type of that object, and every function that
                            operates on that intentional type first checks if the parameter
                            really does have the expected CAR, just to make sure I didn't
                            copy&paste some inappropriate function name in my code. Yeah, it
                            takes extra CPU cycles to do that checking on every calls, but it
                            sure saves me from shooting myself in the foot and having to spend
                            an hour to find out how I did it before I can fix it. <mtmi>
                            <emtmiTMI = Too Much Information (actually YMMV, some readers might like it)
                            MTMI = More of Too Much Information
                            EMTMI = Even More of Too Much Information (only newbies need read)
                            Credits to Babylon Five for the "I spy" game in the cargo hold.
                            I spy something that starts with the letter B. Boxes!
                            I spy something that starts with the letter M. More boxes! <emtmi>

                            Comment

                            • John W Kennedy

                              #59
                              Re: The Importance of Terminology's Quality

                              Robert Maas, http://tinyurl.com/uh3t wrote:
                              >>>... the "thunks" were necessary at the machine-language level to
                              >>>/implement/ ALGOL 60, but they could not be expressed /in/ ALGOL.
                              >>Ah, thanks for the clarification. Is that info in the appropriate
                              >>WikiPedia page? If not, maybe you would edit it in?
                              >From: John W Kennedy <jwke...@attglo bal.net>
                              >It is explained s.v. "thunk", which is referenced from "ALGOL
                              >60". The ALGOL "pass-by-name" argument/parameter matching was
                              >perhaps the most extreme example ever of a language feature that
                              >was "elegant" but insane. What it meant, in effect, was that,
                              >unless otherwise marked, every argument was passed as two closures,
                              >one that returned a fresh evaluation of the expression given as the
                              >argument, which was called every time the parameter was read, and
                              >one that set the argument to a new value, which was called every
                              >time the parameter was set.
                              >
                              Wow! All these years when I occasionally heard of a "thunk" I never
                              was told, until now, what it really meant. Thanks for the info!!
                              >
                              Followup question #1: I assume these are lexical closures in the
                              environment of the point of the call, right?
                              Yes. (Actually, subprogram calls are first described as working like
                              macro expansions, but then the specification adds that there must be
                              magic fixups so that variable names are resolved in point-of-call
                              context anyway.)

                              At this point in the history of computing, the conceptual distinction
                              between subprograms and macros was not at all clear. It was quite
                              possible to have "macros" that generated an out-of-line subprogram once
                              and then generated calling code the first time and every time thereafter
                              (it was a way of life on systems without linkage editors or linking
                              loaders), and it was also quite possible to refer to in-line macro
                              expansions as "subprogram s". I suspect that the triumph of FORTRAN may
                              have had something to do with cleaning up the terminological mess by the
                              mid-60s.

                              Into the 60s, indeed, there were still machines being made that had no
                              instruction comparable to the mainframe BASx/BALx family, or to Intel's
                              CALL. You had to do a subprogram call by first overwriting the last
                              instruction of what you were calling with a branch instruction that
                              would return back to you.
                              Followup question #2: For simple arithmetic expressions, I can
                              possibly understand how the UPDATE closure might be implemeted
                              (expressed in Lisp to make the intent clear):
                              Call form: MyFunction(X+2) ;
                              GET closure: (+ closedX 2)
                              UPDATE closure: (lambda (newval) (setf closedX (- newval 2))
                              Thus from inside MyFunction where formal parameter Arg1 is bound
                              to actual parameter X+2, after doing Arg1 := 7; X will have the
                              value 5 so that calling Arg1 will return 7 as expected, right?
                              But if the actual argument is something complicated, especially if
                              it makes a nested function call, how can that possibly be
                              implemented?
                              It was forbidden. In the formal definition of ALGOL 60, there was no
                              such thing as an external subprogram (except for non-ALGOL code, which
                              was treated as magic), so the whole program was supposed to be one
                              compile. Therefore, a theoretical compiler could verify that any
                              parameter used as an LHS was always matched with an argument that was a
                              variable. (However, a "thunk" was still required to evaluate any array
                              index and, possibly, to convert between REAL and INTEGER variables.)
                              Many actual compilers /did/ support separate complication as a language
                              extension -- I suppose they had to use run-time checking.

                              --
                              John W. Kennedy
                              "Compact is becoming contract,
                              Man only earns and pays."
                              -- Charles Williams. "Bors to Elayne: On the King's Coins"

                              Comment

                              • Martin Gregorie

                                #60
                                Re: The Importance of Terminology's Quality

                                On Tue, 24 Jun 2008 18:42:15 -0400, John W Kennedy wrote:
                                David Combs wrote:
                                >passing
                                >*unnamed* functions as args (could Algol 60 also do something like that,
                                >via something it maybe termed a "thunk")
                                >
                                No, the "thunks" were necessary at the machine-language level to
                                /implement/ ALGOL 60, but they could not be expressed /in/ ALGOL.
                                >
                                Are you sure about that?

                                The first time I ran across the term "thunking" was when Windows 3
                                introduced the Win32S shim and hence the need to switch addressing between
                                16 bit and 32 bit modes across call interfaces. That was called "thunking"
                                by Microsoft and even they would surely admit it was a kludge.

                                I used Algol 60 on an Elliott 503 and the ICL 1900 series back when it was
                                a current language. The term "thunking" did not appear in either compiler
                                manual nor in any Algol 60 language definition I've seen. A60 could pass
                                values by name or value and procedures by name. That was it. Call by name
                                is what is now referred to as reference passing.

                                I should also point out that Algol 60 was initially written as a means for
                                communicating algorithms between people. Compiler implementations came
                                later. In consequence the language did not define links to libraries or
                                i/o methods. Both features were compiler specific - for instance the
                                Elliott introduced 'input' and 'print' reserved words and syntax while the
                                1900 compilers used function calls. The Elliott approach was more readable.

                                Algol 60 did not have 'functions'. It had procedures which could be
                                declared to return values or not. A procedure that returned a value was
                                equivalent to a function but the term 'function' was not used. Similarly
                                it did not have a mechanism for declaring anonymous procedures. That, like
                                the incorporation of machine code inserts, would have been a
                                compiler-specific extension, so it is a terminological mistake to refer to
                                it without specifying the implementing compiler.


                                --
                                martin@ | Martin Gregorie
                                gregorie. |
                                org | Zappa fan & glider pilot


                                Comment

                                Working...