HN user

aa0

123 karma
Posts4
Comments93
View on HN

Couldn't a cross-comparison be used, encrypting different known blocks and observing certain key properties? I would imagine that any kind of reversible operation would be able to be deduced if it can be applied to specific data that reveals its true form/operation.

This pattern is egregious and shows a lack of knowledge of the architecture and language.

All these private methods are going to be duplicated for every object created. The whole point of the 'this' magic in javascript is to allow the same function, ie. the same memory usage, to be used with 1000s of objects with no hit. Here, you're going to get unique functions, extra memory, for just having the 'this' operator substituted by a variable named _elem. This code is fundamentally flawed and I severely suggest to never use closures for shared object methods when instead a shared method that is bound using '.bind' will ensure much better performance and memory usage.

Yes, render,reflow,timeouts,event handling, etc happens.. You might need to set a CSS property and then animate it. In this case you'll need to wait for a render in between the two steps

Also useful if you need to wait until after all event handlers are executed in the current context

Timeouts are not checked on every event loop, hence the 4ms delay. And no, setTimeout is asynchronous and processed during the event loop.

Basic event loop is; timeouts, js execution, repaint, reflow, etc

This article is great because it doesn't argue for piracy or against it. I do feel that it is missing a discussion about the colour of bits being amalgated by other bits. IE, if I buy a movie and then I torrent that same movie, is the torrented copy still illegal? Cloudy at best, I'd say.

An operation queue where dependencies can be set is also very relevant. For example, if you have to do 2 different json requests, followed by a render - but they are mutually exclusive, you can do a 2->1 dependency. If they do depend on each other's result, you can do a 1->1->1

I like this async syntax but I'm more fond of native JS generator trampoline. I think the JSOperation with dependencies could even use generators in its implementation.

All these solutions coming about after the C# async article are very enlightening to this problem of the synchronic vs diachronic vs asynchronic.

The JSOperations lib is in alpha but can be found here https://github.com/iandrewfuchs/JSOperations/blob/master/REA...

Microsoft pretty much let their c compiler rot. It doesn't support dynamic allocation, ie, int arr[numElts];, it doesn't even support var declaration anywhere but at the beginning of a function. Making code I've been writing compatible with msvc has been a pure headache.