Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dgrunwald
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
dgrunwald
2y ago
> If a compiler is certain there's UB should it format the developer's hard drive immediately, or does it have to wait until the program is run before formatting to be standards compliant? The standard has enough variants of UB
32.
▲
by
dgrunwald
2y ago
You don't need a distro with ancient glibc; you can instead create a cross-compilation toolchain. We used https://crosstool-ng.github.io/docs/ to create a cross-compilation toolchain that runs on modern debian, bu
33.
▲
by
dgrunwald
2y ago
You're confused there. The xz backdoor made use of a Debian OpenSSH patch, but it wasn't "caused" by it. Without the patch, the malicious xz maintainer could have written a different backdoor without making use of the Op
34.
▲
by
dgrunwald
5y ago
Your "third party libs" includes system libraries like libdl. We had a Python process using both threads (for stuff like background downloads, where the GIL doesn't hurt) and multiprocessing (for CPU-intensive work), and foun
35.
▲
by
dgrunwald
5y ago
UNC paths like //server/share/ are perfectly fine.
36.
▲
by
dgrunwald
5y ago
What's being removed in C23 is the ancient K&R syntax for function definitions: int max(a, b) int a, b; { return a>b?a:b; } My understanding is that C23 does not change the meaning of function declar
37.
▲
by
dgrunwald
5y ago
We don't need to store the metadata differently. The on-disk format is still unambiguous: the part after the last dot is the extension. It's only the graphical display that is ambiguous, because the last dot is not necessarily the
38.
▲
by
dgrunwald
5y ago
Operator overloading has been traditionally overused, especially in C++ (shift operators for iostreams, C++ iterators). Java was the peak of the push-back against that. C# has operator overloading, but forbids many things that were possible
39.
▲
by
dgrunwald
5y ago
You're assuming the police are nice and quickly announce when they haven't found anything. The more likely outcome is that it takes several months until the case is dropped silently.
40.
▲
by
dgrunwald
5y ago
cmov itself isn't slow, it has a latency of 2 cycles on Intel; and only 1 cycle on AMD (same speed as an add). However, cmov has to wait until all three inputs (condition flag, old value of target register, value of source register) ar
41.
▲
by
dgrunwald
5y ago
No, it's from left to right. It's basically just syntax for a series of dup2() calls. "4>&1 1>/dev/null" means: streams[4] = streams[1]; streams[1] = open("/dev/null");
42.
▲
by
dgrunwald
5y ago
Unfortunately you have to choose what you want your C compiler to be. It can be little more than a macro assembler that preserves "the obvious" behavior of undefined constructs on the target platform. Most compilers will do this b
43.
▲
by
dgrunwald
5y ago
There are 64 bit systems where "long int" still is only 32 bits. (most importantly: Windows x64) In general, the C integer types cannot be relied upon; typedefs like uint32_t, size_t, ptrdiff_t should always be preferred.
44.
▲
by
dgrunwald
5y ago
Well it depends on your use-case. We have a large (1-20 GB), complex in-memory C++ data structure that's getting read by Python code. "Just use multiprocessing" just doesn't work in this situation. We can't afford t
45.
▲
by
dgrunwald
5y ago
You're assuming `int` is 32-bits. The fact that C implicitly promotes to `int` makes it extremely hard to use the stdint.h typedefs without accidentally making platform-specific assumptions. uint16_t a, b, c; a = 50000; b =
46.
▲
by
dgrunwald
5y ago
But both the original question and that article were about XHTML. The non-well-formed mess only matters for HTML, not XHTML. The regex is a valid answer to the stack overflow question.
47.
▲
by
dgrunwald
7y ago
As someone familiar with the Python C extension API, I somewhat doubt that it'll make 3.9 either. Disclaimer: I'm only familiar with CPython as a user of the extension API; I have no idea on how the Python team plans to address th
48.
▲
by
dgrunwald
9y ago
rust-cpython will most likely stay abandoned; I rarely have the time (or interest) to work on it. The commit today was me just finally finishing up a change I started in February... What happened with the fork: in May @fafhrd91 contacted me