Extending Python Syntax with @

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Roth

    #61
    Re: Extending Python Syntax with @


    "Peter Hickman" <peter@semantic o.com> wrote in message
    news:405187fd$0 $2803$afc38c87@ news.easynet.co .uk...[color=blue]
    > Cameron Laird wrote:[color=green]
    > > Forth. Lisp. Tcl.[/color]
    >
    > I was thinking of even less than that. Just define a few flow control
    > things and get everything out of the objects. I expect it would look
    > either like lisp or smalltalk.
    >
    > There would only be one built in datatype, the message, and all the
    > objects would chuck messages around. Thus the language as such would
    > have a very limited syntax.
    >
    > load Object.class;
    > load Stream.class;
    >
    > x = new Object;
    > s = new Stream;
    >
    > s.print x.to_string;
    >
    > So we have declare variables, load classes and pass messages.'[/color]

    Have you looked at Io?

    John Roth


    Comment

    • John Roth

      #62
      Re: Extending Python Syntax with @

      "Y2KYZFR1" <jarrodhroberso n@yahoo.com> wrote in message
      news:c718a6cf.0 403112149.1b3d0 e78@posting.goo gle.com...[color=blue]
      > Ben Finney <bignose-hates-spam@and-benfinney-does-too.id.au> wrote in[/color]
      message news:<slrnc4v69 6.lhs.bignose-hates-spam@iris.polar .local>...[color=blue][color=green]
      > > On Wed, 10 Mar 2004 16:50:58 -0500, John Roth wrote:[color=darkred]
      > > > Someday people will get over their attachment with being able to write
      > > > programs with any old text editor that happens to be lying around, and
      > > > being able to print their programs without needing a special
      > > > formatting program, but that day isn't today, and I doubt if it's
      > > > tomorrow.[/color]
      > >
      > > I doubt it's ever, because such a day would have to be preceded by the
      > > day when programs no longer need to be inspected, maintained or
      > > transferred between systems not specifically set up as developer
      > > workstations.[/color]
      >
      > funny thing is VB has survived this long just because you HAVE to have
      > the IDE to edit the code. That is one of the biggest selling points of
      > VB.[/color]
      [color=blue]
      > It should not be an issue, just make all the IDE's cross platform.
      >
      > All the worth while Java IDE's are cross platform. Intellij IDEA and
      > Together.
      > Maybe Eclipse but it is pretty buggy compared to the commerical
      > offerings.[/color]

      Java IDEs are cross platform because they're in Java, which is
      cross-platform. IDLE is cross-platform because it's written in
      Python, which is cross-platform.
      [color=blue]
      > That is what Python is missing is an quality IDE that is cross
      > platform. All the ones out now suck when compared to something like
      > IDEA or Together.[/color]

      Well, yes. I tried using IDLE, and the little things that didn't work
      the way I expected (or work at all) made me go back to PythonWin.
      PythonWin is hardly ideal either: it's just based on a very good
      editor. You can't use the Bicycle Repair Man refactoring plugin,
      and the run facility sucks. It's just better than IDLE.

      There are supposed to be Python plugins for Eclipse, but every time
      I look for them I find stuff that is so far from ready for prime time that
      they're embarassing.
      [color=blue]
      > anyone that thinks about following up this post with anything about vi
      > or emacs can just stop right now and go back to their hole.[/color]


      Comment

      • Peter Hickman

        #63
        Re: Extending Python Syntax with @

        John Roth wrote:[color=blue]
        > Have you looked at Io?[/color]

        It's on my list after I've had a go at lua

        Comment

        • Josiah Carlson

          #64
          Re: Extending Python Syntax with @

          > How much real development (I don't mean archiving) do we do[color=blue]
          > today on systems without appropriate tools? Very little. The issue
          > isn't trying to develop on systems without appropriate tools, it's
          > developers that won't use tools that help them work.[/color]

          One class of people: end users.

          Usually, end users don't need to have an IDE, they just use (not write)
          software without a care in the world. Occasionally, they need to edit
          something (it happens to everyone at some time), and they need to break
          out a text editor. Usually this is an INI file, but there are scenarios
          with applications that ship with an interpreter (Freedom Force) that
          allow people to change them.

          Really the ultimate question is whether we (computer scientists,
          engineers, or anyone who programs) want to limit programming to those
          with an IDE? I think doing so is wasteful, and requires people who want
          to do minor editing to deal with learning a new application, just to
          edit some minor sources.

          Personally, I find most standard IDEs to be bloated pieces of shit.
          When did it become reasonable to need 100+ megs to edit source code?

          - Josiah

          Comment

          • Bas

            #65
            use -&gt; instead of lambda??

            David MacQuigg <dmq@gain.com > wrote in message news:<s2vu409di o5vc9ndl81dcint eagrkpntf5@4ax. com>...[color=blue]
            > Seems like we need a simple way to extend Python syntax that doesn't
            > break existing syntax or clash with any other syntax in Python, is
            > easy to type, easy to read, and is clearly distinct from the "base"
            > syntax. Seems like we could put the @ symbol to good use in these
            > situations. Examples:
            > [...]
            > @x,y:x*x+y*y -- anonymous function
            > [...]
            > It certainly beats adding ugly statements like 'lambda'.[/color]

            Couldn't we use -> instead??

            This wouldn't introduce the the @ symbol (currently forbidden??), but
            only uses symbols that are already used. It is thus just another
            operator. The -> symbol is already used a lot in the help strings, so
            why not use it in the language also?? Maple (symbolic math program)
            also uses -> for anonymous functions.

            Comment

            • Peter Hansen

              #66
              Re: use -&gt; instead of lambda??

              Bas wrote:[color=blue]
              > Couldn't we use -> instead??[/color]

              We could use %--*(): and it still wouldn't be any better. Just because
              the characters are all used elsewhere is no advantage. It's still ugly,
              meaningless punctuation that makes the code less readable.

              -Peter

              Comment

              • Donn Cave

                #67
                Re: use -&gt; instead of lambda??

                In article <0Iq4c.2774$G3. 22476@localhost >,
                Peter Hansen <peter@engcorp. com> wrote:
                [color=blue]
                > Bas wrote:[color=green]
                > > Couldn't we use -> instead??[/color]
                >
                > We could use %--*(): and it still wouldn't be any better. Just because
                > the characters are all used elsewhere is no advantage. It's still ugly,
                > meaningless punctuation that makes the code less readable.[/color]

                I'm hoping he was joking, but I guess you never know. Surely
                there's some humor to be gotten out of the notion that we could
                make lambda work better for Python programming by changing its
                name from "lambda" to "@".

                Donn Cave, donn@u.washingt on.edu

                Comment

                • Ixokai

                  #68
                  Re: Extending Python Syntax with @

                  > >This is all semantics, probably, but I don't believe you can make a[color=blue][color=green]
                  > >strong case that yield is an ill-chosen name.[/color]
                  >
                  > It's not ill chosen, just arbitrary. I would be just as happy with
                  > 'rtn' or 'tsr' or any fanciful word that doesn't convey a _wrong_
                  > meaning.[/color]

                  To me, it conveys the perfect meaning. All it takes is having the
                  right mindset. You yield in traffic; you let someone go along before
                  you and then continue on.. that's what generators are, perfectly.

                  Yes, only one definition of 'yield' fits Python's usage-- but that's
                  infinately better then "Like return, but different".

                  What happens if you have a second type of 'return-like' statement?

                  @@return? @return@?

                  If someone is learning a language, they'll always run into keywords
                  and such that they do not understand. So they have to look them
                  up. No big deal. Afterwards, when they get the mindset of how to
                  think in them, it sticks-- they can then glance down and remember,
                  and /know/, what's going on.

                  It becomes again pseudocode-that-works: 'yield X' means, 'give
                  off X and let the control continue on its way, i'll be continued later'.

                  However, something like '@return X' wouldn't accomplish the same
                  result, in my opinion. For some people it'll be too easy to just ignore
                  the punctuation and think 'return', when its very important that they
                  not think 'return' in this case. For others, it'll always catch their eyes
                  and make them pause and think-- which variant of return is this?

                  A new keyword in this instance is perfect: its totally different, and
                  totally
                  seperate from the behavior of 'return', so someone can't just pass it
                  by with assumptions of 'return', and once they learn what it is, it sticks.

                  --Stephen


                  Comment

                  • Russell Wallace

                    #69
                    Re: Extending Python Syntax with @

                    On Wed, 10 Mar 2004 18:15:57 -0500, "John Roth"
                    <newsgroups@jhr othjr.com> wrote:
                    [color=blue]
                    >How much real development (I don't mean archiving) do we do
                    >today on systems without appropriate tools? Very little. The issue
                    >isn't trying to develop on systems without appropriate tools, it's
                    >developers that won't use tools that help them work.[/color]

                    I'll happily use a fancy tool when I find one that doesn't suck. If
                    and when that ever happens, I'll be willing to start considering using
                    a language that requires such.

                    --
                    "Sore wa himitsu desu."
                    To reply by email, remove
                    the small snack from address.

                    Comment

                    • John Roth

                      #70
                      Re: Extending Python Syntax with @

                      "Russell Wallace" <wallacethinmin tr@eircom.net> wrote in message
                      news:4059deac.7 4176280@news.ei rcom.net...[color=blue]
                      > On Wed, 10 Mar 2004 18:15:57 -0500, "John Roth"
                      > <newsgroups@jhr othjr.com> wrote:
                      >[color=green]
                      > >How much real development (I don't mean archiving) do we do
                      > >today on systems without appropriate tools? Very little. The issue
                      > >isn't trying to develop on systems without appropriate tools, it's
                      > >developers that won't use tools that help them work.[/color]
                      >
                      > I'll happily use a fancy tool when I find one that doesn't suck. If
                      > and when that ever happens, I'll be willing to start considering using
                      > a language that requires such.[/color]

                      Well, two points. First, why does it have to be a "fancy"
                      tool? The only editors I use basically have syntax highlighting
                      and code folding (at least, I think that's what it's called.)
                      There are a lot of other features I'd like to have, but I'm not
                      about to spend time with a learning curve that needs a full
                      mountaineering outfit to scale.

                      Second, what is it about which tools that you don't like?
                      Be specific, I'm sure that at least some of the tool vendors
                      would like feedback on their pride and joy.

                      John Roth
                      [color=blue]
                      >
                      > --
                      > "Sore wa himitsu desu."
                      > To reply by email, remove
                      > the small snack from address.
                      > http://www.esatclear.ie/~rwallace[/color]


                      Comment

                      • Heather Coppersmith

                        #71
                        Re: Extending Python Syntax with @

                        On Thu, 18 Mar 2004 12:58:03 -0500,
                        "John Roth" <newsgroups@jhr othjr.com> wrote:
                        [color=blue]
                        > Second, what is it about which tools that you don't like? Be
                        > specific, I'm sure that at least some of the tool vendors would
                        > like feedback on their pride and joy.[/color]

                        Every IDE is built around a text editor. Software development is
                        executing processes and procedures, i.e., workflow. No IDE is
                        quite like $EDITOR and $SHELL, which I have been using for
                        <mumble> years. Operating $EDITOR is hard-wired into my fingers.
                        Customizing and extending $EDITOR in my own arguably convoluted
                        ways, and writing $SHELL scripts/programs/tools for my own
                        workflow habits, increases my comfort and my productivity.
                        If/when IDE developers realize how personal $EDITOR and my
                        personal collection of $SHELL tools have become, and if/when
                        $EDITOR becomes a drop-in replacement widget for the IDE(s) in
                        question, there's a chance that that IDE may approach the
                        productivity and comfort levels I acheive using $EDITOR and
                        $SHELL.

                        Remember USCD Pascal?

                        Excel : Visual Basic :: IDE : Programming Language.

                        The typical SmallTalk or Lisp environment might come close, but
                        their footprints are larger than Sasquatch's. Also, those
                        environments, when done right, are SmallTalk or Lisp "all the way
                        down" into the OS, which makes for a more homogenous experience
                        than what I usually feel like I get with today's "modern" IDEs
                        glued atop an OS and a GUI.

                        End of rant. Sorry.

                        Regards,
                        Heather

                        --
                        Heather Coppersmith
                        That's not right; that's not even wrong. -- Wolfgang Pauli

                        Comment

                        • Derek Ledbetter

                          #72
                          Re: Extending Python Syntax with @

                          On Fri, 12 Mar 2004 9:08:10 -0800, Josiah Carlson wrote
                          (in message <c2sqva$dp0$1@n ews.service.uci .edu>):
                          [color=blue]
                          > Personally, I find most standard IDEs to be bloated pieces of shit.
                          > When did it become reasonable to need 100+ megs to edit source code?[/color]

                          Not all IDEs are this large. For instance, Apple's Project Builder
                          (version 2.1) is 2.6 MB, while the Mac version of CodeWarrior Pro 8 is
                          9.9 MB. These sizes are just the executables, and don't include
                          compilers, linkers, libraries, headers, documentation and examples. But
                          you would need all these things for a command line based development
                          environment.

                          --
                          Derek Ledbetter
                          derekl@serve.co m

                          Heavy boots of lead
                          fills his victims full of dread
                          Running as fast as they can
                          Iron Man lives again!


                          Comment

                          • Josiah Carlson

                            #73
                            Re: Extending Python Syntax with @

                            >>Personally, I find most standard IDEs to be bloated pieces of shit.[color=blue][color=green]
                            >>When did it become reasonable to need 100+ megs to edit source code?[/color]
                            >
                            > Not all IDEs are this large. For instance, Apple's Project Builder
                            > (version 2.1) is 2.6 MB, while the Mac version of CodeWarrior Pro 8 is
                            > 9.9 MB. These sizes are just the executables, and don't include
                            > compilers, linkers, libraries, headers, documentation and examples. But
                            > you would need all these things for a command line based development
                            > environment.[/color]

                            I never said /all/, I said /most/.

                            In the same vein as your reply, a standard Python install is somewhere
                            around 30 megs and includes Idle (not quite an IDE, but it gets the job
                            done). DJGPP (a c/c++ compiler for dos) is also around 30 megs
                            installed, and includes an IDE, compiler, linker, libaries, headers, etc.

                            However, if we were to take a look at some standard tools that current
                            university students and even a measurable portion of industry
                            professionals use; Eclipse, MS Visual Studio, and others, you'll note
                            the tendency of bloat.

                            - Josiah

                            Comment

                            • Russell Wallace

                              #74
                              Re: Extending Python Syntax with @

                              On Thu, 18 Mar 2004 12:58:03 -0500, "John Roth"
                              <newsgroups@jhr othjr.com> wrote:
                              [color=blue]
                              >Well, two points. First, why does it have to be a "fancy"
                              >tool? The only editors I use basically have syntax highlighting
                              >and code folding (at least, I think that's what it's called.)
                              >There are a lot of other features I'd like to have, but I'm not
                              >about to spend time with a learning curve that needs a full
                              >mountaineeri ng outfit to scale.[/color]

                              Well then we're agreed, neither of us uses fancy tools :) (Don't know
                              what code folding is, but I also like syntax highlighting.)
                              [color=blue]
                              >Second, what is it about which tools that you don't like?
                              >Be specific, I'm sure that at least some of the tool vendors
                              >would like feedback on their pride and joy.[/color]

                              I wouldn't imagine any of them read comp.lang.pytho n, but the main
                              point is that basic functionality needs to be smooth, fast, 100%
                              reliable, not needing you to take your hands off the keyboard or
                              provide more than 2 keystrokes per operation or install third party
                              libraries or entrust your source code to a binary database, etc etc.
                              Get hold of Brief (the 1980s-vintage DOS programming editor) and get
                              to the point where you can do everything it does, not necessarily in
                              the same way, but just as smoothly and easily. _Then_ worry about
                              whiz-bang features.

                              --
                              "Sore wa himitsu desu."
                              To reply by email, remove
                              the small snack from address.

                              Comment

                              • Josiah Carlson

                                #75
                                Re: Extending Python Syntax with @

                                Well, two points. First, why does it have to be a "fancy"[color=blue][color=green]
                                >>tool? The only editors I use basically have syntax highlighting
                                >>and code folding (at least, I think that's what it's called.)
                                >>There are a lot of other features I'd like to have, but I'm not
                                >>about to spend time with a learning curve that needs a full
                                >>mountaineerin g outfit to scale.[/color]
                                >
                                > Well then we're agreed, neither of us uses fancy tools :) (Don't know
                                > what code folding is, but I also like syntax highlighting.)[/color]


                                The above link will show you what code folding looks like. Look at the
                                function definitions.

                                - Josiah

                                Comment

                                Working...