4 ms·
What a ridiculous idea. As hard to read as it is dumb! For a senior engineer like myself with decades of experience it is trivial to see how to fix this to m
by gorgoiler 6mo ago
What a ridiculous idea. As hard to read as it is dumb!
For a senior engineer like myself with decades of experience it is trivial to see how to fix this to make it much more readable.
1/ pick a sunny day
2/ at each hour, measure the bearing to the sun
3/ encode as a dict[str, float] e.g.
{“twelve”:180.00}
4/ sort the hours by dict.get
Voila.
As an added bonus, for some reason this ends up sorting the minutes and seconds too. (“# wtf?!”)
For now, I was only able to fix the hours when I could see the sun (eleven, twelve, and two to eight — I don’t get up very early and I like lunch). Patches form the arctic circle welcome :P
I also need to tilt my head a bit as eleven is at the top instead of twelve. Other than that I would say it’s a considerable improvement on the OP’s rather naïve implementation! Scoff!
- eru 6mo agoHere in Singapore on many sunny days, the bearing is largely the same hour after hour. The sun just changes apparent altitude.
- fellerts 6mo agoJam a stick in the ground aligned with the earth's axis and take your bearing from the shadow's direction. Then follow GP's instructions. Never mind that we've reinvented the sundial...
- eru 6mo ago> Jam a stick in the ground aligned with the earth's axis [...] You mean place a stick flat on the ground? (Singapore is pretty much on the equator.)
- marginalia_nu 6mo agoThe closer you are to the equator, the taller the stick needs to be. If you're really close, the height requirements diverge, and the stick is at this point technically more of a space elevator[1] than a stick. But don't lose hope, just tell Bezos that Musk wants to fund your space elevator, and vice versa, to goad one of them into funding your $10tn near-equatorial sundial boondoggle. [1] https://en.wikipedia.org/wiki/Space_elevator https://en.wikipedia.org/wiki/Space_elevator
- eru 6mo agoA space elevator is not aligned with the axis of earth's rotation. It sounds like what you are describing is a different device?
- marginalia_nu 6mo agoWhy would a sun dial need to point in the north/south direction? It just needs to point up along the normal axis of the ground (assuming flat ground).
- eru 6mo agoFrom the original comment I replied to: > Jam a stick in the ground aligned with the earth's axis and take your bearing from the shadow's direction.
- marginalia_nu 6mo agoAh, that comment would be incorrect.
- deleted 6mo ago[deleted]
- rich_sasha 6mo agoYou could make either method more secure by hashing the encoded time and displaying that. Make sure to use a cryprographically-secure hash function and a strong salt.