The Importance of Terminology's Quality

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Josef Moellers

    #61
    Re: The Importance of Terminology's Quality

    Martin Gregorie wrote:
    Are you sure about that?
    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.
    Are you sure about that? ;-)

    AFAIK "Call by name" is *not* the same as passing an argument by
    reference. With "call by name" you can implement this wonderful thing
    called "Jensen's Device", which you cannot do when you pass parameters
    by reference!

    Josef
    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html

    Comment

    • arsyed

      #62
      Re: The Importance of Terminology's Quality

      On Tue, Jul 22, 2008 at 5:21 AM, Martin Gregorie
      <martin@see_sig _for_address.in validwrote:
      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.
      >

      On Tue, Jul 22, 2008 at 5:21 AM, Martin Gregorie
      <martin@see_sig _for_address.in validwrote:
      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.
      >
      Thunk has more than one meaning. The ALGOL 60 usage predates Windows
      obviously. Also, call-by-name is distinct from call-by-reference.
      See:



      And, for fun with call-by-name:



      Comment

      • Lew

        #63
        Re: The Importance of Terminology's Quality

        Rob Warnock wrote:
        Martin Gregorie <martin@see_sig _for_address.in validwrote:
        +---------------
        | John W Kennedy wrote:
        | 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?
        +---------------
        >
        I don't know if John is, but *I* am! ;-}
        At this point we are so far off topic for clj.programmer, but still impinging
        on functional programming issues with the discussion of closures, et al., that
        I respectfully request that you all exclude clj.programmer from followups to
        this thread.

        (f-u set to comp.lang.funct ional)

        --
        Lew

        Comment

        • Steve Schafer

          #64
          Re: The Importance of Terminology's Quality

          On Tue, 22 Jul 2008 10:21:50 +0100, Martin Gregorie
          <martin@see_sig _for_address.in validwrote:
          >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.
          Win32s thunks are a completely different beast from the original Algol
          60 thunks. As far as I know, the first published description of thunks
          was:

          Ingerman PZ (1961) Thunks: A way of compiling procedure statements with
          some comments on procedure declarations, CACM 4:55-58.

          Steve Schafer
          Fenestra Technologies Corp.

          Comment

          • Grant Edwards

            #65
            Re: The Importance of Terminology's Quality

            On 2008-07-22, Steve Schafer <steve@fenestra .comwrote:
            On Tue, 22 Jul 2008 10:21:50 +0100, Martin Gregorie
            ><martin@see_si g_for_address.i nvalidwrote:
            >
            >>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.
            What?! Microsoft took a technical term and used it to mean
            something completely different than the widely used meaning?
            Never.
            Win32s thunks are a completely different beast from the
            original Algol 60 thunks. As far as I know, the first
            published description of thunks was:
            >
            Ingerman PZ (1961) Thunks: A way of compiling procedure statements with
            some comments on procedure declarations, CACM 4:55-58.
            The Algol usage is certainly what we were taught back in the
            late 70's. I wasn't even aware that Microsoft had hijacked it
            to mean something else.

            --
            Grant Edwards grante Yow! My polyvinyl cowboy
            at wallet was made in Hong
            visi.com Kong by Montgomery Clift!

            Comment

            • John W Kennedy

              #66
              Re: The Importance of Terminology's Quality

              Martin Gregorie wrote:
              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.
              It doesn't have to; Algol 60 thunks are not part of the language.
              However, practical implementation of Algol 60 call by name means that
              thunks are created by every Algol 60 compiler, and the word "thunk" was
              coined in 1961 to designate them.
              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.
              Either you misunderstood (because in many simple cases the semantics of
              call-by-reference and call-by-name cannot be distinguished) or the
              compiler you used implemented non-standard Algol (which was fairly
              common in compilers meant for day-to-day practical work). Algol
              call-by-name was a unique form that subsequent language designers have
              recoiled from in horror.

              (Historically, "call-by-name" has sometimes been used in non-Algol
              contexts to mean "call-by-reference".)
              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.
              This is simply wrong. You are accurately describing the language syntax,
              which used (as PL/I does) the keyword "procedure" for both functions
              and subroutines, but Algol documentation nevertheless referred to
              "functions" .
              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.
              Standards-conforming Algol compilers had a limited ability to create
              de-facto anonymous functions in the call-by-name implementation.

              --
              John W. Kennedy
              "Informatio n is light. Information, in itself, about anything, is light."
              -- Tom Stoppard. "Night and Day"

              Comment

              • John W Kennedy

                #67
                Re: The Importance of Terminology's Quality

                Rob Warnock wrote:
                Thunks were something used by Algol 60
                *compiler writers* in the code generated by their compilers to
                implement the semantics of Algol 60 call-by-name, but were not
                visible to users at all [except that they allowed call-by-name
                to "work right"].
                ....unless you were a system programmer and had to write Algol-friendly
                assembler.



                --
                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

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

                  #68
                  Re: The Importance of Terminology's Quality

                  Robert Maas, http://tinyurl.com/uh3t wrote:
                  John W Kennedy <jwke...@attglo bal.netwrote:
                  JWKInto the 60s, indeed, there were still machines being made
                  JWKthat had no instruction comparable to the mainframe BASx/BALx
                  JWKfamily, or to Intel's CALL. You had to do a subprogram call by
                  JWKfirst overwriting the last instruction of what you were
                  JWKcalling with a branch instruction that would return back to
                  JWKyou.
                  >
                  That's not true, that you needed to do that, that there was no
                  other way available. The subroutine linkage I invented for S.P.S.
                  (Symbolic Programming System, i.e. IBM 1620 assembly language) was
                  to reserve a 5-digit space immediately before the subroutine entry
                  point for storing the return address. So the caller needed to know
                  only one address, the entry point, and do both store-return-address
                  and jump relative to that address, rather than needing to know both
                  the entry point and the last-instruction-JUMP-needs-patch address
                  as independent items of information.
                  CDC Cyber did something very similar.

                  Not very recursion friendly.

                  Arne

                  Comment

                  • norseman

                    #69
                    Re: The Importance of Terminology's Quality

                    John W Kennedy wrote:
                    Robert Maas, http://tinyurl.com/uh3t wrote:
                    >John W Kennedy <jwke...@attglo bal.netwrote:
                    >JWKInto the 60s, indeed, there were still machines being made
                    >JWKthat had no instruction comparable to the mainframe BASx/BALx
                    >JWKfamily, or to Intel's CALL. You had to do a subprogram call by
                    >JWKfirst overwriting the last instruction of what you were
                    >JWKcalling with a branch instruction that would return back to
                    >JWKyou.
                    >>
                    HUMMmmmmm! Brings back memories. The Monroe-bot 9, Olivetti,
                    Sperry-Rand and the rest. I came in on the IBM-360 original series in
                    the mid-60'. Subroutine docs were important. You needed to know from
                    which register the sub was going to use/store the return address. (As
                    well as which registers it used for what both incoming and out going.)

                    it's been so long I forget the actual mnemonics.
                    something like:
                    ..
                    ..
                    load R12,rtn89 (alt)
                    jump sub32 sub32: sub32:
                    rtn89: stor R12,safe .
                    .. . .
                    .. . jump R12
                    rtrv R12,safe
                    jump R12
                    Programs were simple then. Card, paper tape, mag tape IN and card, paper
                    tape, mag tape and hardcopy paper OUT. The monitor was the guy who
                    looked at the flashing lights on the metal panel. And to change a
                    program on the 1401 usually required the soldering iron, patch cables
                    and a patch board! And a new deck of cards containing the next program.
                    Don't use a used deck 'cause then the reader will eat the cards. :)
                    I helped Chevron East convert from 1401 to 360. Long ago, far away and
                    with no intention of returning to those long long hours in 'the room'.
                    LSI??? Ha-Ha. Anyone remember the word transistor?. Power supply was
                    tubes. However, core was 3-axis iron core. That I miss.
                    17 flip switches
                    set 1-16 & flip 17 to load first half word
                    set 1-16 & flip 17 to load 2nd half word 1st boot word ready
                    ..
                    ..
                    core boot loaded mag master 1 and read next sequence which ...

                    only took 45 min. to boot if first effort succeeded. Otherwise...
                    it was going to be a long day....

                    The "Good 'Ole Days"? Point of view. Code was tight and comradely was
                    what kept us going. The long hours and being shunned by company people
                    as gargoyles down there or some such - I can do without.

                    ....(snip)



                    Steve
                    norseman@hughes .net

                    OH- If the sub might be called other than as if in-line, an area of
                    memory was given to safe and it would be incremented/decremented upon
                    use. safe was just an address. safe dw 40 or whatever

                    Comment

                    • Martijn Lievaart

                      #70
                      Re: The Importance of Terminology's Quality

                      On Thu, 14 Aug 2008 18:33:30 -0400, John W Kennedy wrote:
                      Actually, I was thinking of the 1401. But both the 1620 and the 1401
                      (without the optional Advanced Programming Feature) share the basic
                      omission of any instruction that could do call-and-return without
                      hard-coding an adcon with the address of the point to be returned to.
                      (The Advanced Programming Feature added a 1401 instruction, Store
                      B-address Register, that, executed as the first instruction of a
                      subroutine, could store the return-to address.)
                      Raaaagh!!!!

                      Don't. Bring. Back. Those. Nightmares. Please.

                      The 1401 was a decent enough processor for many industrial tasks -- at
                      that time -- but for general programming it was sheer horror.

                      M4

                      Comment

                      • John W Kennedy

                        #71
                        Re: The Importance of Terminology's Quality

                        Martijn Lievaart wrote:
                        On Thu, 14 Aug 2008 18:33:30 -0400, John W Kennedy wrote:
                        >
                        >Actually, I was thinking of the 1401. But both the 1620 and the 1401
                        >(without the optional Advanced Programming Feature) share the basic
                        >omission of any instruction that could do call-and-return without
                        >hard-coding an adcon with the address of the point to be returned to.
                        >(The Advanced Programming Feature added a 1401 instruction, Store
                        >B-address Register, that, executed as the first instruction of a
                        >subroutine, could store the return-to address.)
                        >
                        Raaaagh!!!!
                        >
                        Don't. Bring. Back. Those. Nightmares. Please.
                        >
                        The 1401 was a decent enough processor for many industrial tasks -- at
                        that time -- but for general programming it was sheer horror.
                        But the easiest machine language /ever/.

                        --
                        John W. Kennedy
                        "The grand art mastered the thudding hammer of Thor
                        And the heart of our lord Taliessin determined the war."
                        -- Charles Williams. "Mount Badon"

                        Comment

                        • Martijn Lievaart

                          #72
                          Re: The Importance of Terminology's Quality

                          On Sat, 16 Aug 2008 21:46:18 -0400, John W Kennedy wrote:
                          >The 1401 was a decent enough processor for many industrial tasks -- at
                          >that time -- but for general programming it was sheer horror.
                          >
                          But the easiest machine language /ever/.
                          True, very true.

                          M4

                          Comment

                          • Martin Gregorie

                            #73
                            Re: The Importance of Terminology's Quality

                            On Sat, 16 Aug 2008 21:46:18 -0400, John W Kennedy wrote:
                            Martijn Lievaart wrote:
                            >On Thu, 14 Aug 2008 18:33:30 -0400, John W Kennedy wrote:
                            >>
                            >>Actually, I was thinking of the 1401. But both the 1620 and the 1401
                            >>(without the optional Advanced Programming Feature) share the basic
                            >>omission of any instruction that could do call-and-return without
                            >>hard-coding an adcon with the address of the point to be returned to.
                            >>(The Advanced Programming Feature added a 1401 instruction, Store
                            >>B-address Register, that, executed as the first instruction of a
                            >>subroutine, could store the return-to address.)
                            >>
                            >Raaaagh!!!!
                            >>
                            >Don't. Bring. Back. Those. Nightmares. Please.
                            >>
                            >The 1401 was a decent enough processor for many industrial tasks -- at
                            >that time -- but for general programming it was sheer horror.
                            >
                            But the easiest machine language /ever/.
                            What? Even easier than ICL 1900 PLAN or MC68000 assembler? That would be
                            difficult to achieve.


                            --
                            martin@ | Martin Gregorie
                            gregorie. | Essex, UK
                            org |

                            Comment

                            • John W Kennedy

                              #74
                              Re: The Importance of Terminology's Quality

                              Martin Gregorie wrote:
                              On Sat, 16 Aug 2008 21:46:18 -0400, John W Kennedy wrote:
                              >
                              >Martijn Lievaart wrote:
                              >>On Thu, 14 Aug 2008 18:33:30 -0400, John W Kennedy wrote:
                              >>>
                              >>>Actually, I was thinking of the 1401. But both the 1620 and the 1401
                              >>>(without the optional Advanced Programming Feature) share the basic
                              >>>omission of any instruction that could do call-and-return without
                              >>>hard-coding an adcon with the address of the point to be returned to.
                              >>>(The Advanced Programming Feature added a 1401 instruction, Store
                              >>>B-address Register, that, executed as the first instruction of a
                              >>>subroutine , could store the return-to address.)
                              >>Raaaagh!!!!
                              >>>
                              >>Don't. Bring. Back. Those. Nightmares. Please.
                              >>>
                              >>The 1401 was a decent enough processor for many industrial tasks -- at
                              >>that time -- but for general programming it was sheer horror.
                              >But the easiest machine language /ever/.
                              >
                              What? Even easier than ICL 1900 PLAN or MC68000 assembler? That would be
                              difficult to achieve.
                              I said "machine language" and I meant it. I haven't touched a 1401 since
                              1966, and haven't dealt with a 1401 emulator since 1968, but I can
                              /still/ write a self-booting program. In 1960, some people still looked
                              on assemblers (to say nothing of compilers) as a useless waste of
                              resources that could be better applied to end-user applications, and the
                              1401 was designed to be programmable in raw machine language. Even shops
                              that used assembler nevertheless frequently did bug fixes as
                              machine-language patches, rather than take the time to run the assembler
                              again. (SPS, the non-macro basic assembler, ran at about 70 lines a
                              minute, tops.)

                              --
                              John W. Kennedy
                              "The bright critics assembled in this volume will doubtless show, in
                              their sophisticated and ingenious new ways, that, just as /Pooh/ is
                              suffused with humanism, our humanism itself, at this late date, has
                              become full of /Pooh./"
                              -- Frederick Crews. "Postmodern Pooh", Preface

                              Comment

                              • Martin Gregorie

                                #75
                                Re: The Importance of Terminology's Quality

                                On Sun, 17 Aug 2008 22:30:35 -0400, John W Kennedy wrote:
                                I said "machine language" and I meant it.
                                >
                                OK - I haven't touched that since typing ALTER commands into the console
                                of a 1903 running the UDAS executive or, even better, patching the
                                executive on the hand switches.

                                I was fascinated, though by the designs of early assemblers: I first
                                learnt Elliott assembler, which required the op codes to be typed on
                                octal but used symbolic labels and variable names. Meanwhile a colleague
                                had started on a KDF6 which was the opposite - op codes were mnemonics
                                but all addresses were absolute and entered in octal. I always wondered
                                about the rationale of the KDF6 assembler writers in tackling only the
                                easy part of the job.
                                Even shops that used assembler nevertheless frequently did bug fixes as
                                machine-language patches, rather than take the time to run the assembler
                                again. (SPS, the non-macro basic assembler, ran at about 70 lines a
                                minute, tops.)
                                >
                                Even a steam powered 1901 (3.6 uS for a half-word add IIRC) running a
                                tape based assembler was faster than that. It could just about keep up
                                with a 300 cpm card reader.


                                --
                                martin@ | Martin Gregorie
                                gregorie. | Essex, UK
                                org |

                                Comment

                                Working...