13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 4y ago · link · parent
That said, I think you've misunderstood my post entirely.
a) If you think this system is just now creaking into life, I frankly don't know how. Again, major news very recently with Black Rod stomping in and various MPs protesting.
b) It's not that big of a deal relatively speaking. The monarchy is very clearly increasingly irrelevant, as it has been for some time. Obviously abolish that shit, but the initial post is a bit dramatic.
c) You should compare parliament to cspan sometime - our illiterate representatives don't even bother to show up.
Obviously the UK has plenty of issues, it's an interesting system to watch. Removing the monarchy might be a good step forward, obviously you should all do that. But it's not some 'creeking' 'deep state' system, it's very front and center, and it's really not your biggest problem by a longshot.
comment 4y ago · link · parent
I'm not sure how you can characterize this as some creeky system that's just showing its face now lol it's built into so much of your government, multiple times a year, including one extremely high profile case (the prorogation) only a few months ago.
Honestly, be grateful. I watch parliament for some sort of fucked up cathartic release because even the worst of your MPs have a base moral compass that would dwarf almost anyone in the US government. Just the fact that Johnson's party initiated the no-confidence is incredible, I can't imagine that happening in the US - 15% of a party turning against their party representative? Impossible here.
If the cost is some silly ceremony that is increasingly irrelevant every year, pay that cost.
comment 4y ago · link · parent
And, as you said, proto isn't in a great position to be making crazy changes anyway.
comment 4y ago · link · parent
Maybe with these frameworks threads are less dedicated and instead are more cooperative, idk. Really not my area!
comment 4y ago · link · parent
I guess I could imagine a few threads for managing different 'panes', a thread for chat, a thread for audio maybe? It's hard to think of 24 independent units of work.
I'm not a game dev, just used to play PoE and curious.
comment 4y ago · link · parent
There are a few relevant bits to this. You can MAP_POPULATE the file to prepopulate the entries and you can MAP_LOCKED to MAP_POPULATE + lock the pages in (unreliably). As mentioned in the man page for mmap MAP_LOCKED has some failure modes that you don't get with mlock.
https://www.man7.org/linux/man-pages/man2/mmap.2.html
I also found this page: https://eklitzke.org/mlock-and-mlockall
Oh, and this: https://access.redhat.com/documentation/en-us/red_hat_enterp...
comment 4y ago · link · parent
A "safe" way to do this is still straightforward, I think.
from copy import copy
def _forward(self, x, context=None):
x = x.contiguous() if x.device.type == 'mps' else x
x = copy(x)
x += self.attn1(self.norm1(x))
x += self.attn2(self.norm2(x), context=context)
x += self.ff(self.norm3(x))
return x
It could be faster but I don't know what `x` is and I'm not going to guess. Also, `copy` may not be sufficient, `deepcopy` may be necessary - again, I don't know what `x` is so I can't figure that out. Pls use type annotations :)comment 4y ago · link · parent
This isn't a case of "The Python interpreter is bad" it's just that the code is doing what the user asked it to do - create a completely new copy of the data, then overwrite the old copy with it. Immutable operations like this are slow, mutating the value (what += does) is fast.
Granted, a compiled language could recognize that you're doing this, but it also might not - is `+` and `+=` semantically identical such that the compiler can replace one with the other? Maybe? Probably not, if I had to guess. The correct answer is to just use the faster operation, as it is with all language.
I don't know the type of `x`, but I'd suggest another optimization here would be to:
a) Preallocate the buffer rather before mutating it 3x (which is still likely forcing some allocations)
b) Reuse that buffer if it's so important, store it in `self` and clear it before use.
comment 4y ago · link · parent
z = y + x
x = z
Basically, creating an object `z` just to throw it away.`x += y` just adds y to x directly without any intermediary.
You could write this in any language pretty easily. For example, in Rust:
let x = "abc".to_string();
let y = "123".to_string();
let x = x + &y;
as opposed to the more efficient: let mut x = "abc".to_string();
let y = "123".to_string();
x.push_str(&y);
It's just using an operation to mutate in place vs an immutable operation.comment 4y ago · link · parent
comment 4y ago · link · parent
If someone wants to build a game in a language that's best-effort memory safety go for it. Similarly, CLI applications are often never called from an untrusted context and often provide semantic power that is equivalent to code execution anyways, so again I'd love to see memory safety, but I'm not going to care that much.
But these are exceptions - you'd still want to way whatever you're getting from memory-unsafe-language-X against just using a memory safe language. The default should be memory safety. Given that we have Go, Rust, Java, and more, there are few situations where memory safety isn't an easy option. Not zero, just few.
comment 4y ago · link · parent
comment 4y ago · link · parent
To me, the idea that a new language would be anything other than entirely memory safe, unless it is very domain specific to areas where that's not important, is just another example of developers lowering the bar. And I'm fine calling that out and being called a zealot or whatever.
comment 4y ago · link · parent
comment 4y ago · link · parent
The key here wasn't to produce an exploit. That would have been interesting, but ultimately not the entire goal. The key was to understand "how do we use Firecracker in the safest possible way for our use case?". To do that we picked one of the CVEs that looked like it could be exploitable and dug into it.
We learned a ton about Firecracker and KVM and walked away with some mitigations we can implement such that even if the bug had been exploitable the attacker would have more hurdles to jump through. Specifically, we'll be working to harden the guest operating system such that the untrusted code will have a difficult time escalating to root/kernel, which is a prerequisite for this sort of attack.
comment 4y ago · link · parent
comment 4y ago · link · parent
Key + 2FA means the attacker has to have code execution on a developer's machine in order to publish an update (via the local session token, which you should make short lived). And Google could require a FIDO2 token if you want to bypass the "alert users that this thing uses lots of permissions".
There's a lot of stuff I'd be working on to avoid having to remove developer power.
edit: K I've been rate limited by HN so I can no longer reply for today, but them's my thoughts.
comment 4y ago · link · parent
So yes, as I said, maybe this is step 1 in a longer term plan to completely remove adblockers. Maybe one day so many people will rely on adblockers that Google is forced to take a drastic measure.
I personally don't expect that to be the case any time soon, but that's really not based on much.
comment 4y ago · link · parent
1. Auditability - both in terms of the code and the behaviors
2. Improved permissions - could we have split WebRequest up?
3. Improved performance - could we have leveraged new APIs, like the declarative API, for improved performance? What about compiling to wasm? Or new APIs?
4. Capabilities/ Sandboxing - Within an extension could we slice out capabilities?
5. Improved UX around permissions. Surfacing the permissions and performance implications of extensions would be worth exploring and aided by any ability to slice up permissions more.
Chrome could even create 'sanctioned' extensions that wouldn't trigger scary popups in order to make it that much clearer when something is scary - something like "if you publish your extension such that it is digitally signed, you use 2FA or whatever, you have good standing with us, blah blah blah, we will waive that popup". IIRC Firefox did this to lower their review burden, NoScript was one of the ones on the list I think, but that would have been many years ago and I don't know if it has changed since.
That said, I don't think V3 is the end of the world. I would have preferred the other options, and I bet some people at Google explored them too and know much more about why they are/aren't viable, but I'm OK with V3. I don't really think that Google Adsense is driving this decision at all nor do I expect it to benefit them, at least not in the short/medium term.