Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TuxSH
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
61.
▲
by
TuxSH
11mo ago
I agree with what you said, however neither libc++ nor MS-STL have this "optimization" to my knowledge
62.
▲
by
TuxSH
11mo ago
Yes, that is what I said - sorry if this wasn't clear
63.
▲
by
TuxSH
11mo ago
True, but that's a fault of the implementation, which assumes POSIX is the only thing in town & makes questionable optimization choices, rather that of the language itself (for reference, the person above is referring to what'
64.
▲
by
TuxSH
11mo ago
> I’ve lost track of how many times I’ve listened to Kate Gregory extol the virtues of const-ing all the things, but people still don’t systematically add it Adding const to _function-local_ variables only really matters when you "l
65.
▲
by
TuxSH
11mo ago
Interestingly, GCC (but not Clang) detects but doesn't warn the UB and emits "ud2" with -O2: https://godbolt.org/z/61aYox7EP
66.
▲
by
TuxSH
11mo ago
> Or change / improve the status [quo] uutils/coreutils is MIT-licensed and primarily hosted on GitHub (with issues and PRs there) whereas GNU coreutils is GPL-licensed and hosted on gnu.org (with mailing lists). EDIT: I'm
67.
▲
by
TuxSH
1y ago
You can also add a temporal dimension (-> temporal dithering, also known as FRC). For example if you alternate blue and red every frame at 60~120 FPS, the only thing you'll see is purple.
68.
▲
by
TuxSH
1y ago
Also this is _de facto_ limited to userspace application for the mainstream OSes if my understanding is correct. Reading Fil-C website's "InvisiCaps by example" page, I see that "Laundering Integers As Pointers" is
69.
▲
by
TuxSH
1y ago
I wonder what the page size is on his system (and what effective alignment his pointers have). If it's 4K, the sizes look really close to 0x1000 and 0x2000 - maybe crossing page boundaries?
70.
▲
by
TuxSH
1y ago
You are correct in assuming that I'm not as familiar as you seem to be on these topics. > Polyphase filtering (...) There is no compression and no analog signal that needs to be sampled. The term "polyphase scaling" is use
71.
▲
by
TuxSH
1y ago
> Single bilinear samples can lose information and leave out pixels of the higher res image, it's essentially a worse triangle filter. Can you do [A B] -> [A 0.5*(A+B) B] 1.5x upscaling with a triangle filter? (I think this is no
72.
▲
by
TuxSH
1y ago
> that to the display resolution using bilinear On that topic, Pillow so-called binilnear isn't actually bilinear interpolation [1][2], same with Magick IIRC (but Magick at least gives you -define filter:blur=<value> to counte
73.
▲
by
TuxSH
1y ago
Slightly unrelated but GH's ToS clearly only permit one free account per person and I've heard they sometimes enforce this
74.
▲
by
TuxSH
1y ago
From the UI it indeed seems to be Claude
75.
▲
by
TuxSH
1y ago
For self-use author has a point, but for public-facing sites not so much, because: - infra work is thankless (see below) - outages will last long because you're unlikely to have failovers (for disk failures, etc.), plus the time to rea
76.
▲
by
TuxSH
1y ago
> that's gonna be squashed Isn't your interpretation backwards in some cases? What I mean, is that _because_ you see the intermediate commits are garbage, you _then_ decide not to review the individual commits (because you are
77.
▲
by
TuxSH
1y ago
shownew is flooded with those
78.
▲
by
TuxSH
1y ago
In fact, I have seen gcc optimize clever hacks that tried to use multiplication, into conditional moves (on aarch32). There is this common misconception that conditional moves == branching. On actually relevant software architectures, they
79.
▲
by
TuxSH
1y ago
That's because Rust doesn't have constructors/assignment operators, is it not? Because of that, all objects are trivially relocatable (sort of, because Rust allows destructors for these objects, I guess). And strict aliasing
80.
▲
by
TuxSH
1y ago
Foo foo{}; init(*(Bar *)foo); is UB in most cases (alignment aside, if Bar is not unsigned char, char, std::byte or a base class of Foo). This is obvious why, Foo and Bar may have constructors and destructors. You should use constr
81.
▲
by
TuxSH
1y ago
Somewhat related: I find annoying that C++ doesn't have fetch_update and that Rust's fetch_update doesn't support LL/SC. Rust fetch_update uses the lowest common denominator, CAS, regardless of platform: https:/&#x
82.
▲
by
TuxSH
1y ago
> If C++ gained the proper sum types AFAIK "P2688 R5 Pattern Matching: match Expression" exists and is due C++29 (what actually matters is when it's accepted and implemented by compilers anyway) Also, cheap bound checks (i
83.
▲
by
TuxSH
1y ago
Not quite the best example, since Git usually has unrestricted file access and network access through HTTP/SSH, any kind of RCE would be disastrous if used for data exfiltration, for instance. If you want a better example, take distrib
84.
▲
by
TuxSH
1y ago
Alas none of gcc/clang/msvc(?) have implemented start_lifetime_as, so if you want to create an object in-place and obtain a mutable pointer to it, you're stuck with the: return std::launder(static_cast<T*>(std::me
85.
▲
by
TuxSH
1y ago
Right, I've checked that char foo = "bar"; is indeed the same as the const char variant (both reference a string literal in rodata), which IMO makes it worse. About string literals, the C23 standard states: It is unsp
86.
▲
by
TuxSH
1y ago
> It really isn't. There's a lot of little nuanced differences that can bite you. These are mostly inconsequential when using code other people write. It is trivial to mix C and C++ object files, and where the differences (in h
87.
▲
by
TuxSH
1y ago
> These jobs predominantly seem to exist in C++ land. You wish. These jobs exist for companies with large monorepos in other languages too and/or when you have many projects. Plenty of stuff to handle in big companies (directory own
88.
▲
by
TuxSH
1y ago
Capturing lambdas are no different from handwritten structures with operator() ("functors"), therefore it makes no sense castrating them. Borrowing from stack is super useful when your lambda also lives in the stack; stack escapin
89.
▲
by
TuxSH
1y ago
Well, last I checked Claude's webchat UI doesn't have LaTeX rendering for output messages which is extremely annoying. On the other hand, I wish ChatGPT had GitHub integration in Projects, not just in Codex. I've also had Cla
90.
▲
by
TuxSH
1y ago
> Many, many, classes of problems turn into O(log n) problems, once you sort your input in some way. It might not be the most effective way of solving the problem, but it's often a fairly good one. As a corollary, you can use binary
More ›