Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kangax
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
kangax
12y ago
> So if innerText was standardized to your use case what would it be good for other than your specific project? I don't think this is a very specific task. As you've seen in the post, other people have similar requirements (tex
32.
▲
by
kangax
12y ago
But browsers already take care of this. They collapse all the spaces in markup for non-pre-formatted blocks; they render block/inline elements accordingly; insert newlines where needed, etc. And then, once you select some text from the
33.
▲
by
kangax
12y ago
(author here) I'm working on text editor with real-time spelling correction where `innerText`-like retrieval has to happen quite frequently; it's what pushed me to research the state of affairs with `innerText` in the first place.
34.
▲
by
kangax
12y ago
Yep, it's in the plans! :)
35.
▲
by
kangax
12y ago
2012, actually. In 2008 we had Firebug with not even a JS profiler, IIRC ;)
36.
▲
by
kangax
12y ago
Pretty much the only feature, yes. We'll be adding it shortly, sorry for the confusion.
37.
▲
by
kangax
12y ago
Definitely. And that's why we give different weight to different features. Smallest ones (Math methods, octal & binary literals, etc.) have a weight of 0.25. Medium ones (Map, Set, rest parameters, etc.) have a weight of 0.5. Final
38.
▲
by
kangax
12y ago
For now, yes. Modules are difficult to test (via regular means like `eval`) and the standard is still in the flux so we're trying to figure out the best way — https://github.com/kangax/compat-table/issues/
39.
▲
by
kangax
12y ago
I noticed that I can't do more than 5 quality hours of work as well. And mostly, it's all about density. 2 hours of debugging a tricky issue, while having your tools fail you multiple times in the process, can drain me out for the
40.
▲
by
kangax
12y ago
Although safe, according to current search, there's no benefits from supplementing 10,000 UI daily (2,000-5,000 being recommended dose) — http://examine.com/supplements/Vitamin+D/ This doesn't prove that
41.
▲
by
kangax
12y ago
Your comment inspired me to write a post on References in Javascript :) http://perfectionkills.com/know-thy-reference
42.
▲
Know thy Reference
(perfectionkills.com)
4 points
by
kangax
12y ago
|
0 comments
43.
▲
by
kangax
12y ago
Exactly. Once you understand underlying concept, `this` is not complicated or weird. Small addendum to your list: "whatever is left of the dot at call-time" is a nice way to explain "base reference" concept, but be wary
44.
▲
by
kangax
12y ago
A much more interesting question indeed. There's been numerous (human and animal) studies showing benefits of strength training for elderly. Ergo-log covers [1] those [2] all [3] the time [4]. Then there's evidence [5] suggesting
45.
▲
by
kangax
12y ago
This is nothing new. Back when I was starting, it was all about "JS libraries"; when Prototype.js gained the most traction at one point, beating in popularity older Dojo. Still, there were new libs popping up again and again — Moo
46.
▲
by
kangax
12y ago
Couldn't have said it better myself! Jade Teta has a fantastic article on this — http://www.t-nation.com/diet-fat-loss/a-calorie-is-sometimes... — including so-called HEC (hunger, energy, cravings)
47.
▲
by
kangax
12y ago
Damn, this is bizarre; the kind of elitist attitude that gives Crossfit bad rep. 5 basic lifts with a linear progression (SL/SS) and some mobility/flexibility work is absolutely fantastic way to create foundational strength. Rippe
48.
▲
by
kangax
12y ago
You still can't edit JS like you can in chrome devtools. This is such a boon and a basic thing, really, that I can't switch until they add it. Aside from that, yeah, FF is getting pretty good.
49.
▲
A tale of refactoring, reducing complexity, and exploring client-side MVC
(perfectionkills.com)
3 points
by
kangax
12y ago
|
0 comments
50.
▲
by
kangax
12y ago
Thanks, filed as https://github.com/kangax/html-minifier/issues/220
51.
▲
by
kangax
12y ago
Looks like PHP spec is about twice smaller than ECMAScript 5.1 ( http://es5.github.io/ ) ~42K vs ~82K words.
52.
▲
by
kangax
12y ago
Hm, really? Works for me on http://kangax.github.io/html-minifier/
53.
▲
by
kangax
12y ago
Good point, updated. These were done on 2.3GHz Core i7 & OS X 10.9.4. Note that "max" settings were used, meaning that, for example, both JS and CSS had to be minified (and that's delegated to UglifyJS2 and clean-css pack
54.
▲
by
kangax
12y ago
You can see from this image — http://perfectionkills.com/images/minifier_benchmarks.png — that pages under 100KB are all under a second. But then it grows. I suspect regex parsing (not catastrophic but close) to be the
55.
▲
by
kangax
12y ago
It's not so much about invalid HTML as it is about superset of HTML. I don't like it either but certain constructs seem hard to implement otherwise. Changing attribute value is easy within HTML boundaries but anything related to p
56.
▲
HTML minifier revisited
(perfectionkills.com)
99 points
by
kangax
12y ago
|
41 comments
57.
▲
by
kangax
12y ago
I think it's safe to say that there's some sort of correlation, although of course obesity is a complex issue. Higher caloric intake is just part of equation. Sedentary life style, increased stress, reduced sleep, "western&q
58.
▲
by
kangax
12y ago
And ironically, death rates from obesity just crossed those from hunger. The abundance of food (or rather, abysmal diet culture) is now starting to hurt us.
59.
▲
by
kangax
12y ago
fwiw, it's the way everyone in Russia pronounces it
60.
▲
Buying Beer? Show ID's of everyone in your party
(consumerist.com)
1 points
by
kangax
13y ago
|
0 comments
More ›