Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39686
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Looking for a JavaScript interpreter |
| Date | 2021-03-18 05:47 +0100 |
| Organization | PointedEars Software (PES) |
| Message-ID | <1930786.oMNUckLgyt@PointedEars.de> (permalink) |
| References | <20210317154200.2f685719d07aa0270fea6a3c@g{oogle}mail.com> |
Anton Shepelev wrote: > What interpreters can you suggest for learing JavaScript? First I would strongly recommend that you familiarize yourself with the subject matter. You have several misconceptions there to clear before you can begin developing (ECMAScript-based) software successfully: You will NOT be learning one programming language named ”JavaScript”, but basically several programming languages, some of which have “JavaScript” in their name, that are very similar because they are based on, or are implementations of, the same language standard, ECMAScript. In which programming language your program is considered to have been written will mostly be determined *at runtime* and depends on the runtime environment and the implementation that it supports. Therefore, you will have to learn to write code in a way that is most compatible without sacrificing too much efficiency. Since there are many different editions of ECMAScript, and several implementations whose many versions implement them partially or not at all, the standard leaves some wiggle room (implementation-dependent behavior), and not all language features can be detected, doing this robustly *and* efficiently is *hard*, and requires a lot of experience. Expect that process to take several *years*, and you will have to keep up as changes are introduced into the standard every year. While writing the code, one uses code checkers like ESLint, which can be integrated into an IDE, to avoid major pitfalls. Second, there is no interpreter as such. In all relevant cases, programs written in ECMAScript-based programming languages are JIT-*compiled*. Scripting engines like Mozilla SpiderMonkey (used to) compile them to bytecode which is then interpreted; scripting engines like Google V8 compile them to machine code which is executed directly. > I can't seem to find a light and simple stand-alone > interpreter, not developed by a mega-corporation and > distributed as a small executable, That probably has to do with the fact that you are searching for a *standalone* *interpreter*, which for the reasons mentioned above does not exist. The only interpreter I know would have to be one that interprets bytecode, and it is usually contained in the code of the virtual machine of the scripting engine. > so that I can develop JavaScript programs in my favourite general-purpose > IDE or text editor, without reliance upon a browser or huge specialised > IDE. I need something like the Tiny C Compiler for the C language -- a > standalone minimalistic tool. The main difference between ECMAScript-based programming languages and languages like C is that the former are *scripting* languages: They are general-purpose programming languages, but standalone they are useless: Always there has to be a *runtime environment* that has to provide an API such that its features can be accessed using the languages. See also the ECMAScript Support Matrix referred by my signature. > Such scripting languages as Lua and Python provide official > open-source interpreters Actually, Python source code is JIT-compiled to bytecode (.pyc files), and then *the bytecode* is interpreted by a VM, too. In many cases (for another example: Perl) this is how scripting languages actually work. > with ready binaries for all major OSes. Does JavaScript has anything like > that? There are some implementations with “JavaScript” in their name whose scripting engine is provided as a binary. One of them is Google V8 JavaScript. > I looking for a Windows interpreter, No problem, although you may have to compile it first. > preferably supporting Windows XP. A very bad idea. -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Looking for a JavaScript interpreter Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-03-17 15:42 +0300
Re: Looking for a JavaScript interpreter "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-03-17 06:33 -0700
Re: Looking for a JavaScript interpreter Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-03-17 18:24 +0300
Re: Looking for a JavaScript interpreter "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-03-17 11:50 -0700
Re: Looking for a JavaScript interpreter Jon Ribbens <jon+usenet@unequivocal.eu> - 2021-03-17 15:39 +0000
Re: Looking for a JavaScript interpreter JJ <jj4public@gmail.com> - 2021-03-18 01:43 +0700
Re: Looking for a JavaScript interpreter Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-03-18 05:47 +0100
Re: Looking for a JavaScript interpreter Jean-Francois Moine <moinejf@free.fr> - 2021-03-18 09:36 +0100
Re: Looking for a JavaScript interpreter Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-03-18 12:07 +0100
Re: Looking for a JavaScript interpreter Jean-Francois Moine <moinejf@free.fr> - 2021-03-18 15:28 +0100
Re: Looking for a JavaScript interpreter Anton Shepelev <antonius@freeshell.de> - 2021-03-18 18:56 +0300
Re: Looking for a JavaScript interpreter Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-03-18 15:57 +0300
Re: Looking for a JavaScript interpreter "dcwh...@gmail.com" <dcwhatthe@gmail.com> - 2021-07-27 17:51 -0700
Re: Looking for a JavaScript interpreter "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-07-28 08:26 -0700
csiph-web