Friday, November 25, 2011

Installing Ubuntu fonts in Fedora

I like the new Ubuntu fonts. Here's how to get them working in Fedora.

Monday, September 12, 2011

Sage: A first experience

I had heard about sage a while ago. I had figured that I'd give it a try if I needed it over Mathematica and friends. That need arose a short while ago. And I tried using sage for some hybrid symbolic/numerical computation. So, how was it? Read on.

a) The online sage notebook experience is simply awesome. A very good idea. May be, somebody should do an Android/iOS app for this. It could be quite useful.

b) The symbolic manipulation capabilities are decent. Mathematica's are demonstrably better at this time, but the difference I saw was that the expressions were simplified better in Mathematica. This is hardly a exhaustive review, but it wasn't a deal breaker in any way.

c) I tried evaluating the error function for a complex argument. Sage went poof. The expression was complicated, so I didn't wan't to get my hands dirty with it. But the milestone is set to be the next version, so it's not that bad.

Bottom line, Sage is a very good step in a very good direction. But it will be a while before it crosses the reliability threshold. My guess is 3 years with decent amount of funding.

Thursday, August 25, 2011

C++11 : a great addition

I have always liked a certain subset of C++. I never cared much for OOP, but I have always liked functional paradigm. The C++ standard has just undergone a major revision and it has now added support for lambda functions.

Now, C++11 is almost my favorite language. It offers precise control over memory, instructions and data structures while almost letting you use functional composition and functional abstraction and offers type inference to boot.

There a few brittle points, and the new STL still seems to lack a version/variant of reduce operation.

If only C++ had a garbage collected and interpreted subset ass well :)

Tuesday, July 19, 2011

Writing a ray tracer

I have written earlier about the simple rasterizer I wrote some time ago. Well, I have been feeling somewhat more adventurous of late, and I decided to write a ray tracer. The good news is that it is mostly working. The bad news is that making pretty pictures is more work than fun and messing around with the internals is lots more fun, so nothing worth posting here as yet.

Things I learnt,

a) You might need to link with -lgomp with gcc, in addition to -fopenmp, if your code was initially compiled with -c option.

b) Parallelizing code can make you clear up your understanding of your own code by a lot.

c) OpenMP rocks. But GPUs rock even more.

It needs some secondary rays goodness and some more work for it's acceleration structure. I think I'll do the latter first.

Text rendering in Firefox 5

This was a nice surprise. In FF 3.6, at least on linux, text rendering left a lot to be desired, especially as you zoomed in or out. With Firefox 5, rendering quality is positively cute. With awesome AA. I just keep liking FF more and more.

At this point, I only miss two things from chrome. Auto translate and H.264 video playback with HTML5.

Any suggestions?

Sunday, June 26, 2011

Upgraded to Ubuntu Unity, and I like it

I am running Natty with Unity. I am kinda smitten by the new UI Ubuntu has come up with. With gpu acceleration, this thing really flies. These shortcuts are really useful.

I have upgraded to Firefox 5, and frankly, I am not missing chromium, which is quite surprising, considering my experience with Firefox in the past. A few addons have helped, like omnibar, downthemall, and torbutton helped swing the decision. Firefox is sitting behind polipo, which is good, as I can filter all the nasty ad serving URLs. It helps that I need polipo for tor anyway. I highly recommend tor for anyone who cares about his privacy and free speech online.

The default nouveau driver was a bit of a pain (I have gt330m), as it kept hanging. Got rid of it and with the new nvidia driver, there is no problem at all.

There are a few downsides though. The firewall situation needs to be looked at. I had to set selinux in permissive mode, else it wouldn't let me run the nvidia driver.

Saturday, May 21, 2011

Got my rasterizer working

Long time, no see huh :|

Anyways, the big news is that I have crossed my rite of passage. See, most people would write a simple ray tracer when they are fooling around with graphics. But I for some reason, felt that writing a rasterizer would be so much cooler. The thing is, this technique is so looked down upon that even the word rasterize not in default Firefox dictionary. Talk about being an outcast. :P

But, I managed to write it in the end. So here's the obligatory screenshot.

It has vertex shaders, pixel shaders, bilinear filtering of rectangular textures (but no mip mapping) and perspective correct interpolation. It still has a few rough edges and sharp corners though. The rasterization process is anything but robust and for some reason, I decided to defer implementing the z buffer itself. Yeah, I am going to hell for this...

There's a very illuminating story behind the history of z buffer itself. It was discovered by Edward Catmull, who among other things discovered texturing. In a review of 10 visible surface determination algorithms (PDF) by the legendary Ivan Sutherland, it was characterized as ridiculously expensive. And yet, here it is, having virtually displaced everything else.

Bottom line, amenability to hardware implementation and Moore's law put together can change the cost of an algorithm.