xuu

txt.sour.is

Xuu /zuː/ I am AWESOME! ○△□ ⍼

In-reply-to » calendar.txt: Keep your calendar in a plain text file https://terokarvinen.com/2021/calendar-txt/ It's a lot of fun to have a calendar system.

I have a file with US holidays but I think it’s on my laptop still

⤋ Read More
In-reply-to » calendar.txt: Keep your calendar in a plain text file https://terokarvinen.com/2021/calendar-txt/ It's a lot of fun to have a calendar system.

Yeah. It’s mostly a parser at the moment. But I have extended the calendar.txt to include todo.txt and a repeat syntax to generate future occurances of events and todos.

⤋ 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. :-(

re reading so NewRAMStorage(…) is just something that setups your storage and initial data.. that can probably live with storage/sqlite. The point is the storage package does not import the implementations of storage.Storage It just defines the contract for things that use that interface. Now storage/sqlite CAN import storage and not have a circle dep.

It kinda works in reverse for import directions. usually you have your root package that imports things from deeper in the directory structures.. but for the case of interfaces it reverses where the deeper can import from parents but parents cannot import from children.

- app < storage
      < storage/sqlite
      < controller < storage
                   < storage/sqlite
 
- sqlite < storage

- storage X storage/sqlite

⤋ 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 » 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. :-(

maybe even an internal that has the shared test stuff

⤋ 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. :-(

oof that sucks man. does it make sense to have a separate testutils package to import from?

⤋ Read More
In-reply-to » lang=en @xuu 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.

it seems to be confused with the subject right next to it.. it works better at the end of the twt string.
Yarn won’t display anything. but the parser does add it to the AST in a way that you can parse it out using twt.Attrs().Get("lang")

https://git.mills.io/yarnsocial/go-lextwt/src/branch/main/ast.go#L1270-L1272

https://git.mills.io/yarnsocial/go-types/src/branch/main/twt.go#L473-L478

⤋ 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

Yeah so disappointed. Brother was one of the last good ones.

⤋ 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 » @andros I've commented on the ticket: https://git.mills.io/yarnsocial/twtxt.dev/issues/14#issuecomment-19142

True. Though if the idea turns out to be better.. then community will adopt it.

if you look at the subject for that twt you will see that it uses the extended hash format to include a URL address.

⤋ Read More
In-reply-to » I read a lot about Clean Code, SOLID, TDD, DDD... now I'm discovering «A Philosophy of Software Design»... but nobody talks about the importance of the project architecture. Do we depend on the framework to do the work for us? You know I'm a big fan of Clean Architecture, but I feel alone when I share my thoughts on social media or at work. You have to think outside the framework.

@andros@twtxt.andros.dev

  • System Design Interview Vol. 1 and 2, Alex Xu and Sahn Lam
  • Designing Data-Intensive Applications, Martin Kleppmann

⤋ Read More
In-reply-to » I read a lot about Clean Code, SOLID, TDD, DDD... now I'm discovering «A Philosophy of Software Design»... but nobody talks about the importance of the project architecture. Do we depend on the framework to do the work for us? You know I'm a big fan of Clean Architecture, but I feel alone when I share my thoughts on social media or at work. You have to think outside the framework.

I agree. finding good writings on architecture is hard to find. I used to read architecture reviews over on the high scalability blog. i suspect the reason why is that the arch is how the big tech companies can build moats around their bases. I know in AWS world it only goes as far as how to nickle and dime you to death.

I have the books but they don’t grow much more past interview level.

⤋ Read More

oh dang.. i thought i had parsing for !tag from back when someone was using it for his wiki pages.
i guess i left it out. though shouldnt be to hard to add it back in

⤋ Read More

huh. i suppose. So they came up with mentioning with a bang? i think we parse them as something that i guess we can check for in the AST

⤋ Read More
In-reply-to » i made a little twtxt feed fixer for when a feed uses other whitespace instead of tabs.

trying to keep it simple but.. perhaps it can be extended to fix timestamp formats like using " " instead of "T"

⤋ Read More
In-reply-to » I'm realizing that my performance bottleneck is @prologic ! It is actually calculating the hash to make the replicas, and specifically users with very long feeds 😂 . I'm seriously thinking about enabling replies via configuration.

you rehash the same data too much :P

⤋ Read More
In-reply-to » Saw Windows 11 for the first time today and genuinely had to ask if this is really Windows. Looks a lot like KDE.

~10 seconds means it had to fire up Qwen 2.8b and prompt it what items would reasonably show up in a right click menu for the desktop.

⤋ Read More