| Deutsch English Français Italiano |
|
<87h69hfnmz.fsf@doppelsaurus.mobileactivedefense.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat <rweikusat@talktalk.net> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Command Languages Versus Programming Languages Date: Sat, 12 Oct 2024 14:37:24 +0100 Lines: 46 Message-ID: <87h69hfnmz.fsf@doppelsaurus.mobileactivedefense.com> 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> Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net hS3l0CY3n9LndBHrHVcuEgduyTkAJpFj+3Mtp5CkinCx0v9EQ= Cancel-Lock: sha1:XDJU5N73LzkfoTYev1aGpMCKha8= sha1:pkp3sUPxPKs6LxLDrTiQMFUVRYc= sha256:o9/QAr9K0o4ijdfdObwtf9LwkD+kuZ8agSawDTneWgU= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Bytes: 3231 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. Example for this: [rw@doppelsaurus]/tmp#cat a.sh ed a.sh <<'TT' >/dev/null 2>&1 9,$d wq TT echo `expr $i + 0` i=`expr $i + 1` test $i = 11 && exit sed -n '5,8p' a.sh | tee -a a.sh >/dev/null This is a script printing the numbers from 0 to 10 by exploiting the property that /bin/sh is an interpeter. 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. Eg, the Java compiler transforms Java source code into Java bytecode which is then usually executed by the jvm. OTOH, processors capable of executing Java bytecode directly exit or at least used to exist. ARM CPUs once had an extension for that (Jazelle).