Brief

Out with the old, in with the new. Classes have begun, writing here has reduced to a trickle. I will post some code that I have been writing to make up for it. Here is a simple fortran 90 (f90) function to take a vector and transform it into another vector by multiplying it by a transformation metric… for example to change the basis of a space, hence the name of the function “change_basis“.

function change_basis(vector, tm) result (trans_vector)
    real, dimension(3) :: vector, trans_vector
    real, dimension(3,3) :: tm ! the transformation matrix
    ! one could use dot_product below and tm(:,n) notation
    trans_vector(1) = vector(1)*tm(1,1)+vector(2)*tm(1,2)+vector(3)*tm(1,3)
    trans_vector(2) = vector(1)*tm(2,1)+vector(2)*tm(2,2)+vector(3)*tm(2,3)
    trans_vector(3) = vector(1)*tm(3,1)+vector(2)*tm(3,2)+vector(3)*tm(3,3)
end function

Also I wrote some ruby stuff using REXML, but that’s not really relevant to my Fortran stuff. REXML is very nice, but given that I use it about 1-2 times a year I always have to reread the documentation to get it to do what I want.

Perhaps someday I’ll wrap some Fortran in ruby, but honestly except for the rather quick compile step the Fortran is just way faster (way over 200 times, IIRC?) and just as quick to write at the level I write it. F90 and f95 just aren’t the nightmares that people have seen with the older FORTRAN languages. They are really good for, get this, formula translation. Never mind that my Mom used a bit of FORTRAN in her dissertation. She also used things like paper and pencils which still haven’t gone out of style. It’s all about the modest single capital F. For a good intro to modern Fortran check out the 90/95 subset language F.

While we’re on the things that start with F, let’s have a link to FEMA. I figure that is better than a link to the fearmongers known collectively as ‘corporate media’.

“I see you’ve survived a ‘NIGHTMARE’, would you like to hear some horror stories!?” –Media

It reminds me of the sickening video clips they fed us on repeat like America’s Most Totally !@#$(*@ Home Videos after that fateful day some September’s ago. And then the corruption of patriotism to an advertising jingle. Just remember, you own your attention, don’t give it away to their advertisers seek out better sources and do what you can. Some of these are interesting:
http://flickr.com/photos/deaah/sets/692663/
http://www.directnic.com/katrina.php

Leave a comment

0 Comments.

Leave a Reply

( Ctrl + Enter )