@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
Storageinterface (no tests!)
- storage/sqlite for the sqlite implementation tests for sqlite directly
- storage/ram for the ram implementation and tests for RAM directly
- storage/sqlite for the sqlite implementation tests for sqlite 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
@lyse@lyse.isobeef.org Das war ein sehr glatter Ritt mit der Bahn. Ebenso heute auf der Autobahn.
(gesendet aus ThĂŒringen)
@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?
@prologic@twtxt.net You just have to stay in the center. Itâs supposed to be calm in there I heard. Just getting there is the tricky part. Good luck!
@prologic@twtxt.net Thank you đ
@lyse@lyse.isobeef.org Oh, so thatâs the problem! đ
@prologic@twtxt.net Brace for impact. 𫣠How stormy is it at the moment?
@movq@www.uninformativ.de âThermometer must not be installed near aircraft turbine exhaust.â
@xuu@txt.sour.is My layout looks like this:
- storage/
- storage.go: defines a
Storageinterface
- sqlite.go: implements the
Storageinterface
- 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
- storage.go: defines a
- controller/
- feeds.go: uses a
Storage
- feeds_test.go: here I wanted to reuse the
newRAMStorage(âŠ)function
- feeds.go: uses a
I then tried to relocate the newRAMStorage(âŠ) into a
- teststorage/
- storage.go: moved here as
NewRAMStorage(âŠ)
- storage.go: moved here as
so that I could just reuse it from both
- storage/
- sqlite_test.go: uses
testutils.NewRAMStorage(âŠ)
- sqlite_test.go: uses
- controller/
- feeds_test.go: uses
testutils.NewRamStorage(âŠ)
- feeds_test.go: uses
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.
@lyse@lyse.isobeef.org No, itâs always in the shadow. But thereâs not a lot of wind, maybe other things around it heat up ⊠đ€
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.
@prologic@twtxt.net Best wishes!
@movq@www.uninformativ.de Did you place it in the sun? We only got 15°C today.
@movq@www.uninformativ.de Toowoomba! I love that name. LOL. Sorry, digressing big time.
@prologic@twtxt.net Ouch, thatâs heading right towards you, eh? đ

@prologic@twtxt.net stay safe, close windows, have sand sacks ready, check flashlights, make sure to have some canned food, and bottled water, fill up the bathtubs, etc., and enjoy the ride! :-)
@eapl.me@eapl.me@eapl.me@eapl.me I saw a few a while back.
@prologic@twtxt.net Damn! :-( Yeah, I wonât build that into my client. Not worth it for the many things that are still undetectable and the low frequency it happens.
@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.
@movq@www.uninformativ.de Luckily, theyâre not made of steel as I would not have made it home with such heavy weights. :-D
@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.
@prologic@twtxt.net Got you bro.
@prologic@twtxt.net What the heck. đ«
@lyse@lyse.isobeef.org Lyse, the man with feet of steel. đŠŸ
@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 :)
@prologic@twtxt.net sure thing!
What about discussing it in https://git.mills.io/yarnsocial/twtxt.dev ?
The only con I see is that everyone would need to create an account there to participate.
hi there!! @arne@uplegger.eu \0/
@lyse@lyse.isobeef.org I meant âdetectâ lol đ
@prologic@twtxt.net No edits anymore! \o/
I show you the website of Baldo, my little black cat (the pocket panther).
Website: https://baldo.cat/
Twtxt: https://baldo.cat/twtxt.txt
#catsoftwtxt
interesting.. my pod was looking for him as https://eapl.me/twtxt.txt but the correct path is https://eapl.me/tw.txt
I think @movq@www.uninformativ.de removed support for it in jenny. đ«
@prologic@twtxt.net eapl.me comes up not found for me.
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.
@prologic@twtxt.net its hard to change by consensus. Some things are won in implementation.
@lyse@lyse.isobeef.org Clients could detest edits đ€
@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
@movq@www.uninformativ.de Hahaha, stimmt! :-D
@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. :-)
@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.)
@lyse@lyse.isobeef.org Gotcha. That makes sense. Doesnât hurt the systems but definitely can break the thread.
@lyse@lyse.isobeef.org Haha so true
@prologic@twtxt.net I wonder if we watched the same video.
@lyse@lyse.isobeef.org Lalala, ich höre nix. đ
Aber total unrealistisch. Die âFokuszeitâ hĂ€tte ĂŒberbucht sein mĂŒssen durch ein anderes, wichtiges Meeting. Sonst war ja kein Platz mehr dafĂŒr.
@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? đ„Ž
@lyse@lyse.isobeef.org What do you think about this? https://git.mills.io/yarnsocial/twtxt.dev/issues/14
@bmallred@staystrong.run Not an issue if youâre the doctor working there. :-)
@bmallred@staystrong.run Any edit automatically changes the twt hash, because the hash is built over the hash URL, message timestamp and message text. https://twtxt.dev/exts/twt-hash.html So, it is only a problem, if somebody replied to your original message with the old hash. The original message suddenly doesnât exist anymore and the reply becomes detached, orphaned, whatever you wanna call it. Threading doesnât break, though, if nobody replied to your message.
@osnews@feeds.twtxt.net Its been so long and never really thought about it.
- Arch was great but always had issues.
- Gentoo was great but not enough patience to compile when I need something quick for work.
I havenât really looked back since I installed Void. Sometimes it is a pain when things donât play well with MUSL but nothing that would make me change course.
@thecanine@twtxt.net I donât mind the FUTO keyboard either but it is pretty basic. Going to have to try out helio