Do they belong to you? Claim these comments.
Dean Edwards
Is this you? Claim Profile »
5 months ago
in Could Andrei Arshavin Be Arsenal’s Defensive Midfielder? on EPL Talk
You've hit the nail on the head. We badly need penetration otherwise good teams are not scared to attack us. We nearly have it with Nasri and van Persie but we need a bit more.
The people crying it for a "DM" don't know what they are talking about.
The people crying it for a "DM" don't know what they are talking about.
1 year ago
in Self-Printing JavaScript Literals on Languages of the real and artificial
BTW, If you use this in Functional.js then you will have to change this line:
if (specialized[i] == _)
to this:
if (specialized[i] === _)
if (specialized[i] == _)
to this:
if (specialized[i] === _)
1 year ago
in Self-Printing JavaScript Literals on Languages of the real and artificial
var _ = {toString: K("_")};
1 year ago
in Optional catch in JavaScript on jerakeen.org
I don't think this syntax works in any other browser. You can also leave out the catch block completely in Mozilla (which is nice).
(this comment imported into Disqus by Tom Insam on 2008/12/02)
(this comment imported into Disqus by Tom Insam on 2008/12/02)
1 year ago
in Functional JavaScript on Languages of the real and artificial
I'm having great fun pouring over your library. It is very well written and I'm learning a lot about functional programming from reading the source.
Regarding speed, you can improve performance by giving up your favourite idiom:
var args = [].slice.call(arguments, 0);
This is expensive because it creates a new Array object every time you slice an arguments object. Which is very often.
Mozilla provides a static slice method on the Array object. Or you can fake it yourself:
if (!Array.slice) { // Mozilla already supports this
Array.slice = function(array) {
// Slice an array-like object.
var slice = Array.prototype.slice;
return slice.apply(array, slice.call(arguments, 1));
};
}
And use it like this:
var args0 = Array.slice(arguments); // cast to Array
var args1 = Array.slice(arguments, 1); // a normal slice
I use it so often I make it global.
var slice = Array.slice;
var args = slice(arguments);
Hope that helps. Back to reading your source code for me. :)
Regarding speed, you can improve performance by giving up your favourite idiom:
var args = [].slice.call(arguments, 0);
This is expensive because it creates a new Array object every time you slice an arguments object. Which is very often.
Mozilla provides a static slice method on the Array object. Or you can fake it yourself:
if (!Array.slice) { // Mozilla already supports this
Array.slice = function(array) {
// Slice an array-like object.
var slice = Array.prototype.slice;
return slice.apply(array, slice.call(arguments, 1));
};
}
And use it like this:
var args0 = Array.slice(arguments); // cast to Array
var args1 = Array.slice(arguments, 1); // a normal slice
I use it so often I make it global.
var slice = Array.slice;
var args = slice(arguments);
Hope that helps. Back to reading your source code for me. :)
3 years ago
in E4X - A native XML datatype for JavaScript on jerakeen.org
I was at the London JavaScript night thing. Your talk was the highlight for me. E4X looks fab.
(this comment imported into Disqus by Tom Insam on 2008/12/02)
(this comment imported into Disqus by Tom Insam on 2008/12/02)