Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ncruces
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
421.
▲
by
ncruces
1y ago
My driver (Wasm based) does many of these things by default. Foreign keys are default enabled, default synchronous mode is FULL for rollback and NORMAL for WAL, shared cache is disabled, the default busy timeout when using database/s
422.
▲
by
ncruces
1y ago
If Apple compiled your SQLite library, not even the fullfsync PRAGMAs will do F_FULLFSYNC. Apple has “secretly” patched their SQLite to do F_BARRIERFSYNC instead. https://bonsaidb.io/blog/acid-on-apple/
423.
▲
by
ncruces
1y ago
The Apple built macOS SQLite is something . Another oddity: misteriously reserving 12 bytes per page for whatever reason, making databases created with it forever incompatible with the checksum VFS. Other: having 3 different layers of fsyn
424.
▲
by
ncruces
1y ago
For DELETE (rollback) mode, and given the way fsync works, FULL should not lose committed transactions ( plural ) but it might lose at most one committed transaction. Because DELETE depends on deleting a file ( not modifying file content
425.
▲
by
ncruces
1y ago
OK, so it again all boils down to zero values. I don't necessarily disagree that that was a design mistake, but there's zero mention of the word zero in the article.
426.
▲
by
ncruces
1y ago
> I do feel like C++ can defend that one from first principles though, in a way that Go cannot. How do you propose Go interfaces should be implemented then, to avoid the multiple issues the current implementation causes (more than one ki
427.
▲
by
ncruces
1y ago
That's a lot more than I thought I'd want to know about this, but I was totally nerd sniped. Great writeup.
428.
▲
by
ncruces
1y ago
Yes. But here they are deciding between "pushdown o.status==shipped" and "pushdown u.email==address@", in parallel both , then join (which they already did) or first doing "u.email==address@" then pushing do
429.
▲
Show HN: Immutable AA Trees in Go
(github.com)
2 points
by
ncruces
1y ago
|
0 comments
430.
▲
by
ncruces
1y ago
The underlying reason, which you hint on, is that in Go ( unlike Python, Java, C#… even C++) the “type” of an “object” is not stored alongside the object. A struct{a, b int32} takes 8 bytes of memory. It doesn't use any extra bytes to
431.
▲
by
ncruces
1y ago
“What you'll do next and in what way” is often an important tool to put the small changes into context. Stacked pull requests can be an important tool to enable “frequent, small changes” IMO. Sure, I can use a single pull request and
432.
▲
by
ncruces
1y ago
It's not random internet people saying it's training. It's Cloudflare, among others. Search for “A graph of daily requests over time, comparing different categories of AI Crawlers” on this blog: https://blog.cloudf
433.
▲
by
ncruces
1y ago
Exactly. Europe too. It's how people talk to groups of dozens of people at a time: friends, neighbors, acquaintances, the parents of your kid's school mates to discuss school stuff or to setup a birthday party… coworkers if you in
434.
▲
by
ncruces
1y ago
But that's slower for small query sizes. This describes a few algorithms: http://0x80.pl/notesen/2018-10-18-simd-byte-lookup.html Both the alternative version by Geoff Langdale, and the special case for small sets
435.
▲
by
ncruces
1y ago
> Perform a bitwise AND with 0xFB and check if the result equals 0x09. Both 0x0D & 0xFB = 0x09 and 0x09 & 0xFB = 0x09. This explanation was a bit unsatisfying. This works because 0x09 and 0x0D differ by a single bit, and 0xFB m
436.
▲
by
ncruces
1y ago
No, it didn't fail. Circles is group chats (WhatsApp, or whatever's popular in your neck of the woods), which I'd argue is how (most?) people in 2025 actually do “social networking.” Instagram/TikTok/Xitter is… so
437.
▲
by
ncruces
1y ago
Not just land, but all the bureaucratic costs, licensing, etc. Developers will always build the most high margin house the market will bear. It still increases supply, though. And if there's no market for expensive houses, eventually t
438.
▲
by
ncruces
1y ago
> Note also that historically, the C standard left things UB exactly so that implementations can use it for extensions (e.g. mmap). The idea that UB == invalid program is fairly recent misinformation, but we have to react to it and make
439.
▲
by
ncruces
1y ago
Is the color pixel arrangement still the same as the older pebbles? I was working on a subpixel rendering algorithm for it at the time, but then it was killed, and I shelved it.
440.
▲
by
ncruces
1y ago
> If a newer version of that value is also stored in a register and not yet flushed to memory, should the compiler know to insert that flush for your or is reading a stale value ok? Any value would be OK. There are aliasing rules to foll
441.
▲
by
ncruces
1y ago
So how can you implement an allocator in the language itself? Not even talking about malloc (which gets to have language blessed semantics); say an arena allocator. You get a bunch of memory from mmap. There are no “objects” (in C terminolo
442.
▲
by
ncruces
1y ago
You never converted ptr to an integer. If you did, if the pointer escapes, yes, I claim that then the allocation can't be optimized away. Why is that so bad?
443.
▲
by
ncruces
1y ago
Why can't it work though? And I'm taking about both things. Integer arithmetic that produces pointers that are just out of bounds of an object. Why can't this work? Why can't the compiler assume that, since I explicitl
444.
▲
by
ncruces
1y ago
No, because they hire someone to massage their feet and do the books. /s I'm sorry, I just find the whole concept silly. Makes it sound a silly business decision to do some SRE inhouse instead of “cloud everything” (prob. with the
445.
▲
by
ncruces
1y ago
Just read whatever is at address 12345 of the linear memory. Doesn't matter what that is. If it's an object, if it was malloc'ed, if it's the "C stack", a "global". It's the only way to interpret
446.
▲
by
ncruces
1y ago
And, as a customer, you find that plumber how? What about when they tell you they'll be available 2 months from now for a 1 day service?
447.
▲
by
ncruces
1y ago
Can't reply to the sibling comment, for some reason. If you don't know the extents of the object pointed to by the char*, using an aligned vector load can reach outside the bounds of the object. Keeping provenance makes that und
448.
▲
by
ncruces
1y ago
Why? What specific optimization do you have in mind that prevents me from doing an aligned 16/32/64-byte vector load that covers the address pointed to by a valid char*?
449.
▲
by
ncruces
1y ago
The current standard still says integer-to-pointer conversions are implementation defined ( not undefined) and furthermore "intended to be consistent with the addressing structure of the execution environment" (that's a di
450.
▲
by
ncruces
1y ago
And yet, I see P1434R0 seemingly trying to introduce new undefined behavior, around integer-to-pointer conversions, where previously you had reasonably sensible implementation defined behavior (the conversions “are intended to be consisten
More ›