Re: Command Languages Versus Programming Languages

Liste des GroupesRevenir à cu shell 
Sujet : Re: Command Languages Versus Programming Languages
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.misc
Date : 30. Mar 2024, 02:01:45
Autres entêtes
Organisation : None to speak of
Message-ID : <87il14si3a.fsf@nosuchdomain.example.com>
References : 1 2 3 4
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 29.03.2024 21:59, Lawrence D'Oliveiro wrote:
On Fri, 29 Mar 2024 10:37:22 +0100, Janis Papanagnou wrote:
 
Program text is initially text.[*] During parsing (either in
an interpreted or in a compiled language) you split the text
in tokens.
 
And then, how do you interpret the tokens?
>
In an interpreter the tokens are interpreted, in a compiler
they are subject to the parsing. (But you know that I'm sure.)

Are you suggesting that interpreters don't parse their input?  No doubt
there are interpreters that handle tokens one at a time, but shells
typically don't work that way.

There are a lot of different ways to distinguish between languages like
sh/ksh/bash that are normally interpreted and languages like C that are
normally compiled to machine code:

- Is the language primarily designed for interactive command-line use?
- Is the language normally compiled to machine code?
- Is the language compiled by some kind of byte code that is then
  interpreted?  Is that byte code *sometimes* translated to machine
  code?
- Is foo treated by default as a string or as an identifier?
  (Treating it as a string is convenient for interactive use.)
- Does a syntax error on line 10 prevent lines 1-9 from being executed?

I don't think *any* of these distinctions are fundamental.

For example, a Perl or Python program/script is parsed and "compiled"
into some in-memory form before execution begins.  A syntax error
prevents the entire script from being executed.  In Bourne-line shells,
a syntax error won't be detected until execution reaches that line.
(Things like Perl's BEGIN and eval can complicate things.)

Shells also have to parse their input, though it's done a bit
differently.  Typically the entire script isn't parsed as a unit.

[...]

So what is  'for i in a ; do ... ; done'  then in your world?
>
This is one of many basic shell constructs that I use in shell
programming (not "shell scripting") regularly.

I use it both in shell scripting/programming and interactively.

And the entire construct needs to be processed before the shell can
begin to execute it.  Misspelling "done" prevents the whole thing from
running.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
29 Mar 24 * Command Languages Versus Programming Languages649Lawrence D'Oliveiro
29 Mar 24 +- Re: Command Languages Versus Programming Languages1candycanearter07
29 Mar 24 +* Re: Command Languages Versus Programming Languages19Janis Papanagnou
29 Mar 24 i+* Re: Command Languages Versus Programming Languages15Lawrence D'Oliveiro
30 Mar 24 ii`* Re: Command Languages Versus Programming Languages14Janis Papanagnou
30 Mar 24 ii +* Re: Command Languages Versus Programming Languages3Janis Papanagnou
30 Mar 24 ii i`* Re: Command Languages Versus Programming Languages2Keith Thompson
30 Mar 24 ii i `- Re: Command Languages Versus Programming Languages1Janis Papanagnou
30 Mar 24 ii +* Re: Command Languages Versus Programming Languages6Lawrence D'Oliveiro
30 Mar 24 ii i+* Re: Command Languages Versus Programming Languages3Keith Thompson
30 Mar 24 ii ii`* Re: Command Languages Versus Programming Languages2Lawrence D'Oliveiro
30 Mar 24 ii ii `- Re: Command Languages Versus Programming Languages1Keith Thompson
30 Mar 24 ii i`* Re: Command Languages Versus Programming Languages2Janis Papanagnou
30 Mar 24 ii i `- Re: Command Languages Versus Programming Languages1Lawrence D'Oliveiro
30 Mar 24 ii +* Re: Command Languages Versus Programming Languages3Keith Thompson
30 Mar 24 ii i`* Re: Command Languages Versus Programming Languages2Janis Papanagnou
30 Mar 24 ii i `- Re: Command Languages Versus Programming Languages1Keith Thompson
31 Mar 24 ii `- Re: Command Languages Versus Programming Languages1Lawrence D'Oliveiro
29 Mar 24 i`* Re: Command Languages Versus Programming Languages3Stefan Ram
30 Mar 24 i `* Re: Command Languages Versus Programming Languages2Janis Papanagnou
30 Mar 24 i  `- Re: Command Languages Versus Programming Languages1Lawrence D'Oliveiro
29 Mar 24 +* Re: Command Languages Versus Programming Languages168Muttley
29 Mar 24 i+- Re: Command Languages Versus Programming Languages1Josef Möllers
29 Mar 24 i+* Re: Command Languages Versus Programming Languages9Richard Kettlewell
29 Mar 24 ii`* Re: Command Languages Versus Programming Languages8Muttley
29 Mar 24 ii `* Re: Command Languages Versus Programming Languages7Kaz Kylheku
29 Mar 24 ii  `* Re: Command Languages Versus Programming Languages6Muttley
29 Mar 24 ii   `* Re: Command Languages Versus Programming Languages5Kaz Kylheku
30 Mar 24 ii    `* Re: Command Languages Versus Programming Languages4Muttley
30 Mar 24 ii     +- Re: Command Languages Versus Programming Languages1Janis Papanagnou
30 Mar 24 ii     `* Re: Command Languages Versus Programming Languages2Kaz Kylheku
1 Apr 24 ii      `- Re: Command Languages Versus Programming Languages1Muttley
29 Mar 24 i`* Re: Command Languages Versus Programming Languages157John Ames
29 Mar 24 i +* Re: Command Languages Versus Programming Languages155Muttley
29 Mar 24 i i+- Re: Command Languages Versus Programming Languages1John Ames
29 Mar 24 i i+* Re: Command Languages Versus Programming Languages149Kaz Kylheku
29 Mar 24 i ii`* Re: Command Languages Versus Programming Languages148Muttley
29 Mar 24 i ii +* Re: Command Languages Versus Programming Languages146Kaz Kylheku
29 Mar 24 i ii i+* Re: Command Languages Versus Programming Languages4David W. Hodgins
29 Mar 24 i ii ii+* Re: Command Languages Versus Programming Languages2Johanne Fairchild
30 Mar 24 i ii iii`- Re: Command Languages Versus Programming Languages1David W. Hodgins
30 Mar 24 i ii ii`- Re: Command Languages Versus Programming Languages1Janis Papanagnou
30 Mar 24 i ii i`* Re: Command Languages Versus Programming Languages141Muttley
30 Mar 24 i ii i `* Re: Command Languages Versus Programming Languages140Kaz Kylheku
1 Apr 24 i ii i  `* Re: Command Languages Versus Programming Languages139Muttley
1 Apr 24 i ii i   +* Re: Command Languages Versus Programming Languages137Johanne Fairchild
1 Apr 24 i ii i   i`* Re: Command Languages Versus Programming Languages136Muttley
1 Apr 24 i ii i   i +- Re: Command Languages Versus Programming Languages1Kaz Kylheku
2 Apr 24 i ii i   i `* Re: Command Languages Versus Programming Languages134Johanne Fairchild
2 Apr 24 i ii i   i  +* Re: Command Languages Versus Programming Languages113ram@zedat.fu-berlin.de (Stefan Ram)
2 Apr 24 i ii i   i  i+* Re: Command Languages Versus Programming Languages111Stefan Ram
2 Apr 24 i ii i   i  ii+* Re: Command Languages Versus Programming Languages109Stefan Ram
3 Apr 24 i ii i   i  iii`* Re: Command Languages Versus Programming Languages108Lawrence D'Oliveiro
3 Apr 24 i ii i   i  iii `* Re: Command Languages Versus Programming Languages107David Brown
3 Apr 24 i ii i   i  iii  +- Re: Command Languages Versus Programming Languages1Lawrence D'Oliveiro
3 Apr 24 i ii i   i  iii  +- Re: Command Languages Versus Programming Languages1John Ames
3 Apr 24 i ii i   i  iii  `* Re: Command Languages Versus Programming Languages104Keith Thompson
3 Apr 24 i ii i   i  iii   +* Re: Command Languages Versus Programming Languages99Richard Kettlewell
4 Apr 24 i ii i   i  iii   i+- Re: Command Languages Versus Programming Languages1Muttley
4 Apr 24 i ii i   i  iii   i`* Re: Command Languages Versus Programming Languages97Stefan Ram
5 Apr 24 i ii i   i  iii   i `* Re: Command Languages Versus Programming Languages96Lawrence D'Oliveiro
5 Apr 24 i ii i   i  iii   i  +* Re: Command Languages Versus Programming Languages49Muttley
5 Apr 24 i ii i   i  iii   i  i+* Re: Command Languages Versus Programming Languages3candycanearter07
5 Apr 24 i ii i   i  iii   i  ii`* Re: Command Languages Versus Programming Languages2Muttley
6 Apr 24 i ii i   i  iii   i  ii `- Re: Command Languages Versus Programming Languages1candycanearter07
6 Apr 24 i ii i   i  iii   i  i`* Re: Command Languages Versus Programming Languages45Lawrence D'Oliveiro
6 Apr 24 i ii i   i  iii   i  i `* Re: Command Languages Versus Programming Languages44Alan Bawden
6 Apr 24 i ii i   i  iii   i  i  +* Re: Command Languages Versus Programming Languages13Lawrence D'Oliveiro
8 Apr 24 i ii i   i  iii   i  i  i`* Re: Command Languages Versus Programming Languages12John Ames
9 Apr 24 i ii i   i  iii   i  i  i `* Re: Command Languages Versus Programming Languages11Lawrence D'Oliveiro
9 Apr 24 i ii i   i  iii   i  i  i  +* Re: Command Languages Versus Programming Languages9John Ames
9 Apr 24 i ii i   i  iii   i  i  i  i`* Re: Command Languages Versus Programming Languages8Richard Kettlewell
9 Apr 24 i ii i   i  iii   i  i  i  i +* Re: Command Languages Versus Programming Languages2Janis Papanagnou
9 Apr 24 i ii i   i  iii   i  i  i  i i`- Re: Command Languages Versus Programming Languages1Richard Kettlewell
9 Apr 24 i ii i   i  iii   i  i  i  i `* Re: Command Languages Versus Programming Languages5David Brown
9 Apr 24 i ii i   i  iii   i  i  i  i  `* Re: Command Languages Versus Programming Languages4Lawrence D'Oliveiro
9 Apr 24 i ii i   i  iii   i  i  i  i   `* Re: Command Languages Versus Programming Languages3David Brown
10 Apr 24 i ii i   i  iii   i  i  i  i    `* Re: Command Languages Versus Programming Languages2Lawrence D'Oliveiro
10 Apr 24 i ii i   i  iii   i  i  i  i     `- Re: Command Languages Versus Programming Languages1Kaz Kylheku
9 Apr 24 i ii i   i  iii   i  i  i  `- Re: Command Languages Versus Programming Languages1Kaz Kylheku
6 Apr 24 i ii i   i  iii   i  i  +* Re: Command Languages Versus Programming Languages3Kaz Kylheku
6 Apr 24 i ii i   i  iii   i  i  i`* Re: Command Languages Versus Programming Languages2David Brown
6 Apr 24 i ii i   i  iii   i  i  i `- Re: Command Languages Versus Programming Languages1Muttley
6 Apr 24 i ii i   i  iii   i  i  +- Re: Command Languages Versus Programming Languages1candycanearter07
6 Apr 24 i ii i   i  iii   i  i  `* Re: Command Languages Versus Programming Languages26Muttley
7 Apr 24 i ii i   i  iii   i  i   +* Re: Command Languages Versus Programming Languages22Alan Bawden
8 Apr 24 i ii i   i  iii   i  i   i`* Re: Command Languages Versus Programming Languages21Muttley
8 Apr 24 i ii i   i  iii   i  i   i `* Re: Command Languages Versus Programming Languages20David Brown
8 Apr 24 i ii i   i  iii   i  i   i  `* Re: Command Languages Versus Programming Languages19Muttley
8 Apr 24 i ii i   i  iii   i  i   i   +* Words to the wise (Was: Command Languages Versus Programming Languages)2Kenny McCormack
8 Apr 24 i ii i   i  iii   i  i   i   i`- Re: Words to the wise (Was: Command Languages Versus Programming Languages)1Muttley
8 Apr 24 i ii i   i  iii   i  i   i   `* Re: Command Languages Versus Programming Languages16Kaz Kylheku
8 Apr 24 i ii i   i  iii   i  i   i    +* Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)9Kenny McCormack
9 Apr 24 i ii i   i  iii   i  i   i    i`* Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)8Janis Papanagnou
9 Apr 24 i ii i   i  iii   i  i   i    i +- Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)1D
9 Apr 24 i ii i   i  iii   i  i   i    i `* Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)6candycanearter07
9 Apr 24 i ii i   i  iii   i  i   i    i  `* Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)5Janis Papanagnou
9 Apr 24 i ii i   i  iii   i  i   i    i   +- Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)1candycanearter07
10 Apr 24 i ii i   i  iii   i  i   i    i   `* Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)3Lawrence D'Oliveiro
10 Apr 24 i ii i   i  iii   i  i   i    i    +- Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)1Chris Elvidge
10 Apr 24 i ii i   i  iii   i  i   i    i    `- Re: Phrases that should be banned on Usenet (Was: Command Languages Versus Programming Languages)1candycanearter07
9 Apr 24 i ii i   i  iii   i  i   i    `* Re: Command Languages Versus Programming Languages6Muttley
8 Apr 24 i ii i   i  iii   i  i   +- [meta] Re: Command Languages Versus Programming Languages1Janis Papanagnou
10 Apr 24 i ii i   i  iii   i  i   `* Re: Command Languages Versus Programming Languages2Keith Thompson
5 Apr 24 i ii i   i  iii   i  `* Re: Command Languages Versus Programming Languages46Janis Papanagnou
3 Apr 24 i ii i   i  iii   `* Re: Command Languages Versus Programming Languages4David Brown
2 Apr 24 i ii i   i  ii`- Re: Command Languages Versus Programming Languages1Kaz Kylheku
2 Apr 24 i ii i   i  i`- Re: Command Languages Versus Programming Languages1Kaz Kylheku
2 Apr 24 i ii i   i  `* Re: Command Languages Versus Programming Languages20Lawrence D'Oliveiro
1 Apr 24 i ii i   `- Re: Command Languages Versus Programming Languages1Lawrence D'Oliveiro
1 Apr 24 i ii `- Re: Command Languages Versus Programming Languages1Andreas Eder
29 Mar 24 i i+- Re: Command Languages Versus Programming Languages1Christian Weisgerber
30 Mar 24 i i+* Re: Command Languages Versus Programming Languages2David Brown
30 Sep 24 i i`- Re: Command Languages Versus Programming Languages1Bozo User
29 Mar 24 i `- Re: Command Languages Versus Programming Languages1Kaz Kylheku
29 Mar 24 +* Re: Command Languages Versus Programming Languages451Johanne Fairchild
29 Mar 24 +* Re: Command Languages Versus Programming Languages2David Brown
30 Mar 24 +* Re: Command Languages Versus Programming Languages3Dmitry A. Kazakov
30 Sep 24 `* Re: Command Languages Versus Programming Languages4Bozo User

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal