Humans don’t know what they care about

If you hand over the management of your civilization to machines, you then lose the incentive to understand it yourself or to teach the next generation. […] Up until now, we put a lot of our civilization into books. But the books can’t run it for us. So we always have to teach the next generation. If you work out, it’s about a trillion person years of teaching and learning in an unbroken chain that goes back tens of thousands of generations. What happens if that chain breaks?

Stuart J. Russell

Deferred Promise

Found myself in a situation where I wanted to execute a process and then check back on it later to be sure it had completed.

class MyClass {
  constructor() {
    this.readyPromise = new Promise(
      resolve => (this.readyResolve = resolve)
    );
  }

  async executeProcesses() {
    await // ...executing processes...
    this.readyResolve();
  }

  ready() { return this.readyPromise }
}
Continue reading “Deferred Promise”

Predator Prayers

People want to give up the responsibility of being able to understand. And because they can’t understand, then they have faith. And they put their faith into people who say they can understand. And I think that’s a situation that’s ripe for a predatory relationship.

Paul Stamets

Chrome extension MV2 access to page data

Chrome extensions exist in an “isolated world” to prevent global var collisions between the website and the extension that runs on a given website. This mostly applies to content_scripts in an extension.

E.g. window.foo: my extension declares foo in the global scope and the website the extension runs on also declares foo in the global scope. With “isolated world” scoping for the extension, this is not a worry since it doesn’t share scope with the web page it runs on.

Continue reading “Chrome extension MV2 access to page data”