Category Archives: Fun

Vimisms in Web browsing

Here are some Vimisms(Vim like way of doing things) while browsing the Web.

  1. If you are using Firefox to browse, typing / outside of a text field will open “Quick Find” (not the incremental search)
  2. If you are using Google Reader, you can use j to scroll down, k to scroll up

Here is the shortcut list from Google’s page:

Keyboard Shortcuts

Key Action
J Selects the next result.
K Selects the previous result.
O Opens the selected result.
<Enter> Opens the selected result.
/ Puts the cursor in the search box.
<Esc> Removes the cursor from the search box.

For hardcore Vimmers there is Vimperator, a Firefox add-on that makes Firefox a “modal web browser”

Advertisements

Exploring Fourier Series with Ruby

There is scope for refactoring in this port(such as replacing each with more powerful methods). My first priority was to get it working. Now that it does, I will refactor the code sometime soon, hopefully.

I ported the code from the Python for Fun series’ article entitled Waves and Harmonics. This port still has some rough edges, no pun intended, and not tested very well(see the disclaimers below). It is located on the Box widget to your left with the label ploty.rb. It can be run by typing in ruby ploty.rb. The code is licensed under GPLv2

To actually “explore the Fourier series”, please go ahead and read the original article above. I don’t have the time and patience to go into that after porting this thing–the Ruby/Tk canvas binding was not that intuitive to me(which is rare, most ruby packages I have run into are very intuitive). I had to hunt and peck through Google to find out more about TkcLine, etc.

It turns out, that this is a good collection of scripts–just source code–mostly English, some Japanese strings are there sometimes:

http://lecture.ecc.u-tokyo.ac.jp/~shagiya/progs/

Here’s a screenshot

picture-1.png

Unfortunately, the Mac version doesn’t take advantage of anti-aliased rendering.

NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

Tiobe programming languages index

So, the Tiobe index is considered to be a rough estimate of the popularity of programming languages. Let us see:

  1. Java
  2. C
  3. C++
  4. PHP
  5. Visual Basic(Eww)
  6. Perl(Ew)
  7. Python
  8. C# (haha)
  9. JavaScript
  10. Ruby(Yay!!, up from 17, Ruby on Rails effect?)