Recent submissions

Comment · 2 years ago
First place I read about this idea (specifically newlines, not in general trusting trust) was day 42 in https://www.sigbus.info/how-i-wrote-a-self-hosting-c-compile...

"For example, my compiler interprets "\n" (a sequence of backslash and character "n") in a string literal as "\n" (a newline character in this case). If you think about this, you would find this a little bit weird, because it does not have information as to the actual ASCII character code for "\n". The information about the character code is not present in the source code but passed on from a compiler compiling the compiler. Newline characters of my compiler can be traced back to GCC which compiled mine."

Comment · 3 years ago
I used the pyautogui library on Linux. Then just a simple loop with an incrementing angle, with some overshoot in the end in order for the webpage to recognize that the circle was complete. First time using the library, worked pretty well, except I had to figure out that I had to use pyautogui.PAUSE = 0 to make it not pause between mouse movements.
Comment · 3 years ago
By cheating with a Python script to move the mouse, I managed to get 99.9%. Seems difficult to get higher than that, perhaps due to the mouse position having integer coordinates.
Comment · 3 years ago
But almost no company complies with the law anyways. They need to have a "reject all" button; a "more options" button is not enough. So any company that has a cookie banner without a "reject all" option might as well not have a banner at all.
Comment · 3 years ago
What is the point in implementing a cookie banner if you are still breaking the law in an obvious way? Why not just break the law by not having a cookie banner? That way it would at least be less annoying for your users.
Comment · 4 years ago
Another fun one:

  struct { long unsigned a : 31; } t = { 1 };
What is t.a > -1? What about if a is instead a bit-field of width 32? (Assuming the same platform as in the quiz.)
Comment · 4 years ago
ANSI describes why in their rationale: https://www.lysator.liu.se/c/rat/c2.html#3-2-1 .

    The unsigned preserving rules greatly increase the number of situations where unsigned int confronts signed int to yield a questionably signed result, whereas the value preserving rules minimize such confrontations.  Thus, the value preserving rules were considered to be safer for the novice, or unwary, programmer.  After much discussion, the Committee decided in favor of value preserving rules, despite the fact that the UNIX C compilers had evolved in the direction of unsigned preserving.
Comment · 4 years ago
At least it is still optional to allow for stack allocated VLAs. Which is the attack vector you mentioned.
Comment · 4 years ago
This usage of VLAs is once again mandatory for compilers to support, since C23. From Wikipedia: "Variably-modified types (but not VLAs which are automatic variables allocated on the stack) become a mandatory feature".
Comment · 4 years ago
Comment · 4 years ago
I am Swedish and very much enjoy the meatballs at IKEA. They do not taste significantly worse than homemade or those from a fancy restaurant.

Just as a counterpoint to all the negativity in here.

(To be honest, I have never had a bad meatball. So the problem might be with me. Edit: actually, I tested plant-based meat(?)balls once. They were not good.)

Comment · 4 years ago
Yeah, I didn't mean open access as an insult. I just included it for description. Sorry for the confusion. I have published open access before, so I would be equally guilty in that case.
Comment · 4 years ago
I recognize most of the names of the authors. Thus I am not very surprised about their conclusions. Nothing is actually new in this article. It is mostly incoherent writing, with some conspiracy theories thrown in. The usual stuff that has been coming from these authors since the beginning of the pandemic.

And for those confused: this is not published in nature, but in an open access journal owned by nature: "Humanities and Social Sciences Communications". This is not a subsection of Nature, and is rather obscure. I find it unclear what kind of peer-review has been done, but it has certainly not been done well.

This is not some kind of scientific proof of the "Swedish strategy" being crime against humanity. Merely a oddly placed opinion piece.

Comment · 4 years ago
For each specific fusion reaction there is an optimal temperature (for maximum reactivity). Usually around a billion kelvin or so, plus or minus a few orders of magnitude.
Comment · 4 years ago
So you think it is reasonable to spread what is essentially a conspiracy theory? Why should I not trust a public library that it is difficult to find a replacement for a Russian-speaker willing to read stories for children?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton