In this post, I’ll be introducing the Frink programming language. As stated on Frink’s homepage:
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.
So Frink’s “killer feature” is that you can write something like:
First things first, anything Frink related, including documentation and an interpreter, can be found on its homepage. Simple calculations can be run directly on the web interface. Having set up a working environment (note that Frink is very frequently updated, hopefully, the code written here won’t get dated too soon), we can move on to the premises of our exploratory session.
Clarification: the author of the text below is not completely out of his mind, despite evidence to the contrary.
Without further ado, the premises: we’ll be trying to come up with a totally scientific method of making money (“…using this one weird trick discovered by a mad scientist…”), lots and lots of shiny money. I’ll outline the revenue-generating method, and we’ll use Frink to perform back-of-the-proverbial-napkin calculations to see how profitable it is (where, in our case, the “napkin” includes a computer and an internet connection). There will be some code soon, bear with me.
It’s common practice to make money from currency exchange, which can be thought of as taking advantage of geography to make money. Looking at it from a slightly different angle, we are using some form of spatial relationships to generate profit. Since in physics there isn’t much difference between space and time, why can’t we use temporal relationships to earn money? “Ah”, you might say, “he must mean stock trading”. But no, that’s too well-trodden a path to take, and it’s not that interesting anyways. What I propose is to use time travel, specifically, time travel to the past, to generate profit. A naive approach might include using current stock market information to make money in the past, but I don’t consider it to be a viable approach, since if you’re too successful you’re likely to get caught and be sent to jail for insider trading or something; and that’s not cool at all. Another method would be to go to the past with a bunch of current dollars, and use the dollars’ increased buying ability in the past to import some goods into the future. But using money from the future might raise suspicion as well. So we’ll use a more subtle approach.
The method relies on the fact that prices of various goods vary differently over time. As a reference for historical prices, we’ll use this table (adapted from here, all prices are given in dollars):
| Year | Bread (lbs) | Potatoes (10 lbs) | |------|-------------|-------------------| | 2010 | 1.41 | 5.79 | | 1920 | 0.115 | 0.630 |
So to make money, we can do the following:
10pounds of potatoes today (which, according to the table, is 2010, but that’s beside the point)
- Go back to 1920 and sell the potatoes for
0.63 / 0.115 = 5.47pounds of bread
- Return to the present and sell our bread for
Having executed this simple procedure, we just made a hefty profit of
7.7 - 5.79 = 1.91 dollars.
Of course, nothing is that simple, we should further explore this scenario. For starters, we should convert our table into some Frink code. We could write something like:
1 2 3 4 5 6 7 8
You might note that these are just plain numbers; given how Frink is all about the physical units, we should probably give these numbers some concrete units. We could use the units actually provided in the table, but as someone once said:
If God had wanted us to use the metric system, he would have given us 10 fingers and 10 toes
(Though the distinguished scientist Frink, who lent his name to the Frink language, actually has 8 fingers, not sure what that implies…)
Luckily, unit conversion is deeply ingrained into Frink. Let’s start with bread – the units implied by the table are dollar per lbs, writing this down in the interpreter gives us:
So no need for conversions, MKS is the (very sane) default. We can write down the rest of the values in the same manner:
1 2 3 4 5 6 7
And now we have all of our data with proper units. We can describe our money making scheme using Frink, though we’ll be trying to rake in more profit now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ha, it works! We’ve just made ourselves about 430 dollars, and all it took is to buy a mere tonne of potatoes. Well almost, I’m ignoring the fact that we actually don’t have a time machine. Speaking of which, though I’ve little experience with actual time travel, I would imagine that, just like in space travel, in a real time machine (and not those made-up ones you see in the movies) the allowed weight and volume on a mission would be seriously constrained.
We know how much weight we’ll be carrying, but how much volume would that make? Simple enough, we just need the densities of bread and potatoes, which can be found, for example, here:
From which we can conclude that bread is the constraining element here. But these numbers are a bit meaningless; we need to compare them to something familiar. An average fridge is about 20 cubic feet, converting manually is simple enough (I’m using weird American units just to show that Frink doesn’t scare easily):
But we don’t actually need to bother with manual unit conversion, since Frink has a nifty unit conversion operator:
->. For example, we can write:
Adding quotes on the right-hand side gives a bit of nice formatting:
Note that the result is a string value and not a number.
What’s even nicer is that the right-hand side can contain an arbitrary numeric expression with compatible units, so we are not limited to just built-in units. Back to our example, we can write it as:
We can also define our own custom unit for fridge related measurements (which come up quite often, so definitely a worthwhile investment) and have:
1 2 3 4
Making our 430 dollars would require us to carry 3 fridges full of bread, from 90 years back in the past. Fair enough, nothing comes for free; making a bit of an effort for money builds character, or something.
Let’s get more ambitious, we can arrange our retirement with a big score of 1 million dollars (and when I say “our”, I mean “my”, since it’s my plan, I’m just thinking out loud here). Rearranging the equations from the previous excursion to the past, we have:
1 2 3
Whoa, that’s a lot of potatoes, let’s see how many fridges we’ll need:
And it gets worse with the bread we’ll have to carry back from the past:
1 2 3
At these volumes, fridges become a bit meaningless as well; I, personally, have never seen so many fridges in one place (if you did, you can share this bizarre experience in the comments). A space shuttle fuel tank is about 2.6 million liters:
1 2 3 4
Hmm, 2 space shuttle fuel tanks, that’s a lot. Makes me wonder… If a human can be “fueled” by bread or potatoes, can we fuel a space shuttle with them?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Not bad, of the two, bread seems to be the better alternative to rocket fuel; although we’ll need more than two tanks of bread to compensate for its inefficiency (this is not, hmm, quite accurate, since in an actual fuel tank, not all volume is taken by liquid hydrogen, but, whatever). I won’t take any responsibility for the consequences of actually trying to send a space mission on pure bread fuel; I am willing to take credit if it works out, though.
Anyways, we got a bit sidetracked by a somewhat ridiculous idea – back to our more serious business plans. So making one big score and retiring doesn’t seem to be in our cards. We’ll probably have to devise some working schedule and move our goods in batches; time travel can really become a 9-to-5 job. But still, for now, it’s a niche market, I’m sure that profit is guaranteed.
Since it’s a 9-to-5 job, we can try to figure out what our daily commute would be like. Judging by various movies, it seems that time travel is nearly instantaneous, but that’s ridiculous, one’s daily commute can’t be that fast (I’m sure there’s a law of physics that governs that). I propose a more reasonable rate of half an hour per one year traveled into the past. So traveling ninety years back takes:
That’s quite the commute, but we’re aiming for much profit, so that’s how it is.
One small wrinkle though, in the calculations above, we didn’t account for the monetary investment in actual time travel. Let’s sort this out. For the present discussion, I’ll ignore the one-time investment of actually obtaining a time machine; as it’s just a minor technical detail, a bit of research and engineering should settle it. Given that we are probably going to make many time trips, I would like to have an estimate of how much a single trip actually costs.
In physics, when one goes between time and space values, one uses the speed of light (
c) as a conversion factor. We’re going to stretch this analogy (till it utterly bursts) to provide some estimates for the energy consumption of a time trip.
Since we are not actually moving, I think it’s reasonable to assume that time travel doesn’t have any friction (like air friction when flying). If one day someone discovers some kind of “time friction”, we’ll have to modify our calculations accordingly. But for now, ignoring friction, we can estimate the energy consumption of our trip just by knowing the difference in the required “velocities”. The starting point is that we are moving forwards in time at a rate of one second per second. What we want to achieve, is a movement backwards in time one year per half hour, and of course, we need not forget to convert everything to velocity values using the speed of light:
We can plug our “velocities” into the formula for kinetic energy (
m/2 v^2) and take the difference for our energy consumption. Assuming that the payload is a tonne of potatoes, we have:
Which is the energy we need to invest to accelerate back in time. We could similarly ballpark the return trip, but that
e+28 in the result looks really suspicious. Let’s try to see what it means:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Got it! So all we need to power our little business trip is the energy equivalent of evaporating all oceans on Earth, five times. Right. So how does that affect our revenue? Assuming we’ll be using rocket fuel for our travels:
1 2 3 4 5 6 7 8 9
Well, that sucked…