HNHacker News
TopNewBestAskShowJobs

jQueryIsAwesome

903 karma · joined September 10, 2011

@ivanca at twitter
submissionscomments
jQueryIsAwesome··on Explosions near Boston Marathon finish line
Well, TSA will start checking marathonists anytime soon.

Ban me or whatever you need to do but the reality is that one bomb and Americans cry, while at the same time incentivate thousands of bombs and deads in Mexico for their useless "war on drugs" and also creating pointless wars around the world (eg. Iraq)

jQueryIsAwesome··on News is bad for you – and giving up reading it will make you happier
I'm Colombian, like, live in Colombia/South America.
jQueryIsAwesome··on News is bad for you – and giving up reading it will make you happier
Mass media focus on drama not in information; so your emotions are appealed more than rational thoughts.

You can't do nothing about the North Korea crisis even if you watch the news, that's a "Reality check".

jQueryIsAwesome··on Hal Finney: Bitcoin and me
I never said "cure-all"... I never even mentioned cancer nor did the people in the video.
jQueryIsAwesome··on Hal Finney: Bitcoin and me
Billions of dollars are wasted to fight against a analgesic and therapeutic drug that could help millions; this world haves very dumb and/or corrupted people in charge.
jQueryIsAwesome··on Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
Slightly related: If you are using ST2 I recommend the "Clipboard Manager" plugin to have multiple clipboards, it gets anything that is copied inside ST2 or any other software, it works with multiple cursors which is really handy.
jQueryIsAwesome··on Own your own Bitcoin Exchange
Where does it say that bitcoins are money?
jQueryIsAwesome··on Own your own Bitcoin Exchange
DOSS attacks can be overcome with a solid infrastructure like Cloudflare (expensive but possible) and also with the help of modern browser capabilities such as webRTC and offline cache.
jQueryIsAwesome··on Console.log with style
The features of the console is not really a usability issue.
jQueryIsAwesome··on Console.log with style
I found a way... well, sort of:

    var log = function(){
        args = [].slice.call(arguments);
        args.unshift(console);
        return console.log.bind.apply(console.log, args) 
    }
But you have to add extra parenthesis at the end, hopefully is not too much overhead for most devs.

    log("message")()
jQueryIsAwesome··on Console.log with style
Maybe add console.assert to that list:

    console.assert(str.length === 10, "String is not 10 characters long!");
and console.group/groupEnd

    console.group("sums");
    console.log(1 + 1);
    console.log(2 - 3);
    console.groupEnd();
jQueryIsAwesome··on Console.log with style
This "console"... IE5 didn't even have console... and event the current one IE haves is a joke compared to firefox or chrome.
jQueryIsAwesome··on Csscss: a CSS redundancy analyzer that analyzes redundancy
The author also haves one of the best bios in twitter:

> I connect stuff and copy bits. Sometimes it doesn't work

jQueryIsAwesome··on How to share your data effectively
"Well, that explains why the business world is so broken"
jQueryIsAwesome··on [dead]
"Freedom" is slowly losing its meaning.
jQueryIsAwesome··on Show HN: Subvim – Vim customized to be like SublimeText
Is awesome but it needs some work, it would be _really_ nice if it were syntax aware, so if you start Ctrl+D in a variable it should only select where is being used as a variable and not other things (regex, strings, etc) or at least a boolean option to enable this behavior.
jQueryIsAwesome··on Show HN: Subvim – Vim customized to be like SublimeText
ST3 will be released soon and is supposedly going go fully support all vim commands in vintage mode with better performance.
jQueryIsAwesome··on Homeless in Silicon Valley
There must be a name for the logical fallacy of taking analogies way too literally.
jQueryIsAwesome··on Thesis Hatement
> better-than-thou crowd

The irony burns like flames from hell.

jQueryIsAwesome··on Homeless in Silicon Valley
Kurt Cobain was homeless during a period of his life and was a drug addict and arguably also had mental issues; what I want to say is that is not "social justice" what many of them need but help finding passions that can provide at least for their basics needs (of course also some level of help with their addictions and mental issues)
jQueryIsAwesome··on GDC 2013: Michael Abrash on “Why VR is Hard (and where it might be going)”
The tracking problem seems easy to solve; but admitedly I never went to college so this may be just dumb, but why don't just use a external reference device? A little device that saves your initial position and triangulates the diff between your initial position and your current position.
jQueryIsAwesome··on Callbacks are imperative, promises are functional
I see no benefits in promises, zero, none.
jQueryIsAwesome··on Callbacks are imperative, promises are functional
Sorry, I don't see no clarity there. And how would that fix the fact that stat works in individual files?, and more importantly, how does a function like that handles error? Individual level, group level? It is confusing.
jQueryIsAwesome··on Callbacks are imperative, promises are functional
Nope, the shared scope would obligate me to create a function with binded params for each iteration so "i" is not the last value (e.g. path.length) in every call. Examples: http://stackoverflow.com/questions/1451009/javascript-infamo...
jQueryIsAwesome··on Callbacks are imperative, promises are functional
The example I'm talking about is the one where he doesn't handle errors either, this one: http://pastebin.com/98CarwzU.

And your example is disingenuous too, why do we need to add so much logic instead of collecting the errors if you want to handle them anyway?

    result.push(err || data);
So you don't need to copy around a variable called "hasFail", one line can be enough

    var failed = results.every(Buffer.isBuffer);
jQueryIsAwesome··on Callbacks are imperative, promises are functional
... and what does that haves to do with promises?

And in such case you would only do this once outside the listeners of http/or-whatever connections so it would be done just once regardless of the number of concurrent activity.

jQueryIsAwesome··on Callbacks are imperative, promises are functional
All the code and such a big abstraction for the first example when it could have done like this:

    var result = [];
    paths.forEach(function (i, file){
        fs.stat(file, function (err, data){
            result.push(data);
            if (i === 0) {
                // Use stat size
            }
            if (result.length === paths.length) {
                // Use the stats
            }
        });
    });
Fairly understandable, more efficient and without introducing logic patterns foreign to many. It also meet his requirements (It is parallel and we only hit every file once)
jQueryIsAwesome··on Scientists Inject Human Brain Cells Into Mice, Make Them Smarter
> Only humans perform experiments on other species that we would regard as torture.

Because only humans are capable to, do you seriously think overwhelming cognitive advantage would be used any different if we had different traits? If our heads were shaped like the ones of mice? Or if we had 4 stomachs like the cows? And this selfishness and disregard for other animals well being is what made humans growth so quickly and one of the main reasons you and me exist.

jQueryIsAwesome··on Would it be hard to have a mobile style sheet for HN with pressable buttons?
Fixes done.
jQueryIsAwesome··on Would it be hard to have a mobile style sheet for HN with pressable buttons?
Me too; arrows are just CSS to avoid pixelation.

The code can be found here: https://gist.github.com/AltIvan/5243025

It looks like: http://i.imgur.com/iYrfuOf.png

I know that the login button disappeared but it ask you to login in when you try to reply, up-vote or submit.

Page 1 of 20Next →