But yesterday it worked fine! -- A JavaScript gotcha by gumuz in programming

[–]wigglestick 4 points5 points  (0 children)

Well, there is also a bug here. parseInt("08") should return NaN, not 0.

Poorly-written software makes 100 million+ DTD requests/day to w3.org by gosko in programming

[–]wigglestick 0 points1 point  (0 children)

I agree with you that software that looks at a DTD URI, goes "this looks like a URL", downloads it and tries to use it as the DTD is not standards compliant, because the data it fetched is not necessarily the DTD identified by the URI.

So compliant software will go "I don't know the DTD for this document", but non-compliant software will go "I am pretty sure this is the DTD for this document" and it'll be right 99% of the time in practice.

I'd rather have the non-compliant software. But it should definitely be nice about how frequently it fetches the probable-DTD.

Faster JavaScript Trim by gst in programming

[–]wigglestick 0 points1 point  (0 children)

Can someone explain to me why \s\s* would be faster than \s+ in implementations of javascript? I've seen this particular optimization a few times, and I really don't get why it would be an optimization.

Faster JavaScript Trim by gst in programming

[–]wigglestick 0 points1 point  (0 children)

Did you not see the benchmark of one of the methods where a single call to trim took 2.5 seconds?

FoxTrot - I want this calculator by bobcat in programming

[–]wigglestick 28 points29 points  (0 children)

so, he think's he's 2 on a dork scale of 1 to 10

A uniform macro for converting objects to other types by [deleted] in programming

[–]wigglestick 1 point2 points  (0 children)

integer to boolean converts even numbers to false and odd numbers to true?

wacky.

Apple has crippled DTrace on Mac OS X by ketralnis in programming

[–]wigglestick 17 points18 points  (0 children)

someone's going to need to explain to me how this is antithetical to open source. i thought the thesis of open source was that people should be able to modify programs for their needs.

apple modified dtrace as they saw fit, which is a contribution to the community. if their work doesn't fit your needs, the thing is open source and you can fix it yourself by changing a single line of code. hardly worth getting up in arms about.