Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
comex
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
49 ms
·
631.
▲
by
comex
4y ago
Is the JS file somehow being embedded into index.html on the server side? If not, how do you expect this to be atomic when the user’s browser is making two separate requests (with an arbitrary delay between them)?
632.
▲
by
comex
4y ago
This is how Rust’s mutexes work as well - albeit using RAII rather than a callback, but with the same fundamental innovation of putting the data inside the mutex object. I’ve used it in my C++ code as well; it’s a great pattern.
633.
▲
by
comex
4y ago
Makes me wonder how many other lurking type confusion bugs there are. KASAN only found this one because it happened to produce an out-of-bounds access (I guess pci_dev is larger than whatever struct the pointer really pointed to); it can’t
634.
▲
by
comex
4y ago
> most implementations of malloc would write some kind of book-keeping header before the returned object (observe that on amd64 glibc, malloc(3) for large allocations returns pointers that are offset +0x10 from page alignment, that is wh
635.
▲
by
comex
4y ago
That's right. Indeed, if the optimization is implemented properly it should have no observable behavioral difference except for performance (better in some cases, worse in others) which is not really something POSIX concerns itself wi
636.
▲
by
comex
4y ago
As does macOS. Linux also supports it (zram), though I think most distros don’t enable it by default (could be wrong).
637.
▲
by
comex
4y ago
If you click the link in the blog post with the text “firewalls need adjustments to let 'QUIC' traffic through”, it seems like there is some of the latter as well. Well, not holding off on allowing it through their network, per s
638.
▲
by
comex
4y ago
Personally I don't think the analogy holds up; the situations are too different. Computer security contends with securing systems against people who are assumed to be hostile. AI alignment research seeks to prevent systems from becom
639.
▲
by
comex
4y ago
Because it’s fine-tuning an existing 7B-parameter language model, not training from scratch.
640.
▲
by
comex
4y ago
Note that macOS now has three “apps” to view your passwords, three different UIs for the same database. There’s Keychain Access, there’s the Passwords section of System Settings, and there’s the Passwords section of Safari preferences (w
641.
▲
by
comex
4y ago
Quote from your second link: > On a Mac with Apple silicon, the security policy must be set to Full Security, the default setting.
642.
▲
by
comex
4y ago
You don't need a larger mutex for fairness. For recursive locking, maybe. But most mutexes aren't recursive. That's one of the big problems with pthread mutexes: they try to pack too much functionality into a single type.
643.
▲
by
comex
4y ago
The kinds of programs that were putting in entirely nonstandard paths (~/app.config), or paths specific to macOS or Windows, are still doing that. But when it comes to a 'well-behaved' Unix program, there used to be one place
644.
▲
by
comex
4y ago
But what makes an abstraction 'right'? I would say it's if it makes the program easier to make correct, or easier to write, or easier to understand, or easier to maintain, or ideally some combination of all of those. But ea
645.
▲
by
comex
4y ago
Clicking through to the link next to 'last week's text' and then to 'full rules', it looks like the author is starting the chat sessions with a full explanation that isn't included in the screenshots. (Also, t
646.
▲
by
comex
4y ago
Even with an arena allocator, the indirection is likely to increase cache misses, especially when the array element type is something small like an integer. It’s possible to implement something like smallvec without the branch by having it
647.
▲
by
comex
4y ago
It didn’t just pick the wrong one; “Learning from Rules and Arguments” is completely made up.
648.
▲
by
comex
4y ago
It was published in June 2021, which is before the cutoff date of September 2021, but not by much.
649.
▲
by
comex
4y ago
Two of those links don’t work.
650.
▲
by
comex
4y ago
Do you know if any of them support GPTQ [1], either end-to-end or just by importing weights that were previously quantized with GPTQ? Apparently GPTQ provides a significant quality boost “for free”. I haven’t had time to look into this in
651.
▲
by
comex
4y ago
People using Word in this manner typically create a new filename only occasionally, not every single time they save. Browsers, on the other hand, will create a new filename every single time a download is initiated. That makes downloads i
652.
▲
by
comex
4y ago
I recently asked GPT-3.5 ChatGPT to explain the grammar of a Japanese sentence using an obscure informal verb form, and it gave an answer that was obviously wrong. I just tried again with GPT-4, and it gave an answer that was more plausibl
653.
▲
by
comex
4y ago
But Bob was right that the problem was algorithmic. Checking whether a string ends with a prefix of an emoji abbreviation is a task that could easily be done in a microsecond. It’s apparently taking 100 milliseconds, which is 100,000 tim
654.
▲
by
comex
4y ago
Yes, and that “something” can be an app like gnome-terminal running on a full-fat text rendering library and GUI framework… on a completely different computer. That software could hypothetically have the same bug, but probably not, and at
655.
▲
by
comex
4y ago
C++ has std::variant these days, no need for Boost… however, neither version has particularly good ergonomics.
656.
▲
by
comex
4y ago
If you’re wondering what it’s talking about when it says the triads of red/green/blue rectangles on a CRT display don’t correspond to pixels, here’s a Technology Connections video that explains it: https://youtu.be/
657.
▲
by
comex
4y ago
Swift’s choice has the advantage of visually unifying the two cases where text in a string literal is interpreted as something other than the text itself. One is backslash escapes like \n and \\. The other is string interpolation.
658.
▲
by
comex
4y ago
I think you replied to the wrong comment.
659.
▲
by
comex
4y ago
You can if you typedef it.
660.
▲
by
comex
4y ago
Rust code tends to rely extensively on generic containers to encapsulate various safety properties. That will be hard to replicate in C. Still, I’d like to see how it works out in practice. But where’s the code? Judging by the website fo
More ›