Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Script or program?

by jeffpflueger (Beadle)
on Jan 10, 2004 at 16:45 UTC ( [id://320336]=perlmeditation: print w/replies, xml ) Need Help??

Is consciousness more analogous to a script or a program?
What do you think?
-Jeff

update: OK....the point of the question is this:

The definitions of a script and a program are hazy. Making a distinction between the two is therefore difficult. Also difficult to define is 'consciousness'. The point of the question is to ask us in a simple way to attempt to make a logical comparison between things that we can't really define. And that is a situation we don't encounter often encounter in programming, but that we encounter constantly in life.

Replies are listed 'Best First'.
Re: Script or program?
by cchampion (Curate) on Jan 10, 2004 at 17:03 UTC

    OK. I'll bite. :-)

    Is happiness more like a subroutine or a class method?

    Is cleverness more like an array of tricks or a hash of tips?

    Your move.

Re: Script or program?
by zentara (Archbishop) on Jan 10, 2004 at 18:05 UTC
    I think conciousness is having your i/o ports open. At least the input ports. It dosn't matter if it's a script or program.
      I think conciousness is having your i/o ports open.

      Funny you should mention that. I/O seems to me to have quite a lot to do with the difference (if there is one) between a script and some other program that is not a script. I tend to think of a script as involving a minimum of user interaction (or none). It can ask the user questions and still be a script, but when you start getting into the realm of pulldown menus and key shortcuts and stuff, is it still a script, even though its actions are determined dynamically rather than being scripted? I tend to think of it more as an application at that point.

      Consciousness, of course, is an operating system, because it's what makes it possible for you to carry out any other mental activity, and any mental activity you carry out is within the bounds of your consciousness.


      $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

          I think conciousness is having your i/o ports open

      Huh... it reminds me of something that when I was 8 years old that a 93 year old man in my town told me that has stuck with me for years. He said: "notice that you have 2 ears, 2 eyes, and only one mouth. I think that means the Great Spirit meant for people to observe and listen with their ears twice as much as they talk."

      Yes. He was an American Native but I'm not sure what tribe/nation he belonged to.

      Program or script? I agree with zentara. I make no distinction between them in the context we are speaking of.


      Peter L. Berghold -- Unix Professional
      Peter at Berghold dot Net
         Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.
        I read something similar in a Peanuts cartoon once. Charlie Brown was talking to Linus and said: "You have two ears and one mouth, therefore listening is more important than talking. You have two eyes and one nose, therefore seeing is more important than smelling." At that point Snoopy came racing thru and knocked both of them over. Afterwards, Linus said: "And four legs?" to which Charlie Brown replied: "I guess running is more important than anything." :-)


        "Ex libris un peut de tout"
Re: Script or program?
by b10m (Vicar) on Jan 10, 2004 at 17:09 UTC
    "Is consciousness more analogous to a script or a program?
    What do you think?"

    I don't think, therefore I am not, and thus I have no consciousness, so I can't help you here...

    --
    b10m

      This is in my sig too: "Cogito cogito ergo cogito sum" or I think that I think, therefore I think that I am.

      "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce

Re: Script or program?
by PodMaster (Abbot) on Jan 11, 2004 at 06:29 UTC
    Like Juerd said, this is a FAQ, `perldoc -q script'
    Found in C:\Perl\lib\pod\perlfaq1.pod
      Is it a Perl program or a Perl script?
        Larry doesn't really care. He says (half in jest) that "a script is what
        you give the actors. A program is what you give the audience."
    
        Originally, a script was a canned sequence of normally interactive
        commands--that is, a chat script. Something like a UUCP or PPP chat
        script or an expect script fits the bill nicely, as do configuration
        scripts run by a program at its start up, such .cshrc or .ircrc, for
        example. Chat scripts were just drivers for existing programs, not
        stand-alone programs in their own right.
    
        A computer scientist will correctly explain that all programs are
        interpreted and that the only question is at what level. But if you ask
        this question of someone who isn't a computer scientist, they might tell
        you that a *program* has been compiled to physical machine code once and
        can then be run multiple times, whereas a *script* must be translated by
        a program each time it's used.
    
        Perl programs are (usually) neither strictly compiled nor strictly
        interpreted. They can be compiled to a byte-code form (something of a
        Perl virtual machine) or to completely different languages, like C or
        assembly language. You can't tell just by looking at it whether the
        source is destined for a pure interpreter, a parse-tree interpreter, a
        byte-code interpreter, or a native-code compiler, so it's hard to give a
        definitive answer here.
    
        Now that "script" and "scripting" are terms that have been seized by
        unscrupulous or unknowing marketeers for their own nefarious purposes,
        they have begun to take on strange and often pejorative meanings, like
        "non serious" or "not real programming". Consequently, some Perl
        programmers prefer to avoid them altogether.
    
    
    I personally stopped caring a long time ago. With perl I use both terms interchangably, but don't generally call javascript I write programs.

    update: What the hey? Consciousness? I guess I missed that word. Consciousness is a state, so the answer is I still don't care :)(both or neither, not one or the other)

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Script or program?
by exussum0 (Vicar) on Jan 10, 2004 at 17:52 UTC
    The difference between a script and a program is one is a subset of another. A program is typically a piece of text that contains instructions. A script is a program that is interpreted in real time and then turns it into a lower level language. Of course, that leaves java, which isn't a script language, in a fuzzy definition.

    As someone taught me, the opposite of black isn't white. The opposite of black is non-black. Think ven diagrams. :)

    So the real question is, is, is consciousness a script or non-script. I think it's both. As a non-script program, we have things we don't need to put prior thought into.. things we may or may not even have a definite solution on. As a script program, we have problems and run through different scenarios, sketching out many solutions and scenarios in our heads and then running then thinking them out to see if they are really valid.

    That's part of what makes us human, the ability to improvise and act upon it.


    Play that funky music white boy..
      The difference between a script and a program is one is a subset of another. A program is typically a piece of text that contains instructions. A script is a program that is interpreted in real time and then turns it into a lower level language. Of course, that leaves java, which isn't a script language, in a fuzzy definition.

      I agree that one is a subset of the other, but differ in your idea of what constitutes a script. To me, a program (in the computer programming sense) is a sequence of instructions for a computer to execute. These instructions can be in any form, assembly, C, Perl, byte code, whatever. A script is exactly the same thing but bent towards the human side of readability rather the computer side of readability. Scripts are most often higher-level languages because of this and I think the idea that "scripts are interpretted in real time" falls out of this merely as a matter of consequence. The higher-level the language the greater it's scriptiness

      If I created a C interpretter would the C programs I write for it suddenly be scripts? I don't think so. By your definition they would be. Scriptness is innate in the language, not the implementation. So, Java programs are also Java scripts in this sense. But that's just my opinion

      I think the whole idea of "script" vs "program" is sort of meaningless these days though. In the old days it meant interpretted vs. compiled, but that dichotomy has gotten fuzzier with time.

Re: Script or program?
by zby (Vicar) on Jan 10, 2004 at 23:15 UTC
    Who said consciousness is analogous? It might be digital.

      From what I remember of my physiology, it is frequency modulated. (Assuming, of course, that you believe that nervous activity is the source of consciousness.)

      Elgon

      "It's not easy having a good time - Smiling even makes my face ache."
              - Frank N. Furter, The Rocky Horror Picture Show

Re: Script or program?
by talexb (Chancellor) on Jan 11, 2004 at 05:16 UTC

    How do you differentiate a script from a program? Is it the difference between an explicit compile step (e.g., C) and an implcit compile (e.g., Perl)?

    Fortunately, I drink (Molson Canadian, presently), therefore I am. Conscious, that is.

    Alex / talexb / Toronto

    Life is short: get busy!

      Perl doesn't compile implicitly - its very explicit about it. It just goes and keeps switching from compile to execute back and forth. Saying perl -e 'use strict; use warnings' flip-flops some half a dozen times just on its own.
Re: Script or program?
by eduardo (Curate) on Jan 11, 2004 at 00:43 UTC
    According to MW consciousness is the quality or state of being aware especially of something within oneself or the state or fact of being conscious of an external object, state, or fact. To me, that sounds like signal handling and program environment... I think consciousness is more like the %SIG and %ENV hashes.

      Heh. I guess that says a lot about humankind and the state of the world today, given that the default action for signals is to ignore it or let someone else deal with it, and the environment is considered tainted...

Re: Script or program?
by EdwardG (Vicar) on Jan 11, 2004 at 12:02 UTC
    What do you think?

    I think you're asking a meretricious question that has no meaningful answer.

Re: Script or program?
by Abigail-II (Bishop) on Jan 12, 2004 at 00:05 UTC
    Is consciousness more analogous to a script or a program?
    Is green more analogous to Wednesday or September?

    Abigail

      Yes, but only in the afternoon.

      /J

Re: Script or program?
by DrHyde (Prior) on Jan 12, 2004 at 09:44 UTC
    daddy or chips?
Re: Script or program?
by Art_XIV (Hermit) on Jan 12, 2004 at 16:48 UTC

    Conciousness is more analogous to a daemon, of course.

    Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"
Re: Script or program?
by johndageek (Hermit) on Jan 12, 2004 at 20:03 UTC
    The point of the question is to ask us in a simple way to attempt to make a logical comparison between things that we can't really define.

    There is nothing we can define, other than by comparing and contrasting to our previous experiences. Concsiousness also requires desire, for without desire there would be no reason to attempt something more than once, or to try someting in a different way than has already been recorded.

    I do not believe there can be a passive consciousness, as an ability to modify your environment (even in such a small way as a baby moving it's hand for the first time)allows you to create a loop environment where an output (or action) will have a detectable effect via an input channel.

    This leaves us in an interesting place.

    I think ,therefore I think I am, I think.

    I think you think therefore, I think you think you think you are, you think, I think.

    dageek (I think)

Script (Re: Script or program?)
by sleepingsquirrel (Chaplain) on Jan 12, 2004 at 18:28 UTC
    The answer is: script. Because you're more likely to get the eval construct with scripts.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://320336]
Approved by jonnyfolk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-23 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found