-
Notifications
You must be signed in to change notification settings - Fork 7.3k
(Finally) Fix for "Natives' Syntax-Issues & Implementation Laziness." (Issue #1774) #1804
Conversation
might be worth git rebasing and squashing all the commits into 1 with a meaningful commit message. |
Well okay, I'm considering that. Anyway any problem with my commits at all? However, the commit will follow. |
don't have the time to fully review the change, I just noticed how many commits were involved and their commit messages, and know Ryan wouldn't like that. Remember your commits are "copied" into the project when a pull req happens, so all those messages would then be in the projects history. Ry could fix him self but he prolly doesnt want to have to :P |
Sorry, but I'm not going to merge this. Long lines, doesn't follow the code style, overly clever, change for the sake of change - I could go on... |
} | ||
!options || options.cwd === void 0 && options.env === void 0 && options.customFds === void 0 && options.gid === void 0 && options.uid === void 0 ? | ||
( cwd = '', env = options || process.env, customFds = customFds || [-1, -1, -1], setsid = false, uid = -1, gid = -1 ) : // Deprecated API: (path, args, options, env, customFds) | ||
(cwd = options.cwd || '', env = options.env || process.env, customFds = options.customFds || [-1, -1, -1], setsid = options.setsid ? true : false, uid = options.hasOwnProperty('uid') ? options.uid : -1, gid = options.hasOwnProperty('gid') ? options.gid : -1); // Recommended API: (path, args, options) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOAH
Excuse me, what is your idea of "code style"? Do you want strict syntax, which, by V8 is accepted - or strict-breaking syntax which "follows the code style"? This is hilarious.. I was thinking of Node.JS being developers not bitching about JS-syntax... -.-" However, you could probably give me an idea of what your *style looks like. Thanks & cheers. |
@@ -316,7 +317,7 @@ Interface.prototype._tabComplete = function() { | |||
|
|||
// If there is a common prefix to all matches, then apply that | |||
// portion. | |||
var f = completions.filter(function(e) { if (e) return e; }); | |||
var f = completions.filter(function(e) { return !!e; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be return !!e?e:null; Committing upon knowledge of the future and given relevance of the changes of this fork.
"This is hilarious.. I was thinking of Node.JS being developers not bitching about JS-syntax... -.-" If you work on a team in a professional environment, you care about style and coding standards. |
also, I merged your changes to get an overall diff. Stuff like this:
and (conflict)
Those were horrible changes. then the
as commented by that guy on your fork, that breaks the optional ability of mode. I see what your trying to do, and def think the IDEA should be done, but gotta clean up the code. just fix those var statements, why does the return types matter? and @bnoordhuis his change is needed. it is a bug in node..
Kenan, I suggest you git branch your master to 'tmp', reset your master to upstream/master (joyents). You'll get conflicts due to deleted files. stage the chunks that are valid (removing extra vars) Then simply open it as a new pull request from that branch, and be sure to indicate WHY this is an issue in clearer detail. |
} | ||
|
||
if (value >= 0) { | ||
buffer.writeUInt8(value, offset, noAssert); | ||
} else { | ||
buffer.writeUInt8(0xff + value + 1, offset, noAssert); | ||
buffer.writeUInt8(255 + value + 1, offset, noAssert); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these hex->dec changes was also completely unneeded.
It's much easier to read in hex. Don't keep any of these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of optimizing: hex-values have to be converted to decimals, costs runtime. Anyway, fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should all be optimized by V8 itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget: V8 is smarter than us all :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, just a few billion times faster. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no really... V8 is smarter than you :P
don't try to outwit it, unless your a v8 developer.
@@ -411,8 +411,7 @@ fs.readlinkSync = function(path) { | |||
|
|||
fs.symlink = function(destination, path, mode_, callback) { | |||
var mode = (typeof(mode_) == 'string' ? mode_ : null); | |||
var callback_ = arguments[arguments.length - 1]; | |||
var callback = (typeof(callback_) == 'function' ? callback_ : null); | |||
callback = (typeof(callback) == 'function' ? callback : null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks the code.
If mode == your callback function, callback will be undefined.
Thank you for that specific outlining of the problems, I will fix that and recommit. In fact, I was thinking about the callback-issue yesterday.. anyway, cheers. Edit: |
I count 305 cols in child_process_legacy.js. That's some kind of record, ...and people wonder what I mean when I say John-Resig-style JS is like a disease? The void 0 stuff is also out of place, considering undefined is read-only in v8 now. Ben is right not to merge this. It's too tricky. It's client-side JS sneaking into the server side. No one writes code like that and actually maintains it, in any project worth maintaining. If you can't figure out what he meant by style conventions, it might be hopeless. |
This is the "style convention" the company I'm working in has standardized .. and we got used to. I'm sorry, it's our style of coding here, and we're actually maintaining code like this. But 'client-side JS sneaking into the server side'? That's quite unfair. We're pretty much only working with server-side code, and this is not criticizing the functional but stylistic features of coding.. I already said, I'll be revising the code. Have a nice evening! :) +edit: And as already said: as I considered this being build upon V8, I wanted to implement V8 standards. The V8-engine proposes the usage of void 0 instead of undefined. Anyway, I can revise that, at least to get the JS-_re_conformity implementations pulled. |
This is now recommitted. |
Hey,
this is a fix for Issue #1774 for NodeJS is unable to start when called with latest-build V8 arguments "--harmony_typeof --harmony_weakmaps --harmony_block_scoping". This has been fixed, the JS-compliance has been "re"-implemented.
Cheers,
Kenan.