Re: Is Python programming language?

Discussion in 'Python' started by Stephane Wirtel, Feb 8, 2013.

  1. Stephane Wirtel, Feb 8, 2013
    #1
    1. Advertising

  2. On 2013-02-08, Stephane Wirtel <> wrote:
    > * gmspro <> [2013-02-08 05:03:51 -0800]:
    >
    >> Hello all,
    >>
    >> One said, Python is not programming language, rather scripting language, is that true?
    >>
    >> Thanks.
    >>

    >
    >> --
    >> http://mail.python.org/mailman/listinfo/python-list

    >
    > What's the difference ?


    IMO, a "scripting language" is used to automate tasks that would
    otherwise be done by a human sitting at a keyboard typing commands.
    [Perhaps that definition should be extended to include tasks that
    would otherwise by done by a human sitting and clicking on a GUI.]


    > http://openerp.com OpenERP is written with Python and this is an ERP,
    > Youtube is written with Python and used by Google.


    IMO, neither one of those is replacing a person typing commands or
    clicking buttons, so neither of those are "scripting" applications.

    --
    Grant Edwards grant.b.edwards Yow! I want EARS! I want
    at two ROUND BLACK EARS
    gmail.com to make me feel warm
    'n secure!!
    Grant Edwards, Feb 8, 2013
    #2
    1. Advertising

  3. On 02/09/2013 04:26 PM, Tim Roberts wrote:
    > Most people would call bash a "scripting language", but it is also clearly
    > a programming language. It has syntax, variables and expressions. I
    > suspect it is Turing-complete, although I haven't seen a proof of that.
    >
    > I would assert that scripting languages are a proper subset of programming
    > languages, not a separate category.


    I'm pretty sure Bash is turing complete. I know it's been shown that
    sed is turing complete, and awk probably is too! If I recall, the way
    to show a language is turing complete is to implement a turing machine
    in it. I'm pretty sure bash could handle that, though maybe with help
    from a standard set of unix tools one always finds used in conjunction
    with the shell. Here's one implementation:

    https://github.com/thulsadum/bash-turing-machine/blob/master/turing.sh

    I would say that "scripting language" isn't a definition of a type of
    language, but rather a description of how a language is put to use in a
    particular case. For example, when embedded in a game, lua is used as a
    scripting language to automate and extend the game in certain ways, by
    exposing game objects to the lua engine and allowing interpreted lua
    code to manipulate (script) them. Javascript is the same thing in other
    programs. But whether you call javascript a scripting language in
    firefox, or something much more (as it's actualy required for firefox to
    function at all), is a matter of personal preference really.

    I've seen python embedded in apps to act as a scripting language before.
    I've also seen full-blown apps written in python.

    So yes, the distinction, as made by the original poster, isn't really
    necessary.
    Michael Torrie, Feb 9, 2013
    #3
  4. Stephane Wirtel

    Terry Reedy Guest

    On 2/9/2013 6:53 PM, Michael Torrie wrote:
    > On 02/09/2013 04:26 PM, Tim Roberts wrote:
    >> Most people would call bash a "scripting language", but it is also clearly
    >> a programming language. It has syntax, variables and expressions. I
    >> suspect it is Turing-complete, although I haven't seen a proof of that.
    >>
    >> I would assert that scripting languages are a proper subset of programming
    >> languages, not a separate category.

    >
    > I'm pretty sure Bash is turing complete. I know it's been shown that
    > sed is turing complete, and awk probably is too! If I recall, the way
    > to show a language is turing complete is to implement a turing machine


    If the language has arrays, conditional execution, and explicit (while)
    loops or recursion, you can be pretty sure it is Turing complete. I
    presume this covers awk and bash. Something like the game of Life, where
    the looping in implicit in the operation, is much harder to show Turing
    complete. I suspect sed is non-trivial also.

    --
    Terry Jan Reedy
    Terry Reedy, Feb 10, 2013
    #4
  5. Stephane Wirtel

    Terry Reedy Guest

    On 2/9/2013 6:26 PM, Tim Roberts wrote:
    > Grant Edwards <> wrote:
    >>
    >> IMO, a "scripting language" is used to automate tasks that would
    >> otherwise be done by a human sitting at a keyboard typing commands.
    >> [Perhaps that definition should be extended to include tasks that
    >> would otherwise by done by a human sitting and clicking on a GUI.]

    >
    > I think that definition is a little too neat and clean.
    >
    > Most people would call bash a "scripting language", but it is also clearly
    > a programming language. It has syntax, variables and expressions. I
    > suspect it is Turing-complete, although I haven't seen a proof of that.
    >
    > I would assert that scripting languages are a proper subset of programming
    > languages, not a separate category.


    To me, 'scripting languages' include some non-Turing-complete languages
    and I would not call those 'programming languages'.


    --
    Terry Jan Reedy
    Terry Reedy, Feb 10, 2013
    #5
  6. On 02/09/2013 07:40 PM, Terry Reedy wrote:
    > If the language has arrays, conditional execution, and explicit (while)
    > loops or recursion, you can be pretty sure it is Turing complete. I
    > presume this covers awk and bash. Something like the game of Life, where
    > the looping in implicit in the operation, is much harder to show Turing
    > complete. I suspect sed is non-trivial also.


    All you have to do to show a language is turing complete is to implement
    a turing machine in it. Here's one in sed that I found:
    http://www.catonmat.net/blog/proof-that-sed-is-turing-complete/
    Michael Torrie, Feb 10, 2013
    #6
  7. Sent from my android phone.
    On Feb 9, 2013 6:41 PM, "Terry Reedy" <> wrote:
    >
    > On 2/9/2013 6:53 PM, Michael Torrie wrote:
    >>
    >> On 02/09/2013 04:26 PM, Tim Roberts wrote:
    >>>
    >>> Most people would call bash a "scripting language", but it is also

    clearly
    >>> a programming language. It has syntax, variables and expressions. I
    >>> suspect it is Turing-complete, although I haven't seen a proof of that.
    >>>
    >>> I would assert that scripting languages are a proper subset of

    programming
    >>> languages, not a separate category.

    >>
    >>
    >> I'm pretty sure Bash is turing complete. I know it's been shown that
    >> sed is turing complete, and awk probably is too! If I recall, the way
    >> to show a language is turing complete is to implement a turing machine

    >
    >
    > If the language has arrays, conditional execution, and explicit (while)

    loops or recursion, you can be pretty sure it is Turing complete. I presume
    this covers awk and bash. Something like the game of Life, where the
    looping in implicit in the operation, is much harder to show Turing
    complete. I suspect sed is non-trivial also.

    http://en.m.wikipedia.org/wiki/Turing_completeness

    For proving something Turing-complete, you only need to prove equivalence
    to some other Turing-complete language.

    The simplest test involves three things:
    1. Sequential flow
    2. An if, while or recursive function/method call
    3. An arbitrary number of variables - arrays are optional

    Strictly speaking, no language on a real computer is fully Turing-complete,
    because real computers don't have an infinitely large memory, while TM's do.

    But it's common to handwaive past that part of the definition.

    > Terry Jan Reedy
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    Dan Stromberg, Feb 11, 2013
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Finney
    Replies:
    33
    Views:
    792
    Tim Ottinger
    Aug 17, 2003
  2. Jimmy Retzlaff
    Replies:
    1
    Views:
    305
  3. Replies:
    5
    Views:
    363
    Dennis Lee Bieber
    Aug 16, 2003
  4. Alejandro Lombardo

    Programming language from python

    Alejandro Lombardo, Dec 30, 2003, in forum: Python
    Replies:
    13
    Views:
    536
    Josef Meile
    Jan 6, 2004
  5. Casey Hawthorne
    Replies:
    4
    Views:
    995
    Jarek Zgoda
    Aug 4, 2006
Loading...

Share This Page