Keef
TTCTheo's Typesafe Cult
•Created by johnny the fifth on 11/4/2024 in #questions
is it ok to have two rows for friendship between two users in my friends table?
You can also google sql friendship table if you want a quick answer
4 replies
TTCTheo's Typesafe Cult
•Created by johnny the fifth on 11/4/2024 in #questions
is it ok to have two rows for friendship between two users in my friends table?
You should focus on playing to the strengths of a relational database and what kind of functions do you want to enable from the choices you make in regards to your schema.
So is there a particular reason you find yourself reaching for this route versus just using a simple record with two foreign keys and a status.
The query for your approach is more expensive and complicated compared to just an or check on user_a and user_b then a status =1 or something in the latter
4 replies
TTCTheo's Typesafe Cult
•Created by Isaac on 7/7/2024 in #questions
How to generate files and upload to Github?
In a nutshell you just have to generate the files then push them through a integration that lets do the things you need to do
So you will likely just run into two issues:
1. Working with files (file creation) in a serverless context
2. Permissions issues with GH
I'd also say you prob don't want to use an auth login to grant these permissions because I'd be a little suss'd out if my signin is asking for repo r/w compared to a prompt that asks me to grant it the access.
It'd be best if you share some code on what you are doing/struggling with more specifically over asking a broad question. I don't mind helping its just the reason why you don't see any traction on your questions
3 replies
TTCTheo's Typesafe Cult
•Created by 6t8 on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
If you want to avoid using a SaaS you can take a look at this: https://docs.soketi.app/
18 replies
TTCTheo's Typesafe Cult
•Created by 6t8 on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
I usually just do this w a websocket and most people do too. Chats are realtime so its a perfect use case for it.
With a socket you are gonna have two parts for data :
Initial seed -> Getting the previous history for a chat through a http req or graphql doesn't matter
Listen for new messages -> Get them to the page someway
I've used it with tanstack query to create the initial seed portion and manipulated that query's cache to push new messages onto the front through a listener on the channel/room/topic/whatever
18 replies
TTCTheo's Typesafe Cult
•Created by Musashi20XX on 12/28/2023 in #questions
Is this Theo's Only discord server(asking because of most recent video)
7 replies
TTCTheo's Typesafe Cult
•Created by Musashi20XX on 12/28/2023 in #questions
Is this Theo's Only discord server(asking because of most recent video)
There’s a subscriber part of the discord that’s gated unless you sub through twitch/patreon/YouTube(?)
7 replies
TTCTheo's Typesafe Cult
•Created by futurama on 12/26/2023 in #questions
Is there any example of implementation of external API usage?
For http codegen you can do something like openapi generation for your java api
5 replies
TTCTheo's Typesafe Cult
•Created by futurama on 12/26/2023 in #questions
Is there any example of implementation of external API usage?
I don’t have any links but this is very doable through something as simple as http or you can pull in Graphql depending on your wants and needs.
Only thing you really have to work around is making sure your typings are in sync if you are running it in production. If it’s a hobby thing just write the types yourself in zod and just validate the returns if you go the http route. Graphql gives you the typings already which is nice and it’s a great way to connect different language systems
5 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/22/2023 in #questions
Genius ask the Java problem question in Typescript relate server
Yeah I was guessing this too. nice to see it was the right idea
7 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/22/2023 in #questions
Genius ask the Java problem question in Typescript relate server
That’s why you see that issue
7 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/22/2023 in #questions
Genius ask the Java problem question in Typescript relate server
Probably some compiler optimization is being lost when you do the separate three ifs versus the one control flow
7 replies
TTCTheo's Typesafe Cult
•Created by gisketch on 12/2/2023 in #questions
What is this app Theo is using for his diagrams?
excalidraw
3 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
that cheeky timeout should prob be addressed at some point lol
41 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
as in index lost
41 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
and thats when you fall out of sync ?
41 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
So which line in there is a writer
41 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
boom
41 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
add a ts next to the ticks
41 replies
TTCTheo's Typesafe Cult
•Created by Matt on 11/29/2023 in #questions
Google sheet api / scaleable api
like such
41 replies