News for hackers. Stuff that matters.

Tronchenbiais

"Did you realise that no matter the outcome, everyone who picks red can never die? Let's all pick red and not die!"

Seems pretty easy to me.

Just below the screenshot.
Re:A viable solution for Python concurrency on Saturday October 16, 2021 @10:09AM (#28887989)
Regarding the implementation of this, I am surprised by the use of the least significant bits of the local ref count to hold what are essentially flags telling whether the reference is immortal or deferred. This sounds like a ugly hack, and as pointed out by the article, will break existing C code manipulating the count directly without using the associated macros (although arguably, doing this is unspecified, and really it's their fault).

My guess is that this was done for memory efficiency, but is there really no way to have the local refcount be a packed struct or something, where the "count" field holds the real ref count and the flags are stored separately? I have no understanding of the CPython internals, so it may very well be impossible, but I would appreciate someone explaining why.

Re:Six reasons the EU should force the iPhone to use USB-C on Friday September 24, 2021 @06:54AM (#28640760)
There is a variant of this attack for Apple Lightning USB cables. It is featured in the article you linked.
> Would be happy to hear if you have suggestions for that :)

I would just make sure everything uses simple parameters. The "Making Waves" puzzle is easy to figure out by trial and error, because the values to guess are simple.

One thing that is particularly hard to guess is the "Spiraling into control" puzzle, because the parameters you have to guess are tied to the value of the time increment for drawing the curves. The parametric equation to that curve is currently :

x(t) = 8 + t * cos(A * 2 * PI * t)

y(t) = 8 + t * sin(A * 2 * PI * t)

where A is the ratio between the `t` increment (0.4) and the angle increment (PI/36) (or is it the other way around?). That ratio is just too hard too guess. I would just rewrite the solution to make the constant A easy to guess, so that people writing code with different increments and just playing around with the constant can eventually figure it out.

The Ying-Yang one is harder to simplify, because the result will not look as good. Maybe add an hint?

I just finished solving the puzzles. Overall I really enjoyed the game.

The only thing I did not like was that for certain puzzles, such as the Ying-Yang one, coming up with an idea that will solve the puzzle is quite straight forward, but figuring out the parameters you used for some of the curves can take a long time.

The Ying-Yang problem has no hints and I had to use two different sine waves for the upper half and the bottom half of the screen, just because I couldn't guess which one you used. I also tried solving the "spiraling into control" one without looking at the hints, and was unable to.