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

RE: [hackers-il] [colloq@cs.Technion.AC.IL: Shimon Schocken on Tu esday 05/06/2001]

Expand Messages
  • Moshe Zadka
    ... No it isn t. It s about as similar to Lisp as C is similar to Java. -- I ll be ex-DPL soon anyway so I m |LUKE: Is Perl better than Python? looking
    Message 1 of 11 , Apr 10, 2001
    • 0 Attachment
      On Tue, 10 Apr 2001 13:09:49 +0200, Chen Shapira <chen@...> wrote:

      > Lets take note that this intermediate language is very much similar to lisp.

      No it isn't.
      It's about as similar to Lisp as C is similar to Java.
      --
      "I'll be ex-DPL soon anyway so I'm |LUKE: Is Perl better than Python?
      looking for someplace else to grab power."|YODA: No...no... no. Quicker,
      -- Wichert Akkerman (on debian-private)| easier, more seductive.
      For public key, finger moshez@... |http://www.{python,debian,gnu}.org
    • Oleg Goldshmidt
      ... Come on, you are a lisp-er. Or should it be LISP-er ? I strongly suspect it s a particular implementation. I think f2c also has something like this. While
      Message 2 of 11 , Apr 10, 2001
      • 0 Attachment
        Chen Shapira <chen@...> writes:

        > I had no idea Pascal thinks case-insensitive means everything is uppercase.
        >
        > *That* is horrible.

        Come on, you are a lisp-er. Or should it be "LISP-er"?

        I strongly suspect it's a particular implementation. I think f2c also
        has something like this. While Fortran itself is truly
        case-insensitive (it has another horrible feature - its identifiers
        are white-space-insensitive as well), having a foo or a FOO in the
        code will lead you to a foo in the debugger. In f2c actually. I don't
        find it particularly horrible (it's all lower-case), nor did I object
        too much to name-mangling, which was an evil, but a necessary one.


        --
        Oleg Goldshmidt | ogoldshmidt@...
        "I'd rather write programs to write programs than write programs."
      • Chen Shapira
        ... I have no idea what you mean by this analogy. But since this is a nice game, why don t we continue? I think RTL is like lisp as a cell-phone is like those
        Message 3 of 11 , Apr 10, 2001
        • 0 Attachment
          > No it isn't.
          > It's about as similar to Lisp as C is similar to Java.

          I have no idea what you mean by this analogy.

          But since this is a nice game, why don't we continue? I think RTL is like
          lisp as a cell-phone is like those army motorolla's.

          Wasn't it part of those tests some people take to join the university? find
          the correct analogy?

          But since I believe this is useless, let me explain exectly what I ment, by
          quoting the manual:

          -----
          RTL is inspired by Lisp lists. It has both an internal form, made up of
          structures that point at other structures, and a textual form that is used
          in the machine description and in printed debugging dumps. The textual form
          uses nested parentheses to indicate the pointers in the internal form.
          -----

          I would also say that this is a low level lisp.

          But again, we are discussing descriptions now, which isn't too productive.

          You now know what I mean. I consider this enough to call "similar". If you
          think it isn't similar. Or you think that the right description is "as
          similar to lisp as java is to c", feel free to enjoy yourself.
        • Nadav Har'El
          ... Several people repeated this fact , that Pascal doesn t have a statement to return in the middle of the function. Are you sure??? I haven t programmed
          Message 4 of 11 , Apr 10, 2001
          • 0 Attachment
            On Tue, Apr 10, 2001, mulix wrote about "RE: [hackers-il] [colloq@...: Shimon Schocken on Tu esday 05/06/2001]":
            > > 2) What do you mean by "no return from functions"? IIRC you call a function
            > > and get a returned value, no?
            >
            > of course, of course. i was referring to a return in the middle of a
            > function, once you discover an error condition or a predicate cannot be
            > fulfilled. also, since the code i wrote used a back tracking (recursive)
            > algorithm, being able to return in the middle of a function was crucial.

            Several people repeated this "fact", that Pascal doesn't have a statement
            to return in the middle of the function. Are you sure??? I haven't programmed
            Pascal for quite a few years, but I seem to remember it had a "return"
            statement. In fact, I remember arguing with the Metargel in the course
            "Mavo Lemachshev Pascal" who deducted points for using "return" - eventually
            I got him to admit (if I remember correctly) that there is such a statement
            but it is considered "muktze michamat mius", like C's "goto".

            Perhaps the Wirth's original Pascal didn't have a return statement, and
            only later extensions added it? I don't know...

            --
            Nadav Har'El | Tuesday, Apr 10 2001, 17 Nisan 5761
            nyh@... |-----------------------------------------
            Phone: +972-53-245868, ICQ 13349191 |I couldn't think of an insteresting
            http://nadav.harel.org.il |signature to put here... Maybe next time.
          • mulix
            ... empirically sure. when writing the excersize, we searched in all of the pascal books we found, and none of them made any mention of this. perhaphs it is a
            Message 5 of 11 , Apr 10, 2001
            • 0 Attachment
              On Tue, 10 Apr 2001, Nadav Har'El wrote:
              > On Tue, Apr 10, 2001, mulix wrote about "RE: [hackers-il] [colloq@...: Shimon Schocken on Tu esday 05/06/2001]":
              > > > 2) What do you mean by "no return from functions"? IIRC you call a function
              > > > and get a returned value, no?
              > >
              > > of course, of course. i was referring to a return in the middle of a
              > > function, once you discover an error condition or a predicate cannot be
              > > fulfilled. also, since the code i wrote used a back tracking (recursive)
              > > algorithm, being able to return in the middle of a function was crucial.
              >
              > Several people repeated this "fact", that Pascal doesn't have a statement
              > to return in the middle of the function. Are you sure??? I haven't programmed

              empirically sure. when writing the excersize, we searched in all of the
              pascal books we found, and none of them made any mention of this. perhaphs
              it is a frowned upon idiom?

              > Pascal for quite a few years, but I seem to remember it had a "return"
              > statement. In fact, I remember arguing with the Metargel in the course
              > "Mavo Lemachshev Pascal" who deducted points for using "return" - eventually
              > I got him to admit (if I remember correctly) that there is such a statement
              > but it is considered "muktze michamat mius", like C's "goto".

              c's goto is a painful subject for me. i happen to think that using c's
              goto in controlled circumstances, like omer described in another post and
              can be seen copiously in kernel sources, is a pretty neat technique.
              unfortunately, i have refrained from using it in all technion assignments,
              to spare myself from arguing with TAs. of course this only means i get
              deducted points for other unorthodox coding methods which the TAs are not
              familiar with, but i've never shied away from a good argument :)

              case in point, in one excersize in matam i used a) extern to support a
              single global log object in a c project and b) implemented myself a matrix
              object we were given an object file for (which i considered buggy). this
              lead to the ta's automatic compilation tests breaking on my code in new
              and spectacular ways. i got 50 on the exercise, and after 30 minutes of
              explaining to the teacher's assistants why what i did was both legal and a
              good idea, got my grade boosted to 110 (there was a trivial bonus).

              > Perhaps the Wirth's original Pascal didn't have a return statement, and
              > only later extensions added it? I don't know...

              i'm curious if anyone is using pascal in the "real world". i do know of
              a few places using "object pascal" (borland's delphi).
              --
              mulix
              http://www.advogato.com/person/mulix

              linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead
            • Omer Musaev
              ... I had heard of someone who was used Pascal as intermediate code for complex distributed control system. The system was scriptable in very syntax-sugared
              Message 6 of 11 , Apr 10, 2001
              • 0 Attachment
                > -----Original Message-----
                > From: mulix [mailto:mulix@...]
                ...
                > I'm curious if anyone is using Pascal in the "real world". I
                > do know of
                > a few places using "object Pascal" (Borland's Delphi).

                I had heard of someone who was used Pascal as intermediate code
                for complex distributed control system.

                The system was scriptable in very syntax-sugared language, which was
                translated to Pascal, compiled and passed to backend as object code.

                I learned that the approach was a success.

                > --
                > mulix
                > http://www.advogato.com/person/mulix
                >
                > linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead
              • Nadav Har'El
                ... Hmmm... I looked again at an old Pascal program I had, and it was an exit statement that returned from a function (not called return as I thought). And
                Message 7 of 11 , Apr 10, 2001
                • 0 Attachment
                  On Tue, Apr 10, 2001, mulix wrote about "Re: [hackers-il] [colloq@...: Shimon Schocken on Tu esday 05/06/2001]":
                  > > Several people repeated this "fact", that Pascal doesn't have a statement
                  > > to return in the middle of the function. Are you sure??? I haven't programmed
                  >
                  > empirically sure. when writing the excersize, we searched in all of the
                  > pascal books we found, and none of them made any mention of this. perhaphs
                  > it is a frowned upon idiom?

                  Hmmm... I looked again at an old Pascal program I had, and it was an "exit"
                  statement that returned from a function (not called "return" as I thought).
                  And some website digging I found the following in the Gnu Pascal manual
                  http://didaktik.physik.uni-essen.de/~gnu-pascal/gpc_286.html#SEC286

                  "'Exit' leaves the currently executed procedure or function.
                  `Exit' is a UCSD Pascal extension. GNU Pascal does not support all
                  uses of `Exit' but only those defined in Borland Pascal."

                  So I guess "exit" appeared in UCSD Pascal, and then copied to Borland's
                  "Turbo Pascal" (at least from version 4, which was the first version I
                  used). I bet it exists in any modern Pascal implementation...
                  Actually, UCSD pascal dates back to 1978, which predates the ISO standard
                  (1983) or Borland's Turbo Pascal, or even Kernighan's paper. I don't see
                  how the metargelim, or even Kernighan can claim that Pascal doesn't have
                  an "exit" statement - Wirth's original Pascal from 1970 is just as irrelevant
                  as the Fortran original 1956 standard... I haven't read the 1983 standard
                  though - perhaps they decided not to except the "exit" extension, even
                  though all implementations had it?

                  BTW, Turbo Pascal also had (if I remember correctly) a "break" statement
                  to exit loops that Kernighan writes that Pascal doesn't have... I guess that
                  modern pascal compilers fixed some of the things that bothered him :)

                  --
                  Nadav Har'El | Tuesday, Apr 10 2001, 17 Nisan 5761
                  nyh@... |-----------------------------------------
                  Phone: +972-53-245868, ICQ 13349191 |How long a minute depends on what side
                  http://nadav.harel.org.il |of the bathroom door you're on.
                Your message has been successfully submitted and would be delivered to recipients shortly.