Thursday, April 23, 2009

Monday, April 20, 2009

AsmJit - Binary Code Generation at Runtime?

Wanna generate high performance binary code on the fly at runtime, all through a simple C++ API? AsmJit might be the answer:

http://code.google.com/p/asmjit/

We already have such nifty libraries for the JVM such as ASM and BCEL. This is the first time I've seen it for native x86.

another introduction: http://cplus.about.com/b/2009/04/19/something-a-bit-different-asmjit.htm



[Update] More JIT Libraries:
GNU lightning (LGPL)
libJIT (LGPL)

Wednesday, April 15, 2009

Mercurial Windows Installer: A Good Example of Lightweight Installers

Python windows installer is something like ~10MB. Mercurial (which is written in python) has a stand alone windows installer (i.e, you don't need to have python installed on your system to run it) of about ~3.5MB - probably because it only contains the subset of python needed by Mercurial. The installation is a breeze and hg works flawlessly out of the box. This installer is made using py2exe, which I think showcases the maturity of py2exe: to have a reasonably complex and widely used program using it. py2exe website lists other high profile examples such as BitTorrent.

Although I don't use Python anymore, this is a good example of lightweight (in other words: easy) installers, a question to which Java still does not have an equivalent answer. Lightweight installers help make your program more popular: average joe users wouldn't want to download separate runtimes to run your little program. They are likely to go with something easier to setup. JavaKernel comes close, but it's still a separate installation, and you cannot control the packages included/excluded in it.

Tuesday, April 14, 2009

Happy New Year!

Wish everyone a very happy Sinhala and Tamil New Year!

Sunday, April 12, 2009

A Song Who’s Remakes Are Much Better Than The Original

After watching a song on American Idol that got a standing ovation from the judge Simon Cowell, and also hearing the song that sounded kind of familiar, got me checking it out on the web. I couldn’t view any of the original videos in youtube because they are blocked for my country (bad youtube! What has Sri Lanka ever done to you?).

Anyway, I managed to fish them out through other sites or fan uploads in youtube: The song is called "Mad World" turns out the song was featured on an award winning ad for Gears of War and on the sound track of cult movie Danny Darko.

The version on Gears of War is also a remake (by Gary Jules), and to me sounded a little better than the version on Idol - which got me curious about the “real” original. After some fishing around, I managed to dig up the original, and was a bit disappointed. To me it sounded like it was sung to the tune of tapping trash cans with beer bottles :D.

Saturday, April 11, 2009

Google App Engine adds Java Support

Link: http://code.google.com/appengine/docs/java/overview.html

Java or Python, GAE looks like an amazingly easy platform for scalable web application development:




I wonder if this will make app engine the better free platform for facebook application development. Currently the best free hosting option for general facebook apps is Joyent, which only has the first year free. As for using GAE for facebook hosting, Python facebook libraries still seem to be in early development stages, which could be the reason we haven’t seen any significant facebook apps on GAE. The Java library is also unofficial. But it used to be official and is now maintained as an open source project, so I think it should be reasonably complete. So would the Facebook + Java + GAE combination yield some good facebook apps (assuming there is such a thing as a good facebook app)?

Having said all that, GAE Java is still in the “early access” stage and may still have some glitches. Google is giving away java access to the first 10000 who request it, probably as a soft launch. I managed to sneak one for myself - Don’t know whether I’ll do anything with it though ;-).

Friday, April 10, 2009

Twilight is a Chick Flick!

What a disappointment. I was expecting an action movie - judging from all the hype surrounding it. What I didn’t know was that it was all due to the fanboyism (or fangirlism?) of the book it was based on. And the special effects were as good as those of a high school play.

The reason for the confusion was that I made it a point not to read reviews or check out Wikipedia before watching this movie for a change. Guess that’s the end of that practice!

On a more positive note, I watched Pineapple Express and it was quite good: it was the stoner movie I expected it to be.

How to Make Eclipse Content Assist Work like Visual Assist

Some people like overly helpful IDEs, some just plain hate IDEs (“real programmers use vi”!). I for one am squarely in the former category. I love refactoring tools, reference searches, content assist and any other feature an IDE throws at me that help me increase my productivity. Heck I would let it write the program for me if it can churn out quality code!

I like Eclipse, but I’m a huge fan of Visual Assist style content assist. With Visual Assist, content assist pops up whenever you are typing, not just when you type “.” or “->”. But Eclipse, out of the box is configured to only popup content assist when you type “.” for Java. Luckily it’s trivial to change it so that it pops up whenever you are typing:

Simply enter all the letters in the alphabet (both simple and capital) in the “Auto activation triggers for Java:” box as shown below:


Not sure whether this is available for other languages though. You may have noticed that I have also lowered "Auto activation delay" to 0, so that it opens immediately.