I was trying to learn Qt to create a simple Java API Viewer on Linux for my own use, when I stumbled upon the fact that Qt Assistant can be configured easily for displaying one's own help documentation. With a little bit of ugly shell scripting, I was able to create a Qt Assistant "profile" from the JDK documentation index files and now I have a simple but quick and effective JDK API viewer on Linux. Cool!
Needless to say, my interest in learning Qt has evaporated and so has my desire to create a native Java API viewer for Linux.
(Originally posted on Advogato.)
2005-04-23
2005-04-22
Coding Competitions
There is a weekly coding competition for Indian coders running right now at www.azealots.com and there are fairly attractive prizes to be won. This is apart from the regular TopCoder competitions. train.usaco.org seems to be a nice site for practising for such things.
By the way, I found a nice set of slides explaining the Static Single Assigment (SSA) form here (PDF).
Lastly, GCC 4.0.0 has been released!
(Originally posted on Advogato.)
By the way, I found a nice set of slides explaining the Static Single Assigment (SSA) form here (PDF).
Lastly, GCC 4.0.0 has been released!
(Originally posted on Advogato.)
Labels:
advogato diary,
gcc,
programming
2005-04-20
Java Language Specification: Finally Updated
JLS3 is finally available, though only as one big PDF right now. It took them quite a while to update it to reflect the new features introduced with JDK1.5.
I think it is really weird that the specifications for C and C++ are not freely available and that you have to shell out moolah to get them from ISO. Every programming language meant for general developers must have its language specification freely available. On that count, Java fares much better and full marks to Sun for ensuring that.
(Originally posted on Advogato.)
I think it is really weird that the specifications for C and C++ are not freely available and that you have to shell out moolah to get them from ISO. Every programming language meant for general developers must have its language specification freely available. On that count, Java fares much better and full marks to Sun for ensuring that.
(Originally posted on Advogato.)
Labels:
advogato diary,
programming
2005-04-16
Broadband Ahoy!
After many a pestering call and almost two months of waiting, I finally have BSNL's DataOne broadband connection. At 256Kbps it is hardly that "broad" a band, but it is so much better than the old dial-up connection as well as those peddled by most of the competing service providers! BSNL is owned by the Indian government and used to suffer from the usual red-tapism and apathy. In recent times however, it has improved vastly and has become quite competitive with the private telecom operators. By the way, the main reason I went with BSNL instead of the private operators was that most of them used to actively block outgoing connections to several network ports (including tcp/6667 for IRC) in the name of "security" while BSNL does not (so far) have any such restrictions. What's the point of an always-on broadband connection if you can't even chat?
Another very cool thing about BSNL's package is that you get a Huawei SmartAX MT880 ADSL modem-cum-router that has a built-in firewall and is rather cheap at Rs 2000/- for outright purchase. All you need is an Ethernet card. At the moment, the private operators are nowhere close to giving such a deal.
(Originally posted on Advogato.)
Another very cool thing about BSNL's package is that you get a Huawei SmartAX MT880 ADSL modem-cum-router that has a built-in firewall and is rather cheap at Rs 2000/- for outright purchase. All you need is an Ethernet card. At the moment, the private operators are nowhere close to giving such a deal.
(Originally posted on Advogato.)
Labels:
advogato diary,
internet
2005-04-15
Miscellany
Paul Brook has created a Free replacement for kqemu called qvm86. Both are Linux kernel modules that enable QEMU to run guest operating systems at near-native speeds. kqemu is unfortunately closed-source though it is free of cost for non-commercial use.
SRM-238 was only slightly less worse than SRM-236. Muddled thinking ("coder's block"?) once again ensured that I could solve only one of the problems in the given time. I really suck as a coder. I should also stop writing about SRMs.
Mark Wielaard has written a nice article on GCJ in LWN.net. I did not completely grok Nathan Myers's (ncm) problems with the design of the Java language as written in the comments section for that article. Ditto for Jamie Zawinski's problems with Java for that matter. I have a long way to go before I can even begin to understand some of the objections people have for the design of programming language.
It sucks big time that gtkhtml requires the whole GNOME schmear. Unwieldy dependencies seem to be the general rule in Gtk/GNOME-land. Time to learn Qt.
(Originally posted on Advogato.)
SRM-238 was only slightly less worse than SRM-236. Muddled thinking ("coder's block"?) once again ensured that I could solve only one of the problems in the given time. I really suck as a coder. I should also stop writing about SRMs.
Mark Wielaard has written a nice article on GCJ in LWN.net. I did not completely grok Nathan Myers's (ncm) problems with the design of the Java language as written in the comments section for that article. Ditto for Jamie Zawinski's problems with Java for that matter. I have a long way to go before I can even begin to understand some of the objections people have for the design of programming language.
It sucks big time that gtkhtml requires the whole GNOME schmear. Unwieldy dependencies seem to be the general rule in Gtk/GNOME-land. Time to learn Qt.
(Originally posted on Advogato.)
Labels:
advogato diary,
programming,
qemu,
topcoder
2005-04-08
Code Coverage
I hate having to write meaningless tests merely to improve arbitrarily-fixed code-coverage metrics in regression suites.
(Originally posted on Advogato.)
(Originally posted on Advogato.)
Labels:
advogato diary,
programming
2005-04-04
SRM-236
Yet another miserable performance from yours truly. The first problem was to find out the task finally left from a set of tasks after the n-th task (assuming the list is circular) is removed and the process repeatedly applied till there is only one left. I took too much time on this one, all because of a rather silly off-by-one error. The second problem was to find the n-th smallest Hamming number given a set of factors. If X1,..,Xn are the given factors, a Hamming number is X1^P1 * ... * Xn^Pn, where Pi >= 0. For example, for 2 and 3, the Hamming numbers are 1,2,3,4,6,8,9,.... My brute-force solution was too slow and timed out for large values. I could not finish this one before the deadline and thus could not attempt the third problem.
Naturally, my rating fell yet again, but the good thing is that I'm back in Division 2 where I should at least get easier problems.
(Originally posted on Advogato.)
Naturally, my rating fell yet again, but the good thing is that I'm back in Division 2 where I should at least get easier problems.
(Originally posted on Advogato.)
Labels:
advogato diary,
programming,
topcoder
2005-03-29
Java Web Start (JDK 1.4.2_07) on Linux (Again)
I found a neater way of working around the bug in Sun's javaws
in JDK 1.4.2_07 on a Linux system running kernel 2.6.x and
glibc 2.3.3+ that I referred to in my previous blog entry - I
wrote a wrapper for waitid() that tolerates the
bogus options passed by javawsbin and calls the
real waitid() with saner options. With this code,
I am finally able to run javaws without problems. Note that
this bug seems to have been fixed by Sun in JDK 1.5.0_02.
(Originally posted on Advogato.)
in JDK 1.4.2_07 on a Linux system running kernel 2.6.x and
glibc 2.3.3+ that I referred to in my previous blog entry - I
wrote a wrapper for waitid() that tolerates the
bogus options passed by javawsbin and calls the
real waitid() with saner options. With this code,
I am finally able to run javaws without problems. Note that
this bug seems to have been fixed by Sun in JDK 1.5.0_02.
/* Quick and dirty pre-loaded DSO to make buggy javawsbin
in JDK 1.4.2_07 work on Linux with kernel 2.6.x and
glibc 2.3.4.
Compilation:
gcc -O2 -fPIC -g0 -shared -o mywait.so mywait.c
Usage (Bash):
LD_PRELOAD=/path/to/mywait.so /path/to/javaws <Launcher URL>
*/
#include <dlfcn.h>
#include <sys/wait.h>
int (*real_waitid)( idtype_t, id_t, siginfo_t *, int);
int
waitid( idtype_t idtype, id_t id, siginfo_t *infop, int options)
{
int retVal = -1;
void *handle = dlopen( "/lib/libc.so.6", RTLD_LAZY);
real_waitid = dlsym( handle, "waitid");
options = (options == 0) ? WEXITED : options;
retVal = (*real_waitid)( idtype, id, infop, options);
dlclose( handle);
return retVal;
} /* End pseudo-waitid() */
(Originally posted on Advogato.)
Labels:
advogato diary,
linux,
programming
Acrobat Reader
If you remove the utterly useless plug-ins from the Acrobat Reader installation folder, it starts up much faster.
(Originally posted on Advogato.)
(Originally posted on Advogato.)
Labels:
advogato diary,
gyaan,
pdf
Java Web Start on Linux
Due to a bug in Sun's Java Web Start executable in JDK 1.4.2_07 for Linux, I am not able to use it as-is on a system with glibc 2.3.4 and kernel 2.6.11. As should be obvious, if they had made it truly Free, I could have easily fixed the problem and moved on with my life. Since it is not, I have to either use an alternative like OpenJNLP or somehow work around this bug.
On a system where this bug does not manifest itself, I used "ps --columns 2000 -e -o "%a" | grep javaws" to grab the command line that is used by this executable to spawn the Java VM. I tried modifying this command line for my system (adjusting paths) and running it but it failed trying to download the JVM from Sun's site. After a bit of snooping around, I found out that it was looking for a file named "deployment.properties" in "$HOME/.java/.deployment" that is populated by the wrapper executable with the information on the JRE being used. So I just copied this file over from the system where stuff works and adjusted the paths. It finally worked as expected, albeit without the splash screen (which I do not regret losing at all).
(Originally posted on Advogato.)
On a system where this bug does not manifest itself, I used "ps --columns 2000 -e -o "%a" | grep javaws" to grab the command line that is used by this executable to spawn the Java VM. I tried modifying this command line for my system (adjusting paths) and running it but it failed trying to download the JVM from Sun's site. After a bit of snooping around, I found out that it was looking for a file named "deployment.properties" in "$HOME/.java/.deployment" that is populated by the wrapper executable with the information on the JRE being used. So I just copied this file over from the system where stuff works and adjusted the paths. It finally worked as expected, albeit without the splash screen (which I do not regret losing at all).
(Originally posted on Advogato.)
Labels:
advogato diary,
linux,
programming
Subscribe to:
Comments (Atom)
