About site: Programming/Languages/Procedural - Frink
Return to Computers also Computers
  About site: http://futureboy.us/frinkdocs/

Title: Programming/Languages/Procedural - Frink A programming language and calculating tool. It tracks units of measure through all calculations, and helps to get the answers right.
Alanté_Corporation Supplier of refurbished Hewlett-Packard products.

Green,_Nancy University of North Carolina at Greensboro. Intelligent multimdedia presentation systems, argumentation models, automatic generation of textual summaries of graphs, interactive narrative, conversati

fhttpd FTP/HTTP server with modules support. Modules run as separate "looping" processes locally or remotely, and can be configured to run under separate userids.

NoSTalgia_and_PowerST Features NoSTalgia an emulator for MacOS X (older version for CarbonLib and MacOS 9 available) and PowerST a suspended emulator for MacOS 8/9.

The_Clarion_Handy_Tools_Page A fully integrated Clarion application development tool kit.

The_Omni_User The Omni User is Chicagoland's largest and oldest association of computer users. We specialize in the IBM midrange platform and associated computing devices including local area networks.


  Alexa statistic for http://futureboy.us/frinkdocs/





Get your Google PageRank






Please visit: http://futureboy.us/frinkdocs/


  Related sites for http://futureboy.us/frinkdocs/
    MKoD__D_Programming_Language Explanations, instructions, code samples (pure D, D with Windows APIs), ongoing projects (Make DB test data, Financial Package, Support, Idea List), D website banners, links.
    Ranson\'s_CGI_Scripts Free scripts for web page enhancement and business. [Collection]
    Pagego_com_Toolbar Toolbar for Internet Explorer offering Web search from Yahoo!, Google or pick from one of almost 100 other search resources.
    Micro_Seven Mini-PBX simulators.
    Ultraseek_Server The tools they use at their site for sale. Demo version available for download.
    FreeBSD_Security How-to's and discussions on securing FreeBSD.
    A_Plea_for_Grey-Box_Components by Martin Buchi and Wolfgang Weck.
    Magicsoft Offer a variety of Macromedia Director and Authorware Xtras from database support to color management.
    Iota,_Jot,_Zot Iota is unambiguous Turing complete language with only 2 symbols, heavily uses lambda calculus. Jot is Iota variant with elegant Goedel numbering. Also: 4 line Iota implementation, 5 line Jot implemen
    MHC_Synthesizers_and_Effects Space Synthesizer, Fatsondo Synthesizer, Voxynth, FlexFX, Space Effect, VST Plugins for Windows.
    Texas_Memory_Systems,_Inc_ Offers RamSan solid state drives which accelerate databases, network hot files, and any other I/O or bandwidth intensive application.
    Stevens_Creek_Software Custom Palm software development from the creators of PalmPrint and the winner of the 1999 programming contest at Palm Developer's Conference.
    EU_Domains The latest news about the new dot EU domain name extension.
    Router_Security_Policy Sample policy establishing the minimum security requirements for all routers and switches connecting to production networks. [MS Word]
    RFC_1270 V1; SNMP Communications Services. F. Kastenholz. October 1991.
    RFC_0842 Who Talks TCP? - Survey of 1 February 83. D. Smallberg. February 1983.
    Free_Firefox_Wallpaper A collection of Firefox backgrounds for your desktop.
    X-Hive/DB XML Database in form of a Java-based persistent DOM implementation. [Commercial]
    Suspire_Media Provide web design services. Located in London, United Kingdom.
    Novaurora Design, Flash, e-commerce, intranets, extranets, programming, marketing, and hosting. Also offers print and photography services. Based in Pittsburgh, Pennsylvania, United States.
This is websites2007.org cache of m/ as retrieved on 2008.08.20 websites2007.org's cache is the snapshot that we took of the page as we crawled the web. The page may have changed since that time.
Frink

Frink

What's New * FAQ * Download * Frink Applet * Web Interface * Sample Programs * Frink Server Pages * Donate

About Frink

Frink is a practical calculating tool and programming language designed to help us all to better understand the world around us, to help us get calculations right without getting bogged down in the mechanics, and to make a tool that's really useful in the real world. It tracks units of measure (feet, meters, kilograms, watts, etc.) through all calculations, allowing you to make physical calculations easily, to mix units of measure transparently, and ensures that the answers come out right. Perhaps you'll get the best idea of what Frink can do if you skip down to the Sample Calculations further on this document. Come back up to the top when you're done. Frink was named after one of my personal heroes, and great scientists of our time, the brilliant Professor John Frink. Professor Frink noted, decades ago: "I predict that within 100 years, computers will be twice as powerful, ten thousand times larger, and so expensive that only the five richest kings of Europe will own them."

Features

For those with a short attention span like me, here are some of the features of Frink. Tracks units of measure (feet, meters, tons, dollars, watts, etc.) through all calculations and allows you to add, subtract, multiply, and divide them effortlessly, and makes sure the answer comes out correct, even if you mix units like gallons and liters. Arbitrary-precision math, including huge integers and floating-point numbers, rational numbers (that is, fractions like 1/3 are kept without loss of precision,) complex numbers, and intervals. Advanced mathematical functions including trigonometric functions (even for complex numbers,) factoring and primality testing, and base conversions. Unit Conversion between thousands of unit types with a huge built-in data file. Date/time math (add offsets to dates, find out intervals between times,) timezone conversions, and user-modifiable date formats. Translates between several human languages, including English, French, German, Spanish, Portuguese, Dutch, Korean, Japanese, Russian, Chinese, Swedish, and Arabic. Calculates historical buying power of the U.S. dollar and British pound. Calculates exchange rates between most of the world's currencies. Powerful Perl-like regular expression capabilities and text processing. Supports Unicode throughout, allowing processing of almost all of the world's languages. Supports Interval Arithmetic (also known as Interval Computations) in calculations, allowing you to automagically calculate error bounds and uncertainties in all of your calculations. Reads HTTP and FTP-based URLs as easily as reading local files, allowing fetching of live web-based data. Runs on most major operating systems (anything with Java 1.1 or later,) as an applet, through a web-based interface, on a wireless Palm VII, on an HDML- or WML-based webphone, and on many mobile phones and hand-held devices. Installs itself on your system in seconds using Java Web Start and automatically keeps itself updated when new versions of Frink are released. Runs with a Graphical User Interface (both Swing and AWT) or a command-line interface. User interface has a Programming Mode which allows you to write, edit, save, and run extremely powerful programs even on a handheld device. Powers Frink Server Pages, a system for providing dynamic web pages powered by Frink. Frink is a full-fledged programming language with arrays, dictionaries, sets, functions, loops, even object-oriented programming and self-evaluation. Frink allows Object-Oriented Programming, which allows you to create complex data structures that are still easy to use. Java Introspection layer allows you to call any Java code from within Frink. Frink can also be embedded in a Java program, giving your Java programs all the power of Frink. Did I mention it's free? If you find it useful, please donate something. I'd really appreciate it!

Get Notified

Frink changes almost every day. If your version of Frink is more than a few days old, you're probably out of date! The latest versions are always available here. Keep an eye on the What's New page to see new features and keep abreast of its rapid developments. If you'd like to be informed of new releases via e-mail, subscribe to the "Frink Language" project at freshmeat.net. (Link opens in new window.)

Donate

You can download and use Frink free of charge. If you find Frink useful, there are lots of ways you can donate to its further development. I'd really appreciate it!

Mailing List

If you'd like to discuss Frink with others, you might want to join the mailing list. (Hosted by Yahoo! Groups. Link opens in new window.) Subscribe to Frink

Presentations and Papers

You can read (and watch using RealPlayer) my presentation Frink -- A Language for Understanding the Physical World that I gave on Frink at the Lightweight Languages 4 conference at MIT. This discusses some of the design decisions of Frink, how it has evolved, implementation details, and future directions for the language.

Table of Contents

About Frink Features Get Notified Mailing List Using Frink Try as you read Download Using Java Web Start User Interface Options Swing User Interface AWT User Interface Frink As An Applet Minimalist Web Interface Wireless Browser Shortcuts Search Plugins Browser Keywords Downloading Frink Small Devices Dashboard Widget Google Gadget Experimental Versions Programming Mode Running Frink Sample Start Scripts Command-Line Options GUI Options Performance Tips Proxy Configuration How Frink is Different Numeric Types Data Libraries Integrated Help Editing Frink Conversions Multiple Conversions Math Operators Variables Declaring Variables Constraints on Variables Constraining by Dimensions Constraining to Built-in Types Constraining by Object Type Constraint Functions Unicode in Frink Setting Display Units Setting Precision Setting Number Formats Simple Functions Default Values Multiple Return Values Constraining Function Arguments Temperature Scales Recursive Functions Multi-line Functions If/Then/Else Truth Loops While Loop Do...While Loop For Loop Self-Evaluation Security Restrictions on eval[] Arrays Array Methods Input Output Boolean Operators Dictionaries Sets Common Functions Rounding Functions Number Theory Other Functions Cryptographic Functions All Your Base Conversions... Strings Unicode in Strings Unicode Character Codes Upper/Lower Case Substrings Other String Functions Multi-Line Strings String Interpolation Text Translation Translation Pairs Translator Program Date/Time Handling Specifying Timezones Listing Timezones Sloppy Time Specifications Current Time Timezone Conversions Date/Time Arithmetic Notes on Dates Defining New Date/Time Formats Other Date Formats Dynamical Time Regular Expressions Iterating Matches Search and Replace Substitution with Expressions Joining and Splitting Arrays Input and Output Reading Lines Reading Entire Files Specifying Alternate Encodings E-mail Harvesting Stripping HTML URL Manipulation Procedure Blocks Sorting Including Other Files Object-Oriented Programming Other Data Sources Historical U.S. Price Data Historical British Price Data International Exchange Rates Java Introspection Creating Java Objects Calling Static Java Methods Accessing Static Java Fields Interval Arithmetic Interval Arithmetic Example Interval Comparison Operators Interval Arithmetic Status Date/Time Intervals Embedding Frink Sample Calculations Mass and Volume Liquor More Liquor Movie Magic Fiscal Calculations Ouch! Sniping eBay Auctions Junkyard Wars Body Heat Microwave Cookery Why is Superman so Lazy? Fart Jokes Advanced Farting More Incorrect Facts QE2 Hamburgers and Cars "Get The Provisions..." Typing Biblical References E=mc2 Days Old Model Solar System Saving Hundreds of Millions of Dollars Changing Syntax Acknowledgements Donate to Frink

Using Frink

Try as you read If you want to try the calculations as you're reading, click here to open the web-based interface in a new window. The web-based interface gives hints for new users, which may make it the easiest way to learn how to use Frink. If you have a frames-enabled browser, and you don't see a Frink sidebar to the left, you can also click here to try Frink in a sidebar as you read this. (The sidebar mode doesn't give as many hints, though.) Download using Java Web Start For the incredibly impatient (who have a recent version of Java installed): Click here to install Frink using Java Web Start. Read on if you're slightly more patient, or if this doesn't work for you. This method of installation requires Java Web Start, which is installed with recent versions of Java. Using Java Web Start is a great way to run Frink if you don't need to run programs from the command-line. (But you can still write and run programs from the GUI using Java Web Start!) If you do want to run programs from the command-line, see the Downloading Frink section below. Java Web Start will allow you to automatically get the latest version of Frink and will update Frink automatically when new versions are available. Installation Steps If you don't have a recent version of Java, you can get it from Sun. (Link opens in new window.) (Optional) If you've never installed anything with Java Web Start, please read and understand the FAQ entry about the security warnings you'll see (link opens in new window) and your alternate download options. Click one of the options below to install Frink with either interface (see the screenshots below): (Preferred:) AWT Interface - The most feature-rich interface. Not as pretty as the Swing mode below, but with more modes. Better for beginners. Includes programming mode. (Less preferred:) Swing Interface - Prettier but with fewer modes. Requires Java 1.5.0 or later. You can install both, actually, with no problems. If you've read those security notes, and understood what the security messages are telling you, and the warnings are still too scary, (and you don't want to send me the $400 it would cost me to remove at least one of them,) and you'd rather download a limited version of Frink that runs in the most restrictive security sandbox (breaking some features), then click here to install a limited version of Frink. Again, please read those security notes to see what features will be unavailable if you choose this option. You can always get the full version of Frink later if you need those features. If someone wants to send me the $400 necessary to get a VeriSign "Code Signing Cerificate", I'll sign it just for you. It won't work any differently.) If you have an old version of Java Web Start, Frink will probably show up in the "Downloaded Applications" section of the Java Web Start panel which isn't immediately visible. Use the View menu option to select the Downloaded Applications tab. It will also let you create a Frink shortcut on your desktop or in your start menu. The defaults in Java Web Start before version 1.4.2 are set oddly so that the second time you run Frink, it will ask you if you want to make a shortcut. If you're using Linux, and Sun's Java release, only Java version 1.5 beta and later will install shortcuts onto your desktop and start menu. Highly recommended.

User Interface Options

Swing User Interface The Swing version allows mixed fonts and colors, but has fewer features than the AWT interface. Due to some performance bugs in Sun's Swing implementation (like large paragraphs taking several minutes to paint every time you resize or scroll,) it's not especially recommended. Swing GUI Screenshot AWT User Interface The AWT user interface has several modes. The two-line conversion mode and programming mode are shown below. The AWT mode does more than the Swing mode because I spend more time optimizing the AWT mode for use on handheld devices. Small devices usually can't run Swing, but all Java platforms should be able to run AWT. AWT Two-line conversion screenshot AWT Programming Mode screenshot Frink As An Applet If your web browser supports Java 1.3.1 or later, try the Java Applet-based interface. It looks and works just like the GUI above, but it requires you to be connected to the internet and must download for each session. Your browser must support Java 1.3.1 or later, or you will need to get download a newer version of Java from Sun. It is extremely highly recommended that you have Java 1.5.0 update 2 or later. This has been tested with Internet Explorer, Netscape 4.x, Netscape 6+, Mozilla (Windows and Linux), and Opera. If you don't have a recent version of Java, you can get it from Sun. (Link opens in new window.) (The certificate is just signed by me, so you'll get a warning. Network access is necessary to use the network portions of Frink... like currency calculations, translations, etc. If you deny network access, the non-network parts of Frink will work just fine. If someone wants to send me the $400 necessary to get a VeriSign "Code Signing Cerificate", I'll sign it just for you. It won't work any differently.) Minimalist Web Interface If the applet doesn't work for you, try the minimalist web interface. The minimalist interface is intentionally very spare but it should allow you to use the latest version of the Frink engine. It is now powered by Frink Server Pages. In this web interface, you can enter any Frink expression in the "From:" box. If you also enter a value in the "To:" box, it is treated as the right-hand side of a conversion expression (that is, to the right of the conversion operator -> ) Thus, to convert 10 meters to feet, you can enter 10 meters in the "From" box and feet in the "To" box, or, equivalently, type 10 meters -> feet in the "From" box and leave the "To" box empty. It does exactly the same thing. Wireless If you have a wireless Palm VII, download the Frink web clipping application (PQA) to use Frink anywhere, anytime. Palm VII Screenshot If you have a webphone that speaks HDML, or WML, point it at http://futureboy.us/frink/ for the world's most powerful pocket calculator! HDML webphone screenshot If the webphone version doesn't work right, it may be because I can't detect that your device is a webphone. If that's the case, please use your webphone to visit: http://futureboy.us/info/ And then send me an e-mail (from anywhere) telling me about the problem and when you tested, and that should give me enough information to fix the problem. Browser Shortcuts If your browser is Mozilla or Netscape 6+, click here to add a Frink sidebar. (You may need to hit the F9 key or go to View | Show/Hide | Sidebar to display the sidebar.) function addSidebar() { if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) { // window.sidebar.addPanel ("Frink", "http://www.mindspring.com/~eliasen/home.html?redirtarget=frink/index.pl?sidebar=1", ""); window.sidebar.addPanel ("Frink", "http://futureboy.us/fsp/sidebar.fsp", ""); } else { var rv = window.alert("This only works with Mozilla or Netscape 6+. Sorry."); } } function errorMsg() { alert("Netscape 6 or Mozilla is needed to install a sherlock plugin"); } function addEngine(name,ext,cat) { if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) { window.sidebar.addSearchEngine( "http://futureboy.us/frinkdocs/"+name+".src", "http://futureboy.us/frinkdocs/"+name+"."+ext, name, cat ); } else errorMsg(); } //--> Search Plugins If you're using Netscape, Firefox, Mozilla, or another browser that supports "Sherlock" search plugins, //gs URL Manipulation Frink provides a few functions which are useful for manipulating URLs and producing web-spiders: url[base, relative] returns a new string URL made up of the given base and relative parts of a URL. This is useful in resolving relative URLs in an HTML document: url["http://futureboy.us/frinkdocs/index.html", "whatsnew.html"] http://futureboy.us/frinkdocs/whatsnew.html urlHost[url] returns a string indicating the hostname of a specifed URL string (e.g. futureboy.us, an empty string if no host is specified. urlProtocol[url] returns a string indicating the protocol (e.g., http of a given URL string.) The following program resolves all of the relative URLs in an HTML document and prints their values. url = input["Enter a URL: "] println[join["\n", findURLs[url]]] findURLs[u] := {    results = []    for [rel] read[u] =~ %r/<\s*A\s+[^>]*HREF\s*=\s*"([^ "]+)"/gsi       results.push[url[u, rel]]    return results }

Procedure Blocks

In Frink, you can define blocks of executable code which can be assigned to variables, passed to and from functions, and executed as functions. These work just like functions with no name. In fact, that's exactly what they are. The syntax is: { |arglist| body } The arguments in arglist are a (possibly empty) comma-separated list of variable names which are treated just like the formal parameters to a function. The body is one or more statements or expressions to be executed. How is this useful? Well, for example the select[list, proc] function allows you to select the items from a list for which proc returns true. For example, to return the even items from a list: array = [0,1,2,3,4,5] select[ array, { |x| x mod 2 == 0 } ] [0,2,4] This successively assigns each element of array to a new local variable x, and returns the list of values for which x mod 2 equals zero. Note: The second argument to select[list, regex] can also be a regular expression. This expects the list to contain all strings and returns all of the strings that match the regular expression. A procedure block can be called as a function. The current syntax looks just like a function call: isEven = { |x| x mod 2 == 0 } isEven[4] true

Sorting

sort[list]will sort lists in which the elements have the same type. When sorting units, the units should be conformal (that is, all should have the same dimensions.) It is important to note that the list will be sorted in-place, that is, the original list will be modified! To get around this, the array should first be copied with the array.shallowCopy[] method. a = [5,2,3,1,4] sort[a] [1,2,3,4,5] The two-argument version sort[list, proc] allows you to specify a user-defined comparison routine. The second argument is a procedure block which contains a user-defined comparison routine. The comparison routine must take 2 arguments (say |a,b|) and return -1 if a is less than b, 0 if a==b, and 1 if a is greater than b. The following samples are equivalent: a = [5,2,3,1,4] cmp = { |a,b| a <=> b } sort[a, cmp] [1,2,3,4,5] The default sort is much faster than if you define a user-defined comparison function (about 30 times faster in my tests!) Now I see why Perl has so many anomalous and special-cased optimizations around user-defined sorting. If you want the elements in reverse order, you can reverse the sorted list by calling the reverse[list] function on the sorted list. To sort all of the units with dimensions of time (or by extension, any dimension list) by their magnitude, you can use the following. (Keep in mind that the units function returns the names of the units as strings. The function unit[string] returns the unit with the specified name.: sort[units[time], { |a,b| unit[a] <=> unit[b] }]

Including Other Files

For ease of maintenance, you can separate your program code into multiple files and include them in other files. This is accomplished by the use statement. This includes the contents of the named file at compile-time, at the point where the use statement is encountered. For example, to include a file called sun.frink in the current directory: use sun.frink The use statement searches for the named files in the following places: Relative to the root of the current classpath or jar file. If the statement specifies a fully-qualified URL, the URL is loaded. This includes file:, ftp:, and http: URLs. Relative to the current file or URL being parsed. Relative to the current working directory. Relative to all paths specified using the -I path command-line option. From the internal "standard library" shipped within the jar file's /lib directory. This location may change. The use statement has protection against including a file multiple times. Tip: If you're including a file that's not relative to any of the above, you'll need to specify it using an absolute file: URL, such as: use file:///c:/prog/frink/samples/sun.frink or use file:///prog/frink/samples/sun.frink This is necessary because a file or relative URL can legitimately contain colons on some operating systems. For example, on a UNIX-like system, you could have a subdirectory called c: and that would be just fine. Frink doesn't try to duplicate all the quirks of all operating systems and their wacky filename rules.

Object-Oriented Programming

Frink allows you to write your programs in object-oriented fashion, allowing complex data structures that are still easy to use. It's not fully completed yet, (inheritance isn't implemented,) but works fine for programs that don't require inheritance. Classes are defined using the class keyword and a syntax that won't particularly surprise anyone who has worked with Java, C++, Ruby, Python, or other object-oriented languages. The format of a class and how to use it is demonstrated in the classtest.frink file. Interfaces are defined using the interface keyword, and is similar to Java's implementation. The format of an interface and how to use it is demonstrated in the interfacetest.frink file.

Other Data Sources

One of the main design goals of Frink was to allow new sources of data to be added in very easily. These special sources are not necessarily defined in the data file. The three data sources listed below retrieve data on demand from up-to-the minute data on the Internet (and thus require connection to the Internet.) Historical U.S. Price Data Obligatory Disclaimer: This feature requires connection to the internet. If you are using Frink on a handheld device, you may incur connection charges. Also, since I cannot guarantee the availability of any internet sites, this feature is intended only as a bonus that may not work reliably if at all. You may also require some proxy configuration if you use an FTP proxy server to access the web. The units "dollar" or "USD" indicate the value of a current U.S. dollar (which is arbitrarily chosen as the standard unit of currency.) Historical price data is available to allow comparisons between the historical "buying power" of U.S. currency. This allows you to adjust historical prices for inflation. These are represented by specially-named units containing both the currency and the year, separated by an underscore, for example: 1.25 dollar_1960 dollar_1902 dollars_1902 10 dollars_1902 10 USD_1902 cent_1910 5 cents_1926 cent_1914 Data after 1913 is fetched live from the U.S. Department of Labor Bureau of Labor Statistics Consumer Price Index data, specifially by retrieving and parsing this file. If that file is unavailable, the data will be fetched from a static file distributed with Frink, which is only as recent as your version of Frink. Data from 1700 to 1912 is based on some general economists' guesses and should be taken with a grain of salt. U.S. data before 1700 is not available, and probably wouldn't be meaningful unless you could convert between the value of pelts, tinder, and tallow. Warning: Fetching this file uses Java's FTP capability which doesn't work if you have more than one network card, or a network card and a dialup connection. (See Java Bug 4107059) It'll just lock up when you request historical dollar data. That's nice. In addition, the BLS web and FTP servers seem to have frequent outages, and historical data will not be available if the servers are down, or if you are not connected to the Internet. From 1913-present, you can even use monthly resolution by indicating the month after the year. Months are 2 digits and padded with zeros: dollar_1969_08 dollars_1969_08 14.75 dollar_1941_12 14.75 USD_1941_12 dollars_1941_12 dollar_1941_12 15 cents_1965_10 4 cent_1929_01 Historical currency values can be converted to the current value. For example to find today's cost of Mark Twain's passage to Europe and the Holy Land on the steamship Quaker City at a cost of $1250 in 1867 (detailed in The Innocents Abroad, the conversion of which was one of my first web projects): 1250 dollar_1867 -> dollar 14982.240769251547535000 And, you can add the 5 dollars/day in gold that they were encouraged to bring along to cover expenses for the 6-month trip: 1250 dollar_1867 + 5 dollars_1867/day 6 months -> dollar 26043.38587544437 You can translate from one year and month to another, if you have a DeLorean, and want to watch a Reagan movie: 50 cents_1955_11 -> dollars_1985_10 2.020446096654275 Historical British Price Data Obligatory Disclaimer: This feature requires connection to the internet. If you are using Frink on a handheld device, you may incur connection charges. Also, since I cannot guarantee the availability of any internet sites, this feature is intended only as a bonus that may not work reliably if at all. You may also require some proxy configuration if you use an HTTP proxy server to access the web. The units Britain or Britain_Pound or Britain_currency or Great_Britain or Great_Britain_Pound or United_Kingdom_Pound, or England or England_currency or GBP (the ISO-4217 code for the U.K. Pound) indicate the current pound (but don't use pound by itself--that's a measure of mass.) The exchange rate between the pound and all other world currencies, see below, is fetched live from the Internet. Historical price data is available to allow comparisons between the historical "buying power" of British currency, both pre- and post-decimalization. Data goes back to the year 1600. I don't know if data before this would be very meaningful. Historical currency values are represented by specially-named units containing both the currency and the year, separated by an underscore. All can be used in the plural, (e.g. pound_1960 or pounds_1960 or GBP_1960 are all valid). The following are examples of the plethora of values up to and including 1970 (from 1971 on, it just became pounds and pence): ExampleDescription guinea_1865 A pound plus a shilling (21/20 pounds) pound_1865 Fundamental unit GBP_1865 Fundamental unit sovereign_1865 A pound coin merk_1865 13/6d (that is 13 shillings and 6 pence) or 27/40 of a pound mark_1865 2/3 pound noble_1865 80 pence or 1/3 pound crown_1865 1/4 pound or 5 shillings florin_1865 2 shillings or 1/10 pound shilling_1865 1/20 pound or 12 pence groat_1865 4 pence or 1/60 pound penny_1865 or pence_18651/12 shilling or 1/240 pound farthing_1865 1/4 penny or 1/960 pound No wonder they went to decimalization. It was either that or go to base-960 math. To form combinations you can add them (using parentheses when necessary). For example, to convert a historical rate per day to current dollars/year: (4 pounds_1860 + 3 shilling_1860 + 5 pence_1860) / day -> dollars/year 101853.3826649 I acknowledge that's a bit cumbersome. So, you can find out what a great amount of money was involved when the British Parliament announced a 20,000 pound prize in 1714 for solving the Longitude Problem: 20000 pound_1714 -> dollars 2807866.8 That's a lot of lettuce. For more about the fascinating history of this problem, I highly recommend Dava Sobel's Longitude: The True Story of a Lone Genius Who Solved the Greatest Scientific Problem of His Time. By God, Harrison, I will see you righted. Thanks to Dan Weiler who loaned me the above book which I never returned (and passed along to my Grandpa.) Sorry, Dan, I'll buy you a book of your choice. International Exchange Rates Obligatory Disclaimer: This feature requires connection to the internet. If you are using Frink on a handheld device, you may incur connection charges. Also, since I cannot guarantee the availability of any internet sites, this feature is intended only as a bonus that may not work reliably if at all. You may also require some proxy configuration if you use an HTTP proxy server to access the web. Current exchange rate between almost all of the world's currencies is available. Exchange rates are fetched live from an allegedly zero-delay source on the Internet. The currency can either be specified by the name of the country, by the 3-letter ISO-4217 code for the currency, or by one of the combinations shown below. The following examples all work: Ireland Ireland_currency Ireland_Punt IEP Japan Japan_currency Japan_Yen JPY yen (this works because only Japan has a currency called "yen") Yen United_Arab_Emirates United_Arab_Emirates_currency United_Arab_Emirates_Dirham AED Euro EUR To list all of the currencies, you can use: units[currency] So, I'm watching "The Great Race" and seeing a team pay 600 Baht in Thailand for a hotel room. How much is that in a currency I'm familiar with? 600 baht -> USD 13.73724 I could have also used Thailand_Baht or Thailand in the above example. You can also get the current trade rates of various precious metals (normalized from the obscure troy weights that these values are measured in.) These are referenced using the capitalized name (lower case brings up element properties for now... this will all be addressed when I add object-oriented behavior to Frink) or the 3-letter ISO code (which is an X followed by the chemical symbol): ElementISO Code GoldXAU PlatinumXPT SilverXAG PalladiumXPD Gold 8765.9010519364188896 kg^-1 USD (price_per_mass) Note that this is in units of currency/mass (the international exchange rates for these are specified in dollars/troyounce, (but try to find that written somewhere)), but you can use any units of mass you want: 1 ton Gold 7952291.666666666667 USD (currency) Or find out how much it would be worth to melt down that necklace: 3 gram 18 karat Gold 19.723277366856942501600 USD (currency) Note: If you want to set a different base currency in your units file, and if you want currency conversions to still work, you should now) define the base currency as its 3-letter ISO-4217 currency code (say, "EUR" or "JPY"). This will allow the currency converter to unambiguously figure out which currency you mean. The following special cases work as well: SymbolDescription dollarU.S. dollar EuroEuro euroeuro €Euro symbol (Unicode \u20ac) ¥ Japanese Yen symbol (Unicode \u00a5) £ U.K. Pound symbol (Unicode \u0163)

Interval Arithmetic

Frink has the magical ability to perform rigorous interval arithmetic throughout calculations. So what is interval arithmetic? Well, you can think of it as a "new kind of number" that represents a fuzzy range of values. For example, you may know that a value lies between 1 and 2, but you're not quite sure where the value lies in that interval. Depending on your philosophy, you can think of an interval as specifying a fuzzy error bound, or you can think of an interval as simultaneously taking on all values within its bounds. Frink can take this uncertain interval and propagate the uncertainty through its calculations, giving you the ability to see how the initial uncertainties in your values affect your final calculations. Currently, the way to indicate that something is an interval is to use the new interval syntax (although something more concise will likely be added later, and the output format may change.) a = new interval[2,3] b = new interval[5,7] The intervals can then be manipulated in mathematical expressions, either with ordinary scalar variables or other intervals: a * 3 [6, 9] a + b [7, 10] a * b [10, 21] Intervals may also have a "middle" or "main" value which indicates the best-known value. Note that values should be specified in increasing order. d = new interval[2, 2.5, 3] e = new interval[7, 8.2, 9.4] d * e [14, 20.5, 28.2] Of course, all intervals used in a calculation must have "main" values or the main value will be dropped, creating an interval with only upper and lower bounds. Note: The boundaries and "main" values for intervals must be real numbers. (These numbers can also have dimensions like feet, meters, etc.) Although there is a theory of complex intervals, it's much harder and may not get implemented any time soon. (If you want to speed the process, the most expensive book in the world is on my Amazon.com wishlist, if you want to buy it for me.) Lest you think that intervals are simpler than they are, I find that people better understand them when they consider the following case: x = new interval[-2,2] Now, let's square x. Note that the values at each endpoint are equal to 4. However, over the range [-2,2], the value of x2 ranges from 4, down to 0 (at x=0), and back up to 4. Frink does the right thing for the values over this whole range: x^2 [0, 4] Yeah, that is cool. Frink tracks appropriate boundaries for intervals throughout all of your calculations. Frink's interval arithmetic is also rigorous in its treatment of error bounds. It painstakingly controls the rounding direction of arithmetic operations so that the boundaries are guaranteed to include the next-largest or next-smallest representable floating-point number that contains the interval. (See notes below on implementation status.) This is subtle, but I have spent a lot of work ensuring that the boundaries came out trustable, and no bigger than need be. For example: m = new interval[3,6] 1.0/m [0.16666666666666666666, 0.33333333333333333334] Note that the bottom bound is rounded down, and the top bound is rounded up. Currently, almost all functions have been made interval-aware. Implementing all functions will take quite a bit of effort. Implementing, say, sin[x] rigorously will require taking the Taylor series expansion for sin and treating each operation rigorously. Of course, that would be much slower, too. I have added some equivalents in the meantime that may not get the final decimal place right, and if so, I've noted them as such in the Interval Arithmetic Status section below. Not all operators such as < > = make unambiguous sense when applied to intervals, so Frink has introduced new operators to disambiguate these cases, and will implement other operators to work with intervals. See the Interval Comparison Operators section below for more details. By default, degenerate intervals which have the same upper and lower bounds are "collapsed" into a single real number. If you want to maintain them as intervals, call the function collapseIntervals[false] before constructing or performing mathematics on those intervals. As everyone uses Interval Arithmetic for the first time, they come upon two characteristic problems in the field: the dependence problem and the overestimation problem. These are common to all interval analysis, and not just to Frink, and are covered in extensive detail in the Interval Arithmetic section of the Frink FAQ. For more information about the field of Interval Arithmetic, please visit the Interval Computations website. (Link opens in new window.) Interval Arithmetic Example Interval arithmetic is an incredibly powerful feature that allows programs that weren't necessarily written with intervals in mind to track error bounds throughout your calculations, and can be magically applied to programs that are already written. For example, let's take some calculations to find the volume and density of a sphere: circumference = eval[input["Enter circumference of a sphere: "]] mass = eval[input["Enter the mass of the sphere: "]] diameter = circumference / pi radius = diameter / 2 volume = 4/3 pi radius^3 density = mass / volume println["The density is: " + (density -> "g/cm^3")] Now, you can run the program and enter something like "9.1 inches" for the circumference and "5.1 ounces" for the mass and find out the density of your baseball. No surprises there. But when you read the rules of Major League Baseball, you'll find that section 1.09 states: "The ball shall be a sphere formed by yarn wound around a small core of cork, rubber or similar material, covered with two stripes of white horsehide or cowhide, tightly stitched together. It shall weigh not less than five nor more than 5 1/4 ounces avoirdupois and measure not less than nine nor more than 9 1/4 inches in circumference." So, using your exact same program above, and a little interval input, Frink can calculate the effects of these allowed variations and show you the allowed range of densities of any legal baseball: Enter circumference of a sphere: new interval[9, 9+1/4] inches Enter the mass of the sphere: new interval[5, 5+1/4] ounces The density is: [0.64720283343427980773, 0.73778085086685322066] g/cm^3 The output indicates the range of uncertainties. Note that two different intervals were used to perform this calculation, and the effects of their uncertainties was automatically tracked throughout all calculations. All this in a program that wasn't even written with intervals in mind. Also note that I put the units of measure (e.g. inches, ounces) outside the brackets. You could put them inside the brackets, but you'd just have to write them twice in this case. Intervals can, of course, contain units of measure. By the way, I'm working on a more concise notation for specifying intervals. Join the mailing list if you're interested in the discussion. Interval Comparison Operators The relational operators (e.g. < == >, etc) work with intervals, but there are many ambiguous cases. These operators try to Do The Right Thing when applied to intervals. If you compare intervals that do not overlap, they return the appropriate result. If, however, the intervals do overlap, they terminate the program with an error similar to the following: Comparison expression: Using operator > to compare intervals [1, 3] and [2, 4] This operator is only defined if there is no overlap between intervals. Please modify your program to use interval-aware comparison operators. To handle the overlapping cases, Frink defines operators like "certainly less than" (CLT) and "possibly less than" (PLT). These operators can directly replace the normal relational operators. These new operators also work with normal real numbers, so you can still write programs that run using either intervals or real numbers as input. OperatorDescription CEQCertainly equals CNECertainly not equals CLTCertainly less than CLECertainly less-than-or-equal-to CGTCertainly greater than CGECertainly greater-than-or-equal-to PEQPossibly equals PNEPossibly not equals PLTPossibly less than PLEPossibly less-than-or-equal-to PGTPossibly greater than PGEPossibly greater-than-or-equal-to Example: a = new interval[1,3] b = new interval[2,4] a PLT b true a CLT b false Interval Arithmetic Status As noted above, not all functions are implemented for intervals. The following table notes the status of the implementation of various operators and functions. If a function does not appear on this list, it may still return values for interval arguments, but you shouldn't trust it because I haven't evaluated it for discontinuities or non-monotonicity yet. Function / OperatorArbitrary Precision?Rigorous Error Bounds?Notes +YY -YY *YY /YY modYY ^NN Performed to hardware precision only. floor[x]YY ln[x]NN Performed to hardware precision only. log[x]NN Performed to hardware precision only. exp[x]NN Performed to hardware precision only. sin[x]NN Performed to hardware precision only. cos[x]NN Performed to hardware precision only. tan[x]NN Performed to hardware precision only. sec[x]NN Performed to hardware precision only. csc[x]NN Performed to hardware precision only. cot[x]NN Performed to hardware precision only. arccos[x]NY Performed to hardware precision only. arcsin[x]NY Performed to hardware precision only. arctan[x]NY Performed to hardware precision only. arctan[x, y]NN Performed to hardware precision only. Returns arctan[x/y] corrected for quadrant. Arguments can be real or intervals. Has some corrections to range of function to eliminate branch discontinuity across x=0 when y<0. sqrt[x]NN Performed to hardware precision for floating-point numbers, exact values for integers that produce exact integer values. infimum[x]YY Returns the infimum (lower bound) of an interval. If called with a number that is not an interval, just returns the number. supremum[x]YY Returns the supremum (upper bound) of an interval. If called with a number that is not an interval, just returns the number. mainValue[x]Y Y Returns the main (middle) value of an interval. If the interval does not have a middle value, returns undef. If called with a number that is not an interval, just returns the number. Date/Time Intervals An interval can also be composed of date/times. The syntax is very similar: a = new interval[now[], now[] + 3 days] b = new interval[#1969-08-19#, #2005-06-11#] You can then perform Date/Time arithmetic on the values.

Java Introspection

Missing a function that you need? Frink can directly call Java code to let you take advantage of any Java library that's in your classpath. Thus, you can use your favorite graphing package, connect to a database, perform lower-level networking, and more, directly from within Frink. The Java null will be converted to/from the Frink type undef. Creating Java Objects New Java objects can be created with the newJava[classname] and newJava[classname, argList] functions. These call Java constructors with the specified arguments. If the constructor takes a single argument, argList can be a single value, otherwise it should be an array of values. The following creates a new Frame and calls some methods on the Frame to display it. Note that the method calls require square brackets. f = newJava["java.awt.Frame", "Frink Rules!"] f.setSize[200,200] f.show[] f.toFront[] Arrays of Java objects, including primitives, can be constructed with the newJavaArray[classname, length] method. The classname should be a string containing either be a fully-qualified classname (e.g. "java.util.Hashtable") or a primitive type name, (e.g. "int" or "double"). Calling Static Java Methods If you don't have an instance of the class, you can call static methods in Java classes using the callJava[classname, methodname, argList] function. The following uses the java.lang.Math class to generate a random number. n = callJava["java.lang.Math", "random", [] ] 0.38102192379837 Lame example, huh? Especially when Frink can already generate random numbers. The same syntax can be used to get a database driver, or something more interesting. Accessing Static Java Fields You can access static variables in a class without having an instance of the class by calling the staticJava[classname, fieldname] function. green = staticJava["java.awt.Color", "GREEN"] JavaObject:java.awt.Color If you've constructed a Frame as in the Creating Java Objects section above, you can set its background color by: f.setBackground[green] Now go wire all your Java code into Frink. At the moment, not all Frink types are mapped to Java types. If there's a mapping that you need, please let me know.

Embedding Frink

Not only can you call Java from Frink, but you can call Frink from Java. It's quite easy to embed a Frink parser into any Java program and give those programs all of the power of Frink. It can take just a few lines of Java: String results; Frink interp = new Frink(); try {    results = interp.parseString("2+2"); } catch (frink.errors.FrinkEvaluationException fee) {    // Do whatever you want with the exception } There are more methods for calling Frink from within a Java program. One of the major problems is that converting from Frink types to Java types is almost always a narrowing operation. For example, if you try to put a Frink value into a Java integer: It could be too large. It could be a non-integer (rational number, floating point). It could be complex. It may have wrong unit types. It could be something else like a String or an Object. As a result, all of these interface methods throw a variety of exceptions. For more information, see the javadocs about Frink's integration methods, especially the Frink class. If you're interested in integrating Frink into your company's products, please contact Alan Eliasen.

Sample Calculations

The following sections demonstrates some of the real-world calculations I've made with Frink. Mass and Volume Let's say you wanted to fill your bedroom up with water. How much water would it take? Let's say your room measures 10 feet by 12 feet wide by 8 feet high. 10 feet 12 feet 8 feet -> gallons 552960/77 (approx. 7181.298701298701) It would take approximately 7181 gallons to fill it. Note that you get both an exact fraction and an approximation. (If you don't want to see the fraction, put a decimal point in any of the numbers, like 10. or 10.0.) How much would that weigh, if you filled it with water? Frink has the unit "water" which stands for the density of water. 10. feet 12 feet 8 feet water -> pounds 59930.84215309883 So it would weigh almost 60,000 pounds. What if you knew that your floor could only support 2 tons? How deep could you fill the room with water? 2. tons / (10 feet 12 feet water) -> feet 0.5339487791320047 So you could only fill it about .53 feet deep. It'll be a pretty sad pool party. Liquor You can set variables on the fly, by using the assignment = operator. Let's say you want to define a new unit representing the amount of alcohol in a can of (quality) 3.2 beer. Keep in mind that 3.2 beer is measured by alcohol/weight, while almost all other liquors (and many beers) are usually measured in alcohol/volume. The density ratio between water and alcohol is given by: water/alcohol 1.267 Water is thus 1.267 times denser than alcohol. 3.2 beer (measured by weight) is thus actually 4.0 percent alcohol as measured by volume. Now let's set that variable in terms of a beer's density of alcohol per volume so we can compare: beer = 12 floz 3.2 percent water/alcohol Then, you wanted to find out how many beers a big bottle of champagne is equal to: magnum 13.5 percent -> beer 14.07 You probably don't want to drink that whole bottle. Now let's say you're mixing Jungle Juice (using a 1.75 liter bottle of Everclear (190 proof!)) and Kool-Aid to fill a 5-gallon bucket (any resemblance to my college parties is completely intentional.) What percent alcohol is that stuff? junglejuice = 1.75 liter 190 proof / (5 gallon) junglejuice -> "percent" 8.78372074090843481138500000 percent It's really not that strong. About 8.8%. But if you drink 5 cups of that, at 12 fluid ounces each, how many beers have you had? 5 12 floz junglejuice -> "beer" 10.832 beer Maybe that's why people were getting punched in the head. QED. More Liquor Some more useful calculations, most thanks to the lovely Steve Clymer: How many cases in a keg? (A keg is a normal-sized keg, what those in the beer industry would call a "half barrel," or 1/2 beerbarrel in Frink notation. I don't think they sell full barrels. I've never seen one. It would weigh 258 pounds. A "pony keg" is a "quarter barrel" or, in Frink notation, ponykeg or 1/4 beerbarrel) keg -> case 62/9 (approx. 6.888888888888889) How many 12 fluid ounce drinks (i.e. cans o' beer) in a keg? keg -> 12 floz 496/3 (approx. 165.33333333333334) What is the price in dollars per fluid ounce of alcohol when buying a keg of 3.2 beer? (Remember that 3.2 beer is measured in alcohol/weight, so we correct by the density ratio of water/alcohol to get alcohol by volume:) (60 dollars)/(keg 3.2 percent water/alcohol) -> "dollars/floz" 0.74593 dollars/floz A bottle of cheap wine? (A "winebottle" is the standard 750 ml size.) (6.99 dollars)/(winebottle 13 percent) -> "dollars/floz" 2.12 dollars/floz A big plastic bottle of really bad vodka? (13.99 dollars)/(1750 ml 80 proof) -> "dollars/floz" 0.59104811225625 dollars/floz Movie Magic In the movie Independence Day, the alien mother ship is said to be 500 km in diameter and have a mass 1/4 that of earth's moon. If the mother ship were a sphere, what would its density be? (The volume of a sphere is 4/3 pi radius3) 1/4 moonmass / (4/3 pi (500/2 km)^3) -> water 280.68 This makes the ship 280 times denser than water. This is 36 times denser than iron and more than 12 times denser than any known element! As the ship is actually more a thin disc than a sphere, it would actually be even denser. Since it contains lots of empty space, parts of it would have to be much, much denser. If the object is this dense and has such a large mass, what is its surface gravity? Surface gravity is given by G mass / radius2, where G is the gravitational constant (which Frink knows about): G 1/4 moonmass / (500/2 km)^2 -> gravity 2.000079 The surface gravity of the spaceship is thus at least twice earth's gravity--and that's on the rim where gravity is weakest. It would actually be much higher since it's much, much flatter than a sphere. I hope you're not the alien that has to go outside and paint it. Fiscal Calculations You can calculate the day that your company will run out of cash, based on their financial statements. The following is an example for a real company, based on SEC filings, which read as the following: Cash and Cash Equivalents (in thousands) December 31, 2000June 30, 2001 $86,481$41,601 To make this more readable, you can define variables to hold values: burnrate = (#2001-06-30# - #2000-12-31#) / ((86481 - 41601) thousand dollars) burnrate -> dollars/day 248012.89431247435 You can calculate the number of days until the money runs out at this rate: 41601 thousand dollars / burnrate -> "days" 167.7372 days Using date/time math, starting from the last report date (June 30, 2001) you can find out the exact date this corresponds to: #2001-06-30# + 41601 thousand dollars / burnrate AD 2001-12-14 04:41:38.101 PM (Fri) Mountain Standard Time Just in time to see the cinema release of the first Lord of the Rings movie with your last six bucks. Will they know it's Christmas Time at all? Ouch! At the moment, I'm watching CNN which is discussing some land-mines used in Afghanistan. They showed a very small mine (about the size of a bran muffin) containing "51 grams of TNT" and they asked how much destructive force that carries. Frink's data file includes how much energy is in a mass of TNT, specified by the unit "TNT". How many feet in the air could 51 grams of TNT throw me, assuming perfect efficiency, and knowing energy = mass * gravity * height? 51 grams TNT -> 185 pounds gravity feet 937.7628167428616 Yikes. 937 feet. But the only difference between explosives and other combustible fuels is the rapidity of combustion, not in the quantity of energy. How much gasoline contains the same amount of energy? 51 grams TNT -> "teaspoons gasoline" 1.2903255 teaspoons gasoline 1.29 teaspoons? That's not much at all. You're buying a huge amount of energy when you fill up your car. Sniping eBay Auctions I need a monocle, but I don't want to pay a lot for it. The eBay monocle auction ends in 7 hours and 44 minutes... what time do I need to set the alarm clock for to remind me? now[] + 7 hours + 44 min AD 2001-11-17 02:13:51.934 PM (Sat) Mountain Standard Time Epilogue 2001: I didn't get the damned monocle. Junkyard Wars I can't watch Junkyard Wars (or lots of other television shows) without having Frink at my side. This week the team has to float a submerged half-ton Cooper Mini... how many oil barrels will they need to use as floats? half ton -> barrels water 2.8530101742118243 They're trying to hand-pump air down to the barrels, submerged "2 fathoms" below the water. If the guy can sustain 40 watts of pumping power, how many minutes will it take to fill the barrel? 2 fathoms water gravity barrel -> 40 watts minutes 2.376123072093987 And how many food Calories (a food Calorie (with a capital 'C') equals 1000 calories with a small 'c') will he burn to fill a barrel? 2 fathoms water gravity barrel -> Calories 1.3620653895637644 Better eat a Tic-Tac first. Body Heat I've seen lots of figures about how much heat the human body produces. You can easily calculate the upper limit based on how much food you eat a day. Say, you eat 2000 Calories a day (again, food Calories with a capital "C" are equal to 1000 calories with a little "c".) 2000 Calories/day -> watts 96.91666666666667 So, your average power and/or heat output is slightly less than a 100-watt bulb. (Note that your heat is radiated over a much larger area so the temperature is much lower.) Many days I could be replaced entirely with a 100-watt bulb and have no discernible effect on the universe. Microwave Cookery I'm heating up yummy mustard greens in my microwave, but I don't want to overheat them. I just want to warm them up. If I run my 1100 watt microwave for 30 seconds, how much will their temperature increase? I have a big 27 ounce (mass) can, and I'll assume that their specific heat is about the same as that of water (1 calorie/gram/degC): 1100 W 30 sec / (27 oz 1 calorie/gram/degC) -> degF 18.5350 30 seconds should raise the temperature by no more than 18 degrees Fahrenheit, assuming perfect transfer of microwave energy to heat. Knowing this, I could see how efficiently my microwave actually heats food. I could heat a quantity of water and measure the temperature change in the water. I'll do that sometime if I can find my good thermometer. Why is Superman so Lazy? Superman is always rescuing school buses that are falling off of cliffs, flying to the moon, lifting cars over his head, and generally showing off. So why does he still allow so many accidents to happen? Shouldn't he be able to rescue everybody who has a Volkswagen parked on their chest? While searching for answers, I found out three interesting things about Superman: He's 6 feet 3 inches tall. He weighs 225 pounds. He gets his strength from being charged up with solar energy. This is enough information to find some answers. Frink has units called sunpower (the total power radiated by the sun) and sundist (the distance between the earth and the sun.) Thus, we can find the sun's power that strikes an area at the distance of the earth (knowing the surface area of a sphere is 4 pi radius2): earthpower = sunpower / (4 pi sundist^2) This is about 1372 watts per square meter. Superman is a pretty big guy--let's say the surface area he can present to the sun is 12 square feet. (This is probably a bit high--it makes him an average of 23 inches wide over his entire height.) This allows Superman to charge up at a power of: chargerate = earthpower 12 ft^2 chargerate -> watts 1530.1602 Superman thus charges up at the rate of 1530 joules/sec or 1530 watts. At this rate, how long does he have to charge up before he can lift a 2 ton truck over his head? (Knowing energy = mass * height * gravity) 2 ton 7 feet gravity / chargerate -> sec 24.80975 So, charging up for 25 seconds allows him to save one dumb kid who is acting as a speed bump. So his power is huge but not infinite. He couldn't sustain a higher rate (unless he showed off less by lifting the car only a foot or two.) Lifting a truck every 30 seconds or so isn't bad, though. He could be saving a lot more people. So why doesn't he? Well, we've all seen the movie. He's using his super-powers to pick up chicks. Literally. Superman decides to take a break from saving lives and takes Lois Lane up in the sky for a joyride. So how long does he have to charge up with solar energy to fly himself and Lois Lane (let's say she weighs 135 pounds) up to 15,000 feet? (225 + 135) pounds 15000 feet gravity / chargerate -> minutes 59.809235 So, Superman has to charge up with solar energy for an hour to cart Lois's fat ass up there. With the same energy, he could have saved over 120 trapped kids. Keep in mind that if Lois didn't weigh so much, he'd have more energy left over to save people. If she would manage to stay off the ham and lose just two pounds, Superman would have enough energy to save another kid's life. Sure, he's a great guy, and, sure, he's the Defender of Truth, Justice, and the American Way, but can't he find a better use for his super-powers than schlepping some shiksa into the stratosphere? Shovel my walk, he could, in 3 seconds--and me with the sciatica. Fart Jokes I received one of those endlessly-forwarded e-mails of dubious but "interesting facts" which said "if you fart continuously for 6 years and 9 months, you'll have enough gas to create the equivalent of an atomic bomb." Hee hee. Cute. (Thanks to Heather May Howard... being unable to easily calculate the veracity of this statement was one of the primary influences that showed how existing programs were too limited and inspired the creation of Frink.) But I didn't believe it and wanted to check it. The Hiroshima bomb had a yield of 12.5 kilotons of TNT, which is a very small bomb by today's standards. How many horsepower would that be? 12.5 kilotons TNT / (6 years + 9 months) -> horsepower 329.26013859711395 Can you produce a 329-horsepower blowtorch of a fart? I doubt it. That's the power produced by a Corvette engine running just at its melting point. A one-second fart with that much power could blow me 1000 feet straight up. To produce that kind of energy, how much food would you have to eat a day? 12.5 kilotons TNT / (6 years + 9 months) -> Calories/day 5066811.55086559 Ummm... can you eat over 5 million Calories a day? (Again, note that these are food Calories with a capital 'c' which are equal to 1000 calories with a small 'c'.) If you were a perfect fart factory, converting food energy into farts with 100% efficiency, and ate a normal 2000 Calories/day, how many years would it really take? 12.5 kilotons TNT / (2000 Calories/day) -> years 17100.488984171367 17,000 years is still a huge underestimate; I don't know how much of your energy actually goes into fart production. Oh well. To continue the calculations, let's guess your butthole has a diameter of 1 inch (no, you go measure it.) Let's also guess that the gas you actually produce in a fart is only 1/10 as combustible as pure natural gas. What would be the velocity of the gas coming out? 12.5 kilotons TNT / natural_gas / (6 years + 9 months) / (pi (.5 in)^2) 10 -> mph 280.1590446203110 Nobody likes sitting next to a 280-mile-per-hour fart-machine. Lesson: Even the smallest atomic bombs are really unbelievably powerful and whoever originally calculated this isn't any fun to be around if they really fart that much. Fart jokes. Sheesh. If Frink isn't a huge success, it's not because I didn't pander to the Lowest Common Denominator. Advanced Farting The above order-of-magnitude estimate shows how far off the mark that the fart e-mail was. Not content with that, I found some medical studies that allowed me to do a more detailed analysis of the average person's available fart energy. What do you think are the most flammable gases in a fart? Most people think it's methane, but I found some medical studies that disprove this. Most people hardly have any methane in their intestines. For example, one study stated that only 4 out of 11 people had any detectable methane in their intestines! So what's the rest of the gas? GasPercent by Volume Nitrogen64% Carbon Dioxide14% Hydrogen19% Methane3.2% Oxygen0.7% These studies also note that the average person has 100 milliliters of gas is present in their intestinal tract at any given time. The average person expels 400-2000 ml of gas daily (and I'm not talking about through the mouth and nose.) Okay, that's almost enough information to figure out available fart energy. Now all we need to know is the energy of combustion of the flammable gases. Of the above, only hydrogen and methane are readily combustible. Looking up their energies of combustion: GasEnergy of Combustion in kJ/mol Hydrogen (H2)285.8 Methane (CH4)890.8 Okay, that's plenty enough information to find out how much energy is released in a day of farting! Say you're on the farty end of the scale, and you produce the 2000 ml of gas each day. Note that the energies above are given in kJ/mol, but we have volumes in milliliters. As you may have learned in chemistry class, a mole of any gas at standard temperature and pressure takes up the same volume. Frink knows this as molarvolume. The total energy in the hydrogen (keeping in mind that hydrogen makes up 19% of the 2000 ml volume) is given by: h2energy = 2000 ml / molarvolume mol * 19 percent * 285.8 kJ/mol 4845.3656205695224816 m^2 s^-2 kg (energy) The combustible hydrogen thus produces 4800 joules (per day.) Now, for the methane, which makes a smaller percentage, but releases more energy per mole: methaneenergy = 2000 ml / molarvolume mol * 3.2 percent * 890.8 kJ/mol 2543.5537223989278488 m^2 s^-2 kg (energy) The energy in the combustible methane is thus about 2500 joules (per day), about half the energy produced from the hydrogen. Thus, the grand total of energy produced by combustible farts by a farty person in a day, in food Calories (with a capital C, remember--these are what a physicist would call a kilocalorie) is: methaneenergy + h2energy -> Calories Which gives a result of about 1.76 Calories/day of energy available from burning your farts. (About 1.16 Calories from hydrogen, and about 0.60 Calories from methane.) This is out of the 2000 Calories that an average person eats a day. Or, one part in about 1133 of the energy in the food you eat is available in fart energy, (again, for a gassy person.) Thus, a good estimate to the problem stated above is that a real (gassy) human would need to save their farts for: 12.5 kilotons TNT / ((methaneenergy + h2energy) / day) -> years 1.9379377133697419931e+7 or about 19 million years to make the equivalent of the energy in a (small) atomic bomb! So the estimate given in that e-mail is off by a factor of at least 2.8 million! Now, you know the true facts about farts. Frink is now complete, and I couldn't be prouder. Umm... thanks, Heather May. More Incorrect Facts That e-mail has a higher density of incorrect facts than just about anything I've seen. Below are several more examples. QE2 "The cruise liner, Queen Elizabeth II, moves only six inches for each gallon of diesel that it burns." From a page of facts about the QE2, we find that the ship consumes 18 tons of fuel per hour at a service speed of 28 knots. By legislation in many areas, diesel fuel must have a density no higher than .85 kg/liter (if it were watered down, it would be higher.) 18 tons/hour / (28 knot) / (.85 kg/liter) -> feet/gallon Warning: reciprocal conversion 33.52338503156235 They're very, very wrong. It actually travels about 33.5 feet per gallon, or 157 gallons/mile. They're only off by a factor of 67. Still not great gas mileage, though. Hamburgers and Cars The same e-mail states "pound for pound, hamburgers cost more than new cars." Let's see... let's try with a medium-expensive, light car. A 2001 Corvette Z06 weighs 3,115 pounds and costs $48,055. (48055 dollars) / (3115 lb) -> dollars/lb 1373/89 (approx. 15.426966292134832) I know I don't pay $15/lb for hamburger. Let's try with a light, very cheap car. A quick lookup showed that a 2001 Hyundai Accent costs $10,184 and weighs 2255 pounds. That's still $4.51 a pound. Do you pay that much for hamburger? Maybe a finished hamburger in a good restaurant, certainly not for hamburger. This is deceptive if not outright wrong. "Get The Provisions..." By the way, did you ever notice that in the movie Stand By Me that Gordie really gets ripped off for hamburger? Supposedly set in 1960, Gordie buys "a buck and a half of hamburger" which is slapped down in a tiny wrapper that couldn't contain more than 3/4 of a pound. Probably a half pound--it looks like all wrapper. (You estimate it.) Converting to modern prices: 1.50 dollars_1960 / (.75 lb) -> dollars/lb 26.96 Gordie paid a modern equivalent of $27/lb for that hamburger. Perhaps a smarter shopper could have gotten more for Vern's 6 cents. Typing The same e-mail says "the longest word that can be typed using only the left hand is 'stewardesses'." Well, Frink is good for doing word stuff too. Using the single word list from the Moby wordlist, the following program finds lots of 12-letter alternatives, and several longer: infile = "path to words file" // Pattern which matches words containing only the // characters under the left hand on a QWERTY keyboard leftPattern = %r/^[qwertasdfgzxcvb]+$/i // Pick out words that match the pattern matches = select[lines[infile], leftPattern] // Length sort sort[matches, { |a,b| length[a] <=> length[b] } ] for [line] matches    println[length[line] + ": $line"] (Actually, my original program was only 2 lines, but this is easier to read. The program could be written lots of ways.) Some of the results are: 12: stewardesses 12: desegregates 12: terracewards 12: watercresses 12: extravasated 12: decerebrated 12: gazetteerage 12: desegregated 12: extravagated 12: tessaradecad 12: resegregated 12: reaggregated 12: reverberated 12: reverberates 12: reasseverate 12: aftereffects 13: tesseradecade 13: aftercataract 13: devertebrated 17: redrawerredrawers I have no idea what that last word means. Biblical References So you want to build an ark, do you? And not an Ark of the Covenant, but the boat. How bad was that flood? The bible is also quite precise in its measurement of the flood. Genesis 7:19-20 states that "And the waters prevailed exceedingly upon the earth; and all the mountains, that were under the whole heaven, were covered. Fifteen cubits upward did the waters prevail; and the mountains were covered." Okay, so the highest mountains of the earth were covered, plus an extra 15 cubits (approx 27 feet) for good measure. The current measurements for highest mountain is Mt. Everest at 29030.8 feet (according to the highly dubious and utterly non-trustable 2002 Guinness Book of World Records.) I know that Everest is growing slowly, (best estimates are 2.4 inches/year) so we'll discount for that. depth = 29030 feet + 15 biblicalcubits - (2.4 inches/year 4000 years) About 28257 feet of water. This was deposited over 40 days. The rainfall was thus: rainfall = depth / (40 days) Or about 353 inches/hour, or 29 feet/hour. A good rain around here is about an inch an hour. The very rainiest places on earth like Cherrapunji get about this much rain in a year. (I'm campaigning Colorado farmers to sin a bit more...) I have much longer analysis of the predicted effects of what such a flood would produce; e-mail me if you want a copy. E=mc2 Everyone knows Einstein's E=mc2 equation, but to apply it is often very difficult because the units come out so strange. Let's see, I have mass in pounds, and the speed of light is 186,282 miles/second... ummm... what does that come out to? In Frink the calculation becomes transparently simple. If you took the matter in a teaspoon of water, and converted that to energy, how many gallons of gasoline would that equal? teaspoon water c^2 -> "gallons gasoline" 3164209.862836101 gallons gasoline Unbelievable. The energy in a teaspoon of water, if we could extract it, is equal to burning more than 3 million gallons of gasoline. Days Old The November 2001 edition of Sky & Telescope magazine has a charming article called "Stellar Guides for Your Birthday" by Jeff A. Farinacci (p. 63), which provides a list of "nearby" stars and their distances in light-years or light-days. This allows you to look at the light coming from a star that was emitted the day you were born. It includes a 28-line BASIC program to calculate how many days old you are on a certain date. As you know by now, the essential calculation can be done in one line of Frink. For example, the bright star Pollux is about 33.7 light-years away (12314 days, based on the Hipparcos satellite's parallax measurement of 96.74 milliarcseconds) and the light it emitted on the day I was born will finally reach earth on the date: #1969-08-19# + 12314 days AD 2003-05-07 12:00:00.000 AM (Wed) Mountain Daylight Time or, to calculate the date directly from the parallax, we can use the following, where au is an astronomical unit (the average distance between the earth and the sun,) and c is the speed of light, the values of which are known to Frink: #1969-08-19# + au / (96.74 milliarcsec) / c This gives the same date as the calculation above (May 7, 2003.) I was amazed to find that the universe has conspired to produce a beautiful conjunction on this date. Pollux will form a straight line with the moon and Jupiter in the western sky on that night: View of the sky on May 7, 2003 (Screenshot courtesy of the wonderful Sky View Café applet) (Note: The three objects aren't as close together as it may look in this picture. The sky is big.) These screenshots show how it will look at 10 PM Mountain Daylight Time. Below is a 45-degree chunk of sky looking due west. This will give you a better idea of how the sky will look as you face west. You'll probably see Pollux and Castor quite clearly. Castor is the bright star directly to the right of Pollux. Castor and Pollux will appear to make a horizontal line at this time. 45-degree view of the sky looking West during conjunction It shouldn't be hard to find. Look west. The moon will be the brightest object in the sky, and Jupiter will be the second-brightest. Follow the line from Jupiter to the moon. Pollux is by far the brightest star along that line (it has a dimmer twin Castor, which will be on the right.) The moon is in the center and Jupiter and Pollux are equal distances on either side of the moon. Follow the wise men. Bring gold. I already have lots of frankincense and myrrh. Alan's Editorializing: This article also underlines one of the things I am growing to miss in most physical equations and all programs written in other languages... the loss of units. Everything is an unexplained number, and inscrutable conversion factors are strewn liberally throughout. This is exactly the type of thing that Frink was designed to address. For example, a line in the article indicates: The parallax-to-distance formula is simple: d=1/p, where p is the parallax angle in arcseconds and d is the distance in parsecs (3.26 light-years). This description is unfortunate. 1 divided by an angle (which is dimensionless) is still dimensionless, not a distance. This is better specified by saying that the formula is distance=(orbital radius)/(parallax angle). Since the parallax angles are specified with respect to Earth's orbital radius, you can write the equation as d = au/p. "au" is an astronomical unit, the average distance between the Earth and the Sun, which is included in Frink's standard data file. Then, p can be specified in any angular units and distance can be automatically converted to light-years or light-days instead of parsecs (or into feet, if you want). As always, Frink makes the units of measurement transparent, and helps to ensure that your calculations make sense. So, using the Hipparcos satellite's measurements for the parallax of the closest star, Proxima Centauri (okay, second-closest, smartypants): au / (.7723 arcsec) -> lightyears 4.223182420960891 This way, we learn something about the nature of the physical calculation which we can generalize, rather than having an equation that only works with one weird system of measurement. (Although professional astronomers like to use parsecs, I think it's a horrible, intentionally exclusive, geocentric measurement and they're just being difficult. There was even an article in Sky & Telescope a while back which intimated that some astronomers would sneer and giggle at you if you used light-years in a professional publication or speech.) Using our deeper knowledge, we can see how much more accurate the Hipparcos satellite would be if it were put into Jupiter's orbit, or how accurate its instruments need to be to achieve a certain accuracy in distance measurements. We've learned something more general. Below is the same program as in Sky & Telescope, but more flexible. You can enter the exact second of your birth using any of the date formats that Frink recognizes. You enter the desired age as "12314 days" or "1 billion seconds" or any other duration. str = input["Enter your birthdate: "] birthdate = eval["# $str #"] // Parse as a date str = input["Enter desired age: "] age = eval[str] println["You will be $str old on " + (birthdate + age)] Enter your birthdate: 1969-08-19 04:54 PM Mountain Enter desired age: 1 billion seconds You will be 1 billion seconds old on AD 2001-04-27 06:40:40.000 PM (Fri) Mountain Daylight Time Finding Your Own Star Now you want your own star, don't you? You might take a look at a list of the brightest stars in the sky at Cosmobrain and look the stars' distances in light-years. This will give you an idea of the bright stars, and give you their Hipparcos catalog numbers. Using the Hipparcos catalog number given in that table, you can look up that star from this Hipparcos search form, find its Geometrical Parallax (field H11, which is probably given in milliarcseconds) and plug that number into the equation shown above. At some point, I may make a Frink Server Page that automates this. But you might learn more just by doing the calculations yourself. Whether you have a kid who is 8.6 years old (for Sirius which is the brightest star in the sky and 3141 light-days away,) someone turning 11.4 (Procyon), turning 16.8 (Altair) or someone turning 65.1 (Aldebaran,) a star is a great gift and might just start a love of astronomy. I can't promise that the moon and the planets will line up for them, though. Note that there is some uncertainty in measuring parallaxes, often several percent, and thus the dates are somewhat uncertain, so it's a gift you can give any time around the date. For example, the standard error for the parallax of Pollux is .87 milliarcseconds (parallax error is field H16 in the Hipparcos catalog, specified in milliarcseconds) which leads to an actual date that can vary from around January 17, 2003 to August 27, 2003 -- a range of over 7 months. Just have fun and celebrate your stars when you want! Model Solar System This one is fun. I didn't have a grasp of the size difference between the Earth and the Moon so I wanted to make a little scale model in my home. It would be best to use spheres of the appropriate sizes, but I don't have that many balls. Instead, I decided to cut circles out of paper. My deciding dimension was the size of the piece of paper I used to cut out the pieces. I could only get a 7-inch diameter circle for the Earth (3.5-inch radius), so this defined my scale, which I saved in a variable for use in later calculations: scale = earthradius / (3.5 inches) 7.166851856017998E7 The standard data file contains information about the dimensions of the planets, earthradius being one of those. Now how big should the Moon circle be? moonradius / scale -> inches 0.9547455176283174 Okay, using my rolling ruler, I cut out a circle with radius 0.95 inches (diameter 1.9 inches). There's the Moon. It's interesting to see the difference in size between the Earth and Moon: Earth-Moon Sizes Now, to place them properly... how far away should they be at that scale? moondist / scale -> feet 17.59705489913335 Okay, stick the Earth to one wall, and then measure a distance 17.5 feet away, and stick the Moon to that. Installed! From each vantage point, you can see how big the other actually looks from that distance. Standing by the Earth, you can see how big the Moon looks (you've seen the Moon, but it's a smaller angle than you might guess... the Moon really doesn't take up much sky, only about half a degree in diameter.) You can verify this by holding a fingernail out at arm's length, comparing it to the size of your Moon model, and then going outside and doing the same to the Moon, if you can see it. Now walk over to the Moon and look at the Earth. It would be pretty big! Earth would appear about 3.66 times wider in diameter (in Frink notation, earthradius/moonradius, or 13.4 times larger in area ( pi earthradius^2 / (pi moonradius^2) ). Just to verify, I wanted to make sure that the visible angles in my model match real life. The visual angle of an object which does not subtend a large angle can be expressed as angle = width / distance. The angle normally comes out in radians if width and distance are in the same units, but this is Frink. You can get the answer out in degrees, or arcminutes if that's where your heart lies: 1.9 inches / (17.5 feet) -> arcminutes 31.10342316424469 Yep, that's just the right number of arcminutes. From Earth, the Sun and the Moon both appear just over half a degree in diameter, or about 32 arcminutes (an arcminute is 1/60 of a degree). It all works out. Note that in the standard data file, radians are dimensionless units (a radian is defined as "1".) This is because radians are dimensionless units, but you can convert values in radians to other angular units. By the way, a more accurate angular formula that is valid for large and small angles subtended by a sphere with a given radius at a specified distance is: 2 arcsin[radius/(radius + distance)] -> degrees Note that inverse trigonometric functions (arcsin, arccos, arctan) have their output in radians. This is easily converted to whatever angular units you want, as above. You don't see that the output is in radians (if you use the standard data file) because radians are dimensionless numbers. You just gotta be a bit careful here, or make the minor change in your units file to make radians a fundamental dimension. (Read the documentation in the units file... the units file is otherwise radians-correct.) Nostalgic Digression: I remember a cool black-and-white movie we saw in my Kindergarten class about making a scale model of the solar system. It involved a huge vertical circular sign representing the Sun that somebody had built for the film and a car driving a measured distance away to look at it. (A bit confusing, though. I remember them saying "here we are, 93 million miles away!" and they were still in the same park.) Good stuff, and I'm glad I finally made my own model. It helps me understand how cool the Apollo missions were. But my enthusiasm is tempered by the fact that I'm just now figuring out stuff they tried to teach me in Kindergarten. Now go make your own model. Pick your own scale to fit your surroundings and materials. It's fun. In my model, Jupiter would have to be a sphere 6.59 feet in diameter, placed about 5.5 miles away right now. I'll have to get a bigger place. Now that you know how to calculate the size in Frink yourself, I've gone ahead and built a Frink Server Page that lets you design your own! Homework: In your model, figure and/or plot the following: Orbit of the Space Shuttle (about 300 km above the surface of the Earth) Wow. That's barely up there. Orbit of a geosynchronous satellite (42164 km from the center of the Earth, or about 22300 miles from the surface of the Earth.) Stand this far away from the Earth circle... that's how big it would look. The sizes of the Sun, other planets, and their moons. The speed of light in your model. Saving Hundreds of Millions of Dollars "The MCO [Mars Climate Orbiter] MIB [Mishap Investigation Board] has determined that the root cause for the loss of the MCO spacecraft was the failure to use metric units in the coding of a ground software file, "Small Forces," used in trajectory models. Specifically, thruster performance data in English units instead of metric units was used in the software application code titled SM_FORCES (small forces)." --Mars Climate Orbiter Mishap Investigation Board, Phase I Report This is not to take away from the designers of a wonderfully complex spacecraft that can travel to Mars; that's an incredibly difficult problem, and I couldn't do it. However, this is just the type of error that Frink was designed to help avoid, and because I make these type of errors a lot, I've designed this tool to help me. Frink tracks units through all calculations and makes conversions between them transparent. This is why I'm working toward making Frink a feasible solution for calculations of this type. Update: I received the following from Peter Norvig: "I ran across Frink, and as a member of the MCO review board, I appreciate your efforts. Note, however that more than just language support is necessary. First, you'd have to have conventions on data I/O -- the misinterpreted data was from a file, not from another function in the program. Also, there was an issue of software reuse -- the errant portion of the system had been used before on a previous mission, and in that case it was used in a non-critical, non-navigational way. It was not properly reviewed because the team did not realize that in MCO it became critical." The points above are well-taken. Proper parsing of units can be easily achieved in Frink with a simple, appropriate comment in the data file. unittable.frink shows how Frink can parse a file containing units of measure. All that is needed is to add a single comment to the data file that contains the units of measure of each data column. Frink then reads each column with the appropriate units of measure and scale, using any units of measure that Frink knows about as input, and Frink parses them and works with them properly. See its sample data file. Frink and its eval[x] function could always trivially handle the case where each number in a file has its units of measure specified with the number, e.g. "3.5 km/s". That's literally zero effort to parse with Frink, and is slightly less compact, but that's a very small price to pay, compared to mission failure. Of course, there's no simple solution for someone completely not reading the specification documents, but the fact that a file completely omits any units of measure would be a good warning flag to double-check your sources, I'm growing to fear and avoid any system that treats every physical measurement as an unexplained dimensionless number, as most programming languages have for the past few decades. We can do better.

Changing Syntax

Keep in mind that the syntax represented in this document will change as Frink evolves. The current parser just makes it easier for me to test certain features, and I intentionally refuse to spend a lot of time on it at this point. The internals of the language should be the first concern, and the external representation is free to change. Frink should be equally usable whether you want to load and save your data in the current mathematical notation, in a (LISP-like) prefix notation, in a (HP calculator-like) Reverse-Polish postfix notation, from a visually-based GUI, in MathML, TeX, XML, or whatever other flavor-of-the-month format the kids are crazy about these days. The internals of the language are intentionally agnostic on this point, as they should be in a flexible design. On the other hand, I always want to keep Frink easy to use and transparent for the quick calculations as it is now. Turning it into a language that forces an encumbering programming paradigm is out of the question. Alan's Unsolicited Advice: Anytime you're involved with a project where you hear people saying "we want to use 'X' technology" before they've even thought about representing the problem they're trying to solve, look up for the cloud of doom, which floats nigh. It's like hiring a carpenter, who, before he knows what you want to make, insists on using mortice-and-tenon joints.

Acknowledgements

"This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." They made me say that. The included part is the nifty ORO regular expression library. I hacked it significantly so that it would compile and run on a Java 1.1 platform (so that Frink can be used on small devices running PersonalJava 1.1 and run in the JVM in just about any browser out there.) Frink's parser is built using the wonderful JFlex and JavaCUP.

Donate to Frink

If you've gotten this far, hopefully you've seen something you liked. If you find Frink useful, I'd appreciate if you took a look at some of the ways you can donate to Frink's development. Thanks! Please send comments or questions to Alan Eliasen. Back to Alan's Home Server
 

A

programming

language

and

calculating

tool.

It

tracks

units

of

measure

through

all

calculations,

and

helps

to

get

the

answers

right.

http://futureboy.us/frinkdocs/

Frink 2008 August

dvd rental

dvd


A programming language and calculating tool. It tracks units of measure through all calculations, and helps to get the answers right.

Rules




© 2008 Internet Explorer 5+ or Netscape 6+

Recommended Sites: 1. Arts - Business - Computers - Games - Health - Home - Kids and Teens - News - Recreation - Reference - Regional - Science - Shopping - Society - Sports - World Miss Gallery - Top Anime Hentai - DVD rental by mail - Loan - Credit Card - Vegas Hotel - Debt Help - Myspace Codes
2008-08-20 15:52:11

Copyright 2005, 2006 by Webmaster
Websites is cool :) 35Kominki,wk³ady Kominkowe - Konta Www - Bank Zdjêæ - Ozdoby - Serwery Www