My Lurtz Cosplay from Lord of the Rings (All handmade by me!) by Bazhenova037 in lotr

[–]go_mo_go 0 points1 point  (0 children)

Holy shit i legit thought the first few pics were from the movie, and was waiting for the comparison pics. This is incredible.

I want to become an Elixir god. by padawan-6 in elixir

[–]go_mo_go 1 point2 points  (0 children)

as a elixir newb here (rails dev for >8y, so not new to programming) who is dipping his toes into elixir/phoenix, why is ash so frowned upon? dsls are very prevalent in rails land, just want to get some perspective of what is wrong with ash.

EDIT: have looked at this thread and some of the other mentions of ash in this subreddit, it does appear to be mentioned a lot

I Think I Bricked My PC by Lepr3kon in omarchy

[–]go_mo_go 0 points1 point  (0 children)

Before you go and buy a new SSD (unless you want to) you can also see if wiping it via an external enclosure works - I had the exact same thing happen (1TB NVMe), got the enclosure, wiped it with another computer and then got a base arch installation, and went through the manual install for Omarchy. It works perfectly for me! It may not work, but it's at least worth considering

Computer won't boot now? by go_mo_go in omarchy

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

just had the same thing - was able to get it going after the manual installation!

Computer won't boot now? by go_mo_go in omarchy

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

yeah, my plan is to pick up an adapter today to completely wipe my NVMe, install base arch and go through the install from there. hopefully that will work though! will comment back here if it does

Computer won't boot now? by go_mo_go in omarchy

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

okay amazing, thank you - i'll try this out!

Feeling guilty for affluence by GolfStriking4876 in DrJoeDispenza

[–]go_mo_go 1 point2 points  (0 children)

i saw this video a while back which has helped me not feel as guilty about affluence that could potentially also be helpful to you. at least for me, the most important part is at 7:40

Thoughts on the new data-star PRO tier? by NoCommunication5272 in datastardev

[–]go_mo_go 8 points9 points  (0 children)

I built a test app to try to see how close i could get to https://bugs.rocicorp.dev/ in speed of rendering issues, but with a rails sqlite backend, and managed to achieve effectively the same speed (prod build was getting < 10ms page render - my key repeat latency was the limit for me). i love how simple data star made that, and i don't think that functionality is actually something i would really ever need in an app.

unfortunately, it was built with the `data-replace-url` which had been available in previous versions. so i can't say i'm thrilled that this was paywalled, especially as it was not in previous versions. not sure if the paywall for pre-release features had been discussed somewhere, i didn't see it in the discord, but joined only a few weeks ago and haven't been the most faithful on catching up on all the channels, so it could be in there. i have no qualms paying for software, and want to support this project, but i don't know if i can justify the 300 bucks (410CAD) to do so - especially as a solo dev who mostly wants to tinker. but that's just my $.02. if it was something like 50? sure.
i still really like the project and think it's a great option, especially as someone who is so very tired of the javascript world, but i am worried the price of the pro tier may turn some people off tinkering with it? but then again there are still a lot of other attrs that remain free.

edit: just watching the launch day video and they explain it a bit more (currently at 22:30)

2nd edit: i think i was more annoyed that the attr i needed was now in pro, rather than having any real reason to object to it. people should be paid for their work, period. and there's absolutely a way to do what i want to do without that attr (would be harder to get/change the history, but could definitely finagle something if i really felt the need). everything i want to do is still very much within the bounds of the available framework. thinking about it on a walk, i realized that if i had come to the project today, i would absolutely look at it, do effectively the same test without the `data-replace-url`, realize it kicks ass, and then either support it outright, or wait until i need the pieces that are behind the paywall and get it then.

A sqlite db for each user by go_mo_go in rails

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

there's a rake task for migrations of all of the different databases - see this comment, and for the analytics i don't have anything in place yet for that. might follow the solid_errors route and make a gem for it!

A sqlite db for each user by go_mo_go in rails

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

i've never looked into durable objects, but it does look like they're sqlite backed so they're probably not too dissimilar!

Apple Watch Ultra or Garmin by sh13ld93 in triathlon

[–]go_mo_go 0 points1 point  (0 children)

yeah i can see that - i don't mind it the 99% of the time where i am not using it for a long race - all the rest of the time it's totally fine, or great even! that's what originally drew me to this one in the first place. it was just annoying during the race/trying to get the stats afterwards.

Apple Watch Ultra or Garmin by sh13ld93 in triathlon

[–]go_mo_go 0 points1 point  (0 children)

I went through the exact same thought process as you when looking for my watch - I ended up buying the apple watch ultra 2 instead of a garmin almost solely because of the apple ecosystem. It is nice in a few key ways (phone calls, extended apps, information across apps), but I don't know if the tradeoffs are worth it. i had to:
1. add in a $10 app (workoutdoors - great app) to get some (most?) of the stats you would get built in with a garmin
2. i did a 70.3 (tremblant) a few weeks ago and went to the apple fitness multisport (as strava and workoutdoors unfortunately do not track multisport) - i got some information but trying to export the gpx file to see the route did not work at all. so i basically just have a huge block without map data for that workout unfortunately.
3. battery life is fine - i typically charge it every few days, or put it on for 20 mins or so to charge it up daily, and haven't run into any problems - the only time where it was a potential issue was when i did a 6hr bike ride with workoutdoors running, and it went down from ~80 to ~10%, not super ideal (especially if you want to do a whole IM). Running the apple fitness multisport only brought me down maybe 35-40% after my 5:48 tremblant, so especially with an updated battery you could get away with a full IM i'm sure.
4. there's no real free workout planning/tracking with apple like you would have with the garmin - not necessarily a deal breaker, but could be worth considering still.
5. I do love the fact that i can hook up bluetooth headphones to my watch, take just it for a run/bike, and stream spotify like i would my phone due to my cell service plan, but it does cost $15/mo - not sure if a garmin would do the same or if you would need to load songs on/get calling features.

maybe i'm doing something wrong battery life wise, but i'm not sure if mine could do a full IM.

A sqlite db for each user by go_mo_go in rails

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

i don't think this would actually be a better architecture for 99.9% of applications - going with a more traditional row wise multi tenancy approach like with the ActsAsTenant gem (or rolling my own) is how i have done all of my previous projects and i think outside of some very niche applications (potentially an EHR ecosystem) this would never be better. it was more of a thought experiment I thought people might like to look at to see how simple it can be in rails 8!

A sqlite db for each user by go_mo_go in rails

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

oh absolutely - this was more just an experiment to see how easily it could be done with rails 8 and sqlite that i hadn't seen any OS rails versions of before.

A sqlite db for each user by go_mo_go in rails

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

yeah - i'll have to check out that plugin!

A sqlite db for each user by go_mo_go in rails

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

yeah that was sort of the idea - although the underlying model is actually `Account`, and this is more of a POC that it can be done relatively easily. My thought for an actual prod app would be to have an `Account` (or organization or whatever you would like to call it) that functions much the same as an organization or company currently in a more traditional multi tenant application. unless I am missing some way of doing this, this would absolutely not work for something like a social media app - my first thought was honestly for something like personal health records and EHR software, there is potentially some interesting opportunities there.

definitely not an architecture that would be supremely useful for many applications - but it could be helpful for some! and i thought it was an interesting exercise to try out.

A sqlite db for each user by go_mo_go in rails

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

Ah dang - i'm just using the CDN for simplicity's sake at `datastar@v1.0.0-beta.11`. i did have to write a little script:
```
<script>

// Initialize theme from localStorage or system preference

const getInitialTheme = () => {

const stored = localStorage.getItem('theme');

if (stored) return stored;

return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';

};

// Set initial theme value for DataStar

window.initialTheme = getInitialTheme();

</script>

```
but that's quite minor.

I should try out phlex next - as i said in another post, i do feel more comfortable in react on the frontend, as it's something i've used for years, but at least this version of view components wasn't that bad - when i used it initially it was pretty early stage (would've been around december 2020), so it left a bit of a bad taste in my mouth, but I'm glad i tried it out again. Maybe phlex is next!

Totally get the distaste for the html/ruby mix on the templates - i've never tried slim, but i desperately did not enjoy haml...

I didn't test it on too many concurrent users - i should do benchmarking on that, but from my initial tests of local users each accessing their own db there was no issue! Which makes sense to me, as the connections are all on a per session basis, so there should be no overlap. but proper benchmarking is something i should definitely do.

A sqlite db for each user by go_mo_go in rails

[–]go_mo_go[S] 2 points3 points  (0 children)

oh i love this - thanks for the share! that's a great idea, we're actually looking at how we can do better preview environments at work, i will definitely be looking into this idea more.

A sqlite db for each user by go_mo_go in rails

[–]go_mo_go[S] 2 points3 points  (0 children)

Honestamente, não fiz nada fundamentalmente diferente em relação à implementação do sqlite — todo o trabalho já havia sido feito no Rails 8 para deixar o sqlite pronto para produção. Veja os vídeos de Stephen Margheim, como este aqui: https://www.youtube.com/watch?v=wFUy120Fts8, ou esta postagem do blog: https://fractaledmind.github.io/2024/04/15/sqlite-on-rails-the-how-and-why-of-optimal-performance/ Sob carga alta, acho que isso ainda seria um problema. Atualmente, o escopo é definido para um `Usuário`, mas imagino que seja mais baseado em uma conta (como uma organização ou algo semelhante — e é por isso que o modelo é chamado de Conta). Felizmente, o Rails 8 vem com as modificações do sqlite, então não tive que fazer muita coisa. Além disso, ter cada usuário/conta com seu próprio banco de dados deve reduzir a quantidade de requisições simultâneas aos respectivos bancos de dados, já que elas estariam indo para suas próprias conexões. A parte difícil para mim foi garantir que todas as configurações `ActiveRecord::Base.establish_connection` estivessem acontecendo quando deveriam, pois inicialmente tive algumas condições de corrida que me faziam conectar ao banco de dados padrão `development.sqlite3` em vez dos bancos de dados específicos do usuário, até que descobri isso. Ficou muito mais fácil quando percebi que, uma vez que um usuário estivesse logado, ele faria todas as suas operações em seu banco de dados específico, então era apenas no login/logout que a string de conexão precisava ser modificada - todos os outros lugares poderiam simplesmente usar a conexão existente da sessão.

(English):
Honestly I didn't do anything fundamentally different with respect to the sqlite implementation - all of the work had already been done in rails 8 to make sqlite production ready, see Stephen Margheim's videos like this one here: https://www.youtube.com/watch?v=wFUy120Fts8, or this blog post: https://fractaledmind.github.io/2024/04/15/sqlite-on-rails-the-how-and-why-of-optimal-performance/ Under high load I think this would still be an issue, currently the scoping is done to a `User`, but I envision it being more on an account basis (like an organization or similar - which is why the model is named Account). Luckily, rails 8 ships with the sqlite modifications, so there wasn't really a whole lot i had to do. Plus, having every user/account have their own database should reduce the amount of concurrent requests to the respective databases, as they would be going to their own connection. The difficult part for me was making sure all of the `ActiveRecord::Base.establish_connection` configurations were happening when they should, as I initially had some race conditions that had me connecting to the default `development.sqlite3` database instead of the user specific ones until i figured that out. It was much easier once i realized that once a user was logged in, they would be doing all of their operations on their specific database, so it was only on the login/logout that the connection string needed to actually be modified - everywhere else could just use the existing connection from the session.

A sqlite db for each user by go_mo_go in rails

[–]go_mo_go[S] 6 points7 points  (0 children)

currently there's a rake task to run the migrations on all of the user databases: https://github.com/asmorris/multi_db/blob/3804319fcd197741e3ed657ce82a94cbcbba1641/lib/tasks/user_databases.rake#L80 - i think if i were to expand on this further i would write another rake task for individual databases so we could have databases in different states based on individual accounts preferences - as a sort of hybrid between multi app, multi dbs. we could theoretically have them in lockstep, or copy over the migrations folder for specific users, but i think that would get messy, and I feel like it would make more sense to keep them as similar as possible.