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

Re: Fwd: Re: Basic Compiler

Expand Messages
  • Shlomi Fish
    ... Actually, I have an idea for a C++ class library that emulates Scheme s Environments and Frames model. Thus enabling Lexical Scoping, Lambda Calculus,
    Message 1 of 10 , Feb 11, 2002
    • 0 Attachment
      On 11 Feb 2002, Oleg Goldshmidt wrote:

      >
      > Adi Stav <stav@...> writes:
      >
      > > Ye Gawds... First object-oriented FORTRAN, and now multi-threaded
      > > Logo... What will they invent next!? Functional assembly?
      >

      Actually, I have an idea for a C++ class library that emulates Scheme's
      Environments and Frames model. Thus enabling Lexical Scoping, Lambda
      Calculus, Closures, CPS, etc.

      Of course, this model for the time being only works in my mind[1], and it
      has a very limited garbage collector. But it's actually quite usable.

      > A quote no less popular than von Neumann's "random number sin" one
      > (discussed elsewhere by roughly the same forum) is:
      >
      > "I don't know what language will they program in in 2050 but it will
      > be called Fortran."
      >
      > [attribution, anyone?]
      >

      Do not know - Google to the rescue? AFAIK, there is still a lot of old
      code which was written in Fortran (mainly for mainframes and stuff like
      that), and is still maintained in it. However, completely new code is
      usually written in C, C++, VB, Perl, Java, Python, etc.

      Before the recession in the computing started, all of those languages
      where growing in the number of job offers, while COBOL actually decreased.
      And I'm talking about absolute numbers, not just percentage. I don't know
      COBOL, but as a language without recursion, and where you have to type
      "ADD X TO Y" to do "y += x", I would not say it is very usable, either.

      Regards,

      Shlomi Fish

      [1] - I did not code it, just proven it correct. :-)

      > --
      > Oleg Goldshmidt | ogoldshmidt@...
      > "If it ain't broken, it has not got enough features yet."
      >
      > =================================================================
      > To unsubscribe, send mail to linux-il-request@... with
      > the word "unsubscribe" in the message body, e.g., run the command
      > echo unsubscribe | mail linux-il-request@...
      >



      ----------------------------------------------------------------------
      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/
      Home E-mail: shlomif@...

      "Let's suppose you have a table with 2^n cups..."
      "Wait a second - is n a natural number?"
    • Nadav Har'El
      ... What the quote (probably) makes fun of is the fact that as Fortran evolves it changes so radically every two decades(!) or so, that it is not even clear
      Message 2 of 10 , Feb 11, 2002
      • 0 Attachment
        On Mon, Feb 11, 2002, Shlomi Fish wrote about "[hackers-il] Re: Fwd: Re: Basic Compiler":
        > > "I don't know what language will they program in in 2050 but it will
        > > be called Fortran."
        >
        > Do not know - Google to the rescue? AFAIK, there is still a lot of old
        > code which was written in Fortran (mainly for mainframes and stuff like
        > that), and is still maintained in it. However, completely new code is
        > usually written in C, C++, VB, Perl, Java, Python, etc.

        What the quote (probably) makes fun of is the fact that as Fortran evolves
        it changes so radically every two decades(!) or so, that it is not even clear
        why it should be called "Fortran" any more... What people usually refer to
        as Fortran is actually Fortran 77, a relatively new standard from 1977
        (there was on older version from 1956 ;)). But now there's also Fortran 90
        (and Fortran 95) which have radically different features and syntax from
        Fortran 77, and copy many of the features of C and C++ (memory allocation,
        operator overloading, "pointers", etc.) that were missing from Fortran 77.

        It is not true that no new code is written in Fortran nowadays, but most
        of such new code is being written in Fortran 90 (even the thick-headed
        Fortran diehards realize how silly it is to confine yourself to something
        that hasn't changed since 1977). But now that students are no longer being
        tought Fortran at the university, and C is being taught instead, the number
        of people growing up and wanting to code in Fortran is dwindling.

        VB, Perl, Java and Python are completely irrelevant to most Fortraners, by
        the way: Fortran (FORmula TRANslator) is mostly used for numeric calculations,
        especially by physicists (do they still teach Fortran in the physics department
        in the Technion, or have they switched to C too?).

        > Before the recession in the computing started, all of those languages
        > where growing in the number of job offers, while COBOL actually decreased.

        I know someone who's doing a CIS (or something like that) degree in the US
        now, and I was shocked to hear that they are teaching them COBOL!

        > COBOL, but as a language without recursion, and where you have to type
        > "ADD X TO Y" to do "y += x", I would not say it is very usable, either.

        I'd take such "restrictions" any day, over a language that doesn't have any
        concept of memory allocation (namely, Fortran 77) :)

        Recursion is highly overrated, in my opinion (let's not start a flamewar
        on this :))

        --
        Nadav Har'El | Monday, Feb 11 2002, 29 Shevat 5762
        nyh@... |-----------------------------------------
        Phone: +972-53-245868, ICQ 13349191 |Windows detected you moved your mouse.
        http://nadav.harel.org.il |Reboot for this change to take effect.
      • Oleg Goldshmidt
        ... Why bother? There are Scheme2C translators - just write in Scheme. ... Fortran is very much alive. I have never learned its OO incarnations, but I hear
        Message 3 of 10 , Feb 11, 2002
        • 0 Attachment
          Shlomi Fish <shlomif@...> writes:

          > Actually, I have an idea for a C++ class library that emulates Scheme's
          > Environments and Frames model. Thus enabling Lexical Scoping, Lambda
          > Calculus, Closures, CPS, etc.

          Why bother? There are Scheme2C translators - just write in Scheme.

          > Do not know - Google to the rescue? AFAIK, there is still a lot of old
          > code which was written in Fortran (mainly for mainframes and stuff like
          > that), and is still maintained in it. However, completely new code is
          > usually written in C, C++, VB, Perl, Java, Python, etc.

          Fortran is very much alive. I have never learned its OO incarnations,
          but I hear they _are_ OO or on the way there (F95 etc - anyone?).

          The real reason companies move from Fortran to C/C++ (not really to
          others you mentioned - these are basically niche languages and a
          Fortran company is not likely to switch to Perl or VB; besides, the
          old Fortran code has to be interfaced to somehow, which is possible
          from C) is that it is difficult to hire an inexperienced CS graduate
          who knows Fortran nowadays.

          I used to work for a company that made the transition.

          > Before the recession in the computing started, all of those languages
          > where growing in the number of job offers, while COBOL actually decreased.
          > And I'm talking about absolute numbers, not just percentage.

          Can it be that you didn't look at the right ads (US, not Israel)?

          I read (Gabriel?) just a few years ago that there was still much more
          *new* code being written in Cobol that in any other programming
          language. I don't know really if it is true. I would not be surprised,
          really: there probably are many more programmers sitting in banks,
          insurance companies, etc, doing payroll, taxes, whatever, than in all
          of the visible hi-tech. And all those huge Cobol systems need patches,
          features, et caetera.

          > I don't know COBOL, but as a language without recursion, and where
          > you have to type "ADD X TO Y" to do "y += x", I would not say it is
          > very usable, either.

          Schemer <scoff, smiley>... Fortran does not have recursion either,
          IIRC. The Fortran I know, that is. I would not be surprised if newer
          ones had recursion, tail-recursion, and all that jazz.

          Does "y += x" define a good language for you?

          > [1] - I did not code it, just proven it correct. :-)

          More quotes, eh? Knuth.

          --
          Oleg Goldshmidt | ogoldshmidt@...
          "If it ain't broken, it has not got enough features yet."
        • Nadav Har'El
          ... Some programming statistics are very surprising. I heard another surprising statistic (like you, I don t have a pointer to prove it): 90% of the code
          Message 4 of 10 , Feb 11, 2002
          • 0 Attachment
            On Mon, Feb 11, 2002, Oleg Goldshmidt wrote about "Re: [hackers-il] Re: Fwd: Re: Basic Compiler":
            > I read (Gabriel?) just a few years ago that there was still much more
            > *new* code being written in Cobol that in any other programming
            > language. I don't know really if it is true. I would not be surprised,

            Some programming statistics are very surprising. I heard another surprising
            statistic (like you, I don't have a pointer to prove it): 90% of the code
            developed in the US was never meant to be sold - it is either used in-house
            or supplied with hardware.
            So much for people's fears that "programmers will be out of a job if free
            software won"!

            > Schemer <scoff, smiley>... Fortran does not have recursion either,
            > IIRC. The Fortran I know, that is. I would not be surprised if newer
            > ones had recursion, tail-recursion, and all that jazz.

            Well, Fortran 77 did not officially support recursion, but this was never an
            important "feature" of the language. After all you did have functions,
            "return" statements, so why not recursion?
            The problem was that the language standard did not guarantee you that
            function-local variables are allocated on the stack, and many implementation
            put them in fixed positions in memory during compilation, hence you couldn't
            call the same function twice in the same time. Fortran 77 has an explicit
            "SAVE" declaration that declares local variables to be saved across function
            invocation, but implmentations were free to "SAVE" all local variables.
            ("SAVE" is just like "static" variables in functions in C, by the way).

            Anyway, in new Fortran compilers (even f77 compilers), you usually had a
            compiler option (if it wasn't the default already) to put local variables
            on the stack. This would sometimes break antique software which assumed all
            variables were SAVEd by default (which is a wrong assumption, even by the
            Fortran standard).

            "The horror, The horror!"

            (Yes, another quote... This time Joseph Conrad)

            --
            Nadav Har'El | Monday, Feb 11 2002, 29 Shevat 5762
            nyh@... |-----------------------------------------
            Phone: +972-53-245868, ICQ 13349191 |How do you get holy water? Boil the hell
            http://nadav.harel.org.il |out of it.
          • Shlomi Fish
            ... My old Music teacher wished to become a programmer and he learned COBOL. I did not know if he got a job or not. I remember him hacking stuff on the old XT
            Message 5 of 10 , Feb 11, 2002
            • 0 Attachment
              On Mon, 11 Feb 2002, Nadav Har'El wrote:

              > > Before the recession in the computing started, all of those languages
              > > where growing in the number of job offers, while COBOL actually decreased.
              >
              > I know someone who's doing a CIS (or something like that) degree in the US
              > now, and I was shocked to hear that they are teaching them COBOL!
              >

              My old Music teacher wished to become a programmer and he learned COBOL. I
              did not know if he got a job or not. I remember him hacking stuff on the
              old XT Basics, when I was young. (he used to be my neighbour)

              > > COBOL, but as a language without recursion, and where you have to type
              > > "ADD X TO Y" to do "y += x", I would not say it is very usable, either.
              >
              > I'd take such "restrictions" any day, over a language that doesn't have any
              > concept of memory allocation (namely, Fortran 77) :)
              >
              > Recursion is highly overrated, in my opinion (let's not start a flamewar
              > on this :))
              >

              I think a usable language has both memory allocation and recursion. "ADD X
              TO Y" is an annoyance, but I still think it's counter-intuitive. (or
              counter-cognitive). As for recursion, sometimes It's convenient to use it,
              and people like to think in recursive processes. Usually, however, it's a
              good idea to use one's own dedicated stack if it may be of arbitrary
              depth.

              Mark-Jason Dominus tells that once recursion was considered a symbol of
              the academia, and was not even supported by the languages commonly used
              then. (namely COBOL and Fortran) Nowadays, recursion in C, Pascal, Perl,
              VB, whatever, is common place.

              Regards,

              Shlomi Fish

              > --
              > Nadav Har'El | Monday, Feb 11 2002, 29 Shevat 5762
              > nyh@... |-----------------------------------------
              > Phone: +972-53-245868, ICQ 13349191 |Windows detected you moved your mouse.
              > http://nadav.harel.org.il |Reboot for this change to take effect.
              >
              >
              > To unsubscribe from this group, send an email to:
              > hackers-il-unsubscribe@egroups.com
              >
              >
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              >
              >



              ----------------------------------------------------------------------
              Shlomi Fish shlomif@...
              Home Page: http://t2.technion.ac.il/~shlomif/
              Home E-mail: shlomif@...

              "Let's suppose you have a table with 2^n cups..."
              "Wait a second - is n a natural number?"
            • Oleg Goldshmidt
              ... True. And some implementations of Fortran 77 (notably f2c/gcc) allowed the AUTOMATIC keyword to allocate local variables on the stack. I think that g77
              Message 6 of 10 , Feb 11, 2002
              • 0 Attachment
                "Nadav Har'El" <nyh@...> writes:

                > The problem was that the language standard did not guarantee you that
                > function-local variables are allocated on the stack, and many implementation
                > put them in fixed positions in memory during compilation, hence you couldn't
                > call the same function twice in the same time. Fortran 77 has an explicit
                > "SAVE" declaration that declares local variables to be saved across function
                > invocation, but implmentations were free to "SAVE" all local variables.
                > ("SAVE" is just like "static" variables in functions in C, by the
                > way).

                True. And some implementations of Fortran 77 (notably f2c/gcc) allowed
                the AUTOMATIC keyword to allocate local variables on the stack. I
                think that g77 places automatic variables on the stack by default. This
                is not a standard feature in f77 though.

                --
                Oleg Goldshmidt | ogoldshmidt@...
                "If it ain't broken, it has not got enough features yet."
              • Shlomi Fish
                ... It is based on statistics presented in Larry Wall s talk 3rd State of the Onion : http://www.perl.com/1999/08/onion/talk.html That was in August 99 as can
                Message 7 of 10 , Feb 11, 2002
                • 0 Attachment
                  On 11 Feb 2002, Oleg Goldshmidt wrote:

                  > > Before the recession in the computing started, all of those languages
                  > > where growing in the number of job offers, while COBOL actually decreased.
                  > > And I'm talking about absolute numbers, not just percentage.
                  >
                  > Can it be that you didn't look at the right ads (US, not Israel)?
                  >
                  > I read (Gabriel?) just a few years ago that there was still much more
                  > *new* code being written in Cobol that in any other programming
                  > language. I don't know really if it is true. I would not be surprised,
                  > really: there probably are many more programmers sitting in banks,
                  > insurance companies, etc, doing payroll, taxes, whatever, than in all
                  > of the visible hi-tech. And all those huge Cobol systems need patches,
                  > features, et caetera.
                  >

                  It is based on statistics presented in Larry Wall's talk "3rd State of the
                  Onion":

                  http://www.perl.com/1999/08/onion/talk.html

                  That was in August 99 as can be deduced from the URL.

                  > > I don't know COBOL, but as a language without recursion, and where
                  > > you have to type "ADD X TO Y" to do "y += x", I would not say it is
                  > > very usable, either.
                  >
                  > Schemer <scoff, smiley>... Fortran does not have recursion either,
                  > IIRC. The Fortran I know, that is. I would not be surprised if newer
                  > ones had recursion, tail-recursion, and all that jazz.
                  >
                  > Does "y += x" define a good language for you?
                  >

                  Actually it does. I find it more intutive than "ADD Y TO X", and to a
                  lesser extent than

                  (set! y (+ y x))

                  one of the reasons I don't like Scheme much is because I have to write:

                  (vector-set! v a (+ (vector-ref v a) 1))

                  where in Perl I'll write "$v[a]++". I.e: it's far too verbose to be
                  effective. Let's not start a flame war - every one has his own tastes in
                  languages.

                  > > [1] - I did not code it, just proven it correct. :-)
                  >
                  > More quotes, eh? Knuth.
                  >

                  Knuth said that he did not test it, but he actually wrote it. This is a
                  variation on it.

                  Regards,

                  Shlomi Fish

                  > --
                  > Oleg Goldshmidt | ogoldshmidt@...
                  > "If it ain't broken, it has not got enough features yet."
                  >
                  >
                  > To unsubscribe from this group, send an email to:
                  > hackers-il-unsubscribe@egroups.com
                  >
                  >
                  >
                  > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                  >
                  >



                  ----------------------------------------------------------------------
                  Shlomi Fish shlomif@...
                  Home Page: http://t2.technion.ac.il/~shlomif/
                  Home E-mail: shlomif@...

                  "Let's suppose you have a table with 2^n cups..."
                  "Wait a second - is n a natural number?"
                • Adi Stav
                  ... This was said in The Cathedral and the Bazaar, highlighting the exact same point you mentioned now. The pointer given was an unofficial raise your hand if
                  Message 8 of 10 , Feb 11, 2002
                  • 0 Attachment
                    On Mon, Feb 11, 2002 at 05:57:45PM +0200, Nadav Har'El wrote:
                    >
                    > Some programming statistics are very surprising. I heard another surprising
                    > statistic (like you, I don't have a pointer to prove it): 90% of the code
                    > developed in the US was never meant to be sold - it is either used in-house
                    > or supplied with hardware.
                    > So much for people's fears that "programmers will be out of a job if free
                    > software won"!

                    This was said in The Cathedral and the Bazaar, highlighting the
                    exact same point you mentioned now. The pointer given was an
                    unofficial "raise your hand if you develop for in-house use"
                    survey ESR did in one of his lectures, and a suggestion for the
                    reader to try and judge the ratio of sale-value vs. use-value
                    software by looking at job ads.

                    Although I like many of the insightful ideas expressed in CatB
                    (those that were not lifted wholesale from the GNU manifesto, that
                    is), I find the sources for most of its supporting evidence rather
                    dubious. I'd go as far as to speculate that, if indeed there is
                    a connection between free software and software developed for in-
                    house use, the self-selected group that attended the lecture
                    could have an artificially high ratio of developers interested in
                    free software, and therefore who develop for in-house use.
                  • Omer Zak
                    ... [... snipped ...] ... Nowadays, I suppose that this will happen by having someone, who never knew about FORTRAN, invent a new language, and give it the
                    Message 9 of 10 , Feb 11, 2002
                    • 0 Attachment
                      On Mon, 11 Feb 2002, Shlomi Fish wrote:

                      > On 11 Feb 2002, Oleg Goldshmidt wrote:
                      [... snipped ...]

                      > > A quote no less popular than von Neumann's "random number sin" one
                      > > (discussed elsewhere by roughly the same forum) is:
                      > >
                      > > "I don't know what language will they program in in 2050 but it will
                      > > be called Fortran."

                      Nowadays, I suppose that this will happen by having someone, who never
                      knew about FORTRAN, invent a new language, and give it the name FORTRAN.

                      While FORTRAN was the first language I programmed computers in, nowadays I
                      refuse to even touch a language, which doesn't type-check the parameters
                      passed to subroutines/functions, and whose syntax provides no way to
                      guarantee that a subroutine gets parameter of the correct type.

                      > >
                      > > [attribution, anyone?]
                      > >
                      >
                      > Do not know - Google to the rescue? AFAIK, there is still a lot of old
                      > code which was written in Fortran (mainly for mainframes and stuff like
                      > that), and is still maintained in it. However, completely new code is
                      > usually written in C, C++, VB, Perl, Java, Python, etc.

                      --- Omer
                      There is no IGLU Cabal. Oh, do you mean the JGLV Kubul, but pronounced
                      the way our ancestors from 250 years ago pronounced words?
                      WARNING TO SPAMMERS: see at http://www.zak.co.il/spamwarning.html
                    • Oleg Goldshmidt
                      ... I strongly suspect that usable is used here in the sense of usable for what I like and know how to do . A much more common view is that high-level
                      Message 10 of 10 , Feb 11, 2002
                      • 0 Attachment
                        Shlomi Fish <shlomif@...> writes:

                        > I think a usable language has both memory allocation and recursion.

                        I strongly suspect that "usable" is used here in the sense of "usable
                        for what I like and know how to do". A much more common view is that
                        high-level programming languages should not deal with memory
                        allocation.

                        > people like to think in recursive processes.

                        If that were true we would not see so many explanations of why
                        recursion is no more difficult than iteration (we don't see much of
                        the reverse, do we?)...

                        --
                        Oleg Goldshmidt | ogoldshmidt@...
                        "If it ain't broken, it has not got enough features yet."
                      Your message has been successfully submitted and would be delivered to recipients shortly.