Sound.C – The Number

Its been a while I wrote anything up here, and its been a really long time since I actually made any music at all. I was going through some older tracks today and I found this. Some of you may already have heard this before. Its not really mixed or mastered at all, so it won’t sound very pristine, but I wanted it to sound dirty and gritty so I pumped in a lot of distortion too. You’d also hear a lot of stock Logic Pro sounds :).

You can find the track on my Music page, or:

Let me know what you think.

/

Why Python is so awesome sometimes

Here’s why I totally love python sometimes:

def _callService (self, headers, callback, errback = None, method='GET'):
    # ....
    return some_val

def _callServiceGET (*args, **kwargs):
    return args[0]._callService (*args[1:], method='GET', **kwargs)

def _callServiceHEAD (*args, **kwargs):
    return args[0]._callService (*args[1:], method='HEAD', **kwargs)

/

Update: Server from Ubuntu to Arch

Just an update.  The server migration from Ubuntu to Arch went well. The server is running great, the heat levels are low, can’t really hear the fans running now.  There are slight problems with NFS shares but that’s just a matter of some configuration change.  I’d do it whenever I need it next.

The server has been up for 22 days now, usage is running low and there are no stupid services running by default to bog my server down.

I rewired my network with Cat6 and I am seeing some nice gigabit speeds.  Having multiple switch jumps is kind of a pain though.  I probably need a 24 port gigabit router so that the traffic could run at maximum through-put.

The server has also handled 55GB inbound and 37GB outbound traffic in last 22 days :P.

Server from Ubuntu to Arch

I had been a happy customer of Ubuntu 8.04 server edition for quite some time.  It was stable, ran without problems, and got me as far as 130 days (power failure :() without requiring a restart, and that too on my old box which can hardly handle anything else.

But 8.04 was fading out (not being a LTS version), so I thought may be I should dist-upgrade to 9.04.  Well I did and, to say the least, things have been pretty rough.

The server has not been as stable as I’d would like, my iptables rules don’t load well anymore, I just keep loosing internet connectivity at least once every hour, my ssh connections to the box just keep getting terminated and I need a restart almost once a week to bring my file transfers upto speed.

So I think its now time to abandon Ubuntu and move to my Linux of choice.

Arch Linux offers what I need from my server system.

  • Rolling release cycles – So I probably wont need a system-wide upgrade, just an update once every now and then to get my packages updated.
  • Minimal Linux – So I know exactly what is going on on my system.  Easy to configure, easier to find problems.
  • Recent software releases - Arch Linux community is pretty good at keeping up with new releases, you almost always have the latest release of a software available through pacman or, if not, through ABS.  Not always good for server systems, but always good when bug-fixes are being pushed out.
  • I use it as my primary operating system on my desktop and I love it.
Its not going to be easy though.  I have a whole bunch of systems running on my server system and re-configuring them to what they do now is going to me a laborious task.
But well, what the heck.
/

Perfect Editor?

It’s been a while since I last posted here.  There’s just been too much work lately and a toddler running around the house doesn’t really help either :).

Last time when I was here I was looking for the “Perfect Editor”.  Well, I guess there is no such thing as a “Perfect Editor”.  There is probably an “Editor which works for you”, but I guess that could be too subjective for some :).

I gave emacs a shot and I think I am in love.  I haven’t really looked at anything other than emacs at all. Took me a while to get used to those weird finger twister shortcuts but I think I am beyond that now and I don’t even realize when I do a C-x-s.

I have sort of personalized it a lot though.  Since I mostly program in C, the first thing I got was CEDET.  I probably just use 1% of what it really offers, but whatever I use, it makes writing code a lot easier e.g. It has these nice separators for functions so when you’re scrolling through the code you can easily figure where the functions start and finish; also, it has a status line on top which tells you the context you’re in (which function you’re writing etc.).  Well there’s so much it offers that I cannot possibly mention it all here.  If you’re curious its worth a shot.

I also got a couple of more plugins for managing collapsible scopes (like the +/- buttons next to functions in modern editors and IDEs) and languages like lua and php (support wasn’t there with the default emacs package on Arch).

Well, that’s all about it I guess, I’d be sticking to emacs for the foreseeable future I guess, but if I change my mind, I’d let you know.

/

In search for the Perfect Editor

I have been programming exclusively on linux lately.  When I was on windows, like everyone else I used to use Visual Studio for all my development work.  I used to love it, but always used to wonder if there is anything more I can do to boost my productivity.

On linux, there are a whole bunch of editors. None of them, right now to me I would say, sound as convenient as Visual Studio.  I am not saying Visual Studio is the ultimate editor/IDE, just that I am used to it and when I use a new editor that’s where my standard is.

On linux, I have been using eclipse lately. It was great initially, but now it’s turning into a nightmare.  Auto completion is painfully slow with it, and as the number of your library includes and source files go up, the more its failing to deliver.  It’s not that bad though, I’ve been using it for a while and so far I am getting my work done.

Another editor I’ve been using to edit single files is geany.  It’s simple, nice syntax highlighting, native (not in Java), and if you do a native compile on arch, you’re in for some serious speed surprise.

I started a thread on stackoverflow.com to discuss this.  I have a few things that I want my editor to do, and I have a few responses which I am going to try out.

Before getting into GUI editors, I will have to give emacs a try.  I’ve been putting it off for a while now and before I can make a choice, emacs deserves some serious thought.  I use vi occasionally, it hasn’t impressed me much to the point that I start using it as my regular editor. Not that its not great, its awesome.  The things people have been doing with it are mind-blowing.  Just that I don’t want that much hassle to setup my environment around. But I’ve got some nice scripts people are sharing on stackoverflow, so I will give it another shot.

But for now, its emacs’ turn.

In case you have a suggestion, I primarily program in C and python.  Occasionally in C++, C# and Java.

Sound.C – Drugs of Choice

So I finally took some time out today to do some cleanup on this track and level it up so that I could upload it. I had been working intermittently on this track for a while now and wanted to just push it out.

Its more of a euro-psy-progressive style, hope you like it. Feel free to leave feedback :).

/

GMail Notifier v0.4.5 released. Ubuntu package available.

Just released GMail Notifier v0.4.5.

It is now available as an ubuntu package which can be downloaded and installed directly on an Ubuntu 9.04 machine. The program should now be super convenient to install.

More features are being added to the program everyday, so stay tuned (actually the program will let you know whenever a new version is available).

/

GMail-Notifier : Mac OS X style GMail notification for Ubuntu

Here’s the link for the impatient: GMail-Notifier

I just got the GMail Notification application I had been working to a stable state. It should now work for you on a Ubuntu 9.04+ system. Just download the source and run:

./gmail-notify

The first time you run it, it should ask you for your gmail credentials.

I am looking into making it into a .deb package but that will have to wait while I figure out how to do it. Till then feel free to test it and let me know of any problems you get into.

/

Linux router as a persistent VPN Client

I couldn’t think of a good title for this post :).

I work from home and I often have to connect to my workplace network.  I work from several different machines from within my home network and hate setting up VPN on each of these machines.

I recently setup a linux server/router at home.  To solve this problem I configured a VPN connection to my workplace on this machine by following the instructions here.  After playing around with my firewall settings and setting up the route so that all traffic destined for my workplace’s subnet is routed over the ppp interface, I was able to ping my workplace machines from the linux box.  I was, however, still not able to reach my work machine from other machines on my network.

To solve this problem I figured that I needed to NAT the address before sending the packet over to the workplace network.  This can be done very easily with iptables:

/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to 192.168.23.0

Here ppp0 is the PPP VPN Link interface and 192.168.23.0 is the workplace’s subnet.  Once I did this all of my machines on the network were able to ping and connect to my workplace machines, which is sweeeeet!! :)

I configured my VPN connection to start on boot and setup all these routing and firewall settings on startup. So I will now have a persistent connection to my workplace from home.  With some DNS settings I can now easily access my workplace from any computer in my home network.

HTH

/