I disagree, though I wouldn't mind adding a mechanism to say that you want signed overflow to be well defined. C23 already requires 2's-complement representation for signed integer types, but signed overflow still has…
Neither this post nor the linked site explain what XCancel is/was. Since I wasn't familiar with XCancel, an announcement that it's suspended is not particularly informative. Apparently XCancel is an instance of Nitter.…
And if a button has appeared on the screen in the last half second or so, assume that any attempt to click it was unintentional (unless it appeared due to an explicit action by the user). Similarly, if a button has…
Does that really mean that the day after 24 March 1750 was 25 March 1751?
The image shows the `eval` on the same line as the `#!/bin/bash`. It should be on a separate line. #!/bin/bash eval "$(base64 -d <<< '...
Strictly speaking it's the ISO C standard. ISO issues each new edition of the standard, and ANSI adopts it. This was reversed for the first standard, which ANSI published in 1989; ISO adopted it, with editorial changes,…
They hadn't yet decided whether to count from 0 or from 1.
If the behavior is undefined, there is no wrong result.
Your code: int a = 5; int b = a++; has well defined behavior. The first line initializes a to 5. The second initializes b to 5 and sets a to 6. (The language doesn't specify the order of the two operations of assigning…
"Test Your C Skills" is a published book by Yashavant Kanetkar, apparently published in 2005, and still available in paperback. The document you linked to appears to be a scan of a printed copy of that book, and is…
Agreed. As a programmer, the solution to "int a = 5; a = a++ + ++a;" is to decide what you result you wanted, and write code that will produce that result, and probably to pass options to the compiler that tell it to…
I don't see the name "thaumasiotes" at that link, nor do I see anything relevant to the code in the title. The behavior of "int a = 5; a = a++ + ++a;" is undefined. There is no guarantee of a numeric result, because…
The Senate?? Any law changing the name of the Defense Department would have to be passed by both Houses of Congress and signed by the President (or by 2/3 of both Houses overriding a Presidential veto). The Senate has…
If you want any kind of non-trivial formatting, use the printf command, not echo.
Like re-introducing wolves into Yellowstone.
The author missed an opportunity for a much shorter solution for the given problem statement. // Check whether a number is odd or even. #include <stdio.h> #include <stdlib.h> #include <stdbool.h> static bool…
I see a huge semantic gap between assembly language and C. An assembly language program specifies a sequence of CPU instructions. The mapping between lines of code and generated instructions is one-to-one, or nearly so.…
Are you sure it's been open sourced? I'm reasonably sure you've linked to a site offering pirated copies. There are several links to PDF versions of the book. None of them include either a copyright page or a statement…
I think you meant to post this comment here: https://news.ycombinator.com/item?id=45481892
OK, but to me a "lockfile" is a file whose existence signals that some resource is locked. https://en.wikipedia.org/wiki/File_locking#Lock_files When I saw the title "We shouldn't have needed lockfiles", I expected…
The author seems to have assumed that readers are going to know that he's talking about NPM and JavaScript, and that "lockfiles" are an NPM-specific feature (to me, it means something completely different). Perhaps…
I use Ctrl-Space. unbind-key C-b set -g prefix C-Space bind-key C-Space send-prefix I find it a lot easier to type than either Ctrl-A or Ctrl-B.
Not officially, but there are a couple of retronyms. Larry Wall originally wanted to call it "Pearl", but found there was already a language by that name, so he shortened it to "Perl". The name is sometimes expanded as…
"If this standard is accepted, if no magic number you have corrected UTF-8." That's true only if "corrected UTF-8" is accepted and existing UTF-8 becomes obsolete. That can't happen. There's too much existing UTF-8 text…
C is a relatively low level language, but it is not assembly language. The difference is clear. Assembly language programs specify sequences of CPU instructions. C programs specify runtime behavior.
I disagree, though I wouldn't mind adding a mechanism to say that you want signed overflow to be well defined. C23 already requires 2's-complement representation for signed integer types, but signed overflow still has…
Neither this post nor the linked site explain what XCancel is/was. Since I wasn't familiar with XCancel, an announcement that it's suspended is not particularly informative. Apparently XCancel is an instance of Nitter.…
And if a button has appeared on the screen in the last half second or so, assume that any attempt to click it was unintentional (unless it appeared due to an explicit action by the user). Similarly, if a button has…
Does that really mean that the day after 24 March 1750 was 25 March 1751?
The image shows the `eval` on the same line as the `#!/bin/bash`. It should be on a separate line. #!/bin/bash eval "$(base64 -d <<< '...
Strictly speaking it's the ISO C standard. ISO issues each new edition of the standard, and ANSI adopts it. This was reversed for the first standard, which ANSI published in 1989; ISO adopted it, with editorial changes,…
They hadn't yet decided whether to count from 0 or from 1.
If the behavior is undefined, there is no wrong result.
Your code: int a = 5; int b = a++; has well defined behavior. The first line initializes a to 5. The second initializes b to 5 and sets a to 6. (The language doesn't specify the order of the two operations of assigning…
"Test Your C Skills" is a published book by Yashavant Kanetkar, apparently published in 2005, and still available in paperback. The document you linked to appears to be a scan of a printed copy of that book, and is…
Agreed. As a programmer, the solution to "int a = 5; a = a++ + ++a;" is to decide what you result you wanted, and write code that will produce that result, and probably to pass options to the compiler that tell it to…
I don't see the name "thaumasiotes" at that link, nor do I see anything relevant to the code in the title. The behavior of "int a = 5; a = a++ + ++a;" is undefined. There is no guarantee of a numeric result, because…
The Senate?? Any law changing the name of the Defense Department would have to be passed by both Houses of Congress and signed by the President (or by 2/3 of both Houses overriding a Presidential veto). The Senate has…
If you want any kind of non-trivial formatting, use the printf command, not echo.
Like re-introducing wolves into Yellowstone.
The author missed an opportunity for a much shorter solution for the given problem statement. // Check whether a number is odd or even. #include <stdio.h> #include <stdlib.h> #include <stdbool.h> static bool…
I see a huge semantic gap between assembly language and C. An assembly language program specifies a sequence of CPU instructions. The mapping between lines of code and generated instructions is one-to-one, or nearly so.…
Are you sure it's been open sourced? I'm reasonably sure you've linked to a site offering pirated copies. There are several links to PDF versions of the book. None of them include either a copyright page or a statement…
I think you meant to post this comment here: https://news.ycombinator.com/item?id=45481892
OK, but to me a "lockfile" is a file whose existence signals that some resource is locked. https://en.wikipedia.org/wiki/File_locking#Lock_files When I saw the title "We shouldn't have needed lockfiles", I expected…
The author seems to have assumed that readers are going to know that he's talking about NPM and JavaScript, and that "lockfiles" are an NPM-specific feature (to me, it means something completely different). Perhaps…
I use Ctrl-Space. unbind-key C-b set -g prefix C-Space bind-key C-Space send-prefix I find it a lot easier to type than either Ctrl-A or Ctrl-B.
Not officially, but there are a couple of retronyms. Larry Wall originally wanted to call it "Pearl", but found there was already a language by that name, so he shortened it to "Perl". The name is sometimes expanded as…
"If this standard is accepted, if no magic number you have corrected UTF-8." That's true only if "corrected UTF-8" is accepted and existing UTF-8 becomes obsolete. That can't happen. There's too much existing UTF-8 text…
C is a relatively low level language, but it is not assembly language. The difference is clear. Assembly language programs specify sequences of CPU instructions. C programs specify runtime behavior.