News for hackers. Stuff that matters.

oliverkwebb

Re:The CSS Handbook, 2025 edition on Tuesday September 23, 2025 @04:31PM (#45352366)
You should be posting a link to https://flaviocopes.com/books/ or https://flaviocopes.pages.dev/books/css-handbook.pdf

The mailing list thing just sends you a public url. There's really no need to subscribe to it

Re:How the Tz Database Works on Thursday September 11, 2025 @11:47PM (#45218489)
Related, I have written about the formatting of the TZ database and other representations before: https://gitlab.com/libtime/documentation/-/wikis/Timezones
If the editor focused on becoming an IDE instead of being idiot-proof and cleanly designed, what would distinguish it from the 1,000 other editor projects?
It's nice to see an editor that explicitly isn't an IDE and is more something like notepad. often when editing config files and the such, it's more convenient to use something like notepad than it is to use something like VSCode.

This editor doesn't have delusions of grandeur, it focuses on usability more than features. and it is better for it.

Re:Fun with Telnet on Tuesday June 17, 2025 @07:42PM (#44305165)
JPL provides a data generation API that you can telnet into: https://ssd.jpl.nasa.gov/horizons/ to get the positions and whatnot of asteroids, planets, spacecraft, etc.
Thank you! I accepted it
This is also interesting for speed, The algorithms ran by all the impls are identical, but sacrificing speed for cleanliness and adherence to spirit is done regularly.

Without having actually measured, the rust impl probably runs faster than the C impl, but that's not because rust is "faster" than C. That's because I used a closure with one call to floor() for modulus in rust, whilst in C I did 2 fmod()'s to get it because the alternative would've been to make the code unreadable or add a second function/macro (although thinking about it now, undef does exist...)

This discrepancy with time is explained in the book the algorithm is based on (Practical Astronomy with Your Calculator, which also does a good job explaining a ton of other ideas and models in astronomical calculation).

January 0th makes sense because a year starts on January 1st. You count days of the year from 1 instead of from 0. So if we are going by the day of the year, day 1 of the year should be Jan1, the consequence of this being that Jan0 exists and is Dec31 of the prev year.

I originally got into this because of my status bar on i3, hacking together C code from moontool into https://github.com/oliverkwebb/moontool about a year back.

Older »