Better HN
topnewbestaskshowjobs
Log inSign up

ChrisGaudreau

298 karma · joined Mar 21, 2014 (12y ago) · 95 submissions

Submissions

comment 11y ago · link · parent

In the context of React, it allows you to implement a `shouldComponentUpdate` method which simply compares the references of two objects, which is extremely fast. If the references remain the same, then there is no need to invoke `render` again.

comment 11y ago · link · parent

Prototype-type based systems are cool in theory, but aren't much fun to use in practice. They are incredibly powerful and easy to abuse. Basically single inheritance in disguise.

Classes aren't great either, but at least using class inheritance makes you feel icky, you're not likely to have shared state on the prototype being randomly mutated, and it's pretty readable.

3.

Mutations in Relay(speakerdeck.com ↗)

43 points · by ChrisGaudreau · 11y ago · 2 comments

comment 11y ago · link · parent

I think I actually had a similar problem, but using `filter`. Don't really remember though.

comment 11y ago · link · parent

Separation of concerns and separation of technologies are a different thing. It would appear you haven't done your research. See Pete Hunt's famous talk:

https://www.youtube.com/watch?v=x7cQ3mrcKaY

comment 11y ago · link · parent

P:

comment 11y ago · link · parent

I prefer flipped smileys. (:

8.

Jet – Lightweight, Realtime Message Bus for the Web(jetbus.io ↗)

14 points · by ChrisGaudreau · 11y ago · 6 comments

9.

I'm an Imposter(davidwalsh.name ↗)

3 points · by ChrisGaudreau · 11y ago · discuss

10.

SighJS(github.com ↗)

3 points · by ChrisGaudreau · 11y ago · discuss

comment 11y ago · link · parent

http://facebook.github.io/react/blog/2015/02/20/introducing-...

12.

Better Asynchronous JavaScript(eng.localytics.com ↗)

4 points · by ChrisGaudreau · 11y ago · discuss

comment 11y ago · link · parent

Would this technique work to center, say, an <img> tag with undeclared dimensions inside of a div? Or do you have to jump through hoops?

comment 11y ago · link · parent

An alternative using ES6 object parameters:

  function addObserver(observer, func, { weak = false } = {}) {
    if (weak) {
      // ...
    }
  }

  addObserver(observer, 'load', { weak: true });

15.

Playground – game framework that doesn't try to solve everything(playgroundjs.com ↗)

2 points · by ChrisGaudreau · 11y ago · discuss

16.

JSNES: A JavaScript NES emulator(fir.sh ↗)

2 points · by ChrisGaudreau · 11y ago · discuss

17.

ECMAScript 6: Feature Overview and Comparison(es6-features.org ↗)

2 points · by ChrisGaudreau · 11y ago · discuss

comment 11y ago · link · parent

> the fact that it is hosted makes it a non starter.

What do you mean?

19.

URGENT: need script to remove spam (JSBin)(github.com ↗)

4 points · by ChrisGaudreau · 11y ago · 1 comment

comment 11y ago · link · parent

Just Ember. I'm pretty sure Ember doesn't even have a dependency on Handlebars anymore. (possibly only off stable)

comment 11y ago · link · parent

A Pry for Go would be enough to make me switch fully to Go.

22.

“Discuss latest changes to master before releasing”(github.com ↗)

59 points · by ChrisGaudreau · 11y ago · 27 comments

comment 11y ago · link · parent

Except that corn is used for more than just ethanol.

comment 12y ago · link · parent

It's amazing how people who should know better demand proof of something obvious that's been written about so many times, just like how Fox News demands proof that Obama isn't secretly a Muslim. Or how people demand proof that goto is a Bad Thing™.

comment 12y ago · link · parent

It is amazing just how much Israel spies on America, and how nobody knows about it. If you dare to say it publicly then your reputation and career are destroyed, and you are an antisemitic terrorist sympathizer, if not also a terrorist.

comment 12y ago · link · parent

Untouchable by police? That's a pretty big claim. What would happen if the government were to round up some computers and control 50% or more of the network?

comment 12y ago · link · parent

Personally, I like to learn any language, regardless of how popular it is. It's just fun.

comment 12y ago · link · parent

Working in technology, you probably make a lot of money. Could be wrong. $5 a month probably means more to the general population.

Personally, I feel far less privacy when making online payments and giving out my credit card or trusting some middle provider than I do when visiting a site that has ads which I can disable.

1234