%-----------------------------------------------------------------------------% % www.index.m % Ralph Becket % Fri Nov 1 15:09:52 EST 2002 % vim: ft=mercury ts=4 sw=4 et wm=0 tw=0 % %-----------------------------------------------------------------------------% :- module www__index. :- interface. :- func index_url = url. :- func index_html(string) = html. %-----------------------------------------------------------------------------% %-----------------------------------------------------------------------------% :- implementation. index_url = "index.html". index_html(TimeStamp) = myhtml( "Ralph Becket's Home Page", "align=right width=300 height=429" >> img("images/ralph.jpg") ++ p( "Hello! I am a research fellow working on the" ++ mercury ++ "project in the" ++ csse ++ "at the" ++ unimelb ++ "." ) ++ p( "Just for the record, my name is pronounced" ++ em("Rafe") ++ "- as in" ++ a("http://www.thespiannet.com/actors/F/fiennes_ralph/index.shtml", "Ralph Fiennes") ++ "and" ++ a("http://www.cs.qub.ac.uk/~J.Collis/RVW.html", "Ralph Vaughan Williams.") ++ "It's old English (Saxon), apparently means" ++ em("crafty counselor") ++ "(oh, the sweet irony) and was in the top fifty men's names in the 16th century, no less." ) ++ p( "Ph.D, Cantab (Artificial Intelligence)" ++ br ++ "Ba.Hons (I), Cantab (Computer Science)" ) ++ p( "My CV is available upon request." ) ++ hr ++ ul( li(a("152/index.html", "Home page for 433-152 -- Algorithmic problem solving (advanced)")) ++ li(a(icfp2004_url, "ICFP 2004 contest entry")) ++ li(a(research_url, "Research interests")) ++ li(a(useful_local_url, "Useful local links")) ++ li(a(interests_url, "Other interests")) ++ li(a(biography_url, "Short biography")) ++ li(a(galleries_url, "Photo galleries")) ++ li(a(sexlogic_url, "Sex is better than logic")) ) ++ hr ++ % I seem to get more pleasant formatting using this method % rather than a sequence of rows. It's arguably easier to % read, too. % table( "valign=top" >> tr( td( "E-Mail:" ++ br ++ "Phone:" ++ br ++ "Fax:" ++ br ++ "www:" ++ br ++ "Office:" ++ br ) ++ td(right( a("mailto:rafe@cs.mu.oz.au", "rafe@cs.mu.oz.au") ++ br ++ "+61 3 8344 1354" ++ br ++ "+61 3 9282 2444" ++ br ++ a("http://www.cs.mu.oz.au/~rafe", "www.cs.mu.oz.au/~rafe") ++ br ++ "5.37" ++ br )) ++ td( nbsp(8) ) ++ td( "Department of Computer Science" ++ br ++ "University of Melbourne" ++ br ++ "111 Barry Street" ++ br ++ "Carlton, Victoria 3053" ++ br ++ "Australia" ++ br ) ) ) ++ hr ++ inset( "These pages were created using a Mercury program. I can't stand writing HTML by hand; using Mercury gives me the full power of a real language plus the guarantee of correct output. Examples of the source code for these pages are" ++ source_links([ "www.m", "www.index.m", "www.interests.m", "www.poetry.m", "www.poetry.kubla_khan.m" ]) ++ "which depend upon the libraries" ++ source_links([ "html.m", "html.li.m", "html.dli.m", "html.tr.m", "html.td.m" ]) ++ "." ) ++ hr ++ inset(html.("These pages were last updated on " ++ TimeStamp)) ). %-----------------------------------------------------------------------------% :- func source_links(list(string)) = html. source_links([]) = nil. source_links([L]) = source_link(L). source_links([L1, L2]) = source_link(L1) ++ " and " ++ source_link(L2). source_links([L1, L2, L3 | Ls]) = source_link(L1) ++ ", " ++ source_links([L2, L3 | Ls]). :- func source_link(string) = html. source_link(L) = a(L, tt(L)). %-----------------------------------------------------------------------------% %-----------------------------------------------------------------------------%