Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #24781

Re: "i = i|0"

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript, comp.lang.c
Subject Re: "i = i|0"
Followup-To comp.lang.javascript
Date 2014-06-12 20:01 +0200
Organization PointedEars Software (PES)
Message-ID <2396275.g7lyTkyHjg@PointedEars.de> (permalink)
References (6 earlier) <lnc5s2$df8$1@dont-email.me> <2122350.lP4zVSTnZj@PointedEars.de> <lnc9o6$7tk$1@dont-email.me> <1894582.2ZI1QNF3Jn@PointedEars.de> <5399D2AA.6010100@verizon.net>

Cross-posted to 2 groups.

Followups directed to: comp.lang.javascript

Show all headers | View raw


[F'up2 comp.lang.javascript]

James Kuyper wrote in comp.lang.c:

> On 06/12/2014 11:13 AM, Thomas 'PointedEars' Lahn wrote:
>> James Kuyper wrote:
>>> On 06/12/2014 08:45 AM, Thomas 'PointedEars' Lahn wrote:
>>>> [F'up2 comp.lang.javascript]
>>> Noted, and ignored. Explanation in last paragraph.
>> 
>> Noted, and rejected.  We are _not_ discussing C anymore.\
> 
> Where does this "We" come from? You are, of course, free to discuss
> anything you wish. I, however, am still discussing the accuracy of the
> connection between the original C code and the JavaScript produced by
> Emscripten, a topic for which comp.lang.c is still an appropriate
> cross-reference. The minute that this thread ceases to have a valid C
> connection, I will also lose interest in it.

Please point out the word or paragraph in your posting that contains or 
refers to C code.  If you reasonably cannot, you should reconsider.

> ...
>>> so I'm still not sure what the cross-reference was intended to convey.
>> There is no programming language called ”javascript”, and from that
>> everything else follows.  STFW.
> 
> I did indeed search the Web. The Wikipedia page for JavaScript says
> "JavaScript (JS) is a dynamic computer programming language". so you'll
> have to forgive me for thinking that there might be some truth in that
> statement.

First one has to define what “dynamic programming language” means.
 
> There's nothing unusual about Wikipedia being incorrect - but if so,
> would you or anyone else who cares about the issue care to correct that
> article? If so, how would you correct it?

I would, and I have a long time ago.  I am not convinced that further 
editing would be worthwhile.  The misconception of a single language appears 
to be cemented too deeply into the thinking of the general public.  Not just 
this article, all related lemmata on Wikipedia need a clean-up.  But I am 
going to edit it again if and when I find the time.
 
>>> From your comments earlier, I assume it's something about the case.
>> It is not just about the case, and I wonder which of my comments could
>> have mislead you to that assumption.
> 
> "... newsgroup name is case-insensitive ... You would not talk about “c”
> either, ..."

That refers to the fact that you cannot infer from the newsgroup name the 
spelling of the language (or the topics in the newsgroup, which actually is 
a standard and several programming languages based on it, along with host-
defined APIs like the DOM that are *not* part of any implementation of the 
standard).
 
> That's not enough evidence to prove anything, but you were being too coy
> to explain what you actually meant, so I was left with having to guess
> what you were talking about based upon the limited amount of available
> evidence.

I had not expected the ECMAScript Support Matrix to malfunction this way; 
IIRC it had worked yesterday.  I also had not expected that you would not 
research the newsgroup and the Web more thoroughly before you posted.  I 
prefer to not repeat myself.  Have you tried a Web cache yet?  If not, why 
not?
 
> ...
>>> Or should it be JavaScript?
>> 
>> Only if an ECMAScript implementation of that name is meant.  Since there
>> are now several such ones that differ considerably (I count three major
>> ones; the fourth name is just marketing), I would prefix them with the
>> vendor name or engine codename to avoid the ambiguity.
> 
> The Wikipedia page for JavaScript says that "JavaScript was formalized
> in the ECMAScript language standard ...", which seem to imply that
> JavaScript and ECMAScript are both valid terms, possibly referring to
> subtly different things.

The Wikipedia article is wrong there, too.  The first Edition of ECMAScript 
formalized common features of Netscape JavaScript 1.1 (released 1996-08 with 
Netscape 3.0) and Microsoft’s extended copycat of Netscape JavaScript 1.0 
that they called JScript 1.0 (released 1996-08 with Internet Explorer 3.0).  
The Specification text itself confirms that (any Edition).
 
> The OP called it JavaScript, without any prefix.

Which begs the question which “JavaScript” they are talking about.  It is 
instead very likely that they have no clue which language(s) they are 
talking about.

> He was talking about Emscripten. The Emscripten web page
> <https://github.com/kripken/emscripten/wiki> also calls what it produces
> JavaScript, without any prefix.

Most people do not know what they are talking about, doubly so on this 
topic.

> I don't think I'm competent to judge whether or not it would be correct to
> take what they said about "JavaScript", and treat it as if were an an
> equivalent statement about "ECMAScript". Can you confirm that such a
> conversion would be correct?

It would not.  ECMAScript is the standard; “JavaScript” is contained in the 
name of some implementations of it (borrowing from the original).  The 
standard is very lenient, therefore its implementations can and do differ 
greatly if you know where to look.

> I certainly have no basis on which to choose a vendor name to use as a
> prefix. Would you care to identify the appropriate vendor?

Of the ECMAScript implementations that I would consider “major”, there are 
Netscape/Mozilla JavaScript, Google V8 JavaScript and KDE JavaScript that 
contain the “JavaScript” name standalone.  The original JavaScript, of 
course, is Netscape JavaScript, with Mozilla JavaScript as its open-source 
free-software successor (at least those parts that are licensed under MPL 
2.0 or later).  “Internet Explorer JavaScript” is just a Micro$~1 marketing 
scam; its real name is Microsoft JScript 9+ (codename “Chakra”), supported 
by MSHTML 9+.
 
> Do the differences between those different versions of ECMAScript affect
> the validity of Emscripten's translation of this C code?  If so, how? 

There are no versions of ECMAScript.  There is the ECMAScript Language 
Specification, there are Editions of it, and implementations of those.  I do 
not know which syntactic features of which Edition of ECMAScript Emscripten 
employs, and I suspect code analysis would take long.  I am not aware of any 
differences in the implementation of the “|” operator that we discussed 
here; however, I understand now that the code it generates has little to do 
with the actual statements that are being executed (like, “|0” being just a 
type marker for asm.js aso.)

Insofar there is doubt whether Emscripten/asm.js would be on-topic here in 
the first place (the same as, e.g., there was resistance discussing 
CoffeeScript here).

> If not, there's no point in worrying about which one is being referred to.

Wrong.  The used implementation is defined by the runtime environment.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: "i = i|0" Ike Naar <ike@iceland.freeshell.org> - 2014-06-11 21:09 +0000
  Re: "i = i|0" James Kuyper <jameskuyper@verizon.net> - 2014-06-11 17:37 -0400
    Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 00:56 +0200
      Re: "i = i|0" raltbos@xs4all.nl (Richard Bos) - 2014-06-12 11:41 +0000
        Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 14:28 +0200
      Re: "i = i|0" James Kuyper <jameskuyper@verizon.net> - 2014-06-12 08:19 -0400
        Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 14:45 +0200
          Re: "i = i|0" James Kuyper <jameskuyper@verizon.net> - 2014-06-12 09:25 -0400
            Re: "i = i|0" raltbos@xs4all.nl (Richard Bos) - 2014-06-12 14:50 +0000
              Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 16:55 +0200
                Re: "i = i|0" Keith Thompson <kst-u@mib.org> - 2014-06-12 11:28 -0700
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 20:46 +0200
                Re: "i = i|0" Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-12 20:58 +0200
                Re: "i = i|0" Kaz Kylheku <kaz@kylheku.com> - 2014-06-12 19:20 +0000
                Re: "i = i|0" Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-12 22:13 +0200
                Re: "i = i|0" Kaz Kylheku <kaz@kylheku.com> - 2014-06-12 21:15 +0000
                Re: "i = i|0" Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-12 23:59 +0200
                Re: "i = i|0" Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-13 01:10 +0200
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-13 01:52 +0200
                ECMAScript standards (was: "i = i|0") Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-15 12:53 +0200
                Re: "i = i|0" Stephen Sprunk <stephen@sprunk.org> - 2014-06-12 17:11 -0500
                Re: "i = i|0" Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-12 22:40 +0000
                Re: "i = i|0" glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-06-12 22:44 +0000
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-13 01:16 +0200
                Re: "i = i|0" raltbos@xs4all.nl (Richard Bos) - 2014-06-16 12:55 +0000
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-16 22:44 +0200
                Re: "i = i|0" Thomas Richter <thor@math.tu-berlin.de> - 2014-06-13 19:16 +0200
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-13 19:21 +0200
                Re: "i = i|0" Tim Streater <timstreater@greenbee.net> - 2014-06-13 18:24 +0100
                Re: "i = i|0" Kaz Kylheku <kaz@kylheku.com> - 2014-06-13 21:25 +0000
            Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 17:13 +0200
              Re: "i = i|0" raltbos@xs4all.nl (Richard Bos) - 2014-06-12 15:20 +0000
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 17:32 +0200
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-17 12:30 +0200
              Re: "i = i|0" James Kuyper <jameskuyper@verizon.net> - 2014-06-12 12:17 -0400
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 20:01 +0200
                Re: "i = i|0" James Kuyper <jameskuyper@verizon.net> - 2014-06-12 16:13 -0400
                Re: "i = i|0" glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-06-12 20:44 +0000
                Re: "i = i|0" Kaz Kylheku <kaz@kylheku.com> - 2014-06-12 20:59 +0000
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-13 01:22 +0200
                Re: "i = i|0" Martin Shobe <martin.shobe@yahoo.com> - 2014-06-12 19:48 -0500
                Re: "i = i|0" "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-12 18:32 -0700
                Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-13 12:12 +0200
                Re: "i = i|0" John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-13 10:16 +0100
                Re: "i = i|0" Tim Streater <timstreater@greenbee.net> - 2014-06-13 11:44 +0100
          Re: "i = i|0" "BartC" <bc@freeuk.com> - 2014-06-12 15:06 +0100
            Re: "i = i|0" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-12 16:54 +0200

csiph-web