Better HN
topnewbestaskshowjobs
Log inSign up

shadedtriangle

145 karma · joined Oct 16, 2017 (9y ago) · 23 submissions

Submissions

comment 4w ago · link · parent

I think it's obvious why someone would buy this and why Apples continues to slowly update them.

It's got a bright and colorful design where a Mac mini and any third party monitor would just be silver/grey + black plastic. Everything works together, no decision making about compatibility, no extra purchases, it has a webcam, speakers, one power cable, only one customer support call if you need help with any of it, one warranty etc. It's quite far from the "same" computer as a Mac Mini.

comment 2mo ago · link · parent

This happened to my website about learning c++. I was posting new articles daily for a while there and traffic was slowly but steadily rising. Then one day traffic from search went straight to zero and never recovered. The whole project was designed to be Google searched first and not read like a book so that really killed my motivation back then.

comment 2mo ago · link · parent

Keep trying to educate them how? By your own admission data centers:

* use a lot of water to build one

* the power is a problem

* the noise is an issue

* the power is coming from non-green sources

* the government could “easily” fix all this with regulations

comment 6mo ago · link · parent

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.

comment 1y ago · link · parent

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...

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 4y ago · link · parent

> 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

comment 4y ago · link · parent

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.

comment 5y ago · link · parent

Thank you! Yes I do intend to cover build systems, libraries, static vs dynamic binaries. All of these are an important part of working with C++ often overlooked.

13.

Show HN: C++ by Example – A new website for learning C++(cppbyexample.com ↗)

18 points · by shadedtriangle · 5y ago · 2 comments

comment 5y ago · link · parent

Thanks!

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

17.

Show HN: C++ by Example(cppbyexample.com ↗)

16 points · by shadedtriangle · 5y ago · 4 comments

18.

Show HN: Clue – Command Line User Experience – v1.0(github.com ↗)

3 points · by shadedtriangle · 7y ago · discuss

19.

Show HN: Clue – Command Line User Experience – C++17(github.com ↗)

1 points · by shadedtriangle · 7y ago · discuss

20.

Data Oriented Design and the Structure of Arrays(shadedtriangle.com ↗)

5 points · by shadedtriangle · 8y ago · discuss

21.

Show HN: Static Fire. A Git Based Static Blog Engine(github.com ↗)

5 points · by shadedtriangle · 9y ago · 3 comments