Recent submissions

Comment · 7 years ago
I took the parent comment to be making the assumption that politically attractive options for responding to emissions and climate change tend to be "market-based" solutions or activities that are picking winners between industries (say solar manufacturers and installers vs. coal plant workers). If there is a choice where there is a "winner" with money on the line there will also be lobbying money put toward that effort and so consensus building is easier.

There isn't necessarily anything nefarious about this, just that it may be incapable of dealing with the enormity of climate climate and also, as OP intimates, there may be a class of solutions that are better/cheaper/more efficient from a policy perspective, but that don't have anyone positioned to gain financially from them and so are harder to garner support for.

Comment · 10 years ago
Comment · 10 years ago
Where x can be any combination of letters of any length?
Comment · 10 years ago
If the DNA in a seed is still in good enough shape to support blooming after being frozen 30,000 years, perhaps a seed frozen in a meteorite [1] could also survive long enough to be spread between solar systems.

[1] maybe after glancing off a planet or created by the collision of two large objects

Comment · 10 years ago
Ruby. Rails is the web framework, Ruby is the language and thus the thing that is interpreted.
Comment · 11 years ago
BST is O(n) in the worst case (when a tree is completely unbalanced and is essentially a linked list)
Comment · 11 years ago
Comment · 11 years ago
Comment · 11 years ago
Comment · 12 years ago
His second bind example is incorrect.

  function handleClick(i) {  
    this.innerHTML = i;
  }

  for (i = 0; i < elems.length; i++) {  
    elems[i].addEventListener("click", handleClick.bind(this, i));
  }
In the for loop, the this value refers to the global object. To get the desired effect, it should be changed to elems[i] (this piece of code is trying to bind a handler to an element).
Comment · 12 years ago
Not the friendliest program but http://mrale.ph/irhydra/1/ can display all sorts of intermediate representations spit out by v8
Comment · 12 years ago
You mixed up your definitions of function declaration and function expression. In this case, if the '!' weren't there, it would indeed be a function declaration, but with improper syntax (removing the '!' would result in a syntax error).

What makes a function either an expression or declaration is simply whether the parser expects an expression or declaration in the given context. The grouping operator '()' and the NOT operator '!' both are parameterized by expressions, and so the Javascript parser treats functions passed to them as expressions. Unless located where an expression is expected, functions will default to declarations.

Comment · 12 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton