Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
masklinn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
421.
▲
by
masklinn
10mo ago
> It can just leave the result totally uninitialised. That's because both code paths have undefined behaviour: whichever of result.x or result.y is not set is still copied at "return result" which is undefined behaviour, s
422.
▲
by
masklinn
10mo ago
It clearly notes that it's "a refresher", does not claim that it's novel research, and extensively links to the reference documents. It is, essentially, a review article ( https://en.wikipedia.org/wiki
423.
▲
by
masklinn
10mo ago
Afaik this is usually know as “snapshot”, “golden master”, or “characterisation” testing, and it is quite common and popular. And effective. Although it is quite sensitive to non-determinisms as well as less helpful at tracking down issues.
424.
▲
by
masklinn
10mo ago
And afaik this is what most compression algorithms do. It’s certainly one of the trade offs you have to consider when archiving at high levels of compression.
425.
▲
by
masklinn
10mo ago
Because it would massively alter langage semantics? It converts returns from the nearest function into returns from the nearest (try) block.
426.
▲
by
masklinn
10mo ago
Windows also splits memory allocations between allocating the virtual space and committing real memory. So you can allocate a large VM when you need one and use piecemeal commits within that space. POSIX not so much.
427.
▲
by
masklinn
10mo ago
COW is not shared memory, it’s an optimised copy. There is no way to guarantee that the optimisation will hold forever thus it is a form of overcommit (and indeed the reason most unices overcommit in the first place): most children will not
428.
▲
by
masklinn
10mo ago
The GeForce 700 series came in 3 different microarchitectures. Most were on Kepler but there were several fermi (the previous uarch) and a few mobile chips used maxwell (the following architecture). Lest anyone think AMD is any better the R
429.
▲
by
masklinn
10mo ago
> You can correlate microarchitecture to product SKUs using the Intel site that the article links. Intel removed most things older than SB late 2024 (a few xeons remain but afaik anything consumer was wiped with no warning). It’s virtual
430.
▲
by
masklinn
10mo ago
> Not sure if you can integrate something like that to help block a PR from being merged like Actions CI checks Post statuses, and add rulesets to require those statuses before a PR can be merged. The step after that is to lock out pus
431.
▲
by
masklinn
10mo ago
Yep, this mostly works fine (and can be necessary already in some setups anyway), the main issues are that each status update requires an API call (over v3, AFAIK updating statuses was never added to v4) so if you have a lot of statuses and
432.
▲
by
masklinn
10mo ago
These are… completely unrelated ratings? The heat pump generates 162MWt, at the cost of around 50MWe. The nuclear reactor produces 1.6GWe alongside 4.5GWt. Furthermore the listed costs are also unrelated: the 235 millions are for the bare
433.
▲
by
masklinn
10mo ago
> well, sudo-rs had a few privilege escalation CVEs recently. So there has been some recent evidence in favor of the stability argument. it would probably be a lot stronger an argument if sudo hadn’t also had a few privilege escalation C
434.
▲
by
masklinn
10mo ago
And yet it does: https://godbolt.org/z/h9GW5v3YK And creates an on-stack slice whose size is only limited by Go's 1GB limit on individual stack frames: https://godbolt.org/z/rKzo8jre6 https:
435.
▲
by
masklinn
11mo ago
> Not sure how to verify this, but the assumption you can allocate megabytes on the stack seems wrong. []byte{N: 0}
436.
▲
by
masklinn
11mo ago
> Go won’t put large allocations on the stack even if escape analysis would permit it Depends what you mean by “large”. As of 1.24 Go will put slices several KB into the stack frame: make([]byte, 65536) Goes on the stack if it d
437.
▲
by
masklinn
11mo ago
A copy of what? It’s returning a pointer, so i has to be on the heap[0]. gc could create i on the stack then copy it to the heap, but if you plug that code into godbolt you can see that it is not that dumb, it creates a heap allocation then
438.
▲
by
masklinn
11mo ago
That’s the one. Since 1.17 it’s not impossible for escape analysis to come into play for slices but afaik that is only a consideration for slices with a statically known size under 64KiB.
439.
▲
by
masklinn
11mo ago
> It seems obvious Doesn't seem obvious unless your dutch. Especially as the first things I would think obvious is: if breaking the behaviour of innerHTML is not a concern for your software why keep it at all? Delete the property
440.
▲
by
masklinn
11mo ago
That breaks existing usages of innerhtml which may legitimately need its more dangerous features.
441.
▲
by
masklinn
11mo ago
> Are there any examples where the first approach (sanitize to string and set inner html) is actually dangerous? The term to look for is “mutation xss” (or mxss).
442.
▲
by
masklinn
11mo ago
There were already plenty of “successors to the floppy” in the dustbin of history (floptical, Iomega zip, LS120, …). None of them was competitive as a distribution format, or at all once CD-R became widely available.
443.
▲
by
masklinn
11mo ago
> No it doesn't. Yes it does. > As a child, one time I tried to make a CD unplayable and literally couldn't do it. (Sandpaper didn't do the trick.) Either child you was incompetent or your player was very good at error
444.
▲
by
masklinn
11mo ago
> The only downside of CDs was that you couldn’t record from the radio and Napster eventually solved that better than radio ever did. This was far from the only drawback with CDs especially early on, at least in mobile applications: the
445.
▲
by
masklinn
11mo ago
Even outside of such, if your contention is low and critical section short, spinning a few rounds to avoid a syscall is likely to be a gain not just in terms of latencies but also in terms of cycles waste.
446.
▲
by
masklinn
11mo ago
> I don't think Safari mattered much. Apple was the first to publicly call out native plugins (jobs did so on stage) and outright refused to support them on iOS, then everyone else followed suit.
447.
▲
by
masklinn
11mo ago
Yes I’m sure jobs went on stage calling out flash as the main source of Safari crashes because of Microsoft’s Java plugin.
448.
▲
by
masklinn
11mo ago
Fun fact: until Office 2007, outlook used IE’s engine for rendering html.
449.
▲
by
masklinn
11mo ago
> Why was it that in the early PC days, IBM was unable to keep a lid on 'IBM compatible', allowing for the PC interoperability explosion IBM didn't think to lock it down, the BIOS was the main blocker and was relatively qu
450.
▲
by
masklinn
11mo ago
Because `append` works in-place, Go slices are amortised, and the backing buffer is shared between `a` and `b`, so unless you never ever use a again it likely will have strange effects e.g. a := make([]int, 0, 5) a = append(a, 0,
More ›