Hackers' Corner

[Return to the GALAXY Software Page]
[21 kb Flaming Torch image here][10 kb Rotating Skull image here][21 kb Flaming Torch image here][10 kb Rotating Skull image here][21 kb Flaming Torch image here][10 kb Rotating Skull image here][21 kb Flaming Torch image here]

The opinions expressed herein are the author's and should not be disseminated beyond the known universe in any form including flushing down a public drainage system


Contents List


Headbones in DEC FORTRAN/F90

[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]

Many earlier headbones have now been smashed - well done DEC!

Variable formats

There is a new headbone in the latest F90 compiler. It happens under certain circumstances when writing a list via a variable format statement. For instance,
      DIMENSION KK(4)
      MM=4
      DO I=1,MM
        KK(I)=I
      ENDDO
      WRITE(6,60) (KK(I),I=1,MM),MM
60    FORMAT(I5,<MM>I5)
      END
... incorrectly writes
    1    4[2.3 kb Nuke image here]
... whereas altering the FORMAT statement to (<MM>I5,I5) correctly writes
    1    2    3    4    4
DEC have admitted it's a 'bug' and have 'marked it to be fixed in the next maintenance release'. Unfortunately, although some other headbones have now been fixed in the subsequent F90 release this one has NOT yet been fixed.
[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]

OTS$CVT_T_D function

This headbone has been in situ for years. The FORTRAN RTL function to convert a text string to a D_FLOATING variable incorrectly returns a F_FLOATING result. For instance,
      REAL*8 DD
      CHARACTER*6 CH/'12.345'/
      J=OTS$CVT_T_D(CH,DD,,,,)
      WRITE(6,*) DD
      END
... incorrectly writes
  46213848104.9600[2.3 kb Nuke image here]
... whereas altering the type declaration to REAL*4 DD (incorrectly) gives the correct answer
  12.34500
Since it's mindnumbingly simple to use an internal READ instead, it is unlikely that anyone has bothered to tell DEC about this.
[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]


Headbones in Microsoft PowerStation F90

[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]

This section comprises some immediate headbones on starting to use PowerStation 4. These have not yet been explored or circumscribed (in extremis! shall come back to them sometime) - they might or might not prove reproducible and/or reducible.

Functions in WRITE lists

      CHARACTER*100 CH

...
      J=MAX0(VERIFY(CH,' '),1)
      WRITE(6,*) TRIM(CH(J:))
! so far, so good
      WRITE(6,*) TRIM(CH(MAX0(VERIFY(CH,' '),1):))[2.3 kb Nuke image here]
! the nesting fails
[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]

Dynamic-length AUTOMATIC strings don't work properly via ENTRY points

      SUBROUTINE X(CH)
      CHARACTER*(*) CH
      CHARACTER*(LEN(CH)),AUTOMATIC :: CC
! so far, so good
      ENTRY XX(CH)[2.3 kb Nuke image here]
! CC often has length 0 when calling XX
[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]

Anyone fancy calling Microsoft's Help-Line to tell them about it (and pay them $150)?


"Intentional" differences between DEC and Microsoft F90

[10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here][10 kb Rotating Skull image here]


Experiments in process

Moving up to FORTRAN 90

As with 'moving up to FORTRAN 77' and previous, even less exciting adventures, this is a piecemeal process, taking new features on board as code is amended ('if it ain't broke, don't fix it'). Gradually one's normal practices evolve as new, better methods become available, according to the pundits. On the VAXen, just compile using F90 instead of FORTRAN, and evolution can begin.

Some of the best new features, that have immediately led to simpler/better code and increased flexibility, are:

It would be cool to have a F90 manual (actually a bit disingenuous, as i have one for the Microsoft version).

Migration from VAXen to PCs

The GALAXY environment, which has evolved to FORTRAN 90, is currently being 'migrated' from the OpenVMS environment to the 32-bit console environment of Windows 95 and Windows NT 3·51 (and above). GALAXY's multiple-user features will be retained for use on networks. A Windows interface will be built later.

This is being accomplished using Microsoft FORTRAN PowerStation 4 running under Windows NT 3·51, the equivalent of methadone to the heroin of VMS. Having put together a library of sundry routines to replace VMS Run-Time Library calls (LIB$, STR$, SYS$ etc), the transition is proving quite painless. There is an excellent mathematical and statistical library 'IMSL' which makes it easy to replace calls to the NAG Library. The VMS logical name table is simulated (experiments to determine the better method - symbols or registry - are in process) to make filestore navigation simple. A few headbones have surfaced (above).

It would be interesting to set up a client-server architecture - for instance, all the overviews in GALAXY ('frozen' Childhood A.L.L., Breast Cancer, Colorectal Cancer, Hodgkin's Disease, Prostate Cancer etc etc) could then be accessed and graunched over the CTSU Intranet. (Experiments are in hand on the Internet for GALAXY, non-CTSU work and details will be posted later). The GALAXY Address Finder,GALAXY Fortune Cookies and the GALAXY ICD Decoder are some experimental thingies on the Intranet - sorry if the (pirate) server is not switched on [please note that you will probably need to add p80.ctsu.ox.ac.uk to the list of domains which don't go via the proxy server].

Impressions of Windows 95

[173 b image here]Yuuk!!!!! Having tried it out for a few weeks in 1996, it was unceremoniously junked. Besides, Microsoft are going to inflict another version on the geek world's fashion victims in the foreseeable future.

Partly, it's the gratuitous new interface - not a problem per se; but so many things are 'hidden' or 'done behind your back'. If you are a control freak and actually like to know where your files are and to be informed before huge swathes of strange directories and stranger associations appear spontaneously all over the place (in case you would like to get rid of them again sometime), this could be a problem.

Yes, it has built-in toolbars; but we all have Microsoft Office's toolbar, don't we? Yes, Windows 95-aware software self-installs (rather too eagerly) without your needing to make real decisions. However, try to get rid of certain tiresome ikons from the desktop, or find that the DOS Box has yet again been collapsed to a button when the screen saver cuts in, and you begin to wonder what the advantages actually are. What about that old '386' at home? - well, you put in more RAM and drink a lot of coffee whilst waiting for things to happen.

Of course it is less crashable than the old Windows 3·1/3·11 (although far from bombproof), and quite a few new applications actually insist on something more up-to-date - but Windows NT 3·51 seems far better (traditional interface, virtually unburstable, loads of serious features if required).

'Here comes the twister': there is now Windows NT 4, with the atrocious new interface - and applications are coming out that insist on Windows 95 or NT 4, for some unfathomable reason (e.g. AltaVista Search My Computer), whereas the upgrade from NT 3·5 to 3·51 was supposed to deal with all that (e.g. the Windows 95 application Microsoft Office Professional '7' works perfectly on NT 3·51). Ho hum, plus ça change etc etc.

"It's just your age, dear"

Afterburn: the gossip is that Windows NT 4 was a rather hasty lash-up just to incorporate the Windows 95 interface, and that the 'definitive' new version will be NT 5, which is nearing completion; NT 5 will include numerous features that they didn't have time to bung into NT 4. If i were to upgrade from NT 3·51 (heaven forfend), i'd definitely wait for NT 5 - unless it is going to resemble Internet Exploder (see below).

Impressions of Internet Explorer vs. Netscape Navigator

Another, smaller Yuuk! for Internet Explorer (3·01) which (with a couple of small exceptions) seems like a worse version of the excellent Netscape Navigator (Gold 3·01). There is a version 4 in the offing (20 Mb of it, possibly) - goodness know what this will be like (life is too short to struggle with the spaghetti trying to download it, and then presumably to install the 'mandatory' Windows 95 / NT 4).

The two nicer-than-Navigator-3 features of Explorer spotted so far are: a (large, expandable) History List that can be used to add to the Favourites List; and slightly neater-looking form controls. That's it! and in any case Navigator 4 has caught up (below). Some of the nastier features are: slower loading of documents, worse rendition of colour pictures (JPEG and GIF, at least), sluggish movement of GIF animations, gung-ho font size control, slower Java execution, pop-up message 'the script may have hung: do you wish to continue?' sometimes when exiting from Java subroutines and the complete absence of a document editing suite (no doubt that could be found somewhere (uhh - FrontPage, presumably, if you don't mind alienating all of your audience who don't have a T4+ connexion) and added on, but why bother? - possible answer: it might be possible to edit form controls ('widgets'), e.g. Command and Radio Buttons, Check Boxes, Text Boxes and Areas etc, something that Navigator's otherwise excellent editor rather cops out on - does anybody know? - rsvp: skull@wolfbane.com ). Explorer is no spoiler for Navigator, being far worse than Netscape's betas. Perhaps it would be happier with 32 Mb of R.A.M.

The rumour is that the interface of the successor to Windows 95 (and, presumably, Windows NT 4) is going to resemble Internet Explorer too. If this is the face of Microsoft's world domination plan, hooray for its probable doom.

Impressions of Netscape Communicator

Now there is Navigator 4, with an ominously similar interface to Explorer (what a shame that the leader is apeing the follower). It's part of the Netscape Communicator (Professional 4·01) suite, which has hived editing off from the browser into another utility (Composer) and has numerous other embellishments - still without 'widget' features, though.

Being larger and more complex, Communicator is slower than Navigator 3 - indeed, clunky on first impression, although one rapidly finds the best ways of working. There is a customisable Personal Toolbar, a better Favourites List, proper font control (in Composer), a decent History List and the 'widgets' look slightly neater; there is even a Spell Checker, for persons who have the patience to fill the Personal Dictionaries of these things with the entire contents of the Oxford Textbook of Medicine, the Times Atlas of the World etc etc. The mail package (Messenger) seems improved too. The bugs spotted in previous 'preview' versions of Composer all seem to have been fixed in this final release.

Overall verdict: a very nice one, Netscape! As a postscript, however, it should be noted that trying to edit files larger than a couple of hundred kb was evidently never envisaged. With a 100 MHz Pentium and 24 Mb R.A.M. it can easily take a couple of hours to make the smallest change to a rather larger file - much longer if Autosave is inadvertently left active - never mind the real-time TV processing, this calls for one of those multi-GHz dream machines!


NOT! the Starlink Programming Standards

[Link to separate page here]


Processing duff dates

RG has pointed out (AY E-mail 2-APR-1997) an instance of what happens when garbage dates are fed into the ("widely used throughout CTSU") JDAY(idate) routine. What we do in GALAXY (breast, colorectal, Hodgkin's etc) is to wrap it up as KDAY(idate) which takes the following actions:
Scenario KDAY
Day and Month present and in range  same as JDAY 
Day missing or out of range  as JDAY for 15th of the month 
Month missing or out of range (never mind Day)  as JDAY for 30 June 
Also, when checking the sequences of dates in data one can get absurdities if the days or months are missing from some dates. Although one would like to have full correct dates, one can at least avoid generating errors from 'spurious negative' time intervals (e.g. between 20 April and 0 April, where the 0 April probably occurred during 20-30 April). In the GALAXY data checking this is done crudely by taking the following actions (in a function days_difference=IFDATE(idate1,idate2)):
Scenario IFDATE
Both Days and Months present and in range  same as JDAY(idate2)-JDAY(idate1) 
One or both Days missing or out of range  as the difference of the JDAYs for 15th of the month in each date's month-and-year 
One or both Months missing or out of range  as the difference of the JDAYs for 30 June in each date's year 
When evaluating the time difference between duff dates (at least when doing an analysis, rather than just checking) it would be simple and possibly 'better' to get IFDATE to make a 'best guess' about the duff Day or Month by choosing a value halfway along the possible range...


Some GALAXY Secrets

[Link to separate page here]

The Story of Forest Plots

[Link to separate page here]

[Link to the CTSU GALAXY Experimental Page - please note that this server might not be switched on!]

[Return to the GALAXY Software Page]

[End of document of 22 July 1998, updated]