Sunday, October 24, 2010

Some cool feature of firefox 4

firefox 4 is still under development, I've been testing it again now. A while back I tried it for its support of webgl, but I found gmail crashing and I submitted reports. I now see the new minefield (firefox 4) is quite awesome. What do I love about the new look

  • Group your tabs is a really cool feature
  • Refresh button has moved to the right
  • Book marking got a whole lot easier
  • When pointing to a hyperlinked item, the address bar shows what the URL of the linked item is (quite cool)
  • There is a new firefox sync in preferences to sync firefox across all devices
  • The web console looks interesting, but nothing to beat Chrome's developer tools

There are many more, these are what I could see from my first impression. I'll try and post some interesting screenshots. I've also heard that the firefox 4 javscript engine is now one of the fastest engines (really cool!)

On my wish list, I have

  • Better download manager
  • Ability to do private and non-private browsing in parallel

Saturday, October 23, 2010

Having fun with libvirt and qemu

I've been having some fun dealing with libvirt and qemu. qemu is the basic hypervisor that creates a virtual environment for execution and libvirt is the overall management library. libvirt has several checks built in to valid qemu and every-time, qemu changes (major version), libvirt fails or the default configuration needs tweaking (XML file).

Both are great projects, it is interesting to understand their architecture (which of course is way deeper than this post :))

Friday, October 22, 2010

Cgroups in use

I stumbled upon slides from the 2010 RedHat summit. Cgroups and Resource Management is introduced and mentioned.

There is also a great video on cgroups, really nice to see technology developed being exploited. The video is crisp and clear, do watch it now

Plumbers talk on memory cgroup

There have been several talks on memory cgroups in the past, I just found out about a new one at Linux plumbers by Ying Han from google. If you are at plumbers, I'd recommend attending her session

Sunday, October 17, 2010

Signal processing in sagemath

I was experimenting with some tools for signal processing. The first tools that come to mind are opensource tools scilab and octave. I spent a day looking at the tools, the UI. I figured I could do definite integrals quite easily. Having spent the day and not having the made the progress I would have liked to, I turned to sagemath.

My first delight was to learn about piecewise functions. I decided to play with a square wave of time period 20.

I started with a function that looked like

f1(x) = 1
f2(x) = 0
f = Piecewise([[(0,10),f1],[(10,20),f2]])

Plotting the function with plot(f) showed






Which is exactly what I wanted. Piecewise class also supports a number of very useful functions related to fourier series.

One particularly useful one is a plot fourier series partial sum. The function shows how as we add more frequencies the fourier approximation to the original wave gets better

I started with

f.plot_fourier_series_partial_sum(5,10,-20, 20)

f.plot_fourier_series_partial_sum(15,10,-20, 20) gave me



f.plot_fourier_series_partial_sum(150,10,-20, 20) gave me



This looks like a good approximation to the wave we started with and almost looks like the signals I got on my oscilloscope during my engineering days :)

The next important thing was to get the sine and cosine coefficients

print "sine terms"
for j in range(0,21):
    pretty_print(f.fourier_series_sine_coefficient(j, 10))
print "cosine terms"
for j in range(0,21):
    pretty_print(f.fourier_series_cosine_coefficient(j, 10))



sine terms
0
2/pi
0
2/3/pi
0
2/5/pi
0
2/7/pi
0
2/9/pi
0
2/11/pi
0
2/13/pi
0
2/15/pi
0
2/17/pi
0
2/19/pi
0
cosine terms
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
 
 
Overall, I had good day with sagemath. I need to experiment with some of the discrete functions. Keep tuned in, I'll try and keep you updated on how it goes.

Ranking and Unranking permutations

I've been a big fan of Skiena's Algorithm Design Manual , I recently found my first edition of the book (although I own the third ed...