Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbolino
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
121.
▲
by
kbolino
10mo ago
Yes, I think it's also a good example of how "absolute" backwards compatibility is not necessarily a good thing. Not only was the old loopvar behavior probably the biggest noob trap in Go (*), it turned out not to be what an
122.
▲
by
kbolino
10mo ago
The interesting thing about Go's loopvar change is that nobody was able to demonstrate any real-world code that it broke (*1), while several examples were found of real-world code (often tests) that it fixed (*2). Nevertheless, they
123.
▲
by
kbolino
10mo ago
This sounds like a bug, whether it be in your code, the map implementation, or even the debugger. Map keys are not mutable, and neither are strings.
124.
▲
by
kbolino
10mo ago
I interpret this as asking "why can't you get the address of a value in a map?" There are two reasons, and we could also ask "why can't you get the address of a key in a map?" The first reason is flexibility in
125.
▲
by
kbolino
10mo ago
Encrypted tokens are opaque but they are also offline-verifiable. A simple opaque token has to be verified online (typically, against a database) whenever it's used. Auth0, for example, supports JWE for its access tokens: https:/
126.
▲
by
kbolino
10mo ago
I would suggest gaining a better understanding of the M:N threading model versus the N:N threading model. I do not know that I can do it justice here. Both Java and Rust flirted with green threads in their early days. Java abandoned them be
127.
▲
by
kbolino
10mo ago
Yes, I have cleaned up the wording a bit. Also, the common implementation of Rust's async is comparable to green threads, and I think Zig is adopting something like it too. However, the "normal" execution model on all of them
128.
▲
by
kbolino
10mo ago
There are undoubtedly still some optimizations lying around, but the biggest source of Go's FFI overhead is goroutines. There's only two "easy" solutions I can see: switch to N:N threading model or make the C code gorout
129.
▲
by
kbolino
10mo ago
PFS is just one of many desirable properties, and getting access to plaintext is just one of many kinds of threat. Getting access to ephemeral keys and other sensitive state can enable session hijacking. It's still not a great example,
130.
▲
by
kbolino
10mo ago
There are two main reasons why this approach isn't sufficient at a technical level, which are brought up by comments on the original proposal: https://github.com/golang/go/issues/21865 1) You are almost
131.
▲
by
kbolino
10mo ago
One of the goals here is to make it easy to identify existing code which would benefit from this protection and separate that code from the rest. That code is going to run anyway , it already does so today.
132.
▲
by
kbolino
10mo ago
This is not what secret.Enabled() means. But it probably illustrates that the function needs to be renamed already. Here's what the doc comment says: // Enabled reports whether Do appears anywhere on the call stack. In
133.
▲
by
kbolino
10mo ago
This is a sharp-edged tool guarded behind an experimental flag. You are not meant to use it unless you want to participate in the experiment. Objections like this and the other one ("check if it's enabled" -- you can't,
134.
▲
by
kbolino
10mo ago
Go has both assembly language and unsafe pointer operations available. While any uses of these more advanced techniques should be vetted before going to production, they are obviously able to break out of any sandboxing that you might other
135.
▲
by
kbolino
10mo ago
But you don't have to do either of those things. There's a third way, with functions and bare objects. I'm not sure that's what GP meant, but a lot of the JS I've written (which tends to be for the browser, mostly
136.
▲
by
kbolino
10mo ago
Fixed!
137.
▲
by
kbolino
10mo ago
Until you get to super-high-res textures and the like, the throughput isn't nearly as important as the latency. At 200 MB/s the way hard drives usually measure it, you're able to read up to 390,625 512-byte blocks in 1 second
138.
▲
by
kbolino
10mo ago
Indeed, the only missing piece really then is the ability to warn/error when exposed provenance and/or as-casts are used.
139.
▲
by
kbolino
10mo ago
This feels antithetical to two of the main goals of editions. One of those goals is that code which was written for an older edition will continue to work. You should never be forced to upgrade editions, especially if you have a large codeb
140.
▲
by
kbolino
10mo ago
How many CAs do you think there are? How many countries do you think they operate in? Maybe we could augment the old EV cert indicator with a flag icon, but now there's yet another thing that users have to pay attention to. Maybe the C
141.
▲
by
kbolino
10mo ago
I brought up Go because it was designed around the same time and, while it gets a lot of flack for some of its other design decisions, this particular one seems prescient. However, I would be remiss if I gave the impression that the reasoni
142.
▲
by
kbolino
10mo ago
Great info! Personally, I like 3.1.2 from your link [0] best, which involves getting rid of pointer <=> integer casts entirely, and just adding methods to pointers, like addr and with_addr. This needs no new types and no new syntax, t
143.
▲
by
kbolino
10mo ago
I'm genuinely surprised that usize <=> pointer convertibility exists. Even Go has different types for pointer-width integers (uintptr) and sizes of things (int/uint). I can only guess that Rust's choice was seen as a ha
144.
▲
by
kbolino
10mo ago
Yes, it is fair to say that domain names are not the sum total of identity. However, the EV certificate experience showed that, at least in terms of WebPKI and the open Internet, there really isn't anything better than domains yet. We
145.
▲
by
kbolino
10mo ago
Aren't browsers generally implementing their own DNS resolution (via DoH) nowadays anyway? Not sure it helps that much, but operating systems not enforcing/delivering DNSSEC seems like a side-stepped problem now.
146.
▲
by
kbolino
10mo ago
There are Extended Validation (EV) certificates, and for a couple of years browsers gave them special treatment (typically, a green lock indicator instead of gray, sometimes accompanied by the validated business name). However, they were ev
147.
▲
by
kbolino
10mo ago
There were two main issues. 1) A lot of these businesses have customers outside the U.S. Those customers, including some foreign governments, did not want their data to be snooped by the U.S. government. The business risk here is loss of cu
148.
▲
by
kbolino
10mo ago
But why? There's no reliable source of truth for your home network. Neither the local (m)DNS nor the IP addresses nor the MAC addresses hold any extrinsic meaning. You could certainly run the standard ACME challenges, but neither succe
149.
▲
by
kbolino
10mo ago
Absent widespread adoption of DNSSEC, which has just not happened at all , I don't see any alternative. The authentication must be done before the encryption parameters are negotiated, in order to protect against man-in-the-middle a
150.
▲
by
kbolino
11mo ago
JAR has additional structure to it, though it's mostly optional stuff, like metadata and code signing: https://docs.oracle.com/en/java/javase/21/docs/specs/jar/jar...
More ›