Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 5y ago · link · parent

Well, why do you want to run 'ls' in a sandbox?

comment 5y ago · link · parent

I strongly suggest not worrying about what some HN users believe is self absorbed.

comment 5y ago · link · parent

I think if you find that engaging with people is such a minefield that's probably on you. It's not hard at all to have an engaging conversation with someone without accidentally offending them...

People talk about themselves because conversations can be intimate - they're a two way street where both parties are sharing and relating.

comment 5y ago · link · parent

When I talk to someone and they share an experience, I like to ask questions, or relate to the experience by sharing my own. This is not "self absorbed" it's really normal...

Mountains out of molehills here.

comment 5y ago · link · parent

What's wrong with the web and browsers? It's honestly pretty incredible - we have a system where we can load and execute arbitrary code from any number of third parties near-instantly and it actually works and isn't a complete security disaster.

Seems pretty cool tbh

comment 5y ago · link · parent

I don't know a single person who holds their money in 'cash'. They invest it in the market, real-estate, business development, etc.

comment 5y ago · link · parent

There's "--process-per-tab" and Strict-Origin-Isolation , dunno if that'll work though

comment 5y ago · link · parent

> I cannot convince it to use more than one process for twitch tabs.

Do you actually want it to? Or are you just experimenting? FWIW There's a flag related to isolation in your chrome://flags that will do per-origin.

comment 5y ago · link · parent

It's "scheme + eTLD + 1", with a flag to set it to per origin.

comment 5y ago · link · parent

Chrome didn't have this until 2018, as the parent link shows. This is not about multi-process architecture. Firefox is < 3 years behind, not 10, not 14.

comment 5y ago · link · parent

This is really cool. I really want a language that has GC, but lets me be explicit about memory usage as well / leverage move semantics to optimize. I use Rust, and I suspect I'll always have it as a driver, but I wouldn't mind another higher level language to take the place of Python, which I use for prototyping.

comment 5y ago · link · parent

Or a Vec<T> for storage and a Vec<usize> for tombstoning. Lots of ways to solve this, and my experience is that you can beat a linked list approach with the 'Vec plus Vec' approach for a lot of data sizes/ operations.

Or a custom Vec that has a lower maximum bound, at which point you can start doing things like integer encoding/ pointer swizzling.

comment 5y ago · link · parent

Sure, it's just a mark and sweep, but manually implemented (which is fine).

comment 5y ago · link · parent

I think because if you're building with a language that's extremely interface oriented you probably don't want to think "if it's this type, do x, if it's that type do y" manually. Instead that would be another job for another interface. But I think that's more a symptom of having a powerful hammer than actually designing well, and sum types solve a different problem than interfaces.

comment 5y ago · link · parent

> Either of these approaches defeats a fundamental gRPC benefit: reusable connections.

I feel like that's not quite true. The server could notice it's over-worked and start telling clients to back off or otherwise to try another system. At this point the clients can make the call to either back off or terminate the connection. The server can increase its "back off for N ms" until it finally has to terminate connections.

It requires a bit of extra coordination, but not much.

Also, even without such a system, forcing a reconnect when a new instance starts up/ periodically still reduces connection load a ton. If you force reconnects every minute, and you have 10/rps, that's 1 reconnect per 600 calls.

I guess in theory a load balancer is the most information to make these decisions, so really you'd want it to be aware of 'back off' requests from the server. One way of doing this might be something with health checks? Dunno.

comment 5y ago · link · parent

> Running the Python interpreter inside a Javascript virtual machine adds a performance penalty, but that penalty turns out to be surprisingly small — in our benchmarks, around 1x-12x slower than native on Firefox and 1x-16x slower on Chrome. Experience shows that this is very usable for interactive exploration.

I seriously question these benchmarks.

comment 5y ago · link · parent

Actors are for isolating state, concurrency is a side effect of that.

comment 5y ago · link · parent

I'm really excited to see what is essentially a mainstream language trying out actors - whatever they end up with, I expect there will be a lot to learn from.

> The answer is: “it depends”. It depends how your or others' code uses Person. If two pieces of code, running concurrently, update Person.name at the same time - your app will crash

Damn, I honestly forget what it's like to program with threads in languages that let this happen.

comment 5y ago · link · parent

I don't get what you're trying to convey here. Yes, there are hypothetical situations we could talk about?

comment 5y ago · link · parent

> Not that much as they all follow pep 484 + a few other peps. The number of type features unique to each one are generally bugs/recent peps they haven't implemented.

This is totally untrue? Pyre adds completely new notions like taint analysis, pytype adds a totally different inference system - the type systems are not compatible and it has nothing to do with implementation of PEPs.

The difference with C is that all of the other linters and analyzers are on top of the base type system, they don't replace it. In the case of Python the only standard part is where the annotations go and how they get resolved at runtime, it's otherwise completely up to the type system implementation to determine what's what, and all 3 of them do so in very different ways.

This is like if clang/gcc had totally different behaviors for `auto` in C++, but really it's not even comparable.

comment 5y ago · link · parent

OK so if you take into account almost any transmission rate we've seen that seems like it easily balances out, even not taking into account potential for mutations and the classification of severe.

I have a "severe" reaction to alcohol every time I drink too much.

comment 5y ago · link · parent

I get being cautious, but it isn't like there's a strong concrete reason not to do it. Plus we still have the potential for mutations, and kids can still spread covid even if they aren't dying from it.

comment 5y ago · link · parent

Not really, no.

comment 5y ago · link · parent

Sorry, yes, that works. I should have been a little more explicit. This breaks down when Y is generic over X and X is generic over Y. IDK, I've had tons of problems with mutually recursive TypeVars, though my example was not of that - sorry.

comment 5y ago · link · parent

No, this would just be embrace, they have not extended the ebpf capabilities. It would be "extend" if there were one way comparability, which doesn't seem to be the case.

comment 5y ago · link · parent

I have yet to successfully build a project with the strict mypy settings, without resorting to either turning some off or having to use an explicit Any. And a lot of the non-default settings are absolutely critical if you care about correctness.

Lack of recursive types has been a major deal breaker for me. If you have a class Foo that can construct a class Bar, and a class Bar that can construct a class Foo, you can't express that in mypy without Any-Generics.

To me, at this point, mypy is barely a linter, it's more of a "this helps my IDE autocomplete faster", and definitely not a type system.

comment 5y ago · link · parent

The PEP is clear, it's just extremely unintuitive that, within the scope of declaration, a type T can be many different types.
1
969798
164