HackerTrans
TopNewTrendsCommentsPastAskShowJobs

atweiden

no profile record

Submissions

Condition System for the Fennel Language and Lua Runtime

conf.fennel-lang.org
1 points·by atweiden·قبل 5 سنوات·0 comments

comments

atweiden
·قبل 4 سنوات·discuss
To avoid ecological disaster, we need to slam on the brakes, not merely pump them.

> Once the marginal productivity of physical capital is below the real interest rate people will abandon production even if there is a shortage of products and people are starving on the street.

Given the profit margin on farming is something like 10%, and assuming the average annual purchasing power appreciation of our hypothetical global currency of fixed supply equals the Fed’s inflation target of 2% plus 0.25% GDP growth, how do we arrive at people “starving on the street”?

> If you want to discourage consumption you should introduce consumption taxes for natural resources, co2 and other forms of pollution

Surely the level of taxation necessary to curb industrial and retail usage of fossil fuels to the same extent of global deflationary economics would make the taxation measures politically infeasible. The tax policy would need to result in unthinkably high prices to create the drastic changes necessary. Deflation OTOH would lead to a decline in capital investment, employment, and spending without requiring any level of forcible compulsion.

A global currency of fixed supply would realistically deliver a sufficiently powerful financial incentive to galvanize widespread, voluntary adoption of ecologically sustainable consumer behaviour and business practices.

> by maintaining full employment

Particularly with the rise of automation and AI, is maintaining full employment really an achievable goal? We desperately need a way for the majority of humans to subsist without working bullshit jobs [1].

> hence the need to force ever greater quantities of money into the economy to keep it alive

We’re facing ecological collapse precisely because humanity has chased infinite growth.

[1]: https://www.strike.coop/bullshit-jobs/
atweiden
·قبل 4 سنوات·discuss
Hyperinflation of the old currency would erase all debt denominated in it as we shift to a global deflationary economic system.

Once in the deflationary environment, the cost of borrowing would be higher, and there would be less reason to work, consume and invest. Hence, there would be less incentive to take on debt.

Many things are preferable to having 0 savings and a planet on fire.
atweiden
·قبل 4 سنوات·discuss
Another option is to pump the brakes.

> “As the lockdown to stop the spread of coronavirus in India continues, pollution levels across much of the country have dropped sharply. Now some residents in northern India say they can see the snow-capped Himalayas 200 kilometres away for the first time in 30 years.” [1]

If we had a global deflationary economic system, the incentive to invest in capital and engage in consumerism would dissipate. People would work less, because there would be less reason to work. Without work, people would have less reason to travel. Pollution would drop accordingly.

Under a deflationary economic system, a touch over $480,000 in savings would yield an effective “UBI” of $1000/mo [2].

Once adopted by the entire world, a global currency of fixed supply controlled by computer algorithms could achieve this. Humans would voluntarily work less and pollute less.

[1] https://www.sbs.com.au/language/english/audio/himalayas-visi...

[2] https://news.ycombinator.com/item?id=31759685
atweiden
·قبل 4 سنوات·discuss
> both Florida and California went through pretty stringent lockdowns

In Australia, police would patrol the streets to ensure people were staying within a 5 km radius of their residence, and to ensure they were only out for a reason deemed essential by the government.

This was accompanied by international, interstate and intrastate border closures, i.e. you couldn’t enter Australia, and couldn’t enter another state within Australia if already in Australia, nor could you in some cases even drive from one part of the state to another, without a special exemption.

I hesitate to ask what Florida did to enforce the lockdowns, because I’m fairly certain what passed for a “lockdown” outside of Asia-Pacific was a joke by comparison. I strongly doubt any of the above measures were done by any state in the US at any point in the pandemic.
atweiden
·قبل 4 سنوات·discuss
> Without a really deep dive I'm not certain the island-country numbers of Australia or Japan would be achievable in the US

If “being an island nation” was all it took to eradicate Covid, why was Hawaii unable to do so?

It’s clear border security was a rather important factor. And can you think of a more essential responsibility of government than securing the borders?

Gentle reminder that Australia is an “island country” the size of the continental US with several densely-populated major cities.
atweiden
·قبل 4 سنوات·discuss
> Here in the U.S., at least, what has widely been maligned as "COVID denialism" was actually a deeper and more nuanced conversation about whether sudden, sweeping changes to society would prevent more harm than they cause.

> And now looking at outcomes across different states (e.g. Florida vs. California)--and considering ALL outcomes (public health, homelessness, unemployment, substance abuse, mental health, truancy, graduation rates, violent crime)--it's indeed unclear that draconian policies in the name of public health were a net positive.

Why are we drawing conclusions about the effectiveness of Covid safety protocols based on the failed half-measures taken by America? We have a plethora of working examples to study from the Asia-Pacific region: Australia, New Zealand, Hong Kong, Taiwan, Vietnam and China all eradicated Covid pre-Omicron.

> But there seems to be little introspection from those who propose sweeping policy change about the need to consider second-order effects on those whose lives and livelihoods will be upturned.

Equally, there seems to be little introspection amongst American libertarians about the role their own society’s dysfunction might be playing in shaping their personal beliefs.
atweiden
·قبل 4 سنوات·discuss
lizmat++

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 ∮.
atweiden
·قبل 4 سنوات·discuss
> The concept of "inflating debt away" is an assumption that wages match inflation while debt stays static

It also myopically focuses on household debt. But household debt is significantly lower than either corporate debt or government debt [1].

The biggest debtors benefit the most from inflation — quantitatively speaking, the debts of ordinary people aren’t very big.

[1]: https://www.mckinsey.com/~/media/McKinsey/Industries/Financi...
atweiden
·قبل 4 سنوات·discuss
> The alternative is to have your boss decide for you when he wants to fire you

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.
atweiden
·قبل 4 سنوات·discuss
Have you used Raku before? The new and improved regex syntax [1] IMHO completely obsoletes legacy PCRE. Writing regexes in other languages feels like stepping into an ICE vehicle after driving a Tesla: so crufty and old and obvious legacy.

Raku’s built-in grammars make parsers trivial to write. I effortlessly created two [2] — one for reordering fstab entries, and the other for converting human-readable LUKS offsets into cryptsetup sectors — on a lazy afternoon. Grammars in Raku make this second nature.

Then you have Raku’s multi-dispatch. It is more capable than Erlang/Elixir pattern matching:

    # a list with at least one element, extracting the head and tail
    multi sub tail(*@list ($head, *@tail)) { @tail }
    multi sub tail(*@list) { @list }

    [3]
    ==> tail()
    ==> say(); # []

    [3, 4]
    ==> tail()
    ==> say(); # [4]

    # pattern matching with arbitrary guards
    multi sub user($name where { is-valid-user($_) }) { $name.say }
    multi sub user($name) { "invalid name: $name".say }

    sub is-valid-user($name)
    {
        # notice the additive character class in this regex: “letters plus digits”
        # fail the match if $name is root
        try with $name ~~ /(<+:Letter +digit>+)/ { $0 ne 'root' or fail }; $!.not
    }

    user('name'); # name
    user('1234'); # 1234
    user('root'); # invalid name: root

    class Coordinates
    {
        has $.latitude is required;
        has $.longitude is required;
    }

    class City
    {
        has Str:D $.name is required;
        has Str:D $.state is required;
        has Str:D $.country is required;
        has Coordinates:D $.coordinates is required;
    }

    my $latitude = -37.840935;
    my $longitude = 144.946457;
    my Coordinates $coordinates .= new(:$latitude, :$longitude);
    my Str:D $name = 'Melbourne';
    my Str:D $state = 'Victoria';
    my Str:D $country = 'Australia';
    my City $melbourne .= new(:$name, :$state, :$country, :$coordinates);

    my City:D $sydney = do {
        my Coordinates:D $coordinates = do {
            my $latitude = -33.86514;
            my $longitude = 151.209900;
            Coordinates.new(:$latitude, :$longitude);
        };
        my Str:D $name = 'Sydney';
        my Str:D $state = 'New South Wales';
        my Str:D $country = 'Australia';
        City.new(:$name, :$state, :$country, :$coordinates);
    };

    # deeply nested argument deconstruction
    multi sub melbourne-or-bust(
        City:D $city (
            Str:D :$name where 'Melbourne',
            Str:D :$state,
            Str:D :$country,
            :$coordinates (
                :$latitude,
                :$longitude
            )
        )
    )
    {
        my $gist = qq:to/EOF/.trim;
        Welcome to the city of $name. It’s located in $state, $country.

        GPS coordinates: $latitude, $longitude
        EOF
        $gist.say;
    }

    multi sub melbourne-or-bust(City:D $city)
    {
        'This isn’t Melbourne.'.say;
    }

    melbourne-or-bust($melbourne); # Welcome to the city of Melbourne ...
    melbourne-or-bust($sydney); # This isn’t Melbourne
> Perl 6 was treated as the successor of Perl 5 -- and that was the mistake. It meant Perl 5 started dying,

Perl 6 took a long time to make, but how much did that matter? What was Perl going to do about Rails, Clojure, Go, Rust, JS/TS, and more? The world of programming languages used to be a lot smaller than it is today.

> Perl 6 had a new different syntax.

Inline::Perl5 [3] allows running legacy Perl 5 code in Perl 6 codebases.

[1]: https://docs.raku.org/language/5to6-nutshell#Regular_express...

[2]: https://github.com/atweiden/voidvault

[3]: https://github.com/niner/Inline-Perl5
atweiden
·قبل 4 سنوات·discuss
I’m disappointed in the way this Perl 6 v Perl 7 debate is developing. Perl 6 modernizes Perl with e.g. concurrent and reactive programming, built-in grammars and a reimagined regex syntax superior to legacy PCRE, named function arguments, and gradual typing.

Perl 6 was designed to be the successor language to Perl 5.

The only technical grounds for Perl 6 being metaphorically sidelined was because Perl 6 lacked the startup and runtime performance characteristics of Perl 5 — fixable problems.

Proponents of Perl 5 often contend Perl could’ve escaped developer mindshare loss without Perl 6 in the picture. But to claim Python, Ruby on Rails, Clojure, Go, Rust and JS/TS never would’ve gained serious developer mindshare had _Perl 6_ not existed seems very myopic to me. All the brilliant new languages and web frameworks launching were bound to erode Perl’s early established dominance regardless.

Things would be different now if Perl 6 was at least as performant as Perl 5. Perhaps then it would’ve become popular years ago amongst Perl users to switch all greenfield Perl code to Perl 6. Then “Perl” would’ve become synonymous with modern language features.
atweiden
·قبل 4 سنوات·discuss
Miners hold enormous political power in Bitcoin.

Users and developers are dependent on miners to create blocks. The negotiating power of miners is self-evident.
atweiden
·قبل 4 سنوات·discuss
> All blockchains require social coordination. How do you think Bitcoin operates?

That’s a great question, and one Jude C. Nelson — who has a PhD in distributed systems from Princeton — is better equipped to answer [1] than me (or you, probably):

“PoW requires less proactive trust and coordination between community members than PoS -- and thus is better able to recover from both liveness and safety failures -- precisely because it both (1) provides a computational method for ranking fork quality, and (2) allows anyone to participate in producing a fork at any time. If the canonical chain is 51%-attacked, and the attack eventually subsides, then the canonical chain can eventually be re-established in-band by honest miners simply continuing to work on the non-attacker chain. In PoS, block-producers have no such protocol -- such a protocol cannot exist because to the rest of the network, it looks like the honest nodes have been slashed for being dishonest. Any recovery procedure necessarily includes block-producers having to go around and convince people out-of-band that they were totally not dishonest, and were slashed due to a "hack" (and, since there's lots of money on the line, who knows if they're being honest about this?).”

[1]: https://news.ycombinator.com/item?id=26810619
atweiden
·قبل 4 سنوات·discuss
> no one in this thread is promising utopia. i am merely pushing back against assertions of bitcoin being "most equitable".

Fairly launched proof of work systems are a great deal more equitable than PoS premined ICO coins. This is just a fact.

> a publicly accessible ico is just as equitable as someone mining btc with their cpu on low difficulty.

No, absolutely not. Obviously someone has to get the ICO money. How on earth is that “just as equitable” as anyone in the world being able to use any old Windows computer to mine coins on demand. With proof of work, money isn’t being transferred from end users to developers, or their many Swiss foundations.
atweiden
·قبل 4 سنوات·discuss
> or can be coordinated by users in the network

Phone-a-friend consensus aka “weak subjectivity” doesn’t meaningfully differ from the administration of centralized Git repositories. If your blockchain requires human intervention to resolve disputes, as do all pure proof of stake implementations, you probably never needed a blockchain to begin with.
atweiden
·قبل 4 سنوات·discuss
I’m only commenting from the perspective of investors concerned over debasement. 0.03% annual inflation reduces purchasing power by about 7% every 250 years.
atweiden
·قبل 4 سنوات·discuss
A tail emissions rate of 0.03% or less annually seems acceptable.

    #!/usr/bin/env raku
    use v6;

    multi sub inflate($n, $r, $y)
    {
        my $m = $n;
        loop (my $i = 0; $i < $y; $i++)
        {
            $m = inflate($m, $r);
        }
        $m;
    }

    multi sub inflate($n, $r)
    {
        $n * (1 - $r);
    }

    sub MAIN(:$rate = 0.0003, :$years = 100)
    {
        my $purchasing-power = 1;
        my $inflate = inflate($purchasing-power, $rate, $years);
        my $output = qq:to/EOF/.trim;
        After $years years of inflation at a rate of {$rate * 100}% per year,
        purchasing power is {$inflate * 100}% of what it was initially.
        EOF
        $output.say;
    }
All else equal, a 1% annual rate of inflation costs you over half of your purchasing power per century. Even a 0.1% yearly inflation rate charted out over several centuries results in a collapse of purchasing power. This level of inflation practically requires investors to take countermeasures, like searching for alternative stores of value...

Expanding the supply on demand through on-chain governance in a way stakers can profit from, while sacrilege to “digital gold”, would be more palatable to me than rates of tail emission higher than 0.03% or so.
atweiden
·قبل 4 سنوات·discuss
There isn’t an infinite amount of gold on earth, whereas there _is_ an infinite amount of any linearly emitted $COIN. Linear emissions models don’t resemble terrestrial gold mining.

Linear emissions are a security tax paid for by investors. Do investors enjoy paying this tax? Investors generally don’t “enjoy” being debased through inflation.

Ethereum got away with having no defined emissions policy early on, but they pulled it off during an era when information was low and ignorance was widespread. Many of their investors assumed Ethereum had a fixed supply just like Bitcoin did — and they had to scramble to rectify this years later.

“Governed emission” is achievable via systems of on-chain governance. Non-stakers get debased by tail emissions measures voted in by stakers. Stakers profit from the inflation measure or are hardly debased at worst.

While antithetical to gold, it achieves the stated goal of incentivizing ongoing chain security while also benefiting investors, particularly assuming staking yield is widely accessible to all in a decentralized manner.
atweiden
·قبل 4 سنوات·discuss
Just to make sure I understand correctly, Eth2 stakers have no “voting” power, but are relied upon in a core capacity to ensure the continued functioning of the network?

Something about this explanation seems incomplete.
atweiden
·قبل 4 سنوات·discuss
> PoS is easier than PoW to defend against a 51% attack as the offending validator set can be targeted.

Who decides which validators are malicious?