News for hackers. Stuff that matters.
Re:How a Single Line of Code Made a 24-Core Server Slower Th... by pkolaczk on Friday December 31, 2021 @07:37AM (#29747488)
Indeed, will fix it, thanks. Never happened before to me on HN before, but you're right - my site is incorrect - will need to change the way I generate it.
Re:How a Single Line of Code Made a 24-Core Server Slower Th... by pkolaczk on Friday December 31, 2021 @08:20AM (#29747723)
I fixed it but will HN pick up the change? The "edit" doesn't allow to change the URL. Is it ok to delete it and repost?
Re:How a Single Line of Code Made a 24-Core Server Slower Th... by krapp on Friday December 31, 2021 @08:29AM (#29747821)
It occurs to me that this feature might be better implemented as an optional element in a preview, giving authors the opportunity to choose between their own URL and the canonical one before publishing.

or HN should double check that the canonical URL connects and leads to the same content (checking for multiple schemes and localhost should be done anyway) (downside - now every post eats up two HTTP request/response cycles, one to parse for the canonical url and another to validate it)

or HN should use the author's URL but present a canoncial URL elsewhere when displaying the thread. (downsides, slightly more noise in the layout, no actual quality check.)

Re:How a Single Line of Code Made a 24-Core Server Slower Th... by detaro on Friday December 31, 2021 @09:43AM (#29748447)
seems someone else reposted in the mean time, for the future: yes, reposting if theres something obviously wrong with the first attempt is fine.