Monday, August 26, 2013

Palantir Eclipse TypeScript

Among other languages, I've toyed some with TypeScript over the past half year or so. Lack of good IDE for my use case (Eclipse, not VS) was lacking. But now a company called Palantir has been working on a decent TypeScript plug-in for Eclipse.


I think I'm more in line with TypeScript than with Dart, and last time I tried the Dart editor (in the past month or so), it kept using high CPU all the time (maybe related to issues like this, not sure), and it was slow and flaky for its inference and code editing support. If JS really has speed limits that Dart can break, maybe I'd change my mind. Or if the Dart editor actually got any good. Don't know. For now, though, I like TypeScript better. It seems more "the right thing" to me.

Now if only Microsoft would add operator overloading to TypeScript and if someone would implement a TS to C++ compiler with full instant support for header parsing (pipe dream, maybe), I might really be able to make TypeScript my real go-to language. I'd prefer different, but it might be good enough.

As an aside, I'd really like this TS clone problem to go away, too. Even if it's a GnuTLS issue, it's only hit me at CodePlex so far as I know.

Tuesday, August 20, 2013

Mirror neurons and reusable APIs

One topic in neuroscience that gets a lot of attention in recent years is the "mirror neuron" thing (see here, here, or here). Decades ago, Rizzolatti et al. discovered that certain neurons would fire whether the subject was performing a relevant task or just watching someone else perform the same task.

Lots of fun discussion exists on the meaning of this.

My quick take is that it at least suggests modularity in the brain. If I developed a well-factored software API for handling any task of any sort (really, speaking of any half-serious software here), I would build reusable functions to support various aspects of the system. That's just expected, right?

Well, say I have some code paths using helper functions that actually do visible IO (say to a database or a web page or a robot arm or ...), the same helper functions would also likely get used in other contexts.

Drop a trace of some sort in said helper function, and you'd see it being used whether for visibly active things or not.

Mechanics and various use cases aside, that seems clear to me what is happening in mirror neurons. Much of the research exists around "what specific use case would these reusable functions have" and that's definitely interesting, but to me, the core is that reusable modularity is going on.

In a bit more searching, I also just learned that relevant term sometimes used in neuroscience is subserve (or subserving).