(no title)
atweiden | 3 years ago
Just for fun, I thought I’d do the math on deflationary economics:
#!/usr/bin/env raku
use v6;
multi sub deflate($n, $r, $y)
{
my $m = $n;
loop (my $i = 0; $i < $y; $i++)
{
$m = deflate($m, $r);
}
$m;
}
multi sub deflate($n, $r)
{
$n * (1 + $r);
}
sub MAIN(:$rate = 0.0225, :$years = 10)
{
my $purchasing-power = 1;
my $deflate = deflate($purchasing-power, $rate, $years);
my $output = qq:to/EOF/.trim;
After $years years of deflation at a rate of {$rate * 100}% per year,
purchasing power is {$deflate * 100}% of what it was initially.
EOF
$output.say;
}
Without inflation, your personal wealth would grow by the average inflation rate target plus GDP growth, compounding each year.Assuming an average inflation rate target of 2% per year (per the Fed) and an average GDP growth rate of 0.25% per year, your real purchasing power would grow by about 25% per decade.
Under this scenario, you could mimic a universal basic income of $1000 per month upon saving a total of $480,307.
Bonus: your monthly “UBI” could never be shut off by your government.
lizmat|3 years ago
atweiden|3 years ago
The innumerable dark-seeming corners of the language is part of what makes Raku so very, distinctly “Perl”. Little traits and single character sigils that change everything. I find the black magic of Perl моѕt all∪ring ∮.
kamaal|3 years ago
lizmat|3 years ago
R0b0t1|3 years ago