Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dwattttt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
511.
▲
by
dwattttt
1y ago
The mechanism for sharing definitions, 'include' aka "copy file here", is absolutely not elegant. The absolute minimum you could do maybe, but not elegant.
512.
▲
by
dwattttt
1y ago
> If you were designing a language which would you pick all else being equal? But why would you think all else is equal? You might not agree with the tradeoffs Rust makes, and it's not as if there's a perfect language for all u
513.
▲
by
dwattttt
1y ago
> Why would a stack frame want to move ownership to its callee, when by the nature of LIFO the callee stack will always be destroyed first, so there is no danger in hanging to it until callee returns. It definitely takes some getting use
514.
▲
by
dwattttt
1y ago
If that's a specific use case you need to handle, it's O(1) again if you have a pointer to both the node to be removed and the previous node. Whether it's more efficient to carry a second pointer around when manipulating the
515.
▲
by
dwattttt
1y ago
I'd rather pair program with someone wary of double-linked lists, but is really hot on understanding ownership than the other way around.
516.
▲
by
dwattttt
1y ago
Or with JS disabled. HTML isn't as expressive, but it's still "arbitrary code from the internet"
517.
▲
by
dwattttt
1y ago
For Rust, the advisory database cargo-audit uses ( https://github.com/RustSec/advisory-db/ ) does track which functions are affected by a cve (if provided). I'm not sure if the tool uses them though.
518.
▲
by
dwattttt
1y ago
A cursory browse says there's no Linux-isms in the code base, so the Windows-y way to build that (without going into licensing) would be to use the Visual Studio Build Tools. They're the CLI toolchain you get for Visual Studio, bu
519.
▲
by
dwattttt
1y ago
The operating systems prior were not known for their reliable preemptive multithreading of uncooperative tasks, no.
520.
▲
by
dwattttt
1y ago
Emulating it would work quite terribly. With a 4kb page size you can write 4kb of memory as RW, then an adjacent 4kb of memory as RX, and have them interact. Trying to emulate that under 16kb pages would fault every memory operation.
521.
▲
by
dwattttt
1y ago
Those are excuses, in the same way atomics weren't "needed"; cmpxchg is a hardware locked operation that's quite important for lockless algorithms.
522.
▲
by
dwattttt
1y ago
I find myself working through a hierarchy of error handling maturity as a project matures. Initial proof of concepts just get panics (usually with a message). Then functions start to be fallible, by adding anyhow & considering all error
523.
▲
by
dwattttt
1y ago
> Ok, so we've established that the loop can be verified as not changing the container in any way, what makes you believe this shouldn't be obvious to the Rust compiler? I would be quite happy for the Rust compiler to be able t
524.
▲
by
dwattttt
1y ago
> There is no code changing the underlying array, there is no risk of any kind of use-after-free error. There is none of this code, until there is.
525.
▲
by
dwattttt
1y ago
I dunno; I've never tried Zig before, and it wasn't hard to check whether this kind of bug was easy to have: const std = @import("std"); pub fn main() !void { var gpa: std.heap.GeneralPurposeAllocator(.{})
526.
▲
by
dwattttt
1y ago
I don't imagine it was ivan_gammel's intention, but his mention of the original CCC/tomcat issue I think makes the point quite clear: have you ever had a hashmap of HTTP header to values? I hope it used one of those external
527.
▲
by
dwattttt
1y ago
The alternative is to never key a hash map from user input. Which is a choice to make, but that seems much harder to achieve (over every program?), vs have the implementation be safe in case someone does key off user input.
528.
▲
by
dwattttt
1y ago
The point is that since the hash is known and predictable, an attacker who can choose what keys get added to the map can choose them so every key collides, resulting in a DoS. I assume Java has to add some other layer to avoid this, rather
529.
▲
by
dwattttt
2y ago
Perhaps not, but it is the time required to discharge their obligation under Rule 11 of the Federal Rules of Civil Procedure (IANAL).
530.
▲
by
dwattttt
2y ago
If ns is __nonstring, it could be the latter. Without it, it should be the former and warn if it's not. That's not ambiguous.
531.
▲
by
dwattttt
2y ago
Well, as a human compiler, I said "Hey, you've non-NUL terminated a NUL terminated string". If that was what you intended you should use the type annotation for that, so I think that case worked as intended. EDIT: > what d
532.
▲
by
dwattttt
2y ago
Do you mean s & ns to be swapped? ns starts with a NUL terminator and s does not.
533.
▲
by
dwattttt
2y ago
Aside from the hail, none of those are maintenance requirements. I've done 0 maintenance on my panels over their lifespan.
534.
▲
by
dwattttt
2y ago
Make sure to include the time and inputs to make the grass, and especially trees; those don't just appear out of nothing. And we already know how it works, it's called logging.
535.
▲
by
dwattttt
2y ago
CPUs already special case xor reg,reg as zeroing out the register, breaking any data dependency on it. If zeroing bits of the stack were common enough, I'd believe CPUs could be made that handled it efficiently (they already special ca
536.
▲
by
dwattttt
2y ago
Then people would complain about the wasteful initialisation of out-params. Foolishly, perhaps
537.
▲
by
dwattttt
2y ago
You can randomly not randomise it :)
538.
▲
by
dwattttt
2y ago
Game Dev Tycoon even later added Pirate Mode to the game, for people who wanted to experience super-hard-mode. Complete with random mail they got telling them why people pirated their game, framed as why people were pirating the game you ju
539.
▲
by
dwattttt
2y ago
It's not anonymous if the US IP has a real life connection to you.
540.
▲
by
dwattttt
2y ago
> Are you arguing that the major cloud providers getting away from consumer GPUs would put AMD or Intel ahead of Nvidia in the GPU market ? Just the hypothetical "if X% of your customers leave, but don't go to competitors, won&
More ›