Latest wget and CIA
This morning we had a problem with the weather scraping off the Weather Channel site. It seems they have done something that makes the wget 1.5.x fail on the grab. Interestingly, the getPage program I wrote based on the GNOME libghhtp library works fine. Wow... I'm impressed. Well... the latest wget 1.6 works fine and so for sparky I've simply removed the old wget I got from Sun Freeware and grabbed the source for wget 1.6 from the GNU archives. I built it and it works fine. On tux I've simply gone back to using my version and it works fine.
Interesting... very interesting.
On a somewhat related note I've been working for a while on a new feature for CIA. When I 'paint' a region I use a recursive function that does the job. Well... in some cases the recursion migh go very, very deep. On the CellAnalysis web site machines it causes a core dump. So, what I wanted to do was to un-'dig' the routine and make it an iterative one. Very similar to a loop for factorial as opposed to recursion. Well... it didn't quite work out that way, but almost as nice. The trick was to implement a looping algorithm that utilized a stack to save the points I was visiting, and in doing that we achieved what was desired - minimal system stack usage.
Interestingly enough, the routine is faster in that there aren't the overhead calls, and it uses less memory since only the relavent values are on the stack, so it's a pretty good win all around. Sure, the complexity goes up a little, but that's a reasonable trade-off for not having to worry about stack implosion.