HN user

ynfnehf

247 karma
Posts0
Comments59
View on HN
No posts found.
Whence '\n'? 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."

Perfect Circle 4 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.

Perfect Circle 4 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.

Integers in C quiz 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.)
Integers in C quiz 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.

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.)

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.

How is that any different than reversing the English digraphs? "th", "ch", "wh", etc. Reversing English doesn't usually produce something meaningful either.

49% of infected having symptoms a year later is ridiculous and obviously not true. Unless you define symptoms extremely broadly.

I have not read the study you are referring to. Are you sure it is not specifically about hospitalized patients? Even then it sounds extreme.

But you are right that vaccines are clearly better when given a choice.

Those specific quotes (or rather direct translations of quotes) were said in regards to bad integration policy (by Stefan Löfven in 2015 and 2019).

There has probably been said things with similar sentiment in regards to the pandemic. But not those two specific ones.

Even though I agree OP is pushing a narrative a bit too much, your correction is also wrong. Since these were not said during the pandemic.

Your math is off by an order of magnitude. 40Gbps/100Mbps=400.

It should also be able to handle at least 4000 customers (10x) through oversubscrpition.

You don't actually need two arrays to implement your idea. Since the combined size will be constant, just one array with an index indicating the split is enough.

When moving cards from one side to the other a lot of elements will have to be moved around. But for small n it should be much faster than using linked lists. And also relatively easy to implement in C.

The shifting of elements when inserting can be avoided by only swapping two positions. (ABXDEFC instead of ABXCDEF, when inserting X into ABCDEF). But by then you have just reinvented Fisher-Yates.

So the swapping in some of these algoritms is basically an implementation of your idea.

I'm still sceptical if there even exists a successful welfare state that does not rely on natural resources, or the aftermath of some war.

I was referring to this. Both Denmark and Finland were to a large extent involved in WW2, and neither have natural resources of the same kind as Norway.

Or is your opinion that they are not successful welfare states?

The _t suffix is also reserved by posix. (And by the C standard if the name starts with int or unit.)

I agree with just using struct foo, as does the Linux style guide.

(Edit: I just noticed the page mentions this, but it is perhaps useful to reiterate.)

Cases are not the same thing as infections. Comparing cases between countries doesn't work, even when corrected for positivity rate. Deaths should be a more fair comparison. Then there are a lot more countries with higher death rate.

I didn't mean that it is fair to compare a metropolis to Sweden when it comes to "who did the right thing". But it is a fair comparison when considering the effects of longcovid.

Sweden only stands out when compared to Nordic countries, not when compared to the rest of the world. Thus bad effects from longcovid should be more visible in harder hit places.