Searching yarn

Twts matching #twtxt.txt
Sort by: Newest, Oldest, Most Relevant
In-reply-to » One of the biggest gripes of the community with the way the threading model currently works with Twtxt v1.2 (https://twtxt.dev) is this notion of:

@prologic@twtxt.net We can’t agree on this idea because that makes things even more complicated than it already is today. The beauty of twtxt is, you put one file on your server, done. One. Not five million. Granted, there might be archive feeds, so it might be already a bit more, but still faaaaaaar less than one file per message.

Also, you would need to host not your own hash files, but everybody else’s as well you follow. Otherwise, what is that supposed to achieve? If people are already following my feed, they know what hashes I have, so this is to no use of them (unless they want to look up a message from an archive feed and don’t process them). But the far more common scenario is that an unknown hash originates from a feed that they have not subscribed to.

Additionally, yarnd’s URL schema would then also break, because https://twtxt.net/twt/<hash> now becomes https://twtxt.net/user/prologic/<hash>, https://twtxt.net/user/bender/<hash> and so on. To me, that looks like you would only get hashes if they belonged to this particular user. Of course, you could define rules that if there is a /user/ part in the path, then use a different URL, but this complicates things even more.

Sorry, I don’t like that idea.

​ Read More

One of the biggest gripes of the community with the way the threading model currently works with Twtxt v1.2 (https://twtxt.dev) is this notion of:

What is this hash?
What does it refer to?

Idea: Why can’t we all agree to implement a simple URI scheme where we host our Twtxt feeds?

That is, if you host your feed at https://example.com/twtxt.txt – Why can’t or could you not also host various JSON files (let’s agree on the spec of course) at https://example.com/twt/<hash> ? đŸ€”

That way we solve this problem in a truly decentralised way, rather than every relying on yarnd pods alone.

​ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

Thanks, @xuu@txt.sour.is, great explanation. In another project I’ve structured it exactly like you wrote. The mock storage over there extends the SQLite storage and provides mechanism to return errors and such for testing purposes:

  • storage/ defines the interface
    • sqlite/ implements the storage interface
    • mock/ extends the SQLite implementation by some mocking capabilities and assertions

Here, however, there are no storage subpackages. It’s just storage, that’s it. Everything is in there. The only implementation so far is an SQLite backend that resides in storage. My RAM storage is exactly that SQLite storage, but with :memory: instead a backing file on disk. I do not have a mock storage (yet).

I have to think about it a bit more, but I probably have to do exactly that in my tt rewrite, too. Sigh. I just have the feeling that in storage/sqlite/sqlite_test.go I cannot import storage/mock for the helper because storage/mock/mock.go imports and embeds the type from storage/sqlite. But I’m too tired right now to think clearly.

​ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

@lyse@lyse.isobeef.org OK. So how I have worked things like this out is to have the interface in the root package from the implementations. The interface doesn’t need to be tested since it’s just a contract. The implementations don’t need to import storage.Storage

  • storage/ defines the Storage interface (no tests!)
    • storage/sqlite for the sqlite implementation tests for sqlite directly
    • storage/ram for the ram implementation and tests for RAM directly
  • controller/ can now import both storage and the implementation as needed.

So now I am guessing you wanted the RAM test for testing queries against sqlite and have it return some query response?

For that I usually would register a driver for SQL that emulates sqlite. Then it’s just a matter of passing the connection string to open the registered driver on setup.

https://github.com/glebarez/go-sqlite?tab=readme-ov-file#connection-string-examples

​ Read More
In-reply-to » Ich fahre gleich zwei Stunden mit dem Zug durch das sonnige Mecklenburg-Vorpommern, um morgen PÜNKTLICH 🐓 mit den Schwiegereltern zur Familienfeier nach ThĂŒringen aufbrechen zu können. Ein Wochenende auf Achse wird das. 🚞🚐😞

@arne@uplegger.eu Hals- und Beinbruch! Die Bahn hat ja nur die vier Feinde: FrĂŒhling, Sommer, Herbst und Winter. Wurdest Du heute positiv ĂŒberrascht?

​ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

@xuu@txt.sour.is My layout looks like this:

  • storage/
    • storage.go: defines a Storage interface
    • sqlite.go: implements the Storage interface
    • sqlite_test.go: originally had a function to set up a test storage to test the SQLite storage implementation itself: newRAMStorage(testing.T, $initialData) *Storage
  • controller/
    • feeds.go: uses a Storage
    • feeds_test.go: here I wanted to reuse the newRAMStorage(
) function

I then tried to relocate the newRAMStorage(
) into a

  • teststorage/
    • storage.go: moved here as NewRAMStorage(
)

so that I could just reuse it from both

  • storage/
    • sqlite_test.go: uses testutils.NewRAMStorage(
)
  • controller/
    • feeds_test.go: uses testutils.NewRamStorage(
)

But that results into an import cycle, because the teststorage package imports storage for storage.Storage and the storage package imports testutils for testutils.NewRAMStorage(
) in its test. I’m just screwed. For now, I duplicated it as newRAMStorage(
) in controller/feeds_test.go.

I could put NewRAMStorage(
) in storage/testutils.go, which could be guarded with //go:build testutils. With go test -tags testutils 
, in storage/sqlite_test.go could just use NewRAMStorage(
) directly and similarly in controller/feeds_test.go I could call storage.NewRamStorage(
). But I don’t know if I would consider this really elegant.

The more I think about it, the more appealing it sounds. Because I could then also use other test-related stuff across packages without introducing other dedicated test packages. Build some assertions, converters, types etc. directly into the same package, maybe even make them methods of types.

If I went that route, I might do the opposite with the build tag and make it something like !prod instead of testing. Only when building the final binary, I would have to specify the tag to exclude all the non-prod stuff. Hmmm.

​ Read More

lang=en @xuu@txt.sour.is gotcha!
From that PR #17 I think it was reverted? We could discuss about metadata later this month, as it seems that I’m the only person using it.

I’ve added a [lang=en] to this twt to see current yarn behaviour.

​ Read More
In-reply-to » @lyse i appreciate you updating this with that info. been in the weeds at work so haven't been tracking the conversation here much. let me sit on this for a bit because often times the edits are within seconds of first post so maybe maybe i just allow them within a certain time frame or do away with them all together. i really only do it because it bugs me once i notice the typo :)

@bmallred@staystrong.run Oh, I hear you! It’s always after carefully proofreading and publishing that a typo suddenly pops up. :-) Not sure if amending your edit implementation is really worth it, but happy hacking in case you do.

​ Read More
In-reply-to » I went on a 5:30 hours long hike to my second backyard mountain. About 12km to get there and roughly 9km on the way back. It was super nice, sunny all day long, 12°C and luckily just a little bit of wind. Great scenery. I managed to capture one great spotted woodpecker hammering along. There was also a kestrel hovering over a meadow and then landing on a sports field light pole. At the castle ruin I could watch 10-12 gliding red kites (with the V-shaped tail) and other raptors, maybe bussards, I don't know, for about five minutes. That was fascinating. Unfortunately, my camera doesn't too well with moving targets.

@movq@www.uninformativ.de Luckily, they’re not made of steel as I would not have made it home with such heavy weights. :-D

​ Read More
In-reply-to » A depressing video about the current state of printers that just ends with “fuck this, I’m gonna talk about my cat now”: https://www.youtube.com/watch?v=bpHX_9fHNqE

@movq@www.uninformativ.de Fuck! So there aren’t any non-criminal printer vendors out there anymore. Very sad. I really don’t understand why this is not highly illegal in the entire world.

​ Read More
In-reply-to » I went on a 5:30 hours long hike to my second backyard mountain. About 12km to get there and roughly 9km on the way back. It was super nice, sunny all day long, 12°C and luckily just a little bit of wind. Great scenery. I managed to capture one great spotted woodpecker hammering along. There was also a kestrel hovering over a meadow and then landing on a sports field light pole. At the castle ruin I could watch 10-12 gliding red kites (with the V-shaped tail) and other raptors, maybe bussards, I don't know, for about five minutes. That was fascinating. Unfortunately, my camera doesn't too well with moving targets.

@lyse@lyse.isobeef.org Lyse, the man with feet of steel. đŸŠŸ

​ Read More
In-reply-to » (#tbyqv7a) @andros Do edits cause problems? I sometimes make them and didn't realize it may be an issue

@lyse@lyse.isobeef.org i appreciate you updating this with that info. been in the weeds at work so haven’t been tracking the conversation here much. let me sit on this for a bit because often times the edits are within seconds of first post so maybe maybe i just allow them within a certain time frame or do away with them all together. i really only do it because it bugs me once i notice the typo :)

​ Read More
In-reply-to » @andros I've commented on the ticket: https://git.mills.io/yarnsocial/twtxt.dev/issues/14#issuecomment-19142

2025-03-02T13:20:00-07:00 (#<fmgas3a https://twtxt.net/user/prologic/twtxt.txt?t=2025-03-02T10:12:13Z>) @<prologic https://twtxt.net/user/prologic/twtxt.txt> its hard to change by consensus. Some things are won in implementation.

​ Read More
In-reply-to » @bmallred I forgot one more effect of edits. If clients remember the read status of massages by hash, an edit will mark the updated message as unread again. To some degree that is even the right behavior, because the message was updated, so the user might want to have a look at the updated version. On the other hand, if it's just a small typo fix, it's maybe not worth to tell the user about. But the client doesn't know, at least not with additional logic.

@lyse@lyse.isobeef.org Clients could detest edits đŸ€ž

​ Read More
In-reply-to » We went up our backyard mountain again right after lunch. The sun peaked through the clouds sometimes. The 6°C felt much, much cooler with the northeast wind. We got lucky, though, it was dead calm at the summit. At least on the southwestern side, which is a few meters lower than the very top to the east. That was shielded absolutely perfectly from the wind (we were extremely surprised), so we sat down on a bench and could really enjoy the sun heating us up. Apart from the haze, the view was really nice.

@movq@www.uninformativ.de Yeah, the ground was wet here, too. Some sections of esp. smaller paths had turned into mud holes. There are a few notorious spots. Oh well, you just have to press on. :-)

Forest animals also have to do the laundry, they even have a proper clotheshorse! See: https://lyse.isobeef.org/wanderung-zu-den-schurrenhoffuechsen-2021-05-15/07.jpg :-D

​ Read More
In-reply-to » (#tbyqv7a) @andros Do edits cause problems? I sometimes make them and didn't realize it may be an issue

@bmallred@staystrong.run I forgot one more effect of edits. If clients remember the read status of massages by hash, an edit will mark the updated message as unread again. To some degree that is even the right behavior, because the message was updated, so the user might want to have a look at the updated version. On the other hand, if it’s just a small typo fix, it’s maybe not worth to tell the user about. But the client doesn’t know, at least not with additional logic.

Having said that, it appears that this only affects me personally, noone else. I don’t know of any other client that saves read statuses. But don’t worry about me, all good. Just keep doing what you’ve done so far. I wanted to mention that only for the sake of completeness. :-)

​ Read More
In-reply-to » These two degenerates 
 Fucking hell. https://www.youtube.com/watch?v=DZ56ibIel1U

@prologic@twtxt.net I formed my opinion about this before reading/watching any additional media coverage. And yes, this is extremely bad. These two have no place on the “world stage”. They are deciding on our future. (And I am well aware that my country is heading into a similar direction – unless we stop it.)

​ Read More
In-reply-to » We went up our backyard mountain again right after lunch. The sun peaked through the clouds sometimes. The 6°C felt much, much cooler with the northeast wind. We got lucky, though, it was dead calm at the summit. At least on the southwestern side, which is a few meters lower than the very top to the east. That was shielded absolutely perfectly from the wind (we were extremely surprised), so we sat down on a bench and could really enjoy the sun heating us up. Apart from the haze, the view was really nice.

@lyse@lyse.isobeef.org Looks like a nice day. 😊 I tried to go on a quick walk, but it was really cold. And everything’s wet at the moment. Bah.

Clothespins in the woods, who would have thunk? đŸ„Ž

​ Read More