News for hackers. Stuff that matters.

kimjotki2

Re:Hypercard – Way Too Early on Friday February 21, 2014 @02:54AM (#7275905)
Hypercard was never too early. I remember some 'dot com' guys building a 'business management suite' in hypercard, maid fortune which evaporated after two years. Hypercard was a mere joke, like applescript.
Re:Kit Kat Conspiracy (2002) on Friday February 21, 2014 @02:47AM (#7275872)

    $('.content blockquote a').each(function () { var regex = /^http:\/\/everything2\.com\/title/; regex.test(this.href) && $(this).replaceWith(this.textContent) })
a 'backup system' that runs on python. how oxymoron.
this, let's implement inheritance movement nonsense is crufts of Java and C++. (and only C++ can be forgiven, for performance reasons.)

Python has proven that a successful dynamic language should have duck-typing, via what called late-binding. you perform lookups on a live object. And this makes even more sense for javascript, which intentionally violates whole notion of typing.

In python, yes, there are such things like 'abstract base classes', but they're mostly for convenience, not forced like interfaces in Java. which means no one write codes like:

  If not isinstance(obj, JavaicMentalMasturbationBase):
    raise TypeError, "rogue object does not follow holy Javaland commandments: %r" %obj
instead, they exist that a framework provider can tell developers, on what are the possible objects that can be fed to their framework. e.g) to use our SessionInterface, your custom session has to provide get_session and save_sesion methods.

It seems like Branden Eich's original intention has came to fruition - create a sub-par language and name it after Java. sub-sub-par developers from Java will like the language, it even has closures! But I think he didn't expected Java idiots to force their idioms and harm the whole ecosystem - usually, enterprisey code monkeys were very silent in their cubicles.

Re:Venezuela Blocks Twitter as Opposition Stage New Protests on Friday February 14, 2014 @07:19PM (#7242001)
But haven't Americans assassinate Hugo Chavez? Blocking the twitter seems to be a necessary step to stop further influences from capitalistic sides.
Re:How I want to write Node: Stream all the things on Friday February 14, 2014 @06:29PM (#7241795)
It looks like this whole notion of 'stream' is just a syntactic sugar for javascript guys who lost themselves in a bunch of nested stupid callbacks, which is worse than lisp parens. Instead of nesting whole callbacks, create a stream in the middle; execute first half of callback chain and dump the result into the stream so that next half of callback chain can be executed later.

Why is this so an enlightenment for node guys? UNIX does it right since epoch - simple programs perform simple tasks and connected via pipes. Python has gevent, so you don't even need 'a stream' or other bullshit, you just write the code as-is and greenlets provide the concurrency needed.

The real enlightenment comes from 'programming properly'; you start with C and torture your brain with function pointers and realize why it is a good idea to treat functions as a first-class objects. then you learn some 'proper' functional programming languages like lisp or something to learn how to think in functional way. which is the only guaranteed and proven path to prevent yourself from shooting your own foot by writing 20+ nested callbacks. If you start with binding an anonymous function to a <button>'s click event and think you can do this to do real programming, you'll never get it right.