💾 Archived View for rawtext.club › ~sloum › geminilist › 001814.gmi captured on 2020-10-31 at 02:32:15. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
Sean Conner sean at conman.org
Sat Jun 20 09:19:03 BST 2020
- - - - - - - - - - - - - - - - - - -
It was thus said that the Great Luke Emmet once stated:
Hi Sean
Thanks for the new tests - I think they are all reasonable, even the
last one.
Heh, I was a bit worried about that last one.
I just ran them on GemiNaut and I believe it is doing the right thing
for all of them, which is to wrap at the word, hyphen or soft-hypen.
There is a Unicode Line Breaking Algorithm:
https://www.unicode.org/reports/tr14/
Warning: it's long. Longer than the Gemini specification, and it's init's 13th revision. This is *not* an easy problem.
But
I shouldn't claim much credit, I'm just using a system control to
display the text content, which does the hard work of rendering the
unicode into the display.
For tests 43, 46 and 49, it is unclear in the test what you expect
should happen.
I think "not crash" is a good starting point. Past that, it's up to theclient. The way I've done it (in my gopher client) is to just simply wrapthe text (being careful to not break between a glyph codepoint and acombining codepoint). Given this:
LoremipsumdolorsitametconsecteturadipiscingelitInlaciniasemperfringillaDonecvehiculafermentummaximusAliquamegetfelisquamCrasegetullamcorpernuncSuspendisseidlaoreetrisusUtaerosmiMaurisaloremposuereelementumjustosedpellentesquequamAeneansagittisquameupretiumporttitorInnecsemaenimvehiculafaucibusAeneanluctusnonloremacblanditIntegertinciduntlectusnecpulvinarcongueestenimpharetraliberoutgravidadolorneque
And a "screen width" of say, 40 characters, you end up with:
LoremipsumdolorsitametconsecteturadipiscingelitInlaciniasemperfringillaDonecvehiculafermentummaximusAliquamegetfelisquamCrasegetullamcorpernuncSuspendisseidlaoreetrisusUtaerosmiMaurisaloremposuereelementumjustosedpellentesquequamAeneansagittisquameupretiumporttitorInnecsemaenimvehiculafaucibusAeneanluctusnonloremacblanditIntegertinciduntlectusnecpulvinarcongueestenimpharetraliberoutgravidadolorneque
Leaving it as one line and side-scrolling is another valid method. There's not much you can do in the face of such input.
Do you just want the client to confirm it doesn't barf on
the content, but can display it somehow?
Pretty much. I figure if the client doesn't crash, and does The RightThing (even if for some tests quite arbitrary what The Right Thing is), thenit's good to go.
A suggestion for a possible improvement - it would be helpful if there
was a "back to tests index" link on each page, that way you can choose a
few tests from the index, then go back to the index when you are done -
otherwise you might have to go back N times, which is not quite as nice.
Sounds like a good idea. I'll probably have them added in the next day orso. Thank you for the suggestion.
-spc