HN user

natedub

19 karma
Posts2
Comments11
View on HN

The article quotes a fire-safety scientist named Vytenis Babrauskas, whose study has been used in support TB 117:

"The problem, he argues, is that the standard is based on applying a small flame to a bare piece of foam — a situation unlikely to happen in real life. ... In real life, before the flame gets to the foam, it has to ignite the fabric. Once the fabric catches fire, it becomes a sheet of flame that can easily overwhelm the fire-suppression properties of treated foam. In tests, TB 117 compliant chairs catch fire just as easily as ones that aren’t compliant — and they burn just as hot. “This is not speculation,” he says. “There were two series of tests that prove what I’m saying is correct.”

Recovering seemingly lost commits is really important skill to have when working with git. However, it is infinitely easier with the git reflog command.

It can work in terminal vim, too.

I believe the special + register for the system clipboard is enabled by a compile option, but that may not be entirely accurate. I have Vim 7.3 installed via Macports and it works for me.

Ian Bicking gave a talk on the similarities and differences between Python and Javascript that might be helpful, but it's pretty high level: http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-jav...

The key similarities in my mind are:

1) In both python and javascript, the class and prototype are exposed and can be called explicitly if desired:

  MyClass.method(my_instance, arg1, arg2)

  MyClass.prototype.method.call(my_instance, arg1, arg2);
2) Python will automatically bind methods when you retrive them from an instance. Unless you explicitly bind a function in JS, the "this" parameter is specified at call time: whatever comes before the dot is used as "this". Ultimately they're both first class objects and the difference to the developer is notation:
  bound_method = my_instance.method

  bound_method = my_instance.method.bind(my_instance);
3) Attribute lookups in Python behave very similarly to property lookups in Javascript. Python has a modified resolution order for searching for an attribute through its list of parent classes. Javascript will look for an attribute in a series of prototypes (since in JS, an instance's prototype is just an object, so it too can have a prototype). Python is superior here because it supports multiple inheritance, but overall the resolution behaviour is essentially the same.

Can anyone think of any other common ground?

Us too. After a year, we're still really happy we went with Closure, but trying to convince most javascript developers outside our team to learn it has an uphill battle. The learning curve is rather steep, there are no tutorials besides Michael Bolin's (excellent) book, and the similarities to java turn some people off.

But once you get past all that, you have a powerful library with a good set tools for unit testing and a compiler that does dead code removal, function inlining, optional type checking through JSDoc annotations, etc. Its miles ahead of any pure-javascript solution because compilation is so tightly integrated into the whole development process. And yet you don't have to compile to run the code in development, so debugging is no harder than before.

That said, it's worth noting that the closure library is not a framework. You build your own application structure, models, etc, so it's definitely more work to get started.

Agreed, this frustrates me immensely. Fortunately both Chrome and Safari have good built-in Developer Tools that let you disable that style (it's set on the <body> element, btw).

The font size is not a design decision. It should always be the READER's CHOICE.

Actually [x for x in xrange(..)] will produce only one list. In Python 2.X, range() returns a list while xrange() an iterable.

If you just need an iterable, itertools.repeat(0, 100) will do the trick.