Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hvdijk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
hvdijk
6y ago
This is clearly not one of the examples saagarjha was thinking of, but an actual example where Rust is not an option is the x32 ABI for x86_64 platforms. This ABI works well with GCC, but LLVM suffers from multiple code generation bugs. As
242.
▲
by
hvdijk
6y ago
It's much closer to that than any alternative I am aware of, but that's one guarantee you don't have. It's important to limit your substituters (binary caches) to trusted servers, because Nix does not and cannot verify t
243.
▲
by
hvdijk
6y ago
For anyone currently using a GUI mail client where HTML mail works out of the box, this is not something they will spend time figuring out before concluding that HTML mails just don't work. And this is a complete non-starter for those
244.
▲
by
hvdijk
6y ago
Heh, true. It's pretty clearly meant to mean that the constraints for simple assignment apply as constraints for initialization too, but if you were to argue that the constraints of simple assignment are imported as semantics for initi
245.
▲
by
hvdijk
6y ago
For GCC and clang, while -Werror turns all diagnostics into errors, even those for valid code, -pedantic-errors will only turn the standard-mandated diagnostics into errors. This is the only reliable way I know of to determine whether the c
246.
▲
by
hvdijk
6y ago
You're correct that initialization is not assignment, but the assignment section is still the relevant place to look: the initialization section says "the same type constraints and conversions as for simple assignment apply".
247.
▲
by
hvdijk
6y ago
Nope, C doesn't allow such assignment even then. You're thinking of casts. For casts, the C standard requires that a pointer to a struct can convert to a pointer to its initial member and vice versa, this is specified under "
248.
▲
by
hvdijk
6y ago
A bare cc (or gcc or clang) invocation is not meant to be standard-conforming and will both reject standard-conforming code and leave out standard-mandated diagnostics. To accept all standard-conforming code, you need the -std=c[...] option
249.
▲
by
hvdijk
6y ago
"Compatible type" is defined in the standard as well. It doesn't mean "whatever the compiler thinks is compatible", it's what the section "Compatible type and composite type" defines as compatible. Di
250.
▲
by
hvdijk
6y ago
> I don't think the standard explicitly forbids it. I already wrote exactly where the standard explicitly forbids it in the message you replied to.
251.
▲
by
hvdijk
6y ago
It specifically makes the false claim that ISO C requires it to not be rejected, right there in what you quoted. ISO C requires no such thing. ISO C requires compilers to diagnose it and allows them to choose whether to accept or to reject
252.
▲
by
hvdijk
6y ago
struct Meow* p_cat = (struct Meow*)malloc(sizeof(struct Meow)); struct Bark* p_dog = p_cat; > Most compilers warn, but this is standards-conforming ISO C code that is required to not be rejected Bollocks. That is a constraint v
253.
▲
by
hvdijk
6y ago
The title is accurate and does not make assumptions about intent. Even as an accident, it is still using the Internet Archive as a CDN.
254.
▲
by
hvdijk
6y ago
Yeah, I raised this on the mailing list almost a year ago. The people maintaining TinyCC know about it but don't care enough to take action.
255.
▲
by
hvdijk
7y ago
One of the things that impressed me greatly when I used CDE years after using more modern desktop environments was how easy it was to use everything without a mouse. Modern desktop environments do let you do everything without a mouse, but
256.
▲
by
hvdijk
7y ago
One of the requirements for Open Source Software according to the Open Source Definition is that you can use it for any purpose: "No Discrimination Against Fields of Endeavor". It makes sense to interpret "open-source data&qu
257.
▲
by
hvdijk
7y ago
Regardless of whether that is true, if law is modified for a specific purpose, that does not imply that its effects are limited to that specific purpose. If fair use was added to ensure copyright law would not violate the first amendment, i
258.
▲
by
hvdijk
7y ago
The standard doesn't say dereferencing a null pointer is invalid. The fact that it gives it as an example of undefined behaviour is a defect in the standard. In the discussion on core language issue #232, the intent has been explicitly
259.
▲
by
hvdijk
7y ago
You are allowed to dereference a null pointer, but you are not allowed to access the result or use it as an initialiser for a reference. You can only immediately discard the result, or immediately take the result's address. Using std::
260.
▲
by
hvdijk
7y ago
The problem was not with a random someone wanting to make a change to version 1, it was with the project wanting to make a change to version 1. That is not a downstream problem.
261.
▲
by
hvdijk
7y ago
Macros cannot expand to preprocessing directives. This does not result in a #error-directive, this just results in a syntax error because of an unexpected # token. A better definition would be something that highlights that message in the e
262.
▲
by
hvdijk
7y ago
daemontools does not support "start service B once service A is up and running", it can only do "start service A before starting service B". For services that take a while after starting before they are ready, such as da
263.
▲
by
hvdijk
7y ago
This is true, but I do not see in the spec that something like that is the only time 501 should be returned. Am I just overlooking something?
264.
▲
by
hvdijk
7y ago
A common enough recommendation that I tried to follow back when I did web development was that the core of a web service should not even be seeing the requests of users that are not allowed to access the service at all, there should be a la
265.
▲
by
hvdijk
7y ago
This has some paths I did not expect, such as having an unauthorized request to an unimplemented method return 501 Not Implemented rather than 401 Unauthorized. Does HTTP really specify that, or does it allow either and does the flowchart j
266.
▲
by
hvdijk
7y ago
Not everything else. One particular thing cmake does not do well that bugs me quite a lot is supporting source code generators, especially in cross compilations, where those source code generators are themselves written in C or some other l
267.
▲
by
hvdijk
7y ago
I think that last point illustrates the problem: you base your idea of "professional" on the professionals you have worked with or whose code you have read, who might not write such things. At the same time, in code I have read, I
268.
▲
by
hvdijk
7y ago
C has the named operators as macros in <iso646.h>.
269.
▲
by
hvdijk
7y ago
Nice "No true Scotsman" logic there. Sure, if you see multiple question marks as an indicator of unprofessionalism, then by definition, no professional would use that. At the same time, your definition of professional is not one t
270.
▲
by
hvdijk
7y ago
intptr_t is special though. intptr_t has the property that any void pointer can be converted to it and back again to produce the original value. This is in the specification for intptr_t (7.20.1.4), not the general language rules, so it is
More ›