Deutsch   English   Français   Italiano  
<veejup$9ers$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 12 Oct 2024 20:50:51 +0100
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <veejup$9ers$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org>
 <0d2cnVzOmbD6f4z7nZ2dnZfqnPudnZ2d@brightview.co.uk>
 <uusur7$2hm6p$1@dont-email.me> <vdf096$2c9hb$8@dont-email.me>
 <87a5fdj7f2.fsf@doppelsaurus.mobileactivedefense.com>
 <ve83q2$33dfe$1@dont-email.me>
 <87wmighu4i.fsf@doppelsaurus.mobileactivedefense.com>
 <ve8s6d$3725r$1@dont-email.me>
 <87o73rj3sr.fsf@doppelsaurus.mobileactivedefense.com>
 <20241010120827.867@kylheku.com>
 <87frp3itsk.fsf@doppelsaurus.mobileactivedefense.com>
 <ve9mrh$3aiao$2@dont-email.me>
 <87jzee3ded.fsf@doppelsaurus.mobileactivedefense.com>
 <vebffc$3n6jv$1@dont-email.me> <vec3hi$3q4ms$2@dont-email.me>
 <vedcp9$3nu6$1@dont-email.me>
 <87h69hfnmz.fsf@doppelsaurus.mobileactivedefense.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 12 Oct 2024 21:50:49 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a5cd3bdac477e7da7d1ca2c55a4472a0";
	logging-data="310140"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+kp80F7O+m1eP1+UGpqVdH"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9KGYdibc1dUZmeFVFPIgAuV+fVI=
In-Reply-To: <87h69hfnmz.fsf@doppelsaurus.mobileactivedefense.com>
Content-Language: en-GB
Bytes: 3825

On 12/10/2024 14:37, Rainer Weikusat wrote:
> Muttley@DastartdlyHQ.org writes:
>> On Fri, 11 Oct 2024 20:58:26 -0000 (UTC)
>> Lawrence D'Oliveiro <ldo@nz.invalid> boring babbled:
>>> On Fri, 11 Oct 2024 15:15:57 -0000 (UTC), Muttley wrote:
>>>
>>>> On Fri, 11 Oct 2024 15:47:06 +0100
>>>> Rainer Weikusat <rweikusat@talktalk.net>:
>>>>
>>>>> The Perl compiler turns Perl source code into a set of (that's a
>>>>
>>>> Does it produce a standalone binary as output? No, so its an intepreter
>>>> not a compiler.
>>>
>>> There are two parts: the interpreter interprets code generated by the compiler.
>>
>> Code generated by a compiler does not require an interpreter.
> 
> Indeed. As far as I know the term, an interpreter is something which
> reads text from a file, parses it an checks it for syntax errors
> and then executes the code as soon as enough of it has been gathered to
> allow for execution of something, ie, a complete statement. This read,
> check and parse, execute cycle is repeated until the program
> terminates.

That would be some very old BASIC, or maybe a shell program where the 
input is a stream of lines, and each must be executed when they were 
entered (you'd never reach end-of-file otherwise!).

Most interpreters taking input from a file will compile the whole thing 
to some intermediate form first (eg. to internal bytecode). Then it will 
interpret that bytecode.

Otherwise they would be hoplessly slow.

> In contrast to this, a compiler reads the source code completely, parses
> and checks it and then transforms it into some sort of "other
> representation" which can be executed without dealing with the source
> code (text) again.

Some compilers (eg. the ones I write) can run programs from source just 
like an interpreted language. The difference here is that it first 
translates the whole program to native code rather than bytecode.

Then there are more complicated schemes which mix things up: they start 
off interpreting and turn 'hot' paths into native code via JIT techniques.