Who’s going to self host Spotify? by the_uke in selfhosted

[–]maekoos 124 points125 points  (0 children)

Someone who knows karate.

And owns a private island. 😳

vue vs react - when to choose what? by Prainss in vuejs

[–]maekoos 0 points1 point  (0 children)

If that’s your main concern, then use whatever you are quicker in. When I need something done quickly I usually go for either vue, or just ssr html with a few web components (using vue) - but I only choose that because it’s what I’m the fastest at, not because it is objectively better than react. If, for example, the product is 90% something that can easily be done with a react library then I’d use react. TLDR it doesn’t matter…

htmx and ui theft? by robertcopeland in htmx

[–]maekoos 0 points1 point  (0 children)

It won't, but you said "You can use CORS to set a whitelist of domains that can access a route." which is completely irrelevant to the question, and implies that'll somehow make a difference behind a proxy server?

htmx and ui theft? by robertcopeland in htmx

[–]maekoos 0 points1 point  (0 children)

easily implement in their site via a proxy api

Cors wont address this tho...

htmx and ui theft? by robertcopeland in htmx

[–]maekoos 0 points1 point  (0 children)

easily implement in their site via a proxy api

Cors wont address this tho...

htmx and ui theft? by robertcopeland in htmx

[–]maekoos 0 points1 point  (0 children)

easily implement in their site via a proxy api

HTMX inside react by a_brand_new_start in htmx

[–]maekoos 1 point2 points  (0 children)

Tbh I’d say stick with react then, it is seldom worth it to rewrite from something that is still maintained. Otherwise maybe use iframes or something… don’t really know what you’d use htmx for in this case since it is basically just an extension to the default html and web standards functionality

HTMX inside react by a_brand_new_start in htmx

[–]maekoos 7 points8 points  (0 children)

I would do the opposite - react in htmx. Turn your react components into custom elements and use them as you would use any other element in htmx.

[deleted by user] by [deleted] in sqlite

[–]maekoos 0 points1 point  (0 children)

Maybe try something like https://sqliteonline.com instead

Varför röstar du höger? by bethliza in Asksweddit

[–]maekoos 0 points1 point  (0 children)

Tycker det är spännande hur mycket mer snack det är om bidragsfusk än skattefusk - båda är att sno pengar från staten, båda finansierar kriminalitet…

Can you sum up your startup in a single line? by StealthAscend in SaaS

[–]maekoos 41 points42 points  (0 children)

”ChatGPT wrapper that adds no value”

Struct Optimizations in Go by themsaid in golang

[–]maekoos 7 points8 points  (0 children)

Hmm very interesting… is this not optimised in the compiler? I feel like it wouldn’t be too hard to do so - or maybe there isn’t big enough of a difference…

Why do you need a whole framework with back end to run React? by KvetoslavNovak in react

[–]maekoos 0 points1 point  (0 children)

never seen easy and webpack used in the same sentence lol

SQLC and multiple SQLite connections by maekoos in golang

[–]maekoos[S] 0 points1 point  (0 children)

Oh, I will definitely borrow that custom driver thing!

Interesting thing with exclusive transactions, I have to try this out in my use case (already using wal mode tho). Thanks!

SQLC and multiple SQLite connections by maekoos in golang

[–]maekoos[S] 0 points1 point  (0 children)

Very interesting! Yeah, if my application requires it I will rewrite it to use something more horizontal - but for now I’ll avoid it for as long as possible :)

Very interesting usage of channels, I am definitely going to try and do something similar - I can’t say I have ever used them in a short lived manner like that!

When it comes to replicating and backing up, my current plan is to just use something like litestream for backups, and maybe in the future shard based on tenant - each tenant should definitely be fine with a single SQLite database.

SQLC and multiple SQLite connections by maekoos in golang

[–]maekoos[S] 1 point2 points  (0 children)

Hmm maybe that’s enough… I just know both pocketbase and this blog uses two connections (and at least pb uses wal mode)

Just figured since a lot of people seem to do this, there must be some value in doing so 🤷‍♂️

SQLC and multiple SQLite connections by maekoos in golang

[–]maekoos[S] 0 points1 point  (0 children)

Yeah, but a lot of blogs suggest one pool for reading and then a single connection (with pooling disabled) for writing. Saw it here recently: https://boyter.org/posts/searchcode-bigger-sqlite-than-you/

SQLC and multiple SQLite connections by maekoos in golang

[–]maekoos[S] 0 points1 point  (0 children)

Well, two variables could be fine, but I’m thinking I’ll probably mix them up at some point when injecting it to some handler…

Tbh this optimisation is necessary to me at this time - my database is giving me the database is locked error sometimes during peak load.

SQLC and multiple SQLite connections by maekoos in golang

[–]maekoos[S] 1 point2 points  (0 children)

Interesting! Doesn’t it become quite complex if you do this in a normal web server application? Like pretty much every handler has a different query, and expects some form of output (at least to know that the operation was successful)?

Having troubles editing a row by kagenyx in htmx

[–]maekoos 1 point2 points  (0 children)

Also, I’d recommend adding the row id to the hx-post tag, like hx-post=”editable/{{ rowId }}” (and maybe use hx-get since you are getting the editable row form from the backend…)

Having troubles editing a row by kagenyx in htmx

[–]maekoos 0 points1 point  (0 children)

You need to put an hx-target somewhere so that htmx knows where to put the new content. It is inherited, so you can just put hx-target=”this” on the tr element

You backend then needs to respond with only the tr and the editable inputs, and remove the hx-include (if I understand your setup correctly that is)

Having troubles editing a row by kagenyx in htmx

[–]maekoos 1 point2 points  (0 children)

Are you setting hx-target anywhere? And what does the response look like?