Search Amazon.com:
Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
«58 »
  • Post
  • Reply
thathonkey
Jul 17, 2012

rickroll


Wheany posted:

And I just want to warn you that as a new convert I just might become insufferable.

It's cool, we all are

Adbot
ADBOT LOVES YOU

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.


Wheany posted:

And I just want to warn you that as a new convert I just might become insufferable.

Tell me about it. My first work where I dove into a 100% promise driven approach was this WebSQL/IndexedDB API I've just started on: http://malucomarinero.bitbucket.org/johodb/

It's blowing me away how powerful promises are, especially when you're processing a stack of asynchronous actions, and then Q will wait for them all to finish and then output an Array of the lot in sequence. It such a clean and logical way to deal with this stuff, and greatly simplified my life in writing an API for asynchronous storage.

Suspicious Dish
Sep 24, 2011



I'm not really a fan of Crockford, but that talk didn't really explain Monads at all. It seems he, too, fell under the curse.

Like, how was that a "loophole" that allowed Haskell people to do anything? The utility of it as a general pattern seems like it would belong right at home in the Gang of Four book.

I understand Promises, but it seems he had to stretch the definition of the generic pattern in order to give it the "monad" label. I'm disappointed that he didn't really give any concrete examples for promises either, when there's a lot to show off about how the composition works in practice, just a giant code dump with his own weird-o "break" / "keep" / "fate" stuff that seemed to exist just to confuse.

2/10 F- would not watch again

Don Mega
Nov 26, 2005


Edit: I got the help I needed from another source.

Don Mega fucked around with this message at May 17, 2013 around 17:39

Strong Sauce
Jul 2, 2003

You know I am not really your father.

Anyone know how to simulate hanging a cluster worker in Node.js so I can test out hearbeat monitoring?

Adbot
ADBOT LOVES YOU

ufarn
May 30, 2009


Couldn't find a d3.js question, so I'll try my luck here.

I load a dataset from a csv file:

Javascript code:
d3.csv("data.csv")
    .row(function(d) {
        return {
            amount: +d.amount,
            sold: formatDate.parse(d.sold)
        };
    })
    .get(function(error, rows) {
    //
});
My question is how to perform a d3.min(), or d3.extent(), operation on one rows.amount column. Does anyone know how? I assume there's a d3 method involved that, in theory, simplifies the generic JavaScript.

EDIT: I think I found the JavaScript way of doing things; I don't know if this is what they want people using d3.js to do, though:

Javascript code:
var amountColumn = rows.map(function(d) {
    return [+d["amount"]];
);

ufarn fucked around with this message at May 18, 2013 around 23:07

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply
«58 »