HackerTrans
TopNewTrendsCommentsPastAskShowJobs

shadedtriangle

no profile record

comments

shadedtriangle
·2개월 전·discuss
I know this is naive but I wonder why the CCPA, together with the Department of Agriculture, chose not to purchase the peach canning facilities that Del Monte Foods was running. I suppose that it's more risk for the farmers in a world where canned peach sales are declining. I can't imagine it's easy to just clear cut a ton of trees though. 9 million sounds like nothing when it will take years for whatever new crop they plant to fruit.
shadedtriangle
·2년 전·discuss
Yes, the city of Seattle instituted a sweetened beverage tax in 2017 and there was a study with results published in 2023.

https://www.seattle.gov/sweetened-beverage-tax-community-adv...
shadedtriangle
·2년 전·discuss
I feel like this article is missing one of the most useful idioms of parameter packs which is when you want to accept a variety of parameter types to a non-template function. You can stuff a parameter pack into an array/vector of unions/variants which is quite useful! For example it's the way to implement std::format which is based off Python's string.format().

  using FormatArg = variant<int, float, string>;
  string FormatArgs(const char* fmt, const vector<FormatArg> &args);
  
  template <typename... Args>
  string Format(const char* fmt, Args&&... args) {
    vector<FormatArg> expanded_args = {args...};
    return FormatArgs(fmt, expanded_args);
  }

  int main() {
    cout << Format("Hello {} pi {}", "world", 3.14f);
  }
https://godbolt.org/z/v5zo99aGe
shadedtriangle
·3년 전·discuss
J, K, and L are keyboard shortcuts for "skip back 10s", "toggle pause", and "skip forward 10s". Left and right arrow keys do the same skipping. On mobile a double tap on either side of the screen again skips forward/back. A double tap with two fingers skips a chapter. Makes hopping around in a video a breeze.
shadedtriangle
·3년 전·discuss
It's because the algorithm is easy to implement and efficient in terms of compute usage to match a gesture. It's a "cheap and easy" recognizer, a $1 recognizer. The name has spawned a whole host of similarly named papers which you can see on their "impact" page https://depts.washington.edu/acelab/proj/dollar/impact.html.
shadedtriangle
·4년 전·discuss
We can see it and it’s called the Cosmic Microwave Background https://en.m.wikipedia.org/wiki/Cosmic_microwave_background. It’s not t=0.0000001 though as the time before the cosmic microwave background the universe was opaque to photons, you wouldn’t be able to see anything.
shadedtriangle
·4년 전·discuss
> All you need for a stable stablecoin is to save every dollar put in to it.

That’s the issue right there. How does Tether save its dollars? We can see it in their transparency report[1]. Whether you believe them or not it’s not just cash in a bank account.

* 0.41% Non-U.S. Treasury Bills

* 55.53% U.S. Treasury Bills

* 0.15% Reverse Repurchase Agreements

* 5.81% Cash & Bank Deposits

* 9.63% Money Market Funds

* 28.47% Commercial Paper and Certificates of Deposit

How much of that is liquid and directly convertible to dollars 1:1 in he next 24 hours? Not 100%.

What happens when they start selling billions in Treasury Bills and Commercial Paper to fund redemptions? The market price of those assets will drop.

What if the value of those assets is already below 1:1 because of recent market events?

What if they’re not being as transparent as they say they are?

> As long as they never spend anything from the reserve, this can't fail no matter how unpopular the currency is.

This can easily fail many different ways.

[1]: https://tether.to/en/transparency/#reports
shadedtriangle
·4년 전·discuss
This is probably my most used C++17 feature too:

    for (auto& [key, value] : persons)
The nested bindings are neat. Don’t think you can do that in c++ yet.