-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: a convention for multiline statuses (line breaks) #157
Comments
This requires mandating the yarn.social extension of keeping the feed chronologically sorted past to future. Compare this to the twtxt format:
Not even a specific ordering was not mandatory, there was no chronological order recommended either (i.e., past to future vs. future to past). Note that this will also need careful implementation to maintain compatibility with a future scheme that references posts by the feed URL (or follower nick) and the timestamp in combination, since timestamps may no longer be used as a primary key. |
The added complexity and burden on clients makes this proposal more difficult to adopt than a simple replacement of the Unicode new line code point |
I am not suggesting that. My proposal only suggests that statuses with the same timestamp be displayed first-to-last-line when they are sequential in the file. This does not affect the overall structure of the file. It is fully backwards compatible. This is a valid use of the convention:
Isn't this already the case? Timestamps are not guaranteed to be unique.
This proposal's advantage is that it does not require Unicode on both the writer and the reader side, an editor that can preserve In an imperative programming language the client burden amounts to tracking whether the previous line has the same timestamp as the current line when reading a text stream. It is greater than the burden of splitting the status text on I'll also note that this is not an either-or thing: a single client can support both this convention and |
This is true we could support both forms 👌 |
I see that the official client truncates status text on It does illustrate a problem with
To be clear, I know the spec mandates UTF-8. I mention this as a practical advantage for partially compatible clients, for example, on old devices. (I meant to write a client for FreeDOS but never got to it.) |
You may be living in parts of the world where English is the only language spoken. For almost any other language, some part of your alphabet will contain accented characters that can only be represented in Unicode. I do not find it wise to develop software that lacks at least basic support for it. Note that even for a Linux/BSD command line application, you can just copy the byte stream from the file to the output as the terminal emulator or frame buffer will handle it for you. If you used a standard library or compiler without UTF-8 support, you could also just split on the 3-byte sequence of Note that most DOS-based computers lacked TCP/IP and Internet access, so I find this retrocomputing experience oddly anachronistic. Why not develop for some grounds up alternative that is still maintained (BSD, Haiku, Redox, SerenityOS, OpenWrt, MenuetOS, AROS)? |
I agree you should support Unicode on modern systems. On most old systems it is awesome if you do, but it is the norm that you don't. A discussion about what retro and hobby operating systems are better would be out of place here.
Yep.
This would have probably been a better choice than |
@prologic Could you migrate from |
Note that we may consider to implement a subset for HTML to serialize rich text markup (i.e., line breaks in this case) similar to how it had been done in ActivityPub (and most previous protocols on The Fediverse), Matrix, XMPP and others. Surely it always just boils down to a subset of HTML. In our case, this subset could be:
Even a simple hand-made parser can be implemented in a forgiving manner if one forgets to escape. For example, by restricting interpretation to only known tags and without allowing whitespace between In my proof of concept enhanced twtxt-client, I actually implement it like this, along with a subset of tags easy to implement that correspond to the most often used ones in CommonMark/gemini ( It's actually interesting how many GUI widget toolkits support native interpretation of a subset of HTML for rich text formatting without resorting to embedding a full-blown web browser engine: |
I'm not sure what you mean exactly? 🤔 |
I mean to ask, would it be possible for you to switch from the character |
Ahh, what I'm not sure about is where we do this (in the actual feed itself) or in a version of the feed for better backwards compat. The only issue I see with this is it might break the Markdown parser and cause unintended side-effects. I'd have to test this. As an aside, we're already talking about the merits of proving a |
I wouldn't like to comment on the specific forking effort, but generating a frugal feed for each rich yarn.social account sounds like a sensible and easy option. The frugal feed would be much more useful than what you imply above. Let me elaborate about the features of such a frugal feed. A status may be longer than 140 characters - no hard limit was ever defined similar to Twitter:
I recommend replacing the blake-hash in the subject with the character-exact timestamp of the message you are replying to. My client supports threading by both blake-hash and by a combination of timestamp & user mention - whichever is present. Adding a user mention of the previous post in the same thread along the root post is also considered good manners, this might benefit from synthesis during conversion. I'm not sure I'd keep the extended What you seem to be missing without markdown is inline images. But if you still included the bare URL of the image, a client could decide to show it inline anyway or just autolink it. That's precisely the way I do it in my client:
|
Oh, and just a bit more thought about Similarly, how is one supposed to type in the corner case of an @-sign at the end of the line (i.e., producing the phrase
Hence |
This does not take into consideration the "network". You cannot have a threading model whereby you either have to a) keep a global id somewhere (counter to a decentralised system) or b) a high rate of collisions (such as a timestamp in one feed that collides with timestamps in all other feeds) |
This hasn't been the case for years. Simple |
Anyway, I'm happy to explore @dbohdan 's original suggestion here of using "same-timestamp" as multi-line posts and/or use of |
@prologic The recommendation of replacing the blake-hash was for the frugal feed you produce for every yarn.social feed. You can do whatever you want within the legacy yarn.social feed. Please also read the fine prints again: I told you that I connect threads using both the timestamp and the user mention at the beginning of a post, and there can be no collision with that. Incidentally, this scheme was recommended to you years ago in your issue tracker by users, but you went with blake-hashes anyway and claimed that you liked the idea but couldn't "change" it. Recall the example I gave you in the past:
Note that I also support abbreviating user mentions of followers as @joke @lola but that's beside the point here.
|
I would like to propose to a convention for multiline status updates or newlines in the twtxt format. The convention is backwards compatible with clients that do not support it. The conventions is: when the client sees a sequence of statuses with the same timestamp, join their text with a newline. A feed following this convention looks reasonable in a client that does not understand it as long as the client displays statues with the same timestamp in the order they appear.
For example, twtxt currently renders
as
If support for this convention was implemented, twtxt could render the same file as
I have implemented the convention in my twtxt.tcl library and GUI feed reader. I have also made a page explaining it (pretty much like this issue does).
What do you think?
The text was updated successfully, but these errors were encountered: