HackerTrans
TopNewTrendsCommentsPastAskShowJobs

__ryan__

no profile record

comments

__ryan__
·3년 전·discuss
Simple async JavaScript is still single threaded with an event loop. In other words, your async code is just a task deferred for later and only one task runs at a time, only moving onto another task when complete or explicitly yielding via “await”.

Service workers are threads. They’re basically separate JavaScript processes you communicate with with IPC, with other special privileges and capabilities allotted to them.
__ryan__
·3년 전·discuss
What is it about it that makes you feel this way?
__ryan__
·3년 전·discuss
It was 5 billion calls to 500 million numbers over a 3 month period.
__ryan__
·3년 전·discuss
I report nearly all auto-generated unsolicited emails as spam. I also report nearly all follow ups to ignored cold emails. I will protect my inbox.
__ryan__
·3년 전·discuss
Accessing a users data is not the only reason for hacking their account. Performing actions on behalf of a user is just as much of a threat.

Edit: also, if an attacker dumps all the data today then loses access to the data tomorrow, having access to my password hashes means they can access my account and data later.
__ryan__
·3년 전·discuss
This isn’t the attack vector to be concerned about. More concerning is when there’s a data breach and an attacker gains access to hashed passwords. At that point, you attack the hash not the API.

This comment is an example of why I wouldn’t want any given website to choose my password.
__ryan__
·3년 전·discuss
You are correct that the period doesn’t count. Both email addresses belong to the same account. A possible explanation is that they have entered your email as a mistake.
__ryan__
·3년 전·discuss
Not sure if this was their motivation, but hardware acceleration also enables increased opportunity for fingerprinting, to my knowledge.
__ryan__
·3년 전·discuss
When does the standard library lie in this case?
__ryan__
·3년 전·discuss
The lie is when your code uses* the “any” value where a concrete type is expected.

I was misunderstanding your point with the deserialize.

Edit: “using” -> “uses”
__ryan__
·3년 전·discuss
Yes, “any” is a wart. And it’s a bad one.

The correct type for values you don’t know the type of (like the response of an API call) is “unknown”.

TypeScript does not provide the facilities you describe because there is not a one-size-fits-all solution to the cases that are possible and common in JavaScript.

It is left to the developer to decide how to validate unknown data at the boundaries of the API.

There are third party libraries that facilitate this in different ways with different trade-offs.

  The compiler actively lies to you about the types you’ll have at runtime.
I find this to be rare if you are using strict mode with proper TypeScript definition files for your platform and dependencies. Usually the lie is in your own code or bad dependencies when an “unknown” type (including “any”) is cast to a concrete type without being validated.

  In nearly any other typed language I have some deserialization mechanism.
Could you provide examples? I either don’t understand or I disagree.
__ryan__
·3년 전·discuss
I don’t think I’m following well enough to provide a meaningful response.

This is not meant as an argument against what you’re saying, because I know you were just giving an example, but I found this and thought you may find it interesting: https://www.hacklewayne.com/a-truly-strongly-typed-printf-in...
__ryan__
·3년 전·discuss
They’re suggesting outputting runtime type information by emitting different code based on the type of the value passed to their hypothetical “Type.keys()” function.
__ryan__
·3년 전·discuss


  You're forced to emulate exactness by always destructuring objects - not great.
It’s almost like using objects as enumerable maps is an anti-pattern.
__ryan__
·3년 전·discuss
Runtime type information is against the goals of TypeScript.

https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...

Edit:

  Non-goals:
  …
  5. Add or rely on run-time type information in programs, or emit different code based on the results of the type system. Instead, encourage programming patterns that do not require run-time metadata.
__ryan__
·3년 전·discuss


    Also you should fill your database with houses - use AI or some sort of random data generator to generate them and just make sure there's a small but clear note on the listing saying this is AI data. It's not ideal but it is better than an empty database. Give people something to look at.
This genuinely made my stomach turn. If this is the future… I don’t know if I want in.
__ryan__
·3년 전·discuss
“Inception” is frequently misunderstood to mean entering other people’s dreams or having multiple layers of dreams.

In the movie, they of course have the technology to do these things, but it’s usually used for “extraction”: stealing information and ideas from one’s subconscious by infiltrating their dreams.

“Inception”, as used in the movie, is just the opposite of “extraction”: to plant an idea in someone’s subconscious by infiltrating their dreams.

So while I think it’s a stretch, it’s not as bad as suggesting that people can commingle in dreams.
__ryan__
·3년 전·discuss
If I know that an entity goes to great lengths to conceal secrets, why would I ever believe I know of their most secret secret?
__ryan__
·3년 전·discuss
Interestingly, “highlights” is not there.
__ryan__
·3년 전·discuss
“More quinoa”