| p:abstract
| - Frink is a calculating tool and programming language designed by Alan Eliasen. It incorporates features similar to Java, Perl, Ruby, Smalltalk, and various BASIC implementations. Its main focus is on the fields of science, engineering, physics, text processing, and education.
The language is named in honor of the brilliant (but fictional) Professor John Frink, who predicted, 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."
One of the distinguishing characteristics of Frink is that it tracks units of measure through all calculations. This allows all values to contain a quantity and its units of measure. Frink understands how different units of measure interrelate, such as a length cubed is a volume, or power multiplied by time is energy. Different units of measure can be mixed in calculations, and Frink automatically ensures that the calculations lead to a result with the expected dimensions.
height = 3 feet
gravitation = 9.80665 m/s^2
mass = 60 kg
potential_energy = height * gravitation * mass
println[potential_energy -> joules] // Display in joules
The standard distribution comes with a data file which contains thousands of the most common units of measure, along with common data such as masses of elementary particles, planetary data, and historical measures. The standard data file uses the SI base units as its fundamental units of measure, and extends this with units for currency and information (bits). The standard data file can be completely replaced by the user, and new units and even fundamental dimensions may be added at runtime.
The syntax of Frink tries to follow standard mathematical notation when unambiguous. For example, the statement above could be rewritten using implicit multiplication between the three units:
height gravitation mass
Frink is not exactly a dynamically typed nor a statically typed language. By default, any value may be placed into any variable. However, for more safety, arbitrary constraints may be placed on any variable, ensuring that only values meeting the constraints can be assigned to the variable. For example, one can constrain a variable to only contain values that have dimensions of power:
var p is power = 10 watts
Any number of arbitrary constraints may be placed on a variable, including constraints described by user-defined functions. For example, a variable or function argument could be constrained to only contain prime numbers greater than 100.
Frink has arbitrary-size integers, arbitrary-size rational numbers, arbitrary-precision floating-point numbers, complex numbers, and interval arithmetic.
Date/Time values are integrated with the units of measure. Date/time literals are surrounded by the pound sign # and can be parsed in a wide variety of formats." (en)
- Frink is a calculating tool and programming language designed by Alan Eliasen. It incorporates features similar to Java, Perl, Ruby, Smalltalk, and various BASIC implementations. Its main focus is on the fields of science, engineering, physics, text processing, and education.
The language is named in honor of the brilliant (but fictional) Professor John Frink, who predicted, 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."
One of the distinguishing characteristics of Frink is that it tracks units of measure through all calculations. This allows all values to contain a quantity and its units of measure. Frink understands how different units of measure interrelate, such as a length cubed is a volume, or power multiplied by time is energy. Different units of measure can be mixed in calculations, and Frink automatically ensures that the calculations lead to a result with the expected dimensions.
height = 3 feet
gravitation = 9.80665 m/s^2
mass = 60 kg
potential_energy = height * gravitation * mass
println[potential_energy -> joules] // Display in joules
The standard distribution comes with a data file which contains thousands of the most common units of measure, along with common data such as masses of elementary particles, planetary data, and historical measures. The standard data file uses the SI base units as its fundamental units of measure, and extends this with units for currency and information (bits). The standard data file can be completely replaced by the user, and new units and even fundamental dimensions may be added at runtime.
The syntax of Frink tries to follow standard mathematical notation when unambiguous. For example, the statement above could be rewritten using implicit multiplication between the three units:
height gravitation mass
Frink is not exactly a dynamically typed nor a statically typed language. By default, any value may be placed into any variable. However, for more safety, arbitrary constraints may be placed on any variable, ensuring that only values meeting the constraints can be assigned to the variable. For example, one can constrain a variable to only contain values that have dimensions of power:
var p is power = 10 watts
Any number of arbitrary constraints may be placed on a variable, including constraints described by user-defined functions. For example, a variable or function argument could be constrained to only contain prime numbers greater than 100.
Frink has arbitrary-size integers, arbitrary-size rational numbers, arbitrary-precision floating-point numbers, complex numbers, and interval arithmetic.
Date/Time values are integrated with the units of measure. Date/time literals are surrounded by the pound sign # and can be parsed in a wide variety of formats. (en)
|