HN user

shadedtriangle

93 karma
Posts6
Comments12
View on HN

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.

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

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.

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

I think the nice language is in there, but it’s buried within the backwards compatibility as you mentioned.

I’ve started putting together https://cppbyexample.com as a way for newcomers to learn because pointing them to a reference or outdated examples isn’t helping anyone.

Thanks for the feedback. The site is still young and smart pointers are definitely on the list of things to discuss. I’ve bumped their priority.