Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-14 Thread AJ ONeal
And jquery now uses use strict too! AJ ONeal (317) 426-6525 On Wed, Mar 13, 2013 at 4:49 PM, AJ ONeal coola...@gmail.com wrote: FYI: grunt-init gruntplugin uses 'use strict'; for all grunt plugins. Yay! That's what we need to see more of! It would be nice if npm init would follow suit (or

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-14 Thread Rick Waldron
On Wed, Mar 13, 2013 at 10:19 PM, AJ ONeal coola...@gmail.com wrote: Rick: I'm just thinking of the children here. I don't think you should have to be an expert to be a beginner. I'm vehemently pro technology that gets us closer to the goal of just being able to sit down and do stuff well.

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-14 Thread Scott González
On Thu, Mar 14, 2013 at 12:19 PM, AJ ONeal coola...@gmail.com wrote: And jquery now uses use strict too! Actually, we had to back that out. https://github.com/jquery/jquery/commit/0e2977583c0455eda940a28b2499cad2cbf24ee4 http://bugs.jquery.com/ticket/13335 -- -- Job Board:

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-14 Thread Rick Waldron
On Thu, Mar 14, 2013 at 1:29 PM, Scott González scott.gonza...@gmail.comwrote: On Thu, Mar 14, 2013 at 12:19 PM, AJ ONeal coola...@gmail.com wrote: And jquery now uses use strict too! Actually, we had to back that out. Important to note that we are not happy about this at all. Rick

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-14 Thread Mikeal Rogers
I feel so great about the fact that node.js will never have something backed out because it breaks asp.net ajax postbacks :) -Mikeal On Mar 14, 2013, at 11:09AM, Rick Waldron waldron.r...@gmail.com wrote: On Thu, Mar 14, 2013 at 1:29 PM, Scott González scott.gonza...@gmail.com wrote:

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-14 Thread Rick Waldron
On Thu, Mar 14, 2013 at 2:56 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote: I feel so great about the fact that node.js will never have something backed out because it breaks asp.net ajax postbacks :) It's rage inducing. Rick -Mikeal On Mar 14, 2013, at 11:09AM, Rick Waldron

[nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
Perhaps the very best part of node v0.10.0 is that all of the core modules are finally fully ES5 compliant!!! Although, you can't use es5-compliant mode with a shebang (because you can't pass the --use_strict argument), so I made a shim that will run node in es5 (strict) mode for you. [0]

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Ben Noordhuis
On Wed, Mar 13, 2013 at 6:03 PM, AJ ONeal coola...@gmail.com wrote: Perhaps the very best part of node v0.10.0 is that all of the core modules are finally fully ES5 compliant!!! Although, you can't use es5-compliant mode with a shebang (because you can't pass the --use_strict argument), so I

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Adam Crabtree
Wouldn't a global strict mode cause indeterminate behavior in modules not tested for ES5 compliance? Cheers, Adam Crabtree On Wed, Mar 13, 2013 at 10:18 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Wed, Mar 13, 2013 at 6:03 PM, AJ ONeal coola...@gmail.com wrote: Perhaps the very best part

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
Quite the opposite. Strict mode will cure the indeterminance. Modules that aren't tested or jshinted will often have failures where the behavior was presently indeterminate or difficult to explain (due to defining functions inside of conditionals or loops or assigning implicit globals, etc). I

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
Ben, That is correct. See http://stackoverflow.com/a/4304187 Although some shells or OSes may allow arguments to shebang, I've had issues with it on my setup (OSX and Linux with Bash and ZSH). And then there's Windows... I believe my solution will also work on Windows, but it's certainly not

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Joshua Holbrook
I seriously don't understand: Why bother? Why make things that used to work no longer work? That's basically the only thing that use strict at the global level will do for you. --Josh On Wed, Mar 13, 2013 at 11:21 AM, AJ ONeal coola...@gmail.com wrote: Ben, That is correct. See

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
The better question is: Why would you dare not to? Why would you ever allow indeterminate, unsafe, or code that causes your vm to implement runtime hacks to work around it to run at all? Just because the code would run without throwing an exception doesn't mean that it worked. (sidenote: I liked

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Rick Waldron
Can you link to whatever v0.10 release notes covers the subject of this thread, I can't find anything :( I looked at: http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/ and a few other google'd matches Thanks! Rick On Wed, Mar 13, 2013 at 3:41 PM, AJ ONeal coola...@gmail.com wrote: The

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Adam Crabtree
@AJ I was talking more about the following: Indeterminate because unless you're doing a complete ongoing audit of all modules and their dependencies, you'll hit indeterminate behavior in the following cases: 1. eval From

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Scott González
On Wed, Mar 13, 2013 at 4:02 PM, Adam Crabtree atcrabt...@gmail.com wrote: Either way, the community should be moving toward strict mode as fast as possible for its many current and future (performance) benefits. Is this a real thing yet? I've heard performance touted since day one, but every

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Adam Crabtree
Currently, there's no performance gain, but there's also no performance loss (though I haven't verified). See: http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/ (Good article otherwise as well) One option is to strip use strict when deploying to production.

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
On Wed, Mar 13, 2013 at 2:10 PM, Scott González scott.gonza...@gmail.comwrote: On Wed, Mar 13, 2013 at 4:02 PM, Adam Crabtree atcrabt...@gmail.comwrote: Either way, the community should be moving toward strict mode as fast as possible for its many current and future (performance) benefits.

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Joshua Holbrook
Why would you ever allow indeterminate, unsafe, or code that causes your vm to implement runtime hacks to work around it to run at all? Just because the code would run without throwing an exception doesn't mean that it worked. Yeah but I've been using that (hypothetical) code for ages and

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
On Wed, Mar 13, 2013 at 2:01 PM, Rick Waldron waldron.r...@gmail.comwrote: Can you link to whatever v0.10 release notes covers the subject of this thread, I can't find anything :( I looked at: http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/ and a few other google'd matches Thanks!

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Adam Crabtree
@AJ What is your source for strict mode code running faster? All evidence thus far has pointed to exactly the opposite, that if anything it runs slower. On Wed, Mar 13, 2013 at 1:26 PM, Joshua Holbrook josh.holbr...@gmail.comwrote: Why would you ever allow indeterminate, unsafe, or code that

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
On Wed, Mar 13, 2013 at 2:30 PM, Adam Crabtree atcrabt...@gmail.com wrote: @AJ What is your source for strict mode code running faster? All evidence thus far has pointed to exactly the opposite, that if anything it runs slower. As I was saying earlier, strict mode optimizations are the

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
The timecode for the discussion on strict mode is 00:13:32. They broadly stated that Chrome bails out of optimizations incompatible features are used - most specifically they mention `with` (removed in strict) and `delete` (not addressed by strict mode). AJ ONeal On Wed, Mar 13, 2013 at 2:39

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
On Wed, Mar 13, 2013 at 2:26 PM, Joshua Holbrook josh.holbr...@gmail.comwrote: Why would you ever allow indeterminate, unsafe, or code that causes your vm to implement runtime hacks to work around it to run at all? Just because the code would run without throwing an exception doesn't mean

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
And to that end: If you're using JSHint with all of the quality options turned on, then great. You're writing strict mode code and you won't have strange errors and you'll get all of the speed benefits. But not everyone is using JSHint or the like, so strict mode is one more avenue to help

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Adam Crabtree
I would guess almost nobody runs JSHint with strict mode settings on all their dependencies as well. That would be a maintenance nightmare. Regarding slowdown, there's been many many people from Google and others who've seen empirically that there are currently no speed benefits. Here are just

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Rick Waldron
On Wed, Mar 13, 2013 at 4:10 PM, Scott González scott.gonza...@gmail.comwrote: On Wed, Mar 13, 2013 at 4:02 PM, Adam Crabtree atcrabt...@gmail.comwrote: Either way, the community should be moving toward strict mode as fast as possible for its many current and future (performance) benefits.

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
On Wed, Mar 13, 2013 at 3:22 PM, Adam Crabtree atcrabt...@gmail.com wrote: I would guess almost nobody runs JSHint with strict mode settings on all their dependencies as well. That would be a maintenance nightmare. Regarding slowdown, there's been many many people from Google and others

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Luke Arduini
Since use strict; is function scoped people should just use it in their modules so you can use both strict/non strict modules together in happiness. On Wed, Mar 13, 2013 at 5:47 PM, AJ ONeal coola...@gmail.com wrote: On Wed, Mar 13, 2013 at 3:22 PM, Adam Crabtree atcrabt...@gmail.comwrote: I

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
FYI: grunt-init gruntplugin uses 'use strict'; for all grunt plugins. Yay! That's what we need to see more of! It would be nice if npm init would follow suit (or maybe it already does and I just haven't used it in 0.10 yet) AJ ONeal (317) 426-6525 On Wed, Mar 13, 2013 at 4:26 PM, Luke Arduini

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Rick Waldron
I'm really enjoying your maniacal enthusiasm :D On Wed, Mar 13, 2013 at 6:49 PM, AJ ONeal coola...@gmail.com wrote: FYI: grunt-init gruntplugin uses 'use strict'; for all grunt plugins. Yay! That's what we need to see more of! It would be nice if npm init would follow suit (or maybe it

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Luke Arduini
Yeah good luck with this. On Wed, Mar 13, 2013 at 6:51 PM, Rick Waldron waldron.r...@gmail.comwrote: I'm really enjoying your maniacal enthusiasm :D On Wed, Mar 13, 2013 at 6:49 PM, AJ ONeal coola...@gmail.com wrote: FYI: grunt-init gruntplugin uses 'use strict'; for all grunt plugins.

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread AJ ONeal
Rick: I'm just thinking of the children here. I don't think you should have to be an expert to be a beginner. I'm vehemently pro technology that gets us closer to the goal of just being able to sit down and do stuff well. strict mode + jshint get us so much closer to that goal. Hmm...

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Martin Cooper
On Wed, Mar 13, 2013 at 3:49 PM, AJ ONeal coola...@gmail.com wrote: FYI: grunt-init gruntplugin uses 'use strict'; for all grunt plugins. Yay! That's what we need to see more of! It would be nice if npm init would follow suit (or maybe it already does and I just haven't used it in 0.10 yet)

Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Roman Shtylman
This doesn't work if the path to node is not know. Or we don't want to hard code it. On Wednesday, March 13, 2013 1:18:30 PM UTC-4, Ben Noordhuis wrote: On Wed, Mar 13, 2013 at 6:03 PM, AJ ONeal cool...@gmail.com javascript: wrote: Perhaps the very best part of node v0.10.0 is that all of