Better HN
topnewbestaskshowjobs
Log inSign up

pabloPXL

14 karma · joined Oct 3, 2011 (15y ago) · 38 submissions

Submissions

comment 12y ago · link · parent

I wrote another async replacement for browsers, 4.1k minified. https://github.com/aynik/be

comment 13y ago · link · parent

Right column, top.

comment 13y ago · link · parent

FTFY: a) http://www.google.com/trends/explore#q=express%20js%2C%20rub... b) http://www.google.com/trends/explore#q=javascript%2C%20ruby%...

comment 14y ago · link · parent

Try the standard library: http://golang.org/pkg/

5.

Extending and building Railo 4(pxl.gg ↗)

1 points · by pabloPXL · 14y ago · discuss

comment 14y ago · link · parent

This is really cool! Cannot wait for a release with private spaces!

7.

Anonymizer web service with Node.js(pxl.gg ↗)

4 points · by pabloPXL · 14y ago · discuss

comment 14y ago · link · parent

Apple suing in 3, 2, 1...

comment 14y ago · link · parent

I think both behaviors provide continuation to the problem. On one side, the people who is actually sexist, or racist, or just believe in stereotypes. In the another, the people who also believes that the rest of the people are biased towards their sex, skin color or condition. Ignoring information that is not interesting or useful for us is the best tool we have to not be hurt by other people so easily, get stronger and prepared to survive in an unfair society and preserve freedom of speech. Nobody wants to be negatively discriminated, but does somebody think positive discrimination is the solution? I believe is the same social problem after all.

comment 14y ago · link · parent

That's because there is no OOP in javascript as in other languages like java or python, javascript only implements natively prototypal inheritance and lexical scope. This very important concept is always misunderstood because of the syntactic sugar like 'new' and 'this'.

comment 14y ago · link · parent

Well, although simpler and less error prone, the 'self' method is quite less optimal than the prototype way. A quick test reveals that the first technique consumes much more memory (100000 new instances pushed into an array): http://imgur.com/YVkny

self: var a = []; function b(){ var c = {}; c.d = function(){}; return c }; for (var e = 0, f = 100000; e < f; e++) a.push(new b)

prototype: var a = []; function b(){ return this }; b.prototype.c = function(){}; for (var d = 0, e = 100000; d < e; d++) a.push(new b)

comment 14y ago · link · parent

Never heard of anonymous image boards :?

comment 14y ago · link · parent

Thanks! but I can only see it as a bad hack, as it's just grep doing almost all the dirty work :) btw I got the idea from http://zachholman.com and his boom-db...

comment 14y ago · link · parent

hey I did something similar but in pure bash (plus grep and cat) :) https://github.com/pabloPXL/kissdb

comment 14y ago · link · parent

Thanks! I didn't know this project and looks pretty awesome :)

comment 14y ago · link · parent

Well, given that javascript was designed in somehow less time and with less resources than superior languages it has obviously some inconsistences and everybody agrees on that. On the other side if you know the language really well you can avoid the most of the problem it has. I like your point of 'keep it real' but you need to accept that the language is far from 100% correct.

comment 14y ago · link · parent

Well I think that was 'designed' basically to cast any type to it's string representation. Also wanted to point that I used type coercion when is supposed to be used, and never got a bug of that nature in my code, but yes, you must get the coercion rules right from the beginning, and yes, javascript code could live perfectly with this 'feature'.

comment 14y ago · link · parent

Because in strongly typed languages the compiler is able to hunt down the most of the bugs for you in milliseconds. That's why haskell programmers suggest that if a haskell program compiles gracefully, you can assume is mostly correct and bug free.

comment 14y ago · link · parent

It looks really interesting!

comment 14y ago · link · parent

Nice, but wasn't chicken scheme the flagship of scheme-to-c compilers? http://www.call-cc.org/

comment 14y ago · link · parent

I translated it to js -> https://gist.github.com/1679611 Earned 1 line, and packed it with a cheap implementation of zip :3

comment 14y ago · link · parent

I think you didn't make a fair translation from ruby to javascript there, here goes my attempt:

    function map_unless_nested(arr){                                                                      
        return arr.filter(function(it){ if (it instanceof Array) return it }).length?
            function(){ return [] } : function(fn){ return arr.map(fn) };
    }

    console.log(map_unless_nested([1,2,3])(function(n){ return n + 1 }));
    console.log(map_unless_nested([1,2,[1,2],3])(function(n){ return n + 1 }));
edit: also a translation for the last example

    function map_first_innermost(arr){
        return function(fn){
            return arr.map(function(v){
                if (v instanceof Array) 
                    return map_first_innermost(v)(fn);       
                return fn(v);
            });
        };
    }

    console.log(map_first_innermost([1,2,[1,2],3])(function(n){ return n + 1 }));

comment 14y ago · link · parent

No, mainly because there is no such a place.

24.

Jils, expressive javascript.(reddit.com ↗)

2 points · by pabloPXL · 14y ago · discuss

comment 14y ago · link · parent

to install it (globally): > npm install -g jils

26.

Jils, a simple lisp implementation for javascript(github.com ↗)

1 points · by pabloPXL · 14y ago · 1 comment

27.

Pseudo anonymous functions in cfscript(gist.github.com ↗)

1 points · by pabloPXL · 15y ago · discuss

comment 15y ago · link · parent

Created own repo, https://github.com/pabloPXL/kissdb

comment 15y ago · link · parent

^ This is what I mean with my sentence, thanks :)

comment 15y ago · link · parent

I know perfectly where it comes from, I have access to google too, and the quotes remarked perfectly that the quote was not yours. I was replying to your intention, not to the literal text.

EDIT: this reply actually looks more personal than I wanted it to be, and given your clarification, have my apologies...

12