HNHacker News
TopNewBestAskShowJobs

ArchReaper

589 karma · joined February 5, 2012

submissionscomments
ArchReaper··on Thinking in React Hooks
I'm not sure I follow your question. It's Javascript. Code goes from top to bottom. You can't write:

    function doThing(target) {
      console.log(myVar);
      const myVar = target.prop;
    }
Because that's invalid Javascript. React Hooks are just functions that return markup.

If your goal is simply to see what it renders first, that's fine, you simply need to look at what the function returns.

I disagree with your assertion that LSFF is 'backwards' - it is simply not what you are used to.

MSFF could definitely be argued for class-based components, but it's simply not an option for hook-based components.

ArchReaper··on Thinking in React Hooks
Unless I'm missing something, you don't need all that just to have 'componentDidMount' eg:

    export const useMounted = (f) => {
      useEffect(f, []);
    }
Edit: originally:

    export const useMounted = (f) => {
      useEffect(() => {
        f();
      }, []);
    }
ArchReaper··on Thinking in React Hooks
To do 'componentDidMount' you simply need a 'useEffect' with an empty (non-null) dependency array. It makes sense to me - maybe the issue is more familiarity than simplicity?

Edit: useEffect performs a side effect every time one of it's dependencies has changed value. Passing an empty array means the effect is only run once (on mount) because there are no dependencies.

ArchReaper··on Thinking in React Hooks
After using hooks for a while, I have to disagree with most of your points. The issue is not clarity or simplicity, it's familiarity. Once you start actually using hooks, things make a ton of sense. It's a different way to think about components, not an inherently more-complex way.

The order of hooks is only important insofar as they do not change between rendering. That's it. Hooks should always be called, and always in the same order.

A basic React Hooks component has way less boilerplate involved than a class component does, and hooks allow for much better code architecture when it comes to separation of concerns.

ArchReaper··on Postwoman – a free alternative to Postman
Anyone know how this compares to Insomnia/Postman?

Ever since Postman started getting worse I switched to Insomnia and haven't looked back.

ArchReaper··on Pure CSS – Lace
Actually the downvotes are coming from people who don't have experience developing websites to support Safari.

>The downvotes are happening because this would have been as possible to achieve in Safari as in Chrome had the author chosen to develop purely in that, and Chrome would have been one of the engines that look broken.

This is not true.

>At this level you’re relying on engine quirks rather than spec compatibility.

I think you're misunderstanding - the art was developed with standards. Safari is the piece that is failing the standards, not the art.

ArchReaper··on Pure CSS – Lace
Correct. Safari is a dumpster fire when it comes to modern CSS support. Hence 'Safari is the new IE'
ArchReaper··on Gitlab considers not hiring SREs and Support Engineers in China and Russia
I think you're really missing the point of this entire discussion in the first place.

This came up because of a client request.

Your question about whether people from other countries can be considered trustworthy is completely irrelevant.

The fact is, organizations exist that are at polar odds with governments that exist today. It is not unreasonable to, for example, have a 'Uyghur Oppression Awareness Group' require that all of their data be handled by NOT-CHINA. It has nothing to do with Chinese people, or their ethnicity. It has to do with the fact that if an employee is able to access their data, and the government has an incentive to take that data, the government can easily force that person to hand over that data.

This exists in many countries, Russia, China, USA, Australia, UK, the list is very long.

Your argument is flawed because you're arguing the wrong point. The trustworthiness of an individual is not relevant in any capacity.

ArchReaper··on Websites can change content inside a selection
>The browser literally highlights the selection so that seems like a solved problem.

It's nowhere close to a solved problem, and is much more complex than this. Give a read through the comments in the OP for a taste of why.

ArchReaper··on Websites can change content inside a selection
It's absolutely not a reasonable thing to define and target. The bottom line is the feature is a FEATURE and will continue to exist, so trying to police how far websites take it is ultimately a non-starter.

Browser vendors could hypothetically start adding specific types of exceptions to make certain types of the 'hidden box' trick not work, but that would ultimately mean those website developers simply switch to whatever method works. The problem isn't solved, it's just re-coded.

TLDR: There is NO SOLUTION, because there is NO PROBLEM. The feature works as intended, as written in the spec.

ArchReaper··on Websites can change content inside a selection
Both of your answers assume there is a simple and easy way to identify what is "visible on screen" - which if you read through the OP, you will understand that is not an achievable concept.
ArchReaper··on Websites can change content inside a selection
That still does not answer the question of "what are we asking permission for?"

Why that is a hard question can be understood by reading through the discussions in the OP.

ArchReaper··on Websites can change content inside a selection
I encourage you to read through the OP first on why your suggestion (remove copy-modification entirely) is not reasonable.
ArchReaper··on Websites can change content inside a selection
>I would still rather my browser only copy the text that I visibly highlighted. It is annoying to edit content out that I have carefully selected.

Absolutely. But how do we solve that problem and still allow proper usage of it? Removing this feature would break the copy ability of nearly every rich-text-like web-based UI in existence, such as Google Sheets.

Personally, this feels more like something for an adblock-like addon.

ArchReaper··on Websites can change content inside a selection
Ok. So you're editing a sheet on google docs, you highlight part of it to copy into another doc. You hit ctrl+c.

What happens?

Do we not let Google modify what you just copied to inject the actual rich-text version of what you highlighted, as opposed to the presentation-formatted version you're seeing as a user in the editor UI?

What can actually be done if we allow the 'good actors' to continue working as needed?

ArchReaper··on Websites can change content inside a selection
I think your suggestion would actually make things worse, because it would cause more people to have a false sense of security when copying from a web browser, which is exactly the problem in the first place.

The issue is not that the clipboard can be modified. The issue is that users expect a clean copy when they copy from a website.

There are many valid uses for this, and there is not a strong enough argument that this presents a real security issue that would necessitate disabling such a widely-used feature.

ArchReaper··on Websites can change content inside a selection
What an insane take. You're essentially arguing that we shouldn't try to address security issues, because the person exploiting it wouldn't like that?
ArchReaper··on Websites can change content inside a selection
1. As mentioned in the OP, there are numerous ways to add content to a copy event, and 'not visible' is not a 'real thing' - see discussion in the OP

2. What are we asking the user? Permission to copy from the website?

3. So we are adding a new 'permission' that users must accept to... copy from the website? And that trustworthiness is based on how many other people click 'allow' on a permissions popup?

4. You mean displaying what you just copied to the user, on copy? So the browser would give you a popup with the content of what you copied every time you copy anything?

I'm failing to see how any of your proposals solve the problems mentioned and discussed in the OP.

ArchReaper··on Websites can change content inside a selection
Why is this being posted? This "issue" has existed for a long, long time, and it is not specific to any single browser.
ArchReaper··on Mass Driver
1) No

2) * Escape velocity is the velocity required to counter the force of gravity, ie 'away' or 'out' from the center of the planet, opposite the force of gravity.

* Edit: Looks like I'm wrong, guess I slept that day in physics

ArchReaper··on Gitlab ‘rethinking’ third-party telemetry
That thread is disgusting. It's crazy how many people in that thread seem to be suits with no dev comprehension whatsoever, talking about shit that can tank the reputation of their company.

>I'm not familiar with the term "dark patterns".

Then you should not be suggesting changes like this in the first place.

>I want to highlight again that public sector customers will be excluded from this. I've mentioned many times that it's important we respect their strict privacy requirements.

But fuck private sector customers? What?

ArchReaper··on Update on free software and telemetry
Curious to know what planet you guys live on that you think you could put non-opt-in 3rd party telemetry on enterprise-level software and not get this kind of feedback.
ArchReaper··on 600k concurrent websocket connections on AWS using Node.js (2015)
Why are websites still hijacking scroll behavior in 2019? I can't even take the article seriously with my scrolling bouncing and glitching all over the place.
ArchReaper··on Re-Enact the Panama Papers Leak: How Mossack Fonseca Was Hacked
Not to be a dick, but this just feels like an ad for their training product. There's no re-enaction, 'Re-Enact' is referring to their training course that they want you to buy. The meat of the article takes up 2 out of the 13 paragraphs.

Am I just being overly critical?

ArchReaper··on How much faster is Redis at storing a blob of JSON compared to Postgres?
Cached version: https://webcache.googleusercontent.com/search?q=cache:BBB9Vi...
ArchReaper··on How I Got my $3500 Camera Kit Stolen on KitSplit
This is pretty bad on KitSplit's part. How can they even advertise that the owner is covered by a full deposit if the owner doesn't get compensated with it upon theft?

That's blatant misleading advertising, hope this blows up on them.

ArchReaper··on World's largest plant survey reveals alarming extinction rate
Sure, but stupid people don't understand the concept of scientific legitimacy. That's a large part of the problem with modern politics.
ArchReaper··on Mumble – Open source, low latency, high quality voice chat software
So the NSA could listen in.
ArchReaper··on Introduction to Theoretical Computer Science
At the bottom of the page:

>Produced using pandoc and panflute with templates derived from gitbook and bookdown.

http://pandoc.org/

http://scorreia.com/software/panflute/

https://www.gitbook.com/

https://bookdown.org/

ArchReaper··on Publisher Gets Carte Blanche to Seize New Sci-Hub Domains
Because not every country/company will let the US legal system steamroll people.

They have no legal obligation to, so it's up to their discretion.

← PreviousPage 2 of 6Next →