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


Groups > comp.lang.javascript > #20949 > unrolled thread

require.js in a phantomjs test fails for code that works fine in production

Started byDavid Karr <davidmichaelkarr@gmail.com>
First post2013-08-13 16:29 -0700
Last post2013-08-18 08:21 -0700
Articles 20 on this page of 45 — 12 participants

Back to article view | Back to comp.lang.javascript


Contents

  require.js in a phantomjs test fails for code that works fine in production David Karr <davidmichaelkarr@gmail.com> - 2013-08-13 16:29 -0700
    Re: require.js in a phantomjs test fails for code that works fine in production "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-08-13 16:52 -0700
      Re: require.js in a phantomjs test fails for code that works fine in production David Karr <davidmichaelkarr@gmail.com> - 2013-08-13 17:27 -0700
    Re: require.js in a phantomjs test fails for code that works fine in production Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-08-14 11:24 +0200
      Re: require.js in a phantomjs test fails for code that works fine in production John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-14 14:48 +0100
        Re: require.js in a phantomjs test fails for code that works fine in production Jim T. <x@y.z> - 2013-08-14 14:32 -0400
          Re: require.js in a phantomjs test fails for code that works fine in production Tim Streater <timstreater@greenbee.net> - 2013-08-14 19:43 +0100
        Re: require.js in a phantomjs test fails for code that works fine in production Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2013-08-15 18:51 -0300
        Re: require.js in a phantomjs test fails for code that works fine in production Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-16 02:28 +0200
          Re: require.js in a phantomjs test fails for code that works fine in production Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-08-15 20:12 -0600
          Re: require.js in a phantomjs test fails for code that works fine in production John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-16 11:29 +0100
            c.l.js (was: require.js in a phantomjs test fails for code that works fine in production) Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-16 23:57 +0200
              Re: c.l.js Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-08-18 10:17 +0200
                Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-18 15:14 +0100
              Re: c.l.js (was: require.js in a phantomjs test fails for code that works fine in production) John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-18 15:51 +0100
                Re: c.l.js Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-18 17:14 +0200
                  Re: c.l.js Tim Streater <timstreater@greenbee.net> - 2013-08-18 16:44 +0100
                    Re: c.l.js Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-18 17:52 +0200
                      Re: c.l.js Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-08-18 19:28 +0200
                      Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-19 15:42 +0100
                        Re: c.l.js Andrew Poulos <ap_prog@hotmail.com> - 2013-08-20 06:58 +1000
                          Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-20 16:10 +0100
                            Re: c.l.js Andrew Poulos <ap_prog@hotmail.com> - 2013-08-21 07:55 +1000
                              [OT] How to find messages by ID (was: c.l.js) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-08-21 06:47 +0200
                                Re: [OT] How to find messages by ID (was: c.l.js) John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-21 15:50 +0100
                                  Re: [OT] How to find messages by ID (was: c.l.js) Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-21 23:13 +0200
                                    Re: [OT] How to find messages by ID (was: c.l.js) John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-22 11:05 +0100
                                      Quoting in c.l.js (was: [OT] How to find messages by ID) Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-22 15:06 +0200
                                        Re: Quoting in c.l.js (was: [OT] How to find messages by ID) John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-24 10:05 +0100
                                          Re: Quoting in c.l.js Christoph Michael Becker <cmbecker69@arcor.de> - 2013-09-01 22:32 +0200
                                            Re: Quoting in c.l.js Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-02 00:08 +0200
                                              Re: Quoting in c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-09-02 15:52 +0100
                        Re: c.l.js Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-20 01:06 +0200
                          Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-20 16:14 +0100
                  Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-19 16:07 +0100
                    Re: c.l.js Andrew Poulos <ap_prog@hotmail.com> - 2013-08-20 07:01 +1000
                      Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-20 16:20 +0100
                        Re: c.l.js Andrew Poulos <ap_prog@hotmail.com> - 2013-08-21 08:02 +1000
                          Re: c.l.js Tim Streater <timstreater@greenbee.net> - 2013-08-20 23:29 +0100
                            Re: c.l.js Andrew Poulos <ap_prog@hotmail.com> - 2013-08-21 14:59 +1000
                              Re: c.l.js John Harris <niam@jghnorth.org.uk.invalid> - 2013-08-21 16:05 +0100
                                Re: c.l.js Andrew Poulos <ap_prog@hotmail.com> - 2013-08-22 07:43 +1000
          [FAQ] “javascript” (was: require.js in a phantomjs test fails for code that works fine in production) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-08-18 11:36 +0200
    Re: require.js in a phantomjs test fails for code that works fine in production Carlos Pedro <carlospedr@gmail.com> - 2013-08-15 04:28 -0700
    Re: require.js in a phantomjs test fails for code that works fine in production richarduie@yahoo.com - 2013-08-18 08:21 -0700

Page 1 of 3  [1] 2 3  Next page →


#20949 — require.js in a phantomjs test fails for code that works fine in production

FromDavid Karr <davidmichaelkarr@gmail.com>
Date2013-08-13 16:29 -0700
Subjectrequire.js in a phantomjs test fails for code that works fine in production
Message-ID<1e4f5146-6d0d-4161-a2ec-7c302acfbe94@googlegroups.com>
I have a small webapp whose javascript code I don't normally maintain.  I work on the back-end of the service, but that's irrelevant to the question.

I'm trying to implement javascript unit tests.  Someone helped me put together a configuration using maven, jstestrunner, phantomjs, and qunit, along with one trivial unit test.

This configuration works, except I had to add one line of code to the CUT (code under test) that the code running in production doesn't need.  It still works in production with the added line, but I need to understand why the test requires the line.

In short, one of the several .js files begins like this:

-------------------
Data.Daily = new Function();

Data.Daily.prototype = {
...
-----------------

When I run my test, I see this failure:
-------------
    at http://localhost:9080/js/require.js:1703: Can't find variable: Data, source: ReferenceError: Can't find variable: Data
-------------

I then added the following line before the first line:
-------------
var Data	= window.Data || {};
-------------

This fixes the test.  Running the app in my browser works fine both with or without this line.

I know I haven't provided much code here, but is there anything obvious here that I'm missing?

[toc] | [next] | [standalone]


#20950

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2013-08-13 16:52 -0700
Message-ID<f86ac753-c773-4107-a0ff-821aff92ebfd@googlegroups.com>
In reply to#20949
On Tuesday, August 13, 2013 6:29:33 PM UTC-5, David Karr wrote:
> I have a small webapp whose javascript code I don't normally maintain.  I work on the back-end of the service, but that's irrelevant to the question.
> 
> I'm trying to implement javascript unit tests.  Someone helped me put together a configuration using maven, jstestrunner, phantomjs, and qunit, along with one trivial unit test.
> 
> This configuration works, except I had to add one line of code to the CUT (code under test) that the code running in production doesn't need.  It still works in production with the added line, but I need to understand why the test requires the line.
> 
> In short, one of the several .js files begins like this:
> 
> -------------------
> 
> Data.Daily = new Function();
> 
> Data.Daily.prototype = {
> 
> ...
> 
> -----------------
> 
> When I run my test, I see this failure:
> 
> -------------
> 
>     at http://localhost:9080/js/require.js:1703: Can't find variable: Data, source: ReferenceError: Can't find variable: Data
> 
> -------------
> 
> I then added the following line before the first line:
> 
> -------------
> 
> var Data	= window.Data || {};
> 
> -------------
> 
> This fixes the test.  Running the app in my browser works fine both with or without this line.
> 
> I know I haven't provided much code here, but is there anything obvious here that I'm missing?

Are they in the right order?

[toc] | [prev] | [next] | [standalone]


#20951

FromDavid Karr <davidmichaelkarr@gmail.com>
Date2013-08-13 17:27 -0700
Message-ID<72689758-6afb-49c0-b3b1-a3a49a114641@googlegroups.com>
In reply to#20950
On Tuesday, August 13, 2013 4:52:30 PM UTC-7, Michael Haufe (TNO) wrote:
> On Tuesday, August 13, 2013 6:29:33 PM UTC-5, David Karr wrote:
> 
> > I have a small webapp whose javascript code I don't normally maintain.  I work on the back-end of the service, but that's irrelevant to the question.
> 
> > 
> 
> > I'm trying to implement javascript unit tests.  Someone helped me put together a configuration using maven, jstestrunner, phantomjs, and qunit, along with one trivial unit test.
> 
> > 
> 
> > This configuration works, except I had to add one line of code to the CUT (code under test) that the code running in production doesn't need.  It still works in production with the added line, but I need to understand why the test requires the line.
> 
> > 
> 
> > In short, one of the several .js files begins like this:
> 
> > 
> 
> > -------------------
> 
> > 
> 
> > Data.Daily = new Function();
> 
> > 
> 
> > Data.Daily.prototype = {
> 
> > 
> 
> > ...
> 
> > 
> 
> > -----------------
> 
> > 
> 
> > When I run my test, I see this failure:
> 
> > 
> 
> > -------------
> 
> > 
> 
> >     at http://localhost:9080/js/require.js:1703: Can't find variable: Data, source: ReferenceError: Can't find variable: Data
> 
> > 
> 
> > -------------
> 
> > 
> 
> > I then added the following line before the first line:
> 
> > 
> 
> > -------------
> 
> > 
> 
> > var Data	= window.Data || {};
> 
> > 
> 
> > -------------
> 
> > 
> 
> > This fixes the test.  Running the app in my browser works fine both with or without this line.
> 
> > 
> 
> > I know I haven't provided much code here, but is there anything obvious here that I'm missing?
> 
> 
> 
> Are they in the right order?

What is "they"?

Let me make this clear.  The original code is working fine in all major browsers.  The code with the additional "var Data" line also works fine in all major browsers.  If I don't add the "var Data" line before the "Data.Daily = new Function()" line, then the test fails.

[toc] | [prev] | [next] | [standalone]


#20952

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-08-14 11:24 +0200
Message-ID<2367596.uRJ2TEEu9r@PointedEars.de>
In reply to#20949
Do not post to Usenet via Google Groups’ Web interface, for the latter is 
FUBAR.  Some of your lines contain more than 160 characters, whereas more 
than 80 are already inappropriate.

David Karr wrote:

> I have a small webapp whose javascript code I don't normally maintain.  I
> work on the back-end of the service, but that's irrelevant to the
> question.
> 
> I'm trying to implement javascript unit tests.

There is no javascript: <http://PointedEars.de/es-matrix>

> Someone helped me put together a configuration using maven, jstestrunner
> phantomjs, and qunit, along with one trivial unit test.
> 
> This configuration works, except I had to add one line of code to the CUT
> (code under test) that the code running in production doesn't need.  It
> still works in production with the added line, but I need to understand
> why the test requires the line.
> 
> In short, one of the several .js files begins like this:
> 
> -------------------
> Data.Daily = new Function();

The best current practice to create a Function instance dynamically is

  Data.Daily = function () {};

Unless “Data” also specifies a constructor, it should be “data”.
 
> Data.Daily.prototype = {

Be aware that you reset the “constructor” property to the value of “Object” 
if you use this inheritance pattern.

> ...
> -----------------
> 
> When I run my test, I see this failure:
> -------------
>     at http://localhost:9080/js/require.js:1703: Can't find variable:
>     Data, source: ReferenceError: Can't find variable: Data
> -------------
> 
> I then added the following line before the first line:
> -------------
> var Data	= window.Data || {};

The object referred to by “window” *maybe* does not have a built-in “Data” 
property.  Do not use “window” as reference for the Global Object; in 
particular do not use the referred object as data container.  It has or 
inherits host-defined properties that you cannot know about; some of them 
may hold references to host objects.  To prevent the value of an initialized 
“data” variable from being overwritten, use

  if (typeof data == "undefined")
  {
    var data = …
  }

Those issues notwithstanding, in general your approach should work.  It does 
not even matter where in the same execution context the declaration is 
located, as (per ES 3) “variable instantiation” or (per ES 5.x) “declaration 
binding instantiation” happens before execution.  As a result, the “data” 
variable declared above will be available everywhere in that context even 
though the declaration is located in the Block statement.  [“let” in Mozilla 
JavaScript, which is planned for a future Edition of ECMAScript, (will) also 
allow for block scoping.]

> -------------
> 
> This fixes the test.  Running the app in my browser works fine both with
> or without this line.
> 
> I know I haven't provided much code here, but is there anything obvious
> here that I'm missing?

Yes.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20953

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-08-14 14:48 +0100
Message-ID<tk2n09pn04540l098qjee9tbkkdp72sejs@4ax.com>
In reply to#20952
On Wed, 14 Aug 2013 11:24:12 +0200, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:


  <snip>
>There is no javascript: <http://PointedEars.de/es-matrix>
  <snip>

javascript : A convenient name for the group of programming 
languages that use most of the syntax and semantics described in
ECMA 262.


Note that :
1) The wording ensures that languages that were in use before 
anyone started to write ECMA 262 are included in the definition.
2) The wording ensures that it doesn't matter which edition of 
ECMA 262 you are thinking of.
3) If in future some Java syntax is added to ECMASript then 'most'
might have to be replaced by 'much'.

The definition could be said to provide a post hoc justification
of this group's name, though not very convincingly.

  John

[toc] | [prev] | [next] | [standalone]


#20954

FromJim T. <x@y.z>
Date2013-08-14 14:32 -0400
Message-ID<avin09hj9ckrtlk673e83af9v01ufr58ao@4ax.com>
In reply to#20953
On Wed, 14 Aug 2013 14:48:48 +0100, John Harris
<niam@jghnorth.org.uk.invalid> wrote:

>On Wed, 14 Aug 2013 11:24:12 +0200, Thomas 'PointedEars' Lahn
><PointedEars@web.de> wrote:
>
>
>  <snip>
>>There is no javascript: <http://PointedEars.de/es-matrix>
>  <snip>
>
>javascript : A convenient name for the group of programming 
>languages that use most of the syntax and semantics described in
>ECMA 262.
>
>
>Note that :
>1) The wording ensures that languages that were in use before 
>anyone started to write ECMA 262 are included in the definition.
>2) The wording ensures that it doesn't matter which edition of 
>ECMA 262 you are thinking of.
>3) If in future some Java syntax is added to ECMASript then 'most'
>might have to be replaced by 'much'.
>
>The definition could be said to provide a post hoc justification
>of this group's name, though not very convincingly.
>
>  John

Does Thomas have similar problems with "BASIC" and "Fortran" ? After
all, there is much more diversity in the languages included under
those labels than there is under "JavaScript" . 

[toc] | [prev] | [next] | [standalone]


#20955

FromTim Streater <timstreater@greenbee.net>
Date2013-08-14 19:43 +0100
Message-ID<timstreater-AD61F6.19431614082013@news.individual.net>
In reply to#20954
In article <avin09hj9ckrtlk673e83af9v01ufr58ao@4ax.com>, Jim T. <x@y.z> 
wrote:

> On Wed, 14 Aug 2013 14:48:48 +0100, John Harris
> <niam@jghnorth.org.uk.invalid> wrote:
> 
> >On Wed, 14 Aug 2013 11:24:12 +0200, Thomas 'PointedEars' Lahn
> ><PointedEars@web.de> wrote:

> >  <snip>
> >>There is no javascript: <http://PointedEars.de/es-matrix>
> >  <snip>
> >
> >javascript : A convenient name for the group of programming 
> >languages that use most of the syntax and semantics described in
> >ECMA 262.

> >Note that :
> >1) The wording ensures that languages that were in use before 
> >anyone started to write ECMA 262 are included in the definition.
> >2) The wording ensures that it doesn't matter which edition of 
> >ECMA 262 you are thinking of.
> >3) If in future some Java syntax is added to ECMASript then 'most'
> >might have to be replaced by 'much'.
> >
> >The definition could be said to provide a post hoc justification
> >of this group's name, though not very convincingly.

> Does Thomas have similar problems with "BASIC" and "Fortran" ? After
> all, there is much more diversity in the languages included under
> those labels than there is under "JavaScript" . 

PointyHead can safely be ignored.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#20958

FromJoao Rodrigues <groups_jr-1@yahoo.com.br>
Date2013-08-15 18:51 -0300
Message-ID<kujiha$vqs$1@speranza.aioe.org>
In reply to#20953
On 14/08/2013 10:48, John Harris wrote:
> On Wed, 14 Aug 2013 11:24:12 +0200, Thomas 'PointedEars' Lahn
> <PointedEars@web.de> wrote:
>
>
>    <snip>
>> There is no javascript: <http://PointedEars.de/es-matrix>
>    <snip>
>
> javascript : A convenient name for the group of programming
> languages that use most of the syntax and semantics described in
> ECMA 262.
>
>
> Note that :
> 1) The wording ensures that languages that were in use before
> anyone started to write ECMA 262 are included in the definition.
> 2) The wording ensures that it doesn't matter which edition of
> ECMA 262 you are thinking of.
> 3) If in future some Java syntax is added to ECMASript then 'most'
> might have to be replaced by 'much'.
>
> The definition could be said to provide a post hoc justification
> of this group's name, though not very convincingly.
>

We can spot Thomas in this picture:
<http://i.imgur.com/5UhdL.png>


-- 
Joao Rodrigues

[toc] | [prev] | [next] | [standalone]


#20960

FromChristoph Michael Becker <cmbecker69@arcor.de>
Date2013-08-16 02:28 +0200
Message-ID<520d71f9$0$6549$9b4e6d93@newsspool4.arcor-online.net>
In reply to#20953
John Harris wrote:

> On Wed, 14 Aug 2013 11:24:12 +0200, Thomas 'PointedEars' Lahn
> <PointedEars@web.de> wrote:
> 
> 
>   <snip>
>> There is no javascript: <http://PointedEars.de/es-matrix>
>   <snip>
> 
> javascript : A convenient name for the group of programming 
> languages that use most of the syntax and semantics described in
> ECMA 262.
> 
> 
> Note that :
> 1) The wording ensures that languages that were in use before 
> anyone started to write ECMA 262 are included in the definition.
> 2) The wording ensures that it doesn't matter which edition of 
> ECMA 262 you are thinking of.
> 3) If in future some Java syntax is added to ECMASript then 'most'
> might have to be replaced by 'much'.
> 
> The definition could be said to provide a post hoc justification
> of this group's name, though not very convincingly.

Well, there's already a simplified definition in the newsgroup's FAQ[1][2]:

| The term "javascript" is used as a common name for all dialects of
| ECMAScript.

IMHO, defining shortcuts is a good idea--as long as *everybody* involved
is aware of those shortcuts.  Unfortunately by far not every reader of
this NG is aware of the FAQ, obviously.

So I suggest to stick with the generally accepted facts: there is
JavaScript[TM], there is ECMAScript--but there is no javascript (at
least _i_ cOnSiDeR cOrReT cApiTalIsAtIoN aN iMpOrTaNt cOnCePt, john).

And besides: you may have noticed that most of the posts in this thread
(including this one) haven't addressed the OP directly.  At least the
snipped parts of Thomas' answer did.

[1] <http://jibbering.com/faq/#ecma>
[2] <http://pointedears.de/scripts/faq/cljs/#tips>

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#20961

FromMartin Leese <please@see.Web.for.e-mail.INVALID>
Date2013-08-15 20:12 -0600
Message-ID<kuk1rb$sok$1@dont-email.me>
In reply to#20960
Christoph Michael Becker wrote:
...
 > (at
> least _i_ cOnSiDeR cOrReT cApiTalIsAtIoN aN iMpOrTaNt cOnCePt, john).
                          ^^
And speling.

-- 
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/

[toc] | [prev] | [next] | [standalone]


#20962

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-08-16 11:29 +0100
Message-ID<1ovr09hj0vu6taa1fi31jm77j4rvfuakd0@4ax.com>
In reply to#20960
On Fri, 16 Aug 2013 02:28:46 +0200, Christoph Michael Becker
<cmbecker69@arcor.de> wrote:

>John Harris wrote:
>
>> On Wed, 14 Aug 2013 11:24:12 +0200, Thomas 'PointedEars' Lahn
>> <PointedEars@web.de> wrote:
>> 
>> 
>>   <snip>
>>> There is no javascript: <http://PointedEars.de/es-matrix>
>>   <snip>
>> 
>> javascript : A convenient name for the group of programming 
>> languages that use most of the syntax and semantics described in
>> ECMA 262.
>> 
>> 
>> Note that :
>> 1) The wording ensures that languages that were in use before 
>> anyone started to write ECMA 262 are included in the definition.
>> 2) The wording ensures that it doesn't matter which edition of 
>> ECMA 262 you are thinking of.
>> 3) If in future some Java syntax is added to ECMASript then 'most'
>> might have to be replaced by 'much'.
>> 
>> The definition could be said to provide a post hoc justification
>> of this group's name, though not very convincingly.
>
>Well, there's already a simplified definition in the newsgroup's FAQ[1][2]:
>
>| The term "javascript" is used as a common name for all dialects of
>| ECMAScript.
>
>IMHO, defining shortcuts is a good idea--as long as *everybody* involved
>is aware of those shortcuts.  Unfortunately by far not every reader of
>this NG is aware of the FAQ, obviously.
>
>So I suggest to stick with the generally accepted facts: there is
>JavaScript[TM], there is ECMAScript--but there is no javascript (at
>least _i_ cOnSiDeR cOrReT cApiTalIsAtIoN aN iMpOrTaNt cOnCePt, john).

There is also LiveScript, JScript[TM], ActionScript, and probably a
few more.

LiveScript was not, is not, and never will be a dialect of ECMAScript.
This is because ECMAScript is derived from LiveScript.



>And besides: you may have noticed that most of the posts in this thread
>(including this one) haven't addressed the OP directly.  At least the
>snipped parts of Thomas' answer did.

So what? Thomas's obnoxious, sometimes inaccurate, and usually
unhelpful comments have given this news group a lousy reputation.

  John

[toc] | [prev] | [next] | [standalone]


#20963 — c.l.js (was: require.js in a phantomjs test fails for code that works fine in production)

FromChristoph Michael Becker <cmbecker69@arcor.de>
Date2013-08-16 23:57 +0200
Subjectc.l.js (was: require.js in a phantomjs test fails for code that works fine in production)
Message-ID<520ea01e$0$6638$9b4e6d93@newsspool2.arcor-online.net>
In reply to#20962
John Harris wrote:

> On Fri, 16 Aug 2013 02:28:46 +0200, Christoph Michael Becker
> <cmbecker69@arcor.de> wrote:
> 
>> So I suggest to stick with the generally accepted facts: there is
>> JavaScript[TM], there is ECMAScript--but there is no javascript (at
>> least _i_ cOnSiDeR cOrReT cApiTalIsAtIoN aN iMpOrTaNt cOnCePt, john).
> 
> There is also LiveScript, JScript[TM], ActionScript, and probably a
> few more.
> 
> LiveScript was not, is not, and never will be a dialect of ECMAScript.
> This is because ECMAScript is derived from LiveScript.

Obviously you're talking about Netscape's LiveScript (not the indirect
descendant of CoffeeScript with the same name).  IMO the reason that
LiveScript was not, is not, and never will be a "dialect of ECMAScript"
is, that it was renamed to JavaScript long before ECMAScript was going
to be standardized.

>> And besides: you may have noticed that most of the posts in this thread
>> (including this one) haven't addressed the OP directly.  At least the
>> snipped parts of Thomas' answer did.
> 
> So what? Thomas's obnoxious, sometimes inaccurate, and usually
> unhelpful comments have given this news group a lousy reputation.

Even if Thomas' answer didn't address the OP's alleged problem, it did
give valuable hints about the posted code, the usage of the name
"javascript" and posting via Google Groups.  *I* consider this even more
valuable than simply hinting to resp. pointing out the obvious error of
the OP, as Michael (Haufe) and Carlos (Pedro) did.  The latter helps to
quickly solve the problem at hand; the former helps to avoid some other
problems in the long run.  It's a bit like:

| Give a man a fish; you have fed him for today. Teach a man to fish;
| and you have fed him for a lifetime.

Anyway, if replying to a support request with (at least partial)
constructive criticism, instead of just serving the answer, gives this
newsgroup a lousy reputation, I'm gladly willing to bear with it.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#20975 — Re: c.l.js

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-08-18 10:17 +0200
SubjectRe: c.l.js
Message-ID<2808588.8yECor7tte@PointedEars.de>
In reply to#20963
Christoph Michael Becker wrote:

> John Harris wrote:
>> Christoph Michael Becker wrote:
>>> So I suggest to stick with the generally accepted facts: there is
>>> JavaScript[TM], there is ECMAScript--but there is no javascript (at
>>> least _i_ cOnSiDeR cOrReT cApiTalIsAtIoN aN iMpOrTaNt cOnCePt, john).
>> 
>> There is also LiveScript, JScript[TM], ActionScript, and probably a
>> few more.
>> 
>> LiveScript was not, is not, and never will be a dialect of ECMAScript.
>> This is because ECMAScript is derived from LiveScript.
> 
> Obviously you're talking about Netscape's LiveScript (not the indirect
> descendant of CoffeeScript with the same name).  IMO the reason that
> LiveScript was not, is not, and never will be a "dialect of ECMAScript"
> is, that it was renamed to JavaScript long before ECMAScript was going
> to be standardized.

Assuming there was such a thing as a “dialect of ECMAScript”, neither would 
be Mocha and JavaScript 1.0.  However, this is a purely academical 
discussion now as Mocha, LiveScript, and all JavaScript versions before 1.3 
(Netscape 4.0 [1997], for some people even after that) went the way of the 
dinosaur, and are no longer discussed here on a regular basis.
 
> Anyway, if replying to a support request with (at least partial)
> constructive criticism, instead of just serving the answer, gives this
> newsgroup a lousy reputation, I'm gladly willing to bear with it.

Also, when you post here, it is never a support request.  This is _not_ a 
support forum, it is a *newsgroup* (where people are discussing subjects).

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20980 — Re: c.l.js

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-08-18 15:14 +0100
SubjectRe: c.l.js
Message-ID<8ml119tnti7m2db59s86dq7ba854pbs5g9@4ax.com>
In reply to#20975
On Sun, 18 Aug 2013 10:17:16 +0200, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:

  <snip>
>Assuming there was such a thing as a “dialect of ECMAScript”, neither would 
>be Mocha and JavaScript 1.0.  However, this is a purely academical 
>discussion now as Mocha, LiveScript, and all JavaScript versions before 1.3 
>(Netscape 4.0 [1997], for some people even after that) went the way of the 
>dinosaur, and are no longer discussed here on a regular basis.

  <snip>
>Also, when you post here, it is never a support request.  This is _not_ a 
>support forum, it is a *newsgroup* (where people are discussing subjects).

But people are not discussing LiveScript, it has been decreed.

  John

[toc] | [prev] | [next] | [standalone]


#20981 — Re: c.l.js (was: require.js in a phantomjs test fails for code that works fine in production)

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-08-18 15:51 +0100
SubjectRe: c.l.js (was: require.js in a phantomjs test fails for code that works fine in production)
Message-ID<2rn119hkoraus5pcu97kpn92tv3mk5badq@4ax.com>
In reply to#20963
On Fri, 16 Aug 2013 23:57:20 +0200, Christoph Michael Becker
<cmbecker69@arcor.de> wrote:

  <snip>
>Obviously you're talking about Netscape's LiveScript (not the indirect
>descendant of CoffeeScript with the same name).  IMO the reason that
>LiveScript was not, is not, and never will be a "dialect of ECMAScript"
>is, that it was renamed to JavaScript long before ECMAScript was going
>to be standardized.

Which is what I said.


  <snip>
>Even if Thomas' answer didn't address the OP's alleged problem, it did
>give valuable hints about the posted code, the usage of the name
>"javascript" and posting via Google Groups.
  <snip>

So you seriously believe that
It is absolutely forbidden to use Google to post to this news group;
It is forbidden to use a uk.*-approved attribution in this news group;
It is forbidden to use pen names when posting to this news group.

What's more, you seriously believe that one person can decide on these
rules without any group discussion.

Come off it!

  John

[toc] | [prev] | [next] | [standalone]


#20982 — Re: c.l.js

FromChristoph Michael Becker <cmbecker69@arcor.de>
Date2013-08-18 17:14 +0200
SubjectRe: c.l.js
Message-ID<5210e490$0$6624$9b4e6d93@newsspool2.arcor-online.net>
In reply to#20981
John Harris wrote:

> On Fri, 16 Aug 2013 23:57:20 +0200, Christoph Michael Becker
> <cmbecker69@arcor.de> wrote:
> 
>> Even if Thomas' answer didn't address the OP's alleged problem, it did
>> give valuable hints about the posted code, the usage of the name
>> "javascript" and posting via Google Groups.
>   <snip>
> 
> So you seriously believe that
> It is absolutely forbidden to use Google to post to this news group;
> It is forbidden to use a uk.*-approved attribution in this news group;
> It is forbidden to use pen names when posting to this news group.

No, I don't think that it's forbidden (and I didn't say so).  But one
should be aware that posting via Google groups is likely to produce
messages that are hard to read and even harder to reply to, and that
using lengthy attributions may not be useful.  For me it's fine if one
uses a pen name, but the email address should be valid (for the purpose
to reply to the sender directly).

> What's more, you seriously believe that one person can decide on these
> rules without any group discussion.

No, I don't believe so.  But IMO everybody has the right to state his
opinion in this regard, unless there are commonly agreed rules saying
otherwise (preferably in the NG's FAQ).

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#20984 — Re: c.l.js

FromTim Streater <timstreater@greenbee.net>
Date2013-08-18 16:44 +0100
SubjectRe: c.l.js
Message-ID<timstreater-86B5FB.16442818082013@news.individual.net>
In reply to#20982
In article <5210e490$0$6624$9b4e6d93@newsspool2.arcor-online.net>,
 Christoph Michael Becker <cmbecker69@arcor.de> wrote:

> John Harris wrote:

Not a very useful attribution, this. *When* did he write?

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#20985 — Re: c.l.js

FromChristoph Michael Becker <cmbecker69@arcor.de>
Date2013-08-18 17:52 +0200
SubjectRe: c.l.js
Message-ID<5210ed6b$0$6626$9b4e6d93@newsspool2.arcor-online.net>
In reply to#20984
Tim Streater wrote:

> In article <5210e490$0$6624$9b4e6d93@newsspool2.arcor-online.net>,
> Christoph Michael Becker <cmbecker69@arcor.de> wrote:
> 
>> John Harris wrote:
> 
> Not a very useful attribution, this. *When* did he write?

Your newsreader should be able to tell you when the message was written
(if you need this information at all).  And it will tell you more
occasionally interesting information, when you inspect the source code
of the message (for instance, the message ID).

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#20986 — Re: c.l.js

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-08-18 19:28 +0200
SubjectRe: c.l.js
Message-ID<10857176.4b2U5CcTgp@PointedEars.de>
In reply to#20985
Christoph Michael Becker wrote:

> Tim Streater wrote:
>> In article <5210e490$0$6624$9b4e6d93@newsspool2.arcor-online.net>,
>> Christoph Michael Becker <cmbecker69@arcor.de> wrote:
>>> John Harris wrote:
>> Not a very useful attribution, this. *When* did he write?
> 
> Your newsreader should be able to tell you when the message was written
> (if you need this information at all).  And it will tell you more
> occasionally interesting information, when you inspect the source code
> of the message (for instance, the message ID).

“Never argue with idiots.  They drag you down to their level, then beat you 
with experience.”

HTH

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20994 — Re: c.l.js

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-08-19 15:42 +0100
SubjectRe: c.l.js
Message-ID<fnb419l14tju10d52on3otjqgm2bi012ku@4ax.com>
In reply to#20985
On Sun, 18 Aug 2013 17:52:17 +0200, Christoph Michael Becker
<cmbecker69@arcor.de> wrote:

  <snip>
>Your newsreader should be able to tell you when the message was written
>(if you need this information at all).  And it will tell you more
>occasionally interesting information, when you inspect the source code
>of the message (for instance, the message ID).

Thomas wrote :
>There is nothing pedantic or anti-social about 
>telling people the truth.

Now tell me when he said it, and the message ID. How long did it take
you to find out ?

  John

[toc] | [prev] | [next] | [standalone]


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web