Frink: a Units-Aware Programming Language

Frink is a practical calculating tool and programming language designed to make physical calculations simple, to help ensure that answers come out right, 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 mix units of measure transparently, and helps you easily verify that your answers make sense. It also contains a large data file of physical quantities, freeing you from having to look them up, and freeing you to make effortless calculations without getting bogged down in the mechanics.

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.”

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

1 Like

Corresponding tweet for this thread:

Share link for this tweet.

1 Like

I had a similar idea about forty years ago. Turns out Guy L. Steele and a couple other folks actually did try that, but Fortress was never widely adopted. Later I realized that rather than try to make a whole new language that was different from most existing ones by having that feature, it would be better to have a library that would support units of measurement, ideally in a way that could be translated to other languages. About nineteen years ago, I finally wrote one, for C++. Later I did one for Ruby, putting it aside “temporarily” when I couldn’t decide which of a few approaches to take for some feature I now forget. Now I’m thinking I should do one (or at least check if there is such a thing) for Elixir. :slight_smile:

4 Likes

Do it Dave! :lol:

1 Like

@davearonson I would definitely like to also see such a library for the Elixir language. Just do it!!!

2 Likes

Okay, okay, @AstonJ and @conradwt, I’ve started writing up a README (doing README-Driven Development) and will start the project on Github soon(ish). :slight_smile:

4 Likes

I have now put a first stab at a README, outlining how I think it will work, at:

2 Likes

Reminds me of Boost.Units for C++, great way to keep units consistent with transparent conversions as well.

1 Like