Ads by Google

Wednesday, November 11, 2009

Another Day, Another Language: Go: From Google

From LWN, I learnt that Google has released a new systems language because....nothing had been done in that area for some time.

So, we have Go.

After you've gone through the FAQs, which I strongly suggest you do, as it contains interesting pointers on the whys and whats of this language,  one has this nagging feeling ....

Exactly what issue are they addressing and for whom?  It's there in the FAQ but are YOU convinced?

Tuesday, November 10, 2009

MobileOrg 1.0 for iPhone/iPod Touch now available

I've been meaning to post this for sometime but I kept forgetting.  Well, the title says it all, from the org-mode mailing list on the announce.

Read the post for the features and links for downloading it.  There's even a screencast here.

Sunday, November 1, 2009

A quick way of looking up colours in LaTeX

While making beamer presentations, I generally use dvipsnames or svgnames as an option to beamer. This allows me to use named colours instead of giving some RGB numbers to get the colour I want.

Well, sort of.

I mean you still have to figure out what HoneyDew looks like. I used to google it up and check how the colours actually looked. Now, I've got a simpler way to do it. Just do, M-x list-colors-display in Emacs and it shows about the same list as that of svgnam.def with the visual colours. Saves you a few keystrokes and clickies.


You of course, are using Emacs and AucTeX aren't you? :-)



Sunday, October 25, 2009

Carnatic Music Internet Radio/streaming stations?

If anyone knows of a working internet radio station focused on Carnatic Music, could you let me know of them in the comments?  My searches have lead to me only one and the rest seems to be pretty dead.

And the one I found is pretty simple to use too, I have to just plug the url into Windows Media Player and it works.

Tuesday, October 20, 2009

JTikZ: A Java library that produces TikZ code

From an email to the pgf mailing list, Evan Sultanik has written a Java Library to create TikZ code.  If you code in Java, then it might be useful even if the code is in early stages of development.  The library can be found here.

Instructions on using the Library can be found in the email.


Thursday, October 15, 2009

Using Emacs Regular Expression Builder

Sometimes it's worth using or getting help on the work you're trying to do. For example, in the Unix world, regular expressions are powerful tools to match,print, find or delete text strings. While mostly the regular expressions achieve what we want, it might be good to get some help in identifying whether the regex is doing what we intend it to do.

In Emacs, there is such a feature called re-builder, invoked as M-x re-builder. As you type the regular expression in the minibuffer like prompt within the double quotes, the text buffer gets highlighted with the current regex that has been typed so far. As you keep modifying the regex, the buffer too is highlighted dynamically on what that regex will match. Once you're satisfied with the regex C-c C-w will copy it to the kill ring and use it in, say C-M % which is generally bound to query-replace-regexp.

The following screenshot shows the matched text and the regex entered. I was trying to delete off everything after the 2nd semicolon.


The highlighted portion is due to the regex shown below


Give it a shot. It saves you a lot of time figuring out the correct regex.

Saturday, October 10, 2009

Gnuplot tricks blog

If you've done any kind of plotting on the Unix side, you probably would have heard of gnuplot. I've been using it for years on and off and all my learning has been to cadge off the demo scripts on the home page. Those are excellent of and by themselves. To complement that, I saw a post on the gnuplot newsgroup about a blog http://gnuplot-tricks.blogspot.com/ by Zoltán. As mentioned in the post, he also maintains the same examples at this site.

I must say, it is an excellent blog on using gnuplot and I confess, that it does make me want to learn gnuplot to the extent the blog author has done.

Go take a look for the fantastic quality of the graphs.

Wednesday, October 7, 2009

Incrementing counters in Emacs macros

If you've used macros in Emacs, sooner or later you'd need to automatically increment as expressed in this thread. If you read the thread, you'd see a number of suggestions but the simplest is to use the builtin Emacs counters. The Emacs manual too mentions how to use them.

The Emacswiki too mentions how to use them and some tricks in getting it to do it the way you want.

Learn it, it saves a tremendous amount of drudgery typing

Saturday, October 3, 2009

Passing AWK variables to shell commands for evaluation

For some reason, I never seem to get how to use the shell from within GNU AWK to manipulate the AWK variable and return it. Spending a lot of time with the system and getline command, I still couldn't figure out how to pass a variable to a shell command, evaluate it and then return the value.

After much trial and error and googling, this seems to work.
a=20090601
cat ../data/C_100119.dat | \
awk -v compdate="$a" '{
while ("date --date="$4 " +%Y%m%d"|getline aa)
{
if(aa >= compdate)
print $0
else
exit
}
}'


where I'm extracting records whose 4th column date value is greater than a.

Hope this is useful to others.

Update: Scratch the above code. I got some feedback about the correct ways to use getline.
a=20090601
awk -v compdate="$a" '
{
if (("date --date="$4 " +%Y%m%d"|getline aa) >0){
if(aa >= compdate) {
print
next
}
}
exit
}' ../data/C_100119.dat



is a better way to do it.

Saturday, September 19, 2009

Making WinEdt work with MiKTeX 2.8

Apparently people are running into some issues making WinEdt work with the latest version of MiKTeX.   The following post by the WinEdt team might be of use to WinEdt users.  It details how to fix WinEdt to make it call MiKTeX properly.