Wednesday, March 29, 2006

Getting jalopy to work (2 of 2) ....

The latest jalopy (jalopy-console-0.1-1.5rc3) apart from the problem I narrated here , I faced the following issues.
  • JDK1.x (<5) compliant files need to be compliant with 1.5 syntax. That rules out variable names like 'enum'. More importantly, it rules out apache axis. There is package in axis named 'org.apache.axis.enum'. This cannot be used. One can rename variables. But one is stick with the package provided by axis. If running jalopy by hand for a one-time need like I was doing, then the fix is obvious: comment out the import lines. 'jalopy'. Uncomment.
  • Some comment constructions pose a problem with grammar. I have seen constructs like the following cause errors in jalopy
    Map foo; //stuff:fkdjf
    String foo = somefunc(a,
    b,c); //comments
  • The jalopy console package does a very poor job in recursive mode : lots of errors are seen in that mode. If the 'threads' option is turned on you see even more errors caused by ConcurrentModificationException s . The best way seems to be to run it file by file via a hand written shell script to copy the generated file to a desired location (using commands like basename etc). But this also runs much slower - but that cant be helped.

Code Beautifiers

Pursuit Problem and "bugs flying into flames"

I was researching the pursuit problem and found this cool bit of information at cut the knot .

Bugs fly into candles because of the design of their "flight planning" computers. Here is the goods:

Bugs determine a straight line by trying to maintain a constant angle with respect to a source of light, the natural one being sun. Now This works for distant sources of light such as the sun. But for sources of light closer by, the curve that satisfies the constant angle property is a logarithmic spiral. Well, its actually the same spiral all the time but when the source really far off, the spiral is well approximated by the straight line and, in fact, I suspect that fluctuations caused by movement of air is more significant in this case (than the infinitesimal angle change) and bugs might be wired to ignore small changes(even if their sensors could detect them).


Tuesday, March 28, 2006

Getting jalopy to work (1 of 2) ....

Jalopy downloaded as 'jalopy-console-0.1-1.5rc3' ships with scripts that are saved in "dos" mode - the CR LF stuff. On *NIX (At least on Linux - and I have seen similar errors on solaris before), the scripts report weird errors such as :
: command not foundls/java/jalopy/ line 2:
: command not foundls/java/jalopy/ line 4:
: command not foundls/java/jalopy/ line 5:
xxxxxxxxxx/tools/java/jalopy/ line 6: syntax error near unexpected to'en `in
xxxxxxxxxx/tools/java/jalopy/ line 6: `case "`uname`" in

A quick fix is to load the shell scripts ( and in vi and execute the following commands:
:set ff=unix

After that the scripts execute fine.

The Mathematical Century by Piergiorgio Odifreddi

I started reading this after I found a review in some place - probably in hindu(could not find the link, though).

I have read only to some extent. But so far this book has not lived up to what my romaticized vision of what this book must be when I ordered for the book.

The book does not mention anywhere if the book is a translation from italian or not. (See - it says it indeed is a translation).

First of all I find the translation of the book quite below par. There are weird constructions that I find very hard to understand. For exmaple

Hence, in order to describe the extensions of these notions, it is imperative to obtain classification results, which are a complemnetary aspect of abstraction

What is that supposed to mean?

The content is more like a historical survey of the problems and areas in mathematics rather than a deeper discussion of various problems. In that respect the first two chapters I have read have been very useful. They provided a logical organization of various bits and pieces of mathematics I have acquired over a period of time.

As  a personal anecdote: There was this job interview I attended at a large company. The team seemd to like me. So I was called in to meet the CTO. In that meeting I said that the whole of computer science is a specialized aplication of set theory - in this I had a notion of a broadish set theory, teh one discussed in teh chapter one of this book. The CTO's knowlege( though he claimed to understand "set therory") seemed to be limited to some dim notions about ven diagrams and nothing else. No. I did not get that job - he thought I was very opinionated.




Mark Dominus (also) blogs about misattributions ...

Continuing the list of misattributions further ....

Dirac delta function. In "The mathematical century" claims it was introduced by Heaviside. And apparenly, he was expelled from the royal academy of sceinces for this misdemeanour. People (his critics) seemed to have considered this not "formal", "rogourous" enough.

There is a also a nice PDF by V Balki (V Balakrishnan) of IIT-M on the topic. Now, that aricle states mathematica indicates a similar history. But it also states
The delta function seems to have made its first appearance in the early part of the 19th century, in the works of Poisson (1815), Fourier (1822), and Cauchy (1823,1827)