@lyse@lyse.isobeef.org The one in question is more like the javascript version for unwrapping errors when accessing methods.
const value = some?.deeply?.nested?.object?.value
but for handling errors returned by methods. So if you wanted to chain a bunch of function calls together and if any error return immediately. It would be something like this:
b:= SomeAPIWithErrorsInAllCalls()
b.DoThing1() ?
b.DoThing2() ?
// Though its not in the threads I assume one could do like this to chain.
b.Chain1()?.Chain2()?.End()?
I am however infavor of having a sort of ternary ?
in go.
PS. @prologic@twtxt.net for some reason this is eating my response without throwing an error :( I assume it has something to do with the CSRF. Can i not have multiple tabs open with yarn?
@prologic@twtxt.net @lyse@lyse.isobeef.org First, please leave me your comments on the repository! Even if itās just to give your opinion on what shouldnāt be included. The more variety, the better.
Second, Iām going to try to do tests with Elliptic keys and base64. Thanks for the advice @eapl@eapl.me
Finally, Iād like to give my opinion. Secure direct messages are a feature that ActivityPub and Mastodon donāt have, to give an example. By including it as an extension, weāre already taking a significant leap forward from the competition. Does it make sense to include it in a public feed? In fact, weāre already doing that. When we reply to a user, mentioning them at the beginning of the message, itās already a direct message. The message is within a thread, perhaps breaking the conversation. Direct messages would help isolate conversations between 2 users, as well as keeping a thread cleaner and maintaining privacy. I insist, itās optional, it doesnāt break compatibility with any client and implementing it isnāt complex. If you donāt like it, youāre free to not use it. If you donāt have a public key, no one can send you direct messages.
@movq, @prologic@twtxt.net when navigating to a Yarn. If the head twt is missing then the whole thread is not accessible. It only returns an error. so i have no way to view any of the replies within the thread other than the end twt.
Thank you @prologic@twtxt.net , Iām pleased to be a little āthreadā in the ball of yarn (Twtxt).
After I stripped off my clothes and turned around, I came to the conclusion that the plan to shower was cancelled at this moment. The faucet had broken right off and was laying in the tub. I noticed that the diameters of the hot and cold water pipes were surprisingly small, didnāt expect that. Since the pipes were broken flush with the wall, I couldnāt even determine if I had to remove the inner our outer threads, well, remains thereof, in order to attempt to repair this mess. Luckily, I was going to see a plumber mate at the christmas tree collection later anyway.
The first thing that came to mind when I woke up was that I didnāt catch the logical flaw in my dream: absolutely no water was coming out of the burst pipes. The whole scenario took place in summer, so the water couldnāt be frozen either.
although I agree that it helps, I donāt see completely correct to leave the nick definition to the source .txt. It could be wrong from the start or outdated with the time.
Iād rather prefer to get it from the mentioned .txt nick metadata (could be cached for performance).
So my vote would to make it mandatory to follow @<name url>
but only using that name/nick if the URL doesnāt contain another nick.
A main advantage is that when the destination URL changes the nick, itāll be automagically updated in the thread view (as happens with some other microblogging platforms, following the Jakobās Law)
good morning yarn friends. we need a funny name for yarn posters. whatās something that fits the yarn themeā¦. i mean we quite literally have threads here. yarn threads. how epic is that. now us posters need a funny name too.
@doesnmppsflt@doesnm.p.psf.lt Not sure which bug youāre referring to. š¤ (Did I forget?)
Those long IDs like (#113797927355322708) are simply part of that feed. Looks like the author just dumps ActivityPub IDs into twtxt. I think this used to work in the past, but the corresponding spec (https://twtxt.dev/exts/hash-tag.html) has been deprecated and jenny doesnāt support ā actually, jenny never supported that.
jenny can only group threads by exactly one criterium (because it writes a Message-ID
into the mail file) and thatās the regular twt hash. So, anything else, like people doing ā#CoolTopicā, isnāt possible.
This is the first screenshot, a simple timeline Iām using to check the fields. Now Iām working on some details: avatar cache, relative dates, simple thread, etc.
#emacs #twtxt@prologic@twtxt.net this is epic⦠youāve made a great platform!!! screw big tech we got literal threads here. X, The Everything App, wishes it had literal yarn threads smh my head. also twtxt is so cool like i love that yarn is a frontend for it but also its own thing. all plaintext⦠coolest shit ever
I like the cleaness and indiewebness of using just domains for handles/shorthands similar to blusky, but the situations with more users on the same domain and that people in the fediverse (threads too?) are already familiar with the syntax speaks for webfinger. And since we already got support for webfinger in both yarnd and timeline it makes sense to stick with it.
# nick = skinshafi
so... should I scream buuug ? š¤
@prologic@twtxt.net yeah! If you remember I was curious about how people managed their stuff hosted on a Pubnix (this thread -> #z2ymlkq ) and Iāve just managed to join one ā¦
Bluesky Passes Threads for Active Website Users, But Confronts āScammers and Impersonatorsā
Bluesky now has more active website users than Threads in the U.S., according to a graph from the Financial Times. And though Threads still leads in app usage, āPrior to November 5 Threads had five times more daily active users in the U.S. than Bluesky⦠Now, Threads is only 1.5 times larger tha ⦠ā Read more
I share I did write up an algorithm for it at some point I think it is lost in a git comment someplace. Iāll put together a pseudo/go code this week.
Super simple:
Making a reply:
- If yarn has one use that. (Maybe do collision check?)
- Make hash of twt raw no truncation.
- Check local cache for shortest without collision
- in SQL:
select len(subject) where head_full_hash like subject || '%'
- in SQL:
Threading:
- Get full hash of head twt
- Search for twts
- in SQL:
head_full_hash like subject || '%' and created_on > head_timestamp
- in SQL:
The assumption being replies will be for the most recent head. If replying to an older one it will use a longer hash.
I mean sure if i want to run it over on my tooth brush why not use something that is accessible everywhere like md5? crc32? It was chosen a long while back and the only benefit in changing now is āi cant find an implementation for xā when the down side is it breaks all existing threads. soā¦
Oh boy, Iām looking for trapezoidal (like ACME thread) screws and nuts in left hand form. The rods are already expensive, but nuts feel like a total ripoff. A hex nut for Tr20x2 being 30mm long and 30mm in ādiameterā costs me 22 bucks! O_o Just a single one, made of regular steel. A meter of rod is 21ā¬. The more common Tr20x4 hex nut is just 7⬠and the rod 17ā¬, but 4mm pitch is a bit much for a leadscrew for semi-precision work I reckon.
Well, maybe I just use metric threads. I will sleep on this.
I mean thread command but bash escapes quoted as commandā¦
@doesnm@doesnm.p.psf.lt twt
probably isnāt the best client Iām afraid. It doesnāt really cache twts by their key (hash) to display threads properly. Jenny however does š
@prologic@twtxt.net YES James, it should be up to the client to deal with changes like edits and deletions. And putting this load on the clients, location-addressing with make this a lot easier since what is says it: Look in this file at this timestamp, did anything change or went missing? (And then threading will not break;)
@bender@twtxt.net Soā¦
() @xuu@txt.sour.is wrote:
ā@bender I am also in camp no edit signals. deletes only breaks the head of a thread. all the replies are unaffected.ā
I figure I could also answer every single twtxt like this, so that if the original gets edited, or deleted, at least I donāt sound foolish without knowing exactly what I replied to. š¤
It Sounds like a good idea! should that be limited to just direct replays or can it be extended to replays
to other replays, that way and With just the right amount of chain-replays, weāll be RRrrrrrevolutionizing the way people Mailing Lists
like, in no time! xD
P.S: Just a reminder! Iāve already told you not to mind my twts for the next couple of hours, right!
@bender@twtxt.net I am also in camp no edit signals. deletes only breaks the head of a thread. all the replies are unaffected.
@bender@twtxt.net Re that broken thread (#bqor23a)
. Its the same one. My pod doesnāt have the Root Twt: https://twtxt.net/twt/bqor23a => 404 Not Found.
How in the hell did you even reply to this in the first place?
@quark@ferengi.one HAHA I wish! but no. Itās actually
@sorenpeter@darch.dk Points 2 & 3 arenāt really applicable here in the discussion of the threading model really Iām afraid. WebMentions is completely orthogonal to the discussion. Further, no-one that uses Twtxt really uses WebMentions, whilst yarnd
supports the use of WebMentions, itās very rarely used in practise (if ever) ā In fact I should just drop the feature entirely.
The use of WebSub OTOH is far more useful and is used by every single yarnd
pod everywhere (no that thereās that many around these days) to subscribe to feed updates in ~near real-time without having the poll constantly.
#fzf is the new emacs: a tool with a simple purpose that has evolved to include an #email client. https://sr.ht/~rakoo/omail/
Iām being a little silly, of course. fzf doesnāt actually check your email, but it appears to be basically the whole user interface for that mail program, with #mblaze wrangling the emails.
Iāve been thinking about how I handle my email, and am tempted to make something similar. (When I originally saw this linked the author was presenting it as an example tweaked to their own needs, encouraging people to make their own.)
This approach could surely also be combined with #jenny, taking the place of (neo)mutt. For example mblazeās mthread tool presents a threaded discussion with indentation.
@prologic@twtxt.net Thanks for writing that up!
I hope it can remain a living document (or sequence of draft revisions) for a good long time while we figure out how this stuff works in practice.
I am not sure how I feel about all this being done at once, vs. letting conventions arise.
For example, even today I could reply to twt abc1234 with ā(#abc1234) Edit: ā¦ā and I think all you humans would understand it as an edit to (#abc1234). Maybe eventually it would become a common enough convention that clients would start to support it explicitly.
Similarly we could just start using 11-digit hashes. We should iron out whether itās sha256 or whatever but thereās no need get all the other stuff right at the same time.
I have similar thoughts about how some users could try out location-based replies in a backward-compatible way (append the replyto: stuff after the legacy (#hash) style).
However I recognize that Iām not the one implementing this stuff, and itās less work to just have everything determined up front.
Misc comments (I havenāt read the whole thing):
Did you mean to make hashes hexadecimal? You lose 11 bits that way compared to base32. Iād suggest gaining 11 bits with base64 instead.
āClients MUST preserve the original hashā ā do you mean they MUST preserve the original twt?
Thanks for phrasing the bit about deletions so neutrally.
I donāt like the MUST in āClients MUST follow the chain of reply-to referencesā¦ā. If someone writes a client as a 40-line shell script that requires the user to piece together the threading themselves, IMO we shouldnāt declare the client non-conforming just because they didnāt get to all the bells and whistles.
Similarly I donāt like the MUST for user agents. For one thing, you might want to fetch a feed without revealing your identty. Also, it raises the bar for a minimal implementation (Iām again thinking again of the 40-line shell script).
For āwho followsā lists: why must the long, random tokens be only valid for a limited time? Do you have a scenario in mind where they could leak?
Why canāt feeds be served over HTTP/1.0? Again, thinking about simple software. I recently tried implementing HTTP/1.1 and it wasnāt too bad, but 1.0 would have been slightly simpler.
Why get into the nitty-gritty about caching headers? This seems like generic advice for HTTP servers and clients.
Iām a little sad about other protocols being not recommended.
I donāt know how I feel about including markdown. I donāt mind too much that yarn users emit twts full of markdown, but Iām more of a plain text kind of person. Also it adds to the length. I wonder if putting a separate document would make more sense; that would also help with the length.
Iām still more in favor of (replyto:ā¦)
. Itās easier to implement and the whole edits-breaking-threads thing resolves itself in a ānaturalā way without the need to add stuff to the protocol.
Iād love to try this out in practice to see how well it performs. š¤ Itās all very theoretical at the moment.
@falsifian@www.falsifian.org comments on the feeds as in nick
, url
, follow
, that kind of thing? If that, then not interested at all. I envision an archive that would allow searching, and potentially browsing threads on a nice, neat interface. You will have to think, though, on other things. Like, what to do with images? Yarn allows users to upload images, but also embed it in twtxts from other sources (hotlinking, actually).
@prologic@twtxt.net I know the role of the current hash is to allow referencing (replies and, thus, threads), and it also represents a āuniqueā way to verify a twtxt hasnāt been tampered with. Is that second so important, if we are trying to allow edits? I know if feels good to be able to verify, but in reality, how often one does it?
@prologic@twtxt.net how about hashing a combination of nick/timestamp, or url/timestamp only, and not the twtxt content? On edit those will not change, so no breaking of threads. I know, I know, just adding noise here. :-P
@prologic@twtxt.net the basic idea was to stem the hash.. so you have a hash abcdef0123456789...
any sub string of that hash after the first 6 will match. so abcdef
, abcdef012
, abcdef0123456
all match the same. on the case of a collision i think we decided on matching the newest since we archive off older threads anyway. the third rule was about growing the minimum hash size after some threshold of collisions were detected.
@sorenpeter@darch.dk hmm, how does your client handles āa little editingā? I am sure threads would break just as well. š
@movq@www.uninformativ.de going a little sideways on this, ā*If twtxt/Yarn was to grow bigger, then this would become a concern again. But even Mastodon allows editing, so how much of a problem can it really be? š *ā, wouldnāt it preparing for a potential (even if very, very, veeeeery remote) growth be a good thing? Mastodon signs all messages, keeps a history of edits, and it doesnāt break threads. It isnāt a problem there.š It is here.
I think keeping hashes is a must. If anything for that āfeels goodā feeling.
Regarding jenny development: There have been enough changes in the last few weeks, imo. I want to let things settle for a while (potential bugfixes aside) and then Iām going to cut a new release.
And I guess the release after that is going to include all the threading/hashing stuff ā if we can decide on one of the proposals. š
@quark@ferengi.one Oh, sure, it would be nice if edits didnāt break threads. I was just pondering the circumstances under which I get annoyed about data being irrecoverably deleted or otherwise lost.
@quark@ferengi.one I donāt really mind if the twt gets edited before I even fetch it. I think itās the idea of my computer discarding old versions itās fetched, especially if itās shown them to me, that bugs me.
But I do like @movq@www.uninformativ.deās suggestion on this thread that feeds could contain both the original and the edited twt. I guess it would be up to the author.
jenny
nor yarnd
support it very well. Only at a very basic level.
@prologic@twtxt.net sorry but nope. Neither jenny
, nor yarnd
supports it at all. This was treated as a thread because I picked one of @falsifian@www.falsifian.orgās twtxts (with the āold subjectā), and replied to it (hence starting the thread).
yarnd
(at least) doesn't support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed.
@prologic@twtxt.net based on @falsifian@www.falsifian.orgās findings, I donāt believe this is quite accurate.
āyarnd
(_at least_) doesn't support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed."
Hmm, but yarnd also isnāt showing these twts as being part of a thread. @prologic@twtxt.net you said yarnd respects customs subjects. Shouldnāt these twts count as having a custom subject, and get threaded together?
@sorenpeter@darch.dk I like this idea. Just for fun, Iām using a variant in this twt. (Also because Iām curious how it non-hash subjects appear in jenny and yarn.)
URLs can contain commas so I suggest a different character to separate the url from the date. Is this twt Iāve used space (also after āreplytoā, for symmetry).
I think this solves:
- Changing feed identities: although @mckinley@twtxt.net points out URLs can change, I think this syntax should be okay as long as the feed at that URL can be fetched, and as long as the current canonical URL for the feed lists this one as an alternate.
- editing, if you donāt care about message integrity
- finding the root of a thread, if youāre not following the author
An optional hash could be added if message integrity is desired. (E.g. if you donāt trust the feed author not to make a misleading edit.) Other recent suggestions about how to deal with edits and hashes might be applicable then.
People publishing multiple twts per second should include sub-second precision in their timestamps. As you suggested, the timestamp could just be copied verbatim.
Just that yarnd
(at least) doesnāt support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed.
This scheme also only support threading off a specific Twt of someoneās feed. What if youāre not replying to anyone in particular?
(replyto:http://darch.dk/twtxt.txt,2024-09-15T12:06:27Z)
I think I like this a lot. š¤
The problem with using hashes always was that theyāre āone-directionalā: You can construct a hash from URL + timestamp + twt, but you cannot do the inverse. When I see ā, I have no idea what that could possibly refer to.
But of course something like (replyto:http://darch.dk/twtxt.txt,2024-09-15T12:06:27Z)
has all the information you need. This could simplify twt/feed discovery quite a bit, couldnāt it? š¤ That thing that I just implemented ā jenny asking some Yarn pod for some twt hash ā would not be necessary anymore. Clients could easily and automatically fetch complete threads instead of requiring the user to follow all relevant feeds.
Only using the timestamp to identify a twt also solves the edit problem.
It even is better for non-Yarn clients, because you now donāt have to read, understand, and implement a ātwt hash specificationā before you can reply to someone.
The only problem, really, is that (replyto:http://darch.dk/twtxt.txt,2024-09-15T12:06:27Z)
is so long. Clients would have to try harder to hide this. š
The wiered thing is Twtxt fetches everything just fine (I think) except for not having the convenience of having replays grouped into threads.
@bender@twtxt.net I canāt see ANY of those LOL not even a broken thread. The whole Thread went Poof!! as if it has never happened ā¦
@quark@ferengi.one No can do! I canāt see any of the replies to that thread, not even mine LOL. let me se if I can fetch @sorenpeter@darch.dk ās feed with the https link.
@quark@ferengi.one here is an example: This Thread is not showing up in Mutt š¤ Something is off!
Iāll set up jenny and mutt on another computer and see how it goes from there.
Alright, I saw enough broken threads lately to be motivated enough to extend the --fetch-context
thingy: It can now ask Yarn pods for twt hashes.
https://www.uninformativ.de/git/jenny/commit/eefd3fa09083e2206ed0d71887d2ef2884684a71.html
This is only done as a last resort if thereās no other way to find the missing twt. Like, when thereās a twt that begins with just a hash and no user mention, thereās no way for jenny to know on which feed that twt can be found, so itāll ask some Yarn pod in that case.
Theyāre in Section 6:
Receiver should adopt UDP GRO. (Something about saving CPU processing UDP packets; Iām a but fuzzy about it.) And they have suggestions for making GRO more useful for QUIC.
Some other receiver-side suggestions: āsending delayed QUICK ACKsā; āusing recvmsg to read multiple UDF packets in a single system callā.
Use multiple threads when receiving large files.
So this is a great thread. I have been thinking about this too.. and what if we are coming at it from the wrong direction? Identity being tied to a given URL has always been a pain point. If i get a new URL its almost as if i have a new identity because not only am I serving at a new location but all my previous communications are broken because the hashes are all wrong.
What if instead we used this idea of signatures to thread the URLs together into one identity? We keep the URL to Hash in place. Changing that now is basically a no go. But we can create a signature chain that can link identities together. So if i move to a new URL i update the chain hosted by my primary identity to include the new URL. If i have an archived feed that the old URL is now dead, we can point to where it is now hosted and use the current convention of hashing based on the first url:
The signature chain can also be used to rotate to new keys over time. Just sign in a new key or revoke an old one. The prior signatures remain valid within the scope of time the signatures were made and the keys were active.
The signature file can be hosted anywhere as long as it can be fetched by a reasonable protocol. So say we could use a webfinger that directs to the signature file? you have an identity like frank@beans.co
that will discover a feed at some URL and a signature chain at another URL. Maybe even include the most recent signing key?
From there the client can auto discover old feeds to link them together into one complete timeline. And the signatures can validate that its all correct.
I like the idea of maybe putting the chain in the feed preamble and keeping the single self contained file.. but wonder if that would cause lots of clutter? The signature chain would be something like a log with what is changing (new key, revoke, add url) and a signature of the change + the previous signature.
# chain: ADDKEY kex14zwrx68cfkg28kjdstvcw4pslazwtgyeueqlg6z7y3f85h29crjsgfmu0w
# sig: BEGIN SALTPACK SIGNED MESSAGE. ...
# chain: ADDURL https://txt.sour.is/user/xuu
# sig: BEGIN SALTPACK SIGNED MESSAGE. ...
# chain: REVKEY kex14zwrx68cfkg28kjdstvcw4pslazwtgyeueqlg6z7y3f85h29crjsgfmu0w
# sig: ...