HNHacker News
TopNewBestAskShowJobs

css

4,161 karma · joined January 22, 2016

https://chrissardegna.com
submissionscomments
css··on Enough is enough
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.
css··on Valve Steam Deck
Yeah, this is an awesome change of pace for an industry that notoriously locks down its hardware.
css··on Valve Steam Deck
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

css··on List price for stitches at Stanford Health Care: $93K
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...

css··on The most copied StackOverflow snippet of all time is flawed (2019)
I like the way v8 handles this problem: https://github.com/v8/v8/blob/dc712da548c7fb433caed56af9a021...
css··on How do I opt my access point out of Google Location services?
> 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...

css··on Launch HN: Axolo (YC W21) – Faster pull requests and code reviews
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...

css··on In Response to Oversight Board, Trump Suspended for Two Years
I don't use Facebook, but his Instagram definitely showed a blank "this user has been suspended" page before.
css··on In Response to Oversight Board, Trump Suspended for Two Years
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

css··on Super Mario Bros: The Human Limit
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
css··on Bibliogram – Open-source front-end for Instagram
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

css··on Design structured diagrams, built to increase your team's trust in your docs
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.
css··on [dead]
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

css··on Python Default Dict
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.
css··on It's your device, you should be able to repair it
What does the European definition of "right to repair" entail, then?
css··on It's your device, you should be able to repair it
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.

css··on Vegan cheese has quietly but steadily infiltrated mainstream supermarket shelves
> 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

css··on Adam's Apples
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

css··on Pfizer is testing a pill that, if successful, could cure Covid-19
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...

css··on Ask HN: Does anyone else find the AWS Lambda developer experience frustrating?
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-...

css··on In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
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.

css··on In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
> 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.

css··on In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
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.

css··on In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
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...

css··on In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
> Whitespace is needed between two tokens only if their concatenation could otherwise be interpreted as a different token (e.g., ab is one token, but a b is two tokens).

https://docs.python.org/3/reference/lexical_analysis.html#wh...

css··on No Python interpreter? this simple RAT installs its own copy
CD Projekt's GoG client has a feature where users can write Python extensions [0] for third party account integrations. To enable this, they ship an entire Python interpreter alongside the app binary [1]. I guess this kind of makes sense, it is way easier than having users manage their own `venv`s and other Python environment stuff. Packaging Python apps for distribution outside of a Python development context is quite pesky.

[0]: https://github.com/gogcom/galaxy-integrations-python-api

[1]: https://support.gog.com/hc/en-us/articles/360024812473-GOG-G...

css··on Facebook Down?
Now I am unable to connect at all:

    ~# wget https://developers.facebook.com/status/dashboard/
    Connecting to developers.facebook.com (157.240.206.16:443)
    wget: can't connect to remote host (157.240.206.16): Operation timed out
css··on Facebook Down?
It loads fine for me and shows no downtime or incidents. It even says "Facebook Platform is Healthy"
css··on Show HN: My personal website is a shell
Thanks! Sometimes I worry that the text animation is too slow, but I think its a good balance currently.
css··on Show HN: My personal website is a shell
I'm sure JS devs will hate it, but yes: https://github.com/ReagentX/ReagentX.github.io/blob/master/j...

tl;dr: it appends text from a file to a div, pausing on a specific delimiter.

I only use Github pages for a development testbed, my "deploy" is an FTP copy to my personal web server.

← PreviousPage 3 of 13Next →