Better HN
topnewbestaskshowjobs
Log inSign up

css

4,161 karma · joined Jan 22, 2016 (10y ago) · 497 submissions

https://chrissardegna.com
Submissions

comment 5y ago · link · parent

Of all the chat apps I have used, Mattermost's implementation of threads/replies [0] has felt the most natural. That said, all implementations I've tried leave something to be desired.

[0]: https://docs.mattermost.com/messaging/organizing-conversatio...

comment 5y ago · link · parent

The article title was too long for me to include the full context. From Dell:

> Yes, this was driven by the California Energy Commission (CEC) Tier 2 implementation that defined a mandatory energy efficiency standard for PCs – including desktops, AIOs and mobile gaming systems. This was put into effect on July 1, 2021. Select configurations of the Alienware Aurora R10 and R12 were the only impacted systems across Dell and Alienware.

comment 5y ago · link · parent

I have always had a suspicion that this is the most expedient course of action from a company's perspective: the velocity of media is so fast nowadays that any controversy will be forgotten by the next week.

comment 5y ago · link · parent

Yeah, this is an awesome change of pace for an industry that notoriously locks down its hardware.

comment 5y ago · link · parent

From the FAQ [0]:

- What OS is Steam Deck running?

SteamOS 3.0, a new version of SteamOS based on Arch Linux.

- Will people be able to install Windows, or other 3rd party content?

Yes. Steam Deck is a PC, and players will be able to install whatever they like, including other OSes.

[0]: https://partner.steamgames.com/doc/steamdeck/faq

comment 5y ago · link · parent

In the above example, the remaining balance gets accounted for as a loss to maintain the fiction of the facility’s not-for-profit status. It also provides the basis for a kickback the federal government sends to this hospital called Disproportionate Share Hospital payments [0].

In medical parlance, this is called uncompensated care or uncompensated revenue. The Center for Medicare and Medicaid provides a ton of detail [1].

[0]: https://en.wikipedia.org/wiki/Disproportionate_share_hospita...

[1]: https://www.cms.gov/Regulations-and-Guidance/Guidance/Manual...

comment 5y ago · link · parent

I like the way v8 handles this problem: https://github.com/v8/v8/blob/dc712da548c7fb433caed56af9a021...

comment 5y ago · link · parent

> If you don't want your SSID broadcasted, turn off the broadcast

Hiding the network name doesn't conceal the network from detection or secure it against unauthorized access. It also makes your devices constantly send out that SSID wherever you go when searching for networks. According to Microsoft [0]:

> Non-broadcast networks are advertised in the probe requests sent out by wireless clients and in the responses to the probe requests sent by wireless APs.

[0]: https://docs.microsoft.com/en-us/previous-versions/tn-archiv...

comment 5y ago · link · parent

I've been using Mattermost Incidents [0] with a Pull Request playbook like this for awhile, but its nice to see something else in this space. Wish it were open source.

[0]: https://docs.mattermost.com/administration/devops-command-ce...

comment 5y ago · link · parent

I don't use Facebook, but his Instagram definitely showed a blank "this user has been suspended" page before.

comment 5y ago · link · parent

His accounts are back on Facebook properties, though. Previously they would display as a blank suspended page.

https://www.instagram.com/realDonaldTrump/

https://www.facebook.com/DonaldTrump

comment 5y ago · link · parent

This is a great video, but it glosses over some of the technical aspects because it assumes the viewer already understands them. This video provides a basic gestalt of the tech used for these runs: https://www.youtube.com/watch?v=_FQJEzJ_cQw

comment 5y ago · link · parent

Projects like this make me sad for what we have lost. All of Instagram used to provide open RSS feeds [0]. They also used to brag about third parties making interesting things with Instagram data [1], [2].

You can see their old blog posts by going to [3], right-clicking and copying the link of a post, and appending `/embed` to the URL.

[0] https://instagram.tumblr.com/post/8755963247/introducing-has...

[1]: https://instagram.tumblr.com/post/8757679335/api-highlights-...

[2]: https://instagram.tumblr.com/post/8756150468/a-real-time-api...

[3]: https://instagram.tumblr.com/archive/filter-by/text

comment 5y ago · link · parent

A question I always have for diagramming software is how it handles refactoring. This is often the most frustrating part of every tool. How does IcePanel improve this experience? Group selection and dragging to hopefully have enough room for something new is not workable in complex diagrams.

comment 5y ago · link · parent

They aren't refusing; there is an unlimited duration now as long as you keep paying.

> AppleCare+ for Mac extends your coverage from your AppleCare+ purchase date and adds up to two incidents of accidental damage protection every 12 months

After 2 or 3 years [0] (the initial duration depends on whether it is AppleCare or AppleCare+), you can pay more and get an additional coverage [1]:

> Your plan coverage may continue beyond 24 or 36 months, on a monthly or annual basis, until canceled.

[0]: Before adding AppleCare+ to your cart, the ad copy says "Get up to 3 years of accidental damage protection and expert technical support from Apple."

[1]: https://support.apple.com/en-us/HT210580

comment 5y ago · link · parent

This is really cool, I used it to implement a (very) basic trie:

    trie_struct: Callable = lambda: defaultdict(trie_struct)

    trie = trie_struct()

    for word in words:
        ref = trie
        for char in word:
            ref = ref[char]
It won't work with words that substring other words, but its interesting.

comment 5y ago · link · parent

What does the European definition of "right to repair" entail, then?

comment 5y ago · link · parent

This article moves the goalposts on what "right to repair" is several times. It generally means that manufacturers should not hide schematics from device users or disallow third party manufacturing of first party parts. However, the author states:

> The law doesn't yet cover smartphones and tablets that she says are getting harder to fix. One problem is keeping older devices updated with new software.

Now "right to repair" includes not only designing devices to be easier to repair but also includes legacy software support? Where do we draw this line? If your M1 dies, you can't fab one yourself or run older software on it indefinitely.

Further down, the author writes:

> But markets have now become flooded with products that are less repairable.

> "It requires laws in place that prevent manufacturers from stopping [supporting] a product too early, or making it pretty much impossible to repair it by design."

Now the author has shifted "right to repair" to mean mandatory first-party device support and design requirements around repair-ability.

We must very carefully define our terms here, because requiring someone else to provide on one's behalf presumes a right to the product of their labor.

comment 5y ago · link · parent

> Milk has quite a bit of sugar

Sugar content without regard to glycemic index [0] is meaningless. Cow milk contains lactose, which has a very low glycemic index. Most milk replacements use maltose, which has almost double the glycemic load, making them significantly less healthy than actual milk (since they are all basically sugar and canola oil [1]).

[0]: https://onlinelibrary.wiley.com/doi/10.1002/mnfr.201901082

[1]: https://every.to/almanack/oatly-the-new-coke-821556

comment 5y ago · link · parent

I love stuff like this. I searched my favorite variety [0] and learned that the genetics are actually patented and the university that owns it has an entire program for breeding apples [1].

[0]: https://adamapples.blogspot.com/2008/10/honeycrisp.html

[1]: https://mnhardy.umn.edu/varieties/fruit/apples

comment 5y ago · link · parent

I cannot imagine consuming that much food that quickly... what is this supposed to represent?

- 2 eggs: 150 cal

- 2 bacon strips: 50 cal

- 2 toast slices: 150 cal

- 4oz hash brown: 370 cal

- 8 oz whole milk: 100 cal

Before butter and oil, that's over 800 calories...

comment 5y ago · link · parent

I have not had difficulty writing code for AWS Lambda. I just write everything locally and run the code by invoking the entry point with the proper event and context dictionaries. For debugging, I just attach a debugger and run the entry point like any normal script.

I don't know why you need to deploy to test Lambda code; you can hit remote AWS stuff from local. The AWS SDK picks up your local config's IAM role the same way as it picks up the one granted to the Lambda itself. You don't need localstack for this, just an account in your AWS organization with the right role attached.

Packaging dependencies was a little weird to figure out, but the docs [0] are very good. A simple shell script can do the packaging work; its just a few lines to make the zip file.

[0]: https://docs.aws.amazon.com/lambda/latest/dg/python-package-...

comment 5y ago · link · parent

The check whether a token is a number happens before the check whether a token is a name, as evinced by both the source code and a trivial debugger session.

You are conflating the fact that there is an order to the rules with a strawman that the rules _must_ be evaluated in a specific order. All of the quotes you pulled are facts (Python checks if a token is a number before it checks if it is a name, Python checks if a token is a literal before it checks if it is a name, and the rules are not evaluated concurrently), but your strawman is making a different claim.

comment 5y ago · link · parent

> 0xfor can never be a name

But to know if a token is a name, it has to check, and that check never happens because the tokenizer yields when the number case hits. You can attach a debugger and see for yourself.

> It doesn't matter in which order the rules are checked.

Nowhere did I claim otherwise. The rules _do_ happen in a deterministic order, which I posted the source code for.

comment 5y ago · link · parent

I’m suggesting that it has to happen in a specific order, which it does. Regardless of the direction the tokenization process reads, the rules can’t be evaluated concurrently.

> the first thing it sees looks like the start of a number

Yes, because it checks if the token is a number before checking if it is a name.

comment 5y ago · link · parent

Because the hexadecimal parsing rule [0] happens before [1] the rule that parses names [2]:

    % cat 0xfor.py
    0xfor 1
    % python -m tokenize -e '0xfor.py'
    0,0-0,0:            ENCODING       'utf-8'
    1,0-1,3:            NUMBER         '0xf'
    1,3-1,5:            NAME           'or'
    1,6-1,7:            NUMBER         '1'
    1,7-1,8:            NEWLINE        '\n'
    2,0-2,0:            ENDMARKER      ''
Also, literals have to be evaluated before names, otherwise you could overwrite them:

    >>> 0xzzz = 1
    File "<stdin>", line 1
        0xzzz = 1
        ^
    SyntaxError: invalid hexadecimal literal
    >>> 0xf = 1
    File "<stdin>", line 1
        0xf = 1
        ^
    SyntaxError: cannot assign to literal
[0]: https://docs.python.org/3/library/stdtypes.html#float.fromhe...

[1]: https://github.com/python/cpython/blob/5ce227f3a767e6e44e7c4...

[2]: https://github.com/python/cpython/blob/5ce227f3a767e6e44e7c4...

12345
17