News for hackers. Stuff that matters.
Re:Go 1.17 Beta by libria on Thursday June 10, 2021 @05:00PM (#27465768)
Ok ok I see it in e.g., https://nn-512.com/browse/NN-512#64.

The anchor tags for the listings go to top instead of being self-referencing. Is that a bug?

Like

    format = `<h3 id="%d"><a href="#0">%s</a></h3>` +
Should be

    format = `<h3 id="%d"><a href="#%d">%s</a></h3>` +
And Fprintf should duplicate a parameter?
Re:Go 1.17 Beta by 37ef_ced3 on Thursday June 10, 2021 @05:04PM (#27465823)
No, that's intended. There's an index at the top of each page. You use the index links to jump down. And if you want to jump back up to the index, you use any of the header links. That makes sense to me. It seems useless for a link to point to itself
Re:Go 1.17 Beta by libria on Thursday June 10, 2021 @06:49PM (#27466921)
> It seems useless for a link to point to itself

Hm. I guess the web has programmed me differently. Say I'm CTRL-F searching through the page and I notice an interesting bit of code and say "Hey I have a question about this". Then I start looking for a shortcut to that one file and assume that shortcut is the nearby <h3> header. I expect this because I've seen this pattern implemented a lot. You could have the <h3> be that local anchor and a short [top] link next to it.

Re:Go 1.17 Beta by 37ef_ced3 on Thursday June 10, 2021 @07:14PM (#27467246)
Yeah, maybe you're right