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.

Hurrah!

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).

Friday, April 19, 2013

Dart: Static or Dynamic?

Dart Language folks just announced plans to make reflection more statically analyzable. Full-core reflection makes optimization hard. Yes, I believe that.

So, what does it mean to be "dynamic and proud of it"? To "take full advantage of its dynamic typing" means simple static analysis isn't so easy. Are there are specifically indicated advantages to dynamic typing that they actually claim anywhere?

And the current Dart VM doesn't get anywhere near Java for performance, despite claims that type checks don't help. Maybe they just need more time to optimize the VM? And as for producing tight JS, I suspect enforced type checks would avoid the need to whole program analysis.

Is Dart trying to get the worst of both worlds? More difficult optimization? Slower performance? No dynamic tricks? An unenforced static nominal type system with runtime structural typing?

I only casually observe Dart, so maybe I'm missing something, but I'm not sure they know their target.

On the other hand, I had been dismissing Microsoft's TypeScript for a while, but tried it out this past week. No Eclipse love, but TypeScript actually does a good job of providing the JS we already know but with a static analysis system (and no Dart-like fear of that "inference" word) that's adapted to existing JS usage patterns. It's pretty good.

Wednesday, January 23, 2013

Rust compiler speed

I haven't tried out Rust for several months, but it's one of the languages I watch as something I might use someday. A recent discussion of compiler speed as a lower priority worries me somewhat, though. That's one of the priorities I feel Go gets right. Go gets other things wrong in my opinion, though. Hrmm.

Compiler speed on Rust is somewhat blamed on Hindley-Milner-ish type inference, by the way. They feel that's important.

Tuesday, December 4, 2012

Defeating Gnome Evolution

Once upon a time, I apparently imported my Google Calendar info into Evolution, thinking the integration would be a good idea. It drives me crazy. The web interface is good enough.

Sad thing is, Evolution wouldn't let me delete the calendar. I searched for solutions, and nothing worked.

What did work was this (and maybe some of this is overkill, so don't sue me if you lose something you want):
  1. Kill all evolution processes. I needed sudo for the calendar one, and that's probably the one that really mattered.
  2. Kill the goa (Gnome Online Accounts) process.
  3. Watch out, because evolution processes like to start back up on their own.
  4. Delete .config/evolution (although maybe just the related sources files would have worked).
  5. Delete .config/goa-1.0 (and again, maybe could have been more selective).
  6. Delete .cache/evolution (and again, maybe could have been more selective).
After all that, if I logged out and back in or otherwise let Evolution restart, it no longer tried to access my Google data.

Anyway, it felt like virus hunting I've done in the past on friends' computers. Things just kept coming back. Is any "robust" software like a virus? At least to me in this case, Evolution was serious malware.

Again, this isn't a scientific report. Just vague notes on what I did. Don't blame me for anything.

Thursday, November 29, 2012

Intelligence as a wave

On the side, I've been pondering self-modifying code as it relates to artificial general intelligence from a self-programming perspective. I think, in the extreme, an agent could (attempt to) change any aspect of its world, including its own software. To a great extent, humans are malleable, too, with cells dying and regenerating and with neural connectivity changing over time. I believe in spirit, too, but I don't know how everything works.

Anyway, I've wondered what it means for a running process (on a computer) to have access to change all its own software. If the code changes, and if all other aspects of memory change, during run time, what is constant?

I've started to think of it like waves. In a wave, the matter doesn't move, even though the wave (the energy) does. In a running process that can everything about its own memory and code, the software itself isn't the true process. The software is like the matter than the process lives in, and the process itself is some sort of wave in that medium.

Those are all my thoughts for now. Nothing formal. Just wanted to get them down in case I forget about it later.

Thursday, November 1, 2012

Prezi's UI changes

I've never really used Prezi myself, but my son has for school. I just got a notice that they've changed their UI. That link probably won't last forever.

Summary is that they are changing from an organic look with things spread out in somewhat hand-designed fashion into a more common style with everything across the top (and looking a lot like recent Google UIs, too).

I think there are pros and cons despite their simple claim that "Our new interface is simpler, cleaner and better." There were reasons for the old UI, I think. They weren't just drunk. However, it is yet another example of an oddball interface made to conform to common expectations.

Long ago, I worked on a WYSIWYG HTML editor that went through the same kind of evolution.

What's common often is what's easier, especially when you want to grow to new users.