4 ms·
Some reason probably being that it's easier
by andreareina 1y ago
Some reason probably being that it's easier
- noduerme 1y agoyet an incredibly basic and stupid oversight when the only point of your site is to show the phase of the moon. I'm voting that this was vibe-coded by an LLM on behalf of someone who not only didn't write the code but didn't bother to look at a picture of the moon or look at the sky before deploying it. If so, it's almost the perfect Platonic example of "what could possibly go wrong?"
- bstsb 1y agoin this case the code is publicly available on github and it doesn't have any obvious hallmarks of LLM generation. (for example the comments are all capitalized, there's inconsistent indentation)
- kingstnap 1y agoThe math isn't that bad if anyone wants to do it properly. Assume y vertical and x horizontal and z out of the page. The moon is a disk. x^2 + y^2 <= R^2 For all the points, calculate z = sqrt(R^2 - y^2 - x^2) Let the vector v(theta) = <sin(theta), 0, cos(theta)> point to the Sun. Points <x,y,z> • v(theta) >= 0 should be bright, The rest dim.
- JdeBP 1y agoNow achieve that when your implementation constraint is that you're using JavaScript to style a <div/> element. (-: * https://github.com/Sean-93/asciimoon/blob/main/src/components/ASCIIMoon.astro#L35 https://github.com/Sean-93/asciimoon/blob/main/src/component...