HNHacker News
TopNewBestAskShowJobs

symmetricsaurus

523 karma · joined October 11, 2012

submissionscomments
symmetricsaurus··on Carrier Landing in Top Gun for the NES
Don't think there was ever a Top Gun for Virtual Boy.
symmetricsaurus··on A string formatting library in 65 lines of C++
Pretty neat and a very nice walkthrough of the code.

For localization you might want numbered holes which makes it way more complicated.

You can detect if the backing buffer is too short, but can you detect other errors? Like having different numbers of holes and arguments? I couldn’t find any discussion about this.

symmetricsaurus··on Caesar's Last Breath
Well actually, air molecules (N2, O2) are indistinguishable. This means that they are fundamentally interchangeable with each other and it’s not well defined what ”same” molecules mean. You can’t label the individual molecules.

It’s of course possible to track a single molecule if you really try hard. But this hasn’t been done since Caesar's time and the molecules have mixed. Even if we knew the exact state of the universe right now and could play back time perfectly it would be impossible to say that some particular molecules were part of his last breath.

symmetricsaurus··on CLion Is Now Free for Non-Commercial Use
Doom Emacs (https://github.com/doomemacs/doomemacs)
symmetricsaurus··on VVVVVV Source Code
Second this recommendation!

It’s a super fun game to learn. It looks impossible to start out but then your brain adapts. It’s like seeing through the matrix.

symmetricsaurus··on James Webb Space Telescope reveals that most galaxies rotate clockwise
The result is only significant to 3.39 sigma. Pretty good chance this is just a random fluctuation that will go away if you look at more galaxies.
symmetricsaurus··on Ask HN: What's the most creative 'useless' program you've ever written?
Also first click is never a mine (if there's one where you click it's moved to the top left corner).
symmetricsaurus··on Starcraft (A History in Two Acts)
Apparently smart triangulation of the game world, A*, plus boids pretty much.

https://www.gdcvault.com/play/1014514/AI-Navigation-It-s-Not

symmetricsaurus··on Interview with Andreas Kling of Serenity OS (2022)
Should have a (2022) perhaps this post?
symmetricsaurus··on Ron Patrick's Street-Legal Jet Powered Volkswagen Beetle (2006)
Volvo did this back in 1992 but only as a concept vehicle https://en.m.wikipedia.org/wiki/Volvo_ECC
symmetricsaurus··on A CD Spectrometer (2006)
In my high school physics class we measured the pitch between the tracks of a CD using the same principle. You just need a light source with a known wavelength, like a laser. It was a pretty cool experiment!
symmetricsaurus··on Circles rolling on circles (2014)
Yes I’m thinking in terms of different frames of reference.

Imagine that you’re a tiny ant that lives on the large circle. When you push the small circle around the large circle you will see it make four rotations before you get back to the starting point. This is the local frame of reference.

Now imagine you’re a giant living in the space with the circles. You see the small circle do five full rotations. Four are the same that the ant sees but you also see the ant itself do one rotation simultaneously as it walks along the large circle making five in total.

It would be more accurate to say that you have 4 local rotations and that the local frame rotates one full turn in the global frame.

Does this make sense to someone with a high-school level of geometry knowledge? Not as I wrote it I initially (but there was no such goal). The analogy with the giant and the ant together with some nice illustrations maybe?

symmetricsaurus··on Clever code considered harmful
Making code simple is not easy.

In your analogy I think the listener should be the junior programmer. Music by Beethoven can be appreciated by many more than just the people who can compose on that level.

In the same way you can write code so that also junior developers can appreciate it. The challenge lies in clearly expressing solutions to complex problems.

symmetricsaurus··on Circles rolling on circles (2014)
Interesting case!

You can see it is R/r local revolutions of the small circle. Then you need to add one global revolution from going around the large circle. So R/r + 1.

This is of course what the article is saying pretty much.

Are there other situations that require a similar reasoning?

symmetricsaurus··on The Fourier Transform, explained in one sentence (2014)
Instead of energy, it should say amplitude(and phase since it’s an inherently complex thing).
symmetricsaurus··on The “Wavefunction Collapse” generation algorithm explained clearly (2018)
You can use it solve sudokus as well [0]. I find the parallel quite enlightening.

[0] https://norvig.com/sudoku.html

symmetricsaurus··on The “Wavefunction Collapse” generation algorithm explained clearly (2018)
Oskar Stålberg has famously used WFC in Bad North and Townscaper.

Here's a nice presentation from him explaining it: https://www.youtube.com/watch?v=0bcZb-SsnrA

symmetricsaurus··on Balloon framing is worse-is-better (2021)
Europe is not uniform in this regard. For example in Sweden almost all houses are built out of wood.
symmetricsaurus··on Recursive Game of Life
The OTCA metapixel has 2048x2048 cells and a period of 35328. That's a total of 18.5 GB. And that's not counting the different states depending on neighbors and on-off-transitioning state.

Even with compression that's a lot of data.

symmetricsaurus··on Recursive Game of Life
Very smooth. Wonder if there are any optimizations like Hashlife going on? There’s a lot of spatial redundancy to exploit.

https://en.wikipedia.org/wiki/Hashlife

symmetricsaurus··on GCC undefined behaviors are getting wild
Yes, and in particular the compiler can assume that you stay within the defined behavior. That's what's enabling the optimization in removing the i < 0 check.
symmetricsaurus··on GCC undefined behaviors are getting wild
There’s no reason to expect the result of integer overflow to be negative, or any particular value at all. It is undefined.

So after checking that x > o there is no way for i (a product and ratio of positive numbers) to become negative.

The only reason this is surprising is that there is an expectation of wrapping on overflow. But this is simply not the behavior of the C virtual machine.

(Maybe today it makes sense to have even C wrap in a two’s-complement way? C is used in many places though, maybe there are still platforms in use that aren’t two’s-complement?)

symmetricsaurus··on Undefined Isn’t Unpredictable
You’re gonna get the same result each time you compile. But if you change _anything_ the results can be completely different. So, I can agree that it’s not a very useful predictability.
symmetricsaurus··on Undefined Isn’t Unpredictable
The situation in C++ is similar. With a particular compiler and with a specific set of compilation flags you can sometimes get predictable behavior even if it's undefined (and sometimes not). But, there are no guarantees and if you change compiler, flags or perhaps even some other part of the code the behavior can change.

Perhaps with out of order CPUs relying on something that is undefined could change based on adjacent instructions also?

symmetricsaurus··on Show HN: Game of Life on non-square topologies with 2^32 update rules
Conway's Game of Life does consider diagonals. Since they start and finish by talking about GoL I think they've made a mistake.
symmetricsaurus··on Show HN: Game of Life on non-square topologies with 2^32 update rules
I don't understand the update rules as described in the readme.

In an 3x3 neighborhood there are 2^9, not 2^5 states. So we should get 2^512 possible update rules, not 2^32.

I think something similar is described in https://conwaylife.com/wiki/Rule_integer.

I'm not sure that all of those rules are valid. We must have translational invariance. One way to do that is to only update the state of the central cell in each considered neighborhood. In that case 2^9 rules are enough. Are there other ways to define consistent rules for a CA?

symmetricsaurus··on Absurd Trolley Problems
Need more complexity: https://spot.colorado.edu/~huemer/trolley.htm
symmetricsaurus··on When FFI function calls beat native C
Previously: https://news.ycombinator.com/item?id=17171252

(Linked from the article)

symmetricsaurus··on Cornell McRay T'Racing
Most probably is rally driver Colin McRae[0], after whom a popular series of rally games are named[1].

[0] https://en.wikipedia.org/wiki/Colin_McRae

[1] https://en.wikipedia.org/wiki/Colin_McRae_Rally_and_Dirt

(edit: formatting)

symmetricsaurus··on Does the Bronze Garbage Collector Make Rust Easier to Use?
> A key tradeoff is that Bronze does not guarantee thread safety

Not having data races is one of the key benefits of using Rust, “fearless concurrency” and all that. So by throwing away a key guarantee of Rust (no aliasing mutable references), it can become easier for learners to program in. It becomes a bit of an apples and oranges situation at that point.

Page 1 of 5Next →