make clean

October 18, 2008

Moving over

Filed under: Uncategorized — harshadrj @ 9:21 pm

Dear reader,

I have moved yet again to another site.

I am now blogging on a new blog site.

I like wordpress and I have 3 other blogs hosted on wordpress.com. However for technical stuff I find it easier to use a wiki with interlinks to other posts/pages.

See you around,

hrj

September 6, 2008

Clang: A static analyser

Filed under: Uncategorized — harshadrj @ 11:28 am

I saw Clang mentioned on a blog post somewhere and it looks really interesting. Got to try it sometime on a real project.

(This is more of note-to-myself)

July 16, 2008

rags to riches

Filed under: Uncategorized — harshadrj @ 4:37 pm

Back in the old days, GCC was the worst open-source beast, in terms of documentation of its internals. I have made two ports of GCC with sheer guess-work.

But, I think GCC is soon going to be the best documented open-source project. (Though, I suspect the code would still be quite messy).

Checkout this project from IIT-B. I like the approach in these docs; beginning with some conceptual treatment and then drilling down to implementation details (though the latter doesn’t seem to be complete yet)

May 29, 2008

Trade-offs

Filed under: Uncategorized — harshadrj @ 1:25 pm
Tags: , , ,

I think Engineering is mostly just the art of making the right trade-offs.

A classic example

Makes for a good read. Apparently, this was one of the blocker bugs for the release of Firefox 3.

May 13, 2008

LyX : the document processor

Filed under: Uncategorized — harshadrj @ 8:02 pm
Tags: ,

I wanted to create some dot graphs and compose them on a single page, and I thought of using LaTeX for it. That’s when I remembered LyX, my one-time favorite word-processor.

I hopped on to its website and dude! It’s still alive and kicking solid ass. I am surprise, nay shocked! They even have a version compiled with Qt4.4!

Cheers to the LyX team!

I will probably use something like dot2tex to have them co-operate. dot2tex itself looks like a neat tool.

HoM : an experiment in Scala

Filed under: Uncategorized — harshadrj @ 7:35 pm
Tags: ,

I wrote a little game in scala; House of Mirrors. It is a logic game heavily inspired by Chromatron.

It was just a for-fun project and I also wanted to familiarize myself with scala with a real-world application.

My notes:

  • I first wrote the core of the game, with no interface at all. It was probably about 100 lines of Scala code. I found I could easily design and code on the go.
  • I built up all objects using a hierarchy of case classes and stuck to immutable data types.
  • Adding a GUI layer on top of the core was easy with the SQUIB library. I think the total code was about 400 lines of code.
  • However, when dealing with colored light beams I had to get my hands dirty with Swing, since I wanted to define my own Composite class. I found some missing functionality in AWT and had to use Double buffering while compositing. This is what to took most of my time, though it’s just 17 lines of code
  • The next part was saving and loading game files in XML format. Needless to say, this was a breeze to write in Scala. Total code was about 500 lines of code
  • After a lot of game features and minor GUI enhancements the code now stands at 1k loc

The biggest hurdle I faced when dealing with Scala was a lack of documentation for the standard APIs. The others being : instability of the compiler itself, changing APIs and some inconsistencies in the language. An example of the latter; “case North” is treated differently from “case north”! why? because capitalisation of identifiers is treated specially! Bad design choice I think; it’s too quirky.

Most of these problems should go away with time & love but some like the above quirkiness are potential hair-pullers.

March 19, 2008

Inkscape 0.46 will rock

Filed under: Uncategorized — harshadrj @ 12:41 am
Tags:

Inkscape, an excellent open-source vector drawing program, now gets even better. The release note is one long, feature packed list!

I am looking forward to using the engraving tool.

Note to p6 and dkarsh, this was the program I used for creating the BAS logo :)

March 6, 2008

lazy sequences in scala

Filed under: Uncategorized — harshadrj @ 12:53 pm
Tags: ,

At work, some of us were discussing about lazy lists v/s iterators. I just tried a quick lazy list in scala, and it worked pretty well to my satisfaction.

class roleNumbers extends RandomAccessSeq[String] {

def length=10;
def apply(n:Int) = {println(“evalutaing ” + n); “role:” + n}

}

val xyz = new roleNumbers

// drop 8 elements, map the sequence, and then take first element
val one_element = xyz.drop(8).map(“rum ” + _)(0)

println (one_element)

The output :

evalutaing 8
rum role:8

The laziness is preserved across list operations which is a good thing.

In fact, I notice that Iterator trait and List trait have a similar interface, which reinforces my belief that they are pretty much the same, though usage semantics might be differ slightly.

I now need to figure out how to implement an efficient get_next_element kind of iterator in scala.

February 28, 2008

Dormino

Filed under: Uncategorized — harshadrj @ 5:37 pm

A mouse that runs on excess heat from your laptop. Now that’s a cool idea:

http://www.core77.com/competitions/GreenerGadgets/projects/4614/

January 24, 2008

Viewing large graphs

Filed under: Uncategorized — harshadrj @ 5:05 pm
Tags: , ,

For interactively viewing large dot (from graphviz) graphs  ZGRViewer is a great tool.

Next Page »

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.