style question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jorgen Grahn

    #16
    Re: style question

    On Thu, 29 Jun 2006 15:31:53 -0700, Scott David Daniels <scott.daniels@ acm.org> wrote:
    ....[color=blue][color=green]
    >> I like well-typeset code in print though. Bjarne Stroustrup uses an elegant
    >> system for C++ code, ....[/color][/color]
    [color=blue]
    > See Knuth on Literate Programming and the "Web" systems (e.g. CWeb).
    > His goal is to look good typeset with explanation, and extract-to-compile.[/color]

    Yes, I'm aware of Knuth's work, and didn't mean to imply that Stroustrup did
    something revolutionary -- although his book and Bertrand Meyer's Eiffel
    book are the only ones I've read which try do something elegant with the
    code typesetting.

    I haven't read Knuth until now, so I assumed he typeset the actual code
    parts fixed-width. I see in the CWeb manual that that's not the case.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
    \X/ snipabacken.dyn dns.org> R'lyeh wgah'nagl fhtagn!

    Comment

    • Jorgen Grahn

      #17
      Re: style question

      On Thu, 29 Jun 2006 23:19:34 +0200, Fredrik Lundh <fredrik@python ware.com> wrote:[color=blue]
      > Jorgen Grahn wrote:
      >[color=green][color=darkred]
      >>> assuming fixed-pitch fonts isn't very Pythonic, though; to get reliable indentation
      >>> no matter what font you're using, you can write [...][/color]
      >>
      >> Since when? I've always coded, in all languages I've ever used[1], under the
      >> assumption that the reader will view it with a fixed-pitch (or whatever the
      >> proper term is) font. I assumed everyone else did, too.[/color]
      >
      > that's a popular myth.[/color]

      I'm sorry, you will have to come up with some real references to convince me
      (a PEP or preferrably something not Python-specific). Or not, because I will
      keep assuming a fixed-width font in my programming anyway. Living the myth!

      /Jorgen

      --
      // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
      \X/ snipabacken.dyn dns.org> R'lyeh wgah'nagl fhtagn!

      Comment

      • Jorgen Grahn

        #18
        Non-ASCII languages (was: Re: style question)

        On Thu, 29 Jun 2006 23:19:34 +0200, Fredrik Lundh <fredrik@python ware.com> wrote:[color=blue]
        > Jorgen Grahn wrote:[/color]
        ....[color=blue][color=green]
        >> (I like well-typeset code in print though. Bjarne Stroustrup uses an elegant
        >> system for C++ code, where identifiers and strings are in Times italic,
        >> operators in Courier, and so on.)[/color]
        >
        > the idea of printing everything in courier (or some other monospace
        > font) is a rather new idea; if you read seventies stuff, the program
        > code is often as carefully designed as the rest of the document.[/color]

        Possibly true, and definitely for Knuth. But WYSIWYG was unknown at the
        time; these people all programmed using fixed-width fonts, on teletypes or
        character-mapped terminals. Hell, even full-screen editors were new and
        controversial until the late 1970s!

        Program editing and displaying/typesetting can be treated as separate from
        each other. Personally, I think they /should/ be -- I prefer troff or LaTeX
        to MS Word, after all.
        [color=blue]
        > (for an indication that we might be moving back to nicely rendered code,
        > see Sun's new Fortress language, which provides extraordinarily detailed
        > control over how identifiers are rendered, including extensive support
        > for Unicode and math notation. it also mandates the use of proportional
        > fonts for things like identifiers and comments...)[/color]

        And Sun apparently think they should not be separate.
        To me, it looks like they are planning for this language to fail.

        If I wanted to try out this language, I would have to give up most of my
        existing toolbox -- which works flawlessly with everything from TI assembly
        to Python. And what would people discuss on comp.lang.fortr ess? Google
        destroys Python code well enough ...

        /Jorgen

        --
        // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
        \X/ snipabacken.dyn dns.org> R'lyeh wgah'nagl fhtagn!

        Comment

        • Nick Maclaren

          #19
          Re: Non-ASCII languages (was: Re: style question)


          In article <slrneachsh.2t1 .grahn+nntp@fra ilea.sa.invalid >,
          Jorgen Grahn <grahn+nntp@sni pabacken.dyndns .org> writes:
          |>
          |> Possibly true, and definitely for Knuth. But WYSIWYG was unknown at the
          |> time; these people all programmed using fixed-width fonts, on teletypes or
          |> character-mapped terminals. Hell, even full-screen editors were new and
          |> controversial until the late 1970s!

          A slight niggle - WYSIWYG wasn't unknown, just both rare and not yet
          called that! I have programmed using devices with half-line shifts,
          real backspacing and so on - and some languages did mandate that a
          character created by overprinting was to be treated as a composite
          character.

          Also, there were full-screen editors for things like IBM 3270s, though
          they were absolutely ghastly for editing text (being designed for form
          filling).

          I agree with you that neither those days nor gimmicky approaches like
          that of Fortress are worth pursuing. One of the main reasons that
          'program proving' has never taken off outside its cabal is that it
          uses bizarre notations unlike anything else on earth that can't be
          edited in a normal fashion.


          Regards,
          Nick Maclaren.

          Comment

          • Scott David Daniels

            #20
            Re: Non-ASCII languages

            Jorgen Grahn wrote:[color=blue]
            > On Thu, 29 Jun 2006 23:19:34 +0200, Fredrik Lundh <fredrik@python ware.com> wrote:[color=green]
            >> Jorgen Grahn wrote:[/color]
            > ...[color=green][color=darkred]
            >>> (I like well-typeset code in print though....[/color][/color]
            > Possibly true, and definitely for Knuth. But WYSIWYG was unknown at the
            > time; these people all programmed using fixed-width fonts, on teletypes or
            > character-mapped terminals. Hell, even full-screen editors were new and
            > controversial until the late 1970s![/color]
            Sorry, I'm old enough to have a few problems with this. WYSIWIG was
            indeed well known at the time, and disparaged as WYSIAYG around where I
            worked (What You See Is All You Get). We had full screen editors, with
            proportional fonts; SAIL (Stanford AI Lab) had the first laser printer
            to play with (people wrote incredibly ugly documents with tons of fonts
            in them because it was the first they could spec it). All of this was
            in the mid seventies or earlier.

            --Scott David Daniels
            scott.daniels@a cm.org

            Comment

            • Tim Roberts

              #21
              Re: Non-ASCII languages

              Scott David Daniels <scott.daniels@ acm.orgwrote:
              >
              >SAIL (Stanford AI Lab) had the first laser printer
              >to play with (people wrote incredibly ugly documents with tons of fonts
              >in them because it was the first they could spec it).
              "Ransom note syndrome." Virtually everyone falls prey to this the first
              few times they discover desktop publishing.
              >All of this was in the mid seventies or earlier.
              Right. It surprises many people to learn that virtually everything we
              think of as modern and interesting in computer science was first explored
              in the 1960s and early 1970s. GUIs, color, 3D, structured progamming,
              networking, interpreters, Unix; the list goes on and on. It was probably
              the most exciting time in the history of computers.
              --
              - Tim Roberts, timr@probo.com
              Providenza & Boekelheide, Inc.

              Comment

              • Scott David Daniels

                #22
                Re: Non-ASCII languages

                Tim Roberts wrote:
                It surprises many people to learn that virtually everything we
                think of as modern and interesting in computer science was first explored
                in the 1960s and early 1970s. GUIs, color, 3D, structured progamming,
                networking, interpreters, Unix; the list goes on and on. It was probably
                the most exciting time in the history of computers.
                Here I think you're wrong, my vote is the 1940s:
                First time for tons of stuff, fate of the world hangs in the
                balance, no idea if some of this is going to work, ....
                Essentially all the crypto push with top secret machines decoding
                German traffic, and the desperate attempt to crack the Japanese
                Purple system. I expect the efforts at Bletchley Park, Princeton,
                numerous unnamed locations, and even Germany and Japan were pulse-
                pounding. In the sixties and seventies we were just having immense
                fun making things go, at least by comparison.

                --Scott David Daniels
                scott.daniels@a cm.org

                Comment

                Working...