Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leni536
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
271.
▲
by
leni536
2y ago
I can't use an IDE on my entire git history, but git can grep.
272.
▲
by
leni536
2y ago
Lambda captures are explicit in C++, so if you dislike capturing by reference then just don't.
273.
▲
by
leni536
2y ago
I'm using KDE and I have neither Konqueror nor Kate installed. Those are very much optional, I don't consider them part of the DE.
274.
▲
by
leni536
2y ago
I never had a problem disassembling, moving and reassembling even their cheapest pieces of furniture. I think their reputation for falling apart comes from trying to move them fully assembled. Last week I had to move a 3 door kleppstad from
275.
▲
by
leni536
2y ago
Not to dismiss your criticism, but I think supply chain attacks are generally a weak point of the vim/neovim plugin ecosystem, especially with all the fancy autoupdate package managers. No package signing, no audits, no curation. Just
276.
▲
by
leni536
2y ago
All three of the major C++ standard library implementations have stable ABI contracts.
277.
▲
by
leni536
2y ago
Adding one dependency to your toolchain which in turn helps you with dealing with an open-ended set of 3rd party dependencies is a good deal.
278.
▲
by
leni536
2y ago
Use conan or vcpkg.
279.
▲
by
leni536
2y ago
> How do you deal with (for example) a constructor that fails? The usual alternative is to have a factory function that returns std::optional<T> or std::expected<T, Err>. This avoids two-stage init, but has other tradeoffs.
280.
▲
by
leni536
2y ago
It can, and it does on decent runtimes.
281.
▲
by
leni536
2y ago
Also, I hope that if you’re reading this post in a year or two (say, December 2025), these specific examples won’t even reproduce anymore. I hope libstdc++ gets on the ball and eliminates some of this weirdness. (In short: They should get
282.
▲
by
leni536
2y ago
https://eel.is/c++draft/res.on.exception.handling#2 I general functions from the C standard library must not throw, except for the ones taking function pointers that they execute.
283.
▲
by
leni536
2y ago
> Especially since there is no way to mark a function pointer as noexcept. There is, noexcept is part of the type since C++17. In fact, I prefer noexcept function pointer parameters for C library wrappers, as I don't expect most lib
284.
▲
by
leni536
2y ago
https://eel.is/c++draft/alg.c.library#4 Any library implementation that is C++ compliant must implement this. I'm pretty sure that libstdc++ + glibc is compliant, assuming sane glibc compiler options.
285.
▲
by
leni536
2y ago
it is reproducible within a single standard library implementation, so usable for fuzz testing
286.
▲
by
leni536
2y ago
Yes, qsort and bsearch can throw.
287.
▲
by
leni536
2y ago
That's not my experience.
288.
▲
by
leni536
2y ago
According to some comments under this submission, even x86 assembly isn't suitable, or only under specific circumstances that are generally not available in userspace.
289.
▲
by
leni536
2y ago
My guess is that the attribute interacts weirdly with optimizations spanning function calls, like inlining. It might be safe for TUs that define a single function, like with memmove above. Having said that applying the option to the TU itse
290.
▲
by
leni536
2y ago
Maybe that's applied to the TU that defines it? I don't see it in the glibc sources.
291.
▲
by
leni536
2y ago
Ah, the "user-defined registers" paradigm.
292.
▲
by
leni536
2y ago
C and C++ are unsuitable for writing algorithms with constant-time guarantees. The standards have little to no notion of real time, and compilers don't offer additional guarantees as extensions. But blaming the compiler devs for this i
293.
▲
by
leni536
2y ago
"The optimize attribute should be used for debugging purposes only. It is not suitable in production code. " https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attribute...
294.
▲
by
leni536
2y ago
> The performance difference arises (we believe) because when working from an SQLite database, the open() and close() system calls are invoked only once, whereas open() and close() are invoked once for each blob when using blobs stored i
295.
▲
by
leni536
2y ago
It's far more mundane than that. Adding items to the list is a core feature, so there is plenty of engineering time getting assigned to it. Removing items from the list is a feature that has negative return, so nobody wants to work on
296.
▲
by
leni536
2y ago
https://www.smbc-comics.com/comic/2008-09-15
297.
▲
by
leni536
2y ago
How much of zoning laws are lobbied by peopke with 100 houses? People owning the houses is not the problem, as other people still live in those houses. The incentives to keep it a good investment is still a problem.
298.
▲
by
leni536
2y ago
You can have as many monostate objects as you want.
299.
▲
by
leni536
2y ago
rr is awesome. My typical debug workflow: * rr record * rr replay until crash or exception (set up catchpoint for that) * set up hardware watchpoint for borked data that caused the issue * work backwards in the data flow through w
300.
▲
by
leni536
2y ago
It is sometimes useful with concurreny bugs, especially when used in "chaos" mode. Altough it probably masks some classes of concurrency bugs. I wonder if rr + TSAN works.
More ›