#development
1 messages · Page 301 of 1
I have directly contributed to this. The absense of hiring is also a thing.
Most I've seen so far is how incapable people are at using LLMs and "create" stuff without prior knowledge
Which then claim to be theirs
Well absence of hiring is honestly in my opinion because way too many people think it's now possible to just jump in such a career and expect a breakthrough yet don't know any basics
Sorry, I'm getting off track again. I've built applications that use LLMs that have directly contributed to folks getting laid off.
But engineers? Nah. My team has 2 engineers and we outwork the rest of the organization (both those riddled with tech debt / newer teams). Leadership eyes are on us to "coach" / "teach" others – but it did turn into them laying off those that didn't attempt to use our methods.
Not sure I can claim that it was "llms" vs. those who just refused to learn / had other issues ... so they used the excuse.
They heard way the media say LLMs will replace engineers, so they started to use them in a hope to change careers (because it likely pays more?) without a tiny bit of knowledge
Saw an example 1-to-1 because someone made a web app without a single knowledge
The code is horrible to maintain or whatever, vulnerabilities after 2 lines, ...
Yeah for sure
People just tend to use them wrong
As with anything new haha
I've gotten to the point where I really don't touch code anymore / losing my speed I once had
But I can prompt an AI to death and coerce it into doing what I need in a scalable manner so it's not too bad.
There is a new term coinced "slop debt". I think it's interesting.
I mainly use it for boring tasks
Personal projects so I don't care how quick I am or not, I mainly want to improve and learn
what
Exactly, "the what"
oh lol
What
isnt there a way to fix it ?
Fix what 😭
why isnt it showing in dms 😭😭
Quite frankly I have no clue
damn
just this morning ive had it write c++ code that frees uninitialized memory too 💀
the awful and unsafe pattern where you have a class free its own memory allocated by new in the destructor
biggest footgun ever
make the class call the constructor in the destructor instead :v
Only thing I use AI for is to analyze errors 
Every now and then I get junie to examine my code if I run into a problem and suggest a fix
why does my databse get randomly deleted / isnt findable after each update and yes i have a database and yes it did work before
Where is the database hosted
in the terminal like it is in my terminal where i run the code and it is outside the codes directory but the code searches there as welll so it should work and it did work but now it doesn
for some reason
A database isn't hosted in the terminal
Where do you have it running
A simple MariaDB, MongoDB, etc. server or cloud-hosted e.g. a managed database on Azure/GCP/whatever
In the terminal be like docker run -d mongodb 
My guess is that people still consider JSON files or whatever as database
MongoDB is not stored as json files though it's still a database async read/write with collections and tables (many json documents)
Ok?
I was talking about their issue
[...] it is outside the codes directory but the code searches there as welll [...]
wdym my database is hosted inside chatgpt
chatgpt is getting so good at this
I just say
"get user with this id: 136583532972605440, I need their vote counts for top.gg"
And then it gives the data as text
“Give me bot token for mee6 bot”
Wait so the AI is able to use top.ggs api with your token....
That seems concerning 🙃
Also why do you need an AI to make a simple http requests just launch postman/insomnia
Oh we're joking ^-^
Dam whooosh
Although, we're at the point AI can do post/get requests.
AI IDEs are putting in terminal access for the AI, and the AI can do curl requests on your behalf.
Yea but you would be exposing your tokens to said AI that may be public or used for training and exposed at any point, very slippery slope
Gotta read the licenses tbh.
most of the big players have no storage/tracking policies if you pay per request.
would be a huge legal liability for them to not follow those policies
Never stopped them before
Pretty much everything that happens during the training is behind closed doors. Would be very difficult to prove that they aren’t actually collecting data
I think theres a difference legally with scraping public data and tracking data thats against your own policies
A huge chunk of the training data used for these LLMs was illegally scraped
if they wanted to track that stuff they would have not added it to their own policies
and getting caught would destroy their buisness side of stuff.
Not that I think they are violating their terms, but it just wouldn’t surprise me if they did
Although still will always be a concern
yeah
I think we are probably on the same page, I doubt they are but they could
I mean look at Roblox and the pdf situation
their policies are pretty good /s
Very difficult to catch them doing that anyways. I’m sure it’s somehow collected, but just maybe not used for training
They’ll end up “scraping” their own site later to train on 😉
Or selling user data at any point which is the common corp thing, even if you pay
Tbh, I dont think they will do that either. Since its buisness keys that have these policies.
for non scraping
or tracking
Honestly I think a lot of these companies aren’t valuable because of the technology, but rather the data they have access to
It would be like open AI training on Microsoft's employees requests.
Microsoft would be pissed, huge lawsuits, etc.
Microsoft would be happy given their ownership stake in OpenAI 😉
As long as that 1 trillion dollar IPO actually happens!
I'm still waiting on amperes ipo
I would have bought some if they went public when they said they would 🙁
I still think ampere gets bought out by someone
Maybe micron
oh no 😔
If I've only published a server, but not a bot, I can't get it, right?
The api is currently only intended for bots
There is no way to obtain data for servers?

not easily without breaking a lot of rules
web scraping exists but is against guidelines
noob
i cant make updates proply like this
data.sqlite it wont save
it just doesnt exist basically even tho the fiel does exist and it searches for the right path
and it still doesnt take information form there and it was working and i never delted nothing
whats your coding language?
java
what are you using to connect to your database? JDBC?
one sec
you mean wiht the bot

lol
on the program you’re talking about
yeah ?
alr
yeah the main code
java is shorthand of javascript
what does the console output when you run it?
Someone fast, paste that one image
Java 
what does your bot say when you start it?
show the full output in the console
yes sir
🔍 Found database at /home/thegoatchessbot/data.sqlite (Size: 4096 bytes)
🔍 Found database at /home/thegoatchessbot/data.sqlite (Size: 4096 bytes)
🔍 Found database at /home/thegoatchessbot/data.sqlite (Size: 4096 bytes)
🔄 Best data source found at /home/thegoatchessbot/data.sqlite. Restoring to /home/thegoatchessbot/main/data.sqlite...
✅ Data successfully restored from larger backup.
✅ Logged in as Quiz#3747
but where did all the data go the best resouce should be with all the data
did you check the files to see if it exists?
where is it? the file that has all the data
i gtg
larger db isn't necessarily the latest one, careful with that
-1 aura for not using better-sqlite3
-190 aure for using better sqlite
apparently node is working on their own sqlite3 module as well https://nodejs.org/api/sqlite.html
looks very similar to better-sqlite3
maybe a lot of the code was inspired from it
wahh does that mean nodejs size is now larger 😲
probably
Bun

If you have to use js I think that's the best choice(?)
https://bun.com/docs/runtime/sqlite
i haven't heard that name in years
apparently still alive 
got it
$100,000 for a domain is insane
@bitter granite can you help me with this domain /s
do people even buy these holy shit
startups do
💀
holy
i'm sure top.gg was an expensive domain name but that domain change was done when they were already popular
💀
nice
a few buckaroos
can i take my domain to pawn stars
what is this website?
damn there's a whole page for it 😭
lmoa the whole page just breaks if you want to appraise google.com
LMFAO
thinking of selling this domain ive bought a while ago and has just been sitting around, idk
bun has the most random libraries bundled with it, they even have an S3 library
https://bun.com/docs/runtime/s3
I mean it is cool though, since it uses the same api as local fs
@bitter granite WAIT I FOUND A GREAT DOMAIN NAME
its absolutely awesome, just random for a standard library inclusion 🙂
i need to make my own S3 api
bun my beloved
i presume its standardised
apparently apraising google.com causes this 
Oh didnt see you talkin bout it after
😭
gotta love a Next.js Application
What is it
it's secret 😔
damn exclusive gov domain only 2k?
i dont get why they just refuse to appraise certain websites like google or government websites
Don't want people knowing google.com is only worth 1$ 🧌
Well they're reserved either way so yeah
So pretty much free for them 🤷♂️
Kinda like Google's TLD
Using drizzle and I am running into a funny problem where the resulting query wraps a field in another array
const result = await this.db
.select({
id: organization.id,
name: organization.name,
slug: organization.slug,
createdAt: organization.createdAt,
logo: organization.logo,
metadata: organization.metadata,
members: count(member.id),
extensions: sql<string[]>`COALESCE(
array_agg(DISTINCT ${campus.extension}) FILTER (WHERE ${campus.extension} IS NOT NULL),
'{}'
)::text[]`,
})
.from(organization)
.leftJoin(member, eq(member.organizationId, organization.id))
.leftJoin(campus, eq(campus.organizationId, organization.id))
.groupBy(organization.id);
extensions results in a 2 dimensional array, and I came up with this because of the whole groupBy thing with multiple joins.
I found a solution which is to flatten the extensions in the result and return that, but that seems less than ideal (idk?)
this whole sql shit is beyond me, I haven't touched it let alone joins in a while.
wahhh what is this im looking at, prism?
What does it return right now?
extensions is a 2 dimensional array...?
[ [...] ]
thats the only field im concerned about, every other field is correct
What are you expecting for it though, 1d array?
it is only supposed to be a 1 dimensional array
yes
which is why I said I had to flatten it to get the correct result
Mmm
Using drizzle
I was trying to make the query as performant as possible
within reason
i see, thanks
interesting

I hope you have a wonderful holiday season—tell me, are you having a good Christmas holiday so far?
yes
This seems like some weird AI bot.... or just weird xD
It's the 5/6th now
Erm they also posted that in general
sheeeeesh!
😭
you are insane!
what are you making?
got a project from a company, learning k8s to run the program later
fun to learn infra :D
yoooo congrats!!!
i'm so happy for you! good luck on it! ❤️
thanks so much :>
Hey I am trying to get money by doing discord bots I have ai experience can someone help me to know how to find someone who can pay me for bots
Good luck, try on fiverr or upwork
I am under 18
fiverr allows under 18 use as long as your legal guardian owns the account
Oh god the zoomers are now using AI
that's a rlly rlly terrible idea
idk make a huge bot make a premium version sell it for monthly subscriptions
like arcane does
likelyhood of succes 0.1% prolly less tbh
And while you wait for your bot to become popular on its own, you will have to pay for its hosting 
you can do free one i am and really it has been working flawlessly
For now
but it prolly aint getting past 100 servers anyway

lol
do you know server for bot testing btw?
dawg all my friend only give 10/10 cause theyre my friends that aint helpful at all
Well I mean make bots depending on the customer
Wrong channel and wrong server
Self promo /jk
Lol
An LLM throws words/code at you and you trust and use it*
Hey! I’m looking for some dev feedback on the technical side and security of my project.
If anyone has experience with security reviews and wants to share some thoughts or tips, I’d really appreciate it.
https://dealraid.pro/
holy shadcn
so thats where those uis are coming from
yup
had a quick look and i see youre not verifying your jwt signatures in some places, but looks ok at a first glance without a full fledged pentest lol
time to get my hands dirty with some c++ again
Alright hit me guys, whatcha think? I know it looks basic but I dont have time to put in a bunch of mock data
Owner field in that add modal will eventually become a user select instead of their ID (Haven't worked on that yet teehee)
mantine?
Yeah
I am juggling the idea of using graphql for certain operations in my app. I was still going to use REST endpoints for mutation of data, but graphql for any querying. I want to decide now if it's worth it since I don't really want to do an overhaul later of the backend when it's already fully done, and would rather do it now. I also dont really have any experience with graphql so I wanted to ask your guy's opinion on whether its worth it to do it now, or wait and deal with it when it becomes an actual problem.
I love Go's -ldflags

graphql 😞
tbh graphql only remotely has a benefit when youre providing something like the shopify api where you have an absolute ton of available information whereas most users will only want a small subset of them
for an internal api only used by you i wouldnt bother with graphql, instead just make routes that return and do exactly what you want
does anyone want to review some beginner c++ 🙏 https://github.com/calagopus/fusequota
the curly brackets on new lines is making me want to cry
ye idk what formatter to use so didnt use any
i hate them so much that for my job that uses c# for everything i explicitly setup my editor to keep curly brackets on the same line otherwise i just refuse to c#
clang format i'd say 🤷♂️
never used c++ but seen lots of people use it
is there a way to check whether a member has a specific tag?
Pretty new to those tag thingies
like this
I think it's under primary_guild
check to see if ur lib exposes that in the user object
primary_guild.tag
if they have a tag, primary_guild will contain the data on it
Build games, experiences, and integrations for millions of users on Discord.
@eternal osprey ^^
ours are new line curlys 🙁
takes up so much space ahah
guild: User {
id: '...',
bot: false,
system: false,
flags: UserFlagsBitField { bitfield: 0 },
username: '..',
globalName: '[..]...',
discriminator: '0',
avatar: null,
banner: undefined,
accentColor: undefined,
avatarDecoration: null,
avatarDecorationData: null
}```
the primary guild object never really shows up, i assume it only shows up in case it actually exists? Aka if a user has a tag added?
i am so stupid i swear
ya no never mind the objects never exists even with having a tag.
i guess it's only in djs v15?
we still on v14?
v14 wont be out for while
15*
Mmmm, if they haven't added support for it in v14 or whatever the latest version is then yeah most likely
you can always work with the raw api data
it will always be there in that case
iirc there's a way to grab it via discordjs
it allows u to work with both the raw data and whatever they parse into their own class
Hello, how are you?
I value trust above all.
Innovation never waits.
With a new generation of developers, I help ideas become reality.
Open to serious, thoughtful collaborators.
This for some reason screams, "I'm going to scam someone"
mhm
They have been posting weird messages since they joined including double posting in general and development again
@solemn latch
How I get the urges to do a bit of tomfoolery and act like a bot like that sometimes to fuck with people, but I don't wanna get the hammer
One of these days I will make an alt that just sends periodic bot like responses
for no better reason than I am bored
innovation never waits indeed 
this looks like a very poor attempt at trying to get someone to message her then its probably just the typical crypto investing scam
the cons of putting vms to hdd xD
k8s on hdds 🥀
can kubernetes automatically spin up proxmox instances??
they have the talos k8s nodes in proxmox vms
ah i see

i would love to spin up a mini datacenter like this at home but i dont host/run anything that warrants it lmao
need to make myself a small business
better to have it than to need it
eh still useful for learning purpose if you want imo, that's why it's called home lab
and also maybe think about having NAS
wait you have a mini data center????
😭
you are scary man
what does that mean?
disk too slow for etcd to do it's thing
oooohhh
hey takiyo if u want i could donate you some of my money
nooo 😭 thank you tho
no no no no its fine
hdds when you literally have to do any IO at all that isn't sequential: ☠️💀
- i have 10 vms running in it

nah nah, tho i really appreciate you!
linux/ext4 runs somewhat ok on hdds but windows absolutely dies because of the amount of arbitrary r/w's it does
im maybe gonna buy a few hundred tbs of hdds soon
however i dont need it
but then i have it
so all good
i need to buy a few tbs because i want to start doing full disk backups of all my machines and cloud vms
just so i dont lose everything and i dont have to store everything with bill gates/google?
i do full-disk backups to hetzner storage boxes via restic
reaching the limits of my 40mbit uplink at home
donate to me
/j
sure
whoa
not gonna ship stuff though, just money
i will
noonono im just kidding 😭
github sponsorships
oh right
im a professional star buyer
paid tim to star my repos
wait takiyo doesnt have it
noted 
takiyo turn on your github sponsors now 🫵
so when send link to sponsor
Hi
no :(
Is it worth working on Java for discord?
Not to measure, I do love no JS
I just want to try something new
everyone likes no js at all
I mean, we had to remove the whole music part because the music part broke
Only works on Java
I wouldn’t be sure if I wanted to add it back
I wouldn’t be too sure how long it would actually take me to build it, especially how long it took your coat and no JS and then swapping it over to Java would be a big difference and actually learning how things work
I mean, I could probably do it but the only thing is my developer only knows no GS and confuses us to use Java. I only know JS.
Java is very different from JavaScript
That’s fine, but I would recommend probably not starting with a discord bot as your first introduction to Java
At the moment, our disco bot is no JS
It’s not a particularly hard language, it’s just a big difference coming from JavaScript
But if we can get it to work, then we could probably get the music part working again
Because I’m raising our music doesn’t like no JS
9/10. Attempts crashed the boat.
Why tho?
I highly doubt that the ONLY way of fixing your bot is switching languages
I don’t know where you’re getting that from
it's pretty easy to learn if you have already familiarized yourself with OOP imo
The music thing that we’re using, which is used by many other bottles lava link which is like a music thing
one of the notably challenging parts is its generics
Ehhhh, maybe. It depends on how you learned. Java being statically typed and compiled is a pretty big jump from how flexible js is
I'm pretty sure I've seen it in js bots too
but its OOP is still pretty high level compared to something like C++
Yea because it's trash in general
It’s cause I can’t keep up with version updates on live link
We have it on another button and it’s working completely fine on Java
I don’t think lava link is keeping up with their versions causing everything to break
Worked for two months and then died
Even tried to update the version, nothing else even tried to downgrade it still nothing
We just completely removed the music part because we couldn’t fix it. We’ve tried multiple times.
Even though we’d like to have it
probably only package on java works
I’ll probably just stay with no js as music is not really needed
good idea, js sucks anyways
Actually, no GS pretty easy
I started using it
My first bot started in 2017 using it
i was just picking on you because its called node.js so it sounded like you were saying no javascript 😭
That’s when I first started to learn how to use it there was a crappy little butt, but it still did his job
No, that code is so outdated. It would probably never work again even if I tried.
I know you’re joking. It’s fine.
It only got up to Alpha 1.6 and never launched
If I could find it, I’d probably add it to get her as my oldest one.
Remind me it is super outdated so it wouldn’t really work. It’s using an old version of JS.
That was the first time I started learning it some good memories breaking stuff and figuring stuff out.
It was kind of a learning curve for me the fact that I’ve learned stuff over the years was pretty cool. Learning about how version worked how service worked how everything worked. I’ve learned so much..
The one mistake that you have to realise is always make backups before you actually launch it in case you make an error or a bug
Use git
zip >>
I don’t think I even have it any more
I think my friend deleted the office storage device
Git can be easily managed on a cloud provider like GitHub or GitLab, definitely highly recommended to not lose anything
I’m pretty sure he’s deleted it sad face
It also helps if you make a mistake, you can revert to a previous commit almost instantly
Yeah, that’s true
We are doing that
What we do is we have a test bot and a real bot. The test bot is more for testing commands that we are gonna add so that way it doesn’t interfere.
even more fun to host your own like gitea or gitlab (if you have the ram)
storing my code on it more and more because while i dont mind llms being trained using my code im not getting any money out of it so go away microsoft
Yeah, I love hosting providers but you can never trust what they can do half the time. It’s easier if you host yourself at home.
The only thing I need to worry about is hardware and upgrades an Internet?
I want to keep my butt 100% free
99%
I mean, with nice panels they can access it the administrator such as pterodactyl make it access all your folders see everything you’re doing
I’m a type of guy that has trust issues
that's why u use bare linux instead of panels 
We hosted ourselves it’s cheaper and reliable
hey everyone! quick question:
if my program has multiple render processes off-thread, what would be the best way to communicate progress (like rendered frames or completion percentage) with the frontend without excessively wasting performance?
this problem has been bugging me for the past few days

my vote:

estimate then sync
Would channels be a good use case for this?
well i dont think channels are that performant when you are sending data after every successful render, no?
which would be super frequent
finally got gateway API working + make authentik using it 😭 this thing is much much different than docker
great job!!!!
you are amazing!

I mean it depends on what you’re using it for
thanks 😭
Channels are for async communication
what do you think of polling an atomic number every ~16-50ms?
If you want realtime then you might have better luck with Arc<RefCell<T>> yeah?
Uhhhh why is your auth not secure
refcell? what about atomic numbers?
yum free credentials
thanks to this i know takiyo's location now
Sorry I meant Arc<Mutex<T>>
Btw i would change authentik. to just auth.
You could also just do Arc<AtomicU32> or something
oh god I hated using authentik
props to you for doin all that
authentik was just wayyyy too limiting for my usecase though tbf
what do you think of polling an atomic number every ~16-50ms?
how would you guys approach it? @sharp geyser @pearl trail
if this is a rust question beyond me
and if its a frontend question even more so
💀
uh it's more of a multithreading/concurrency question
mmmm
I've never touched the idea so idrk myself
shush its local only
Is your frontend like fetching a backend api each time?
😭whats wrong with it, is it suck
for the past month i have been working on the directx backend
Wait local only with a domain 🤔 what kind of wizard stuff are you doing
slow progress 😭
nah it doesn't suck, I just didn't like authentik's setup and the usage thereafter
yeah im afraid when it comes to that the concept is beyond me
I've not touched multi-threading in any capacity
maybe takiyo
depends on the ordering, but do keep in mind that atomics invalidate the cache line that its on so memory access to surrounding memory on the same cache line (64 bytes usually) you may have a slight penalty
but its so small and since youre talking milliseconds you wont notice anything
lmao, i got some of my apps running locally for lab like jellyfin, *arr stacks, all accessible through a domain, so i have dns server on my vps that rewrites dns queries and tunnel to my home network and through vpn if i were outside
and proxying yes
i think i am just going for relaxed
That's kinda of excessive levels of dev stuff and insane lol
xD fun to learn
But then other people can still access your domain though with no ssl or cloudflare which is still risky to have things exposed like that no?
Especially to your own computer 🙃
I don’t think it would cause any issues
oh no, you must be inside my local network, which requires on my house or,, hack tailscale ig to join my network
its also ssl enabled for local
sheeeeesh
i use nginx for proxying most stuff, so easy. that authentik thing is im just trying k8s’s ingress
I wish i have enough time to properly learn everything
I am juggling around 4 projects right now
Not including uni and its projects and homeworks

I am always occupied yet very slow on progress it's so suffocating
i'm already on my second year in uni and i feel like im lagging behind
i really need to catch up
i dont want to waste my age
yeah well takin on 4 projects and in uni is wild
k8s is the hardest thing i learn so far
k8s is like docker on steroids
k8s uses docker
yeah
It’s an orchestration tool for containerized applications
like, usually you just need web server, proxying with nginx/apache, youre done. with k8s, you need:
- load balancer
- ingress/gateway API <- this is for proxying
- make bunch of stuff, like HttpRoute, Gateway, Service, Deployment, and many more
Docker compose is a very very basic version of k8s basically
Its very useful for scaling your docker apps across servers
holy
the configs are hard too xD
sounds like angular for docker
but i understand why its an industry standard
Most people will never need k8s in a personal capacity, unless you have a project that gets really big
Otherwise k8s is overkill
yeah
Just for learning mostly
yeah, i started learning it fast because i recently just got a project from a company, so might just all in myself to build the infrastructure and the apps
I pray mercatus reaches that need
that means I either suck at managing performance OR I really need it

Usually a mix of both
good luck!! you got this! 🫶
thank you!
btw waffle did I tell you mercatus v3 is underway 
I’ve seen some of your screenshots but didn’t know that it was v3
also please let us know of the things you've learned along the way 😭
Good shit
Well yeah i've tried 2 other times but lost passion
Now im back at it and im much further along then I was the other 2 times
sure thing xD things might just so complicated i can’t even explain anything
im focusing on one aspect at a time and fleshing it out as much as I can before I start needing other stuff for it to function
I’m procrastinating at work rn
but you're learning a lot and to me it seems that you understand almost everything hahaha
I'm less procrastinating and more doing slow progress
🐌
I need to focus on my personal project more
I feel like I’m hitting a wall where I don’t know where to go
One thing I dread still is....Stripe
Trying to figure out model loading rn with materials and meshes and such
the bane of my existence stripe
me every day
or "this is going to be time consuming"
and the moment i focus on my project its already 2am
Yeah
lol
write your own stripe that is 100% fintech regulation compliant and safely stores encrypted credit card numbers (you encrypt it with the secret being hard coded into the source code)
pci level 1 or some kind of nonsense
yeah and after I will wake up from the nightmare to be met with the IRS and every other federal agency because I accidentally leaked millions of credit card and debit card numbers
😭
I've seen this asked before but I'm confused/curious. Can two different guilds end up with the same exact role ID? I would think not, but the docs aren't clear about that.
https://discord.com/developers/docs/reference#snowflakes
Discord utilizes Twitter's snowflake format for uniquely identifiable descriptors (IDs). These IDs are guaranteed to be unique across all of Discord, except in some unique scenarios in which child objects share their parent's ID.
However, all of the API endpoints for roles are under the guild's bucket (/guild/{guild.id}/roles, while channels are under their own bucket (/channel/{channel.id}, with the exception of getting a guild's channels).
Build games, experiences, and integrations for millions of users on Discord.
The everyone role is the same id as the server id after like 2018 or something
I didn't say anything about the everyone role..?
You didn't but there are still cases of same ids
That's not what I was referring to though.
very unlikely
snowflakes are used for that very purpose
to avoid it
I need a bot that notifies me when someone new joins a server
One of the more simplier things people can code so just go on top.gg and search for one 
Why search when you can ask 
discord snowflakes include a timestamp of when the ID was generated including the worker it was generated by so its not possible, even if 2 workers generate a snowflake at the exact millisecond
(unless time magically goes backwards)
what if one of the workers has an identity crisis?
also just spent 1h on an issue that was a 1 line fix of changing .flush() to .shutdown() shoot me
Lets hope your server dosen't get join botted/raided 
guys i have a question how does one use dropdowns with modals
or selectmenus
u could say
i died looking at discord.py's documentations
Good thing there are examples over at https://github.com/Rapptz/discord.py/blob/master/examples/modals/report.py
Thank you so much bro
Ummm guyz who here have a good knowledge about lavalink cuz the thing is iam trying to use it in the place of yt-dlp for my music bot cuz the ytdlp was not working in the hosting site i was trying to host my bot cuz of youtube bot protection and i tried lavalink by hosting lavalink on different server and trying to connect it with my bot but it does say lavalink is ready to accept connection but it doesnt conenct with the port and ip stuff idk what is wrong GPT said the hosting server is blocking the connection and nothing can fix it
chances are lavalink is blocked by youtube or the network stuff you need cannot be done at your level
😭😭
what level do i need then
site developer for the host, or something that isnt blocked by youtube
basically you need to own the host or find smth that works
i was thinking of hosting the with orange pi or raspberry pi
what can work can you tell me ?
depending on bot size, raspberry pi zero 2w, pi 3b, or anything newer than that is good
if its only in a couple of servers and isnt anything demanding, a zero 2w could work
3b is what i recommend though
raspberry pi 3b ?
yes
well thats cheap
~£33 new
also it is not in many svs prob like in 5
it has 1gb ram so cant do anything really demanding but is good
i host my bot, dashboard, and another bot on it, totalling ~107 servers and it runs fine
3b or anything newer is good. the more ram the better
its all about ram ?
and also it will connect to my internet and if my internet dies the bot dies ?
i mean like the processor ?
yupp usb power is work able
it matters but not as much
cpu is more important for music bots
heres a tier list of the important stuff
wb other alternative like a hosting server that will works good ?
oracle cloud free is good but is difficult to setup and you will likely have issues
if its network based issues, you likely cant fix them
how much are we talking about ?
depends what youre talking about
will it lag if 4-5 svs are using bot at same time
depends what the bot is and what youre hosting on
music bot on you said orcale cloud
just get datalix vps, very very cheap 😍
can’t say their cpu is the strongest, but you can get high amount of memory with a low price
congratsss!!!

can't wait to see the amazing projects you cook up with it
works for asia ?
cuz there is these two .eu and .de
nonono im just telling that datalix is worth the price :>
hm mostly europe, their asia is a bit expensive
then you can try ovh for asia, but good luck finding available stock in asia
its literally like available only few hours in a month
*for the vps
noted!!!
this ?
takiyo do you have a go-to domain registrar?
yeah
im loving spaceship recently
or do you just find the best one in tld-list.com?
why so?
@low marten guh... status says its alive
cheaper price than other registrars as far as i can see
ooooh
and also modern ui xD
💔💔 why do I even pay for server hosting ATP
Sorry I'll turn it back on
dw lol
cloudflare's seems interesting to me because it's by... cloudflare
just thought it was funny that status said it was all ok
out of stock
lmao, yeah anything is fine, but i tend to find the cheapest one
yeah as i said, it’s always sold out, usually only available few hours in a month
tho i got it

oh my status thing kinda sucks right now, i plan on reworking it when i switch to hosting it locally

as much as i love the cheapest ones, i am always a bit skeptical hahaha
!!!!!!!!!
can second this @radiant kraken
its also what I used for mercatus' domain
the thing with cloudflare is that it doesn't support EVERY tld
you can only buy a few tld variants
they are working on getting more supported but rn its just the basics
otherwise I would of gone through them for it cause iirc cloudflare also offers some rather cheap prices
"a few tld variants"
Not all/every (no registrar has that either way) but wouldn't call it "a few" or "just the basics"
Cloudflares registrar is the best though, there is porkbun i think too that people like
Moved from Namecheap to CF last year
Oh wow
they expanded since I last checked
my fault
I remember trying to buy a domain from them and it said unsupported TLD
Anyone versed in typescript can explain how this type works
export type PlatformResource = keyof typeof platformStatement;
type ActionsFor<R extends PlatformResource> =
(typeof platformStatement)[R][number];
export type PlatformPermission = Partial<{
[K in PlatformResource]: ActionsFor<K>[];
}>;
I know it works, but I don't quite get how. The original problem was that I had Partial<typeof platformStatement> but that didn't fix the issue of the arrays requiring EVERY entry of the array to be present
e.g
const platformStatement = {
organization: ['create', 'delete', 'update', 'view']
}
I couldn't just do {organization: ['create']} I had to supply all of em.
same
found out namecheap was absolutely overcharging me for my .org domain, asked support if they can match cloudflare and they told me i can only get discounts if i order 100 domains or so (lol does anyone other than resellers do that), so just moved to cloudflare
how do you move it fully to cloudflare? they increased my price too to the point where its not even funny
transfer it
im stupid right
Partial<T> only takes properties of the supplied type which in this case would be the Object. You'd need to make an UnpackArray type which is
type UnpackArray<T> = T extends Array<infer R> ? R : never
And then you can refer to the Array through (typeof platformStatement)["organization"]
so is ActionsFor basically just unpacking the array?
No because you aren't inferring the Array elements
at first, it might say R is a string from UnpackArray, so you may need to add as const after every string in the Array
I'm able to now apply some or all of the array elements
I see
I was hoping to better understand the types I supplied though
I am not quite sure how what you're saying relates to what I displayed
You're unpacking the types in a bit of a roundabout way, but if it works for you then cool.
Whenever you declare
{
[K in keyof typeof someObject]: someObject[K]
}
You're effectively rebuilding the Object type and you can loop and filter properties in Objects this way. The built in Pick<T> and Partial<T> types work in a similar fashion
Ah I see
Then what exactly does ActionsFor do?
Is it just a helper type for getting the appropriate array in the object?
The generic R =keyof typeof platformStatement which would would evaluate to just "organization"
platformStatement["organization"][index]
You can access Array elements by index in ts via constant numbers like 0 or even "0", but I guess number acts as all indices
Very cursed way of doing it imo lol
How would you do it?
Like this
If they're constant values and dont appear as just string then you can get a union of all of the elements of the Array
Something I do for a slot machine
Interesting
I had to union "heart" into the type
const fruits = ["apple" as const, "cherries" as const, "watermelon" as const, "pear" as const, "strawberry" as const] // plus heart, which is chosen seperately
Mmmm, yeah unpacking the array like you suggest though leaves it to be undefined
at least after my testing
What does the type of the thing you're passing into UnpackArray evaluate to when you hover it
string[] from what I can tell
then the type you get back should just be string
weird
Might need to add as const like I suggested but just use what you had lol
I get stuck in my own ways
I was just curious how you would do it anyway and wanted to see the result in my case
:p
Plus I use it for decorators anyway
Well. Hopefully now you know about infer
@HasPermission({ organization: ['create'] })
I've had to make the most cursed types ever using infer
well infer sounds self explanatory
it just infer's whatever the generic type is no?
kind of like any but giving it a genuine type afterwards
export type InferMap<T> = T extends Map<infer K, infer V> ? { key: K, value: V } : never yerp
Can only use it in ternaries afaik
Dont look if you value your sanity
I regret looking
It's pretty bad
yep only ever do a transfer when youre close to renewal
but not too close because transfers arent allowed when youre too close to renewal
3 weeks to a month or so is prob safe
maybe 2 weeks even, theres probably some kind of icann policy that dictates this
just a quick question is there any good way to play a wav file in js without using html?
this is my current setup but its unreliable and has issues
JS isn't really a good language to be doing audio processing or playback. wav is a container format and can be used for other types of data. The most common is PCM, but there's also ADPCM and allegedly also MP3, so you'd have to account for plenty of things.
Honestly, I've went down the road of trying to make my own player node for Discord to rival LavaLink, but it ended up using ffmpeg a lot of the time and I wasn't so interested in either depending on or making bindings for native libraries.
https://github.com/AmandaDiscord/Volcano/tree/rewrite
If you were curious about my journey in audio
I'd like to note one thing I'm actually using this outside of discord for an application I'm working on.
I can understand that as I see you're using the speaker module. All of my points still stand
but if it's somewhere in the browser spawning a hidden audio element and using that would yield the best results
They're trying to do it without the use of a browser.
I was also insane enough to try to do some kind of wasm loading to emulate a browser in node, but performance sucked
@radiant kraken am I the only one with the opinion that people tend to release Rust crates too much?
e.g. serde_json releases a new version like at almost every merged PR
And then obviously you end up with e.g. the version 1.0.149
i don't
i don't mind it really
yeah i dont think its an issue
a lot of software/packages bundle multiple changes/fixes into a new version but i dont think releasing a new version for each patch is an issue
just gets the version out faster, albeit maybe a little less stable/tested i suppose
but i would agree its a bit inelegant
I should probably just put renovate for minor versions and not patch
you are unequivocally impressively amazingly spectacularly right!
✅
luckily cursor made their own coding model (may be a fine tuned claude model?) but they made it so it doesnt glaze you or output pointless preamble text on each prompt
it just says "doing xyz" and writes the code
guys can someone recommend a 1$ nodejs server/test server
google compute engine has a free tier
i use it for testing and running small stuff
oracle
f u

i need it online 24/7 tho
I thought it turns off after a while
it is
nope
not much of a server if it cant run 24/7
jokes on you, my server runs 48/14
lol
24/7 already covers 48/14
no it means it runs 48 hours per day for 14 days per week
lmao
my brain is not working
thanks for the knowledge
ooohh
Good afternoon
good luck with it! 
good afternoon waffle!
I lowkey thought this was general chat whoops
what things have you learned so far in infra?
it is now
not much, just researching things like loki, eck. already know the k8s basic
interested in graphql also 
idk is even using graphql worth to try or not
i'm sure it is! i'm sure you'll love it!
learn everything you can grasp upon! 

TS2367: This comparison appears to be unintentional because the types "developer" and "admin" have no overlap. tf is typescript talkin about
can I seriously not do
if (session.data.user.role !== 'developer' || session.data.user.role !== 'admin') {
router.push('/');
notifications.show({
title: 'Unauthorized',
message: 'You are not authorized to access this page',
color: 'red',
});
}
Why doesn't it make sense
this check will make everyone authorized
if the role isn't developer or isn't admin then perform the if
the rest can pass
right, my intention is that any non-developers and non-admins are unauthorized
neuron activation?

Yeah
It finally turned on
I just got off work
Dumbass customers rubbed off on me
lol
root@remotedev:~/projects/0x7d8/wings-rs# cargo clean
Removed 111117 files, 101.3GiB total
oh my days
your car was not going.
I know im late but try using roles ids might work
Not a thing
huh
damn
i would just use users id for that
make shit easier and not have to fetch main server roels
roles
very future proof
oh
Yeah, nah nothing to do with discord
At most I will have a discord integration for notifications sellers can make use of if they want
not really, it would actually make everyone unauthorized since it will always be true
me when I lie on the internet to install a backdoor through social engineering
tbh I'd simplify the expression to just if (!allowedRoles.includes(currentRole)) return deny()
he doesn’t even use role system
very awsome
what do you mean?
why so?
well firstly, you can't change the role name, second, performance, storage. tho this depend on every project, but i myself always prepare for the worst in the future
ah i see i see, interesting
from the way i see it, while aaron would have to create a new table, in return he would give more freedom to his users
but i also understand if he sacrificed it to save space
he has also planned out the permissions system ahead and how they would work out, so it's already baked in the application
can you elaborate a bit more on performance/storage?
what this means, create table for what specifically
i assume without id, the role name is the pk. then any other foreign key will store it as a text, which increases storage. also integer/serial pk known to have faster performance when joining
he would need to create a role table to store roles?
😨so he doesn’t have table for role?
not sure, have not looked into his database's schema yet
atp idk is that normal or not. now i doubt my knowledge
he probably wanted to keep it simple for his users, so they can just assign prebuilt roles to others and go from there
unlike discord which could allow for flexible roles, his application already has a permission hierarchy
but from your approach, if aaron wanted the ability for his users to be a developer and admin simultaneously and make his website more flexible by making sections of it easily disabled/enabled (at the cost of arguably higher overhead), then that's fine too
hm, alr then if it’s already the best approach for him. only he know how their app works xD

don't worry, i understand where you're coming from! there's no right or wrong here, both sides have their pros and cons!
anywhooo, how's your learning process so far? how's graphql for you? @pearl trail
indeed, and today is none, need to prepare finals 
least bloated rust project
hold on let me check mine
Holy moly
new css features combating JS
not that much :/
least least bloated rust project
node_modules joined the game
my react homework's node_modules 😃
react projects have such an obscene amount of files just for a fresh install
my uni does
our homework instructed us to use react (the lecture note mentions CRA) + react router + express + mongoose
i hate this corporate speak "sunsetting"
yeah standard setup. getting it to install took 10-15 minutes of downloading random packages lol
for sure
might've misquoted, it's been a while since I last used it
it came pre-packaged with an asp.net core app with a react frontend as a "template". i remember being so annoyed by the setup (ejecting specifically) that I just picked up react from scratch
what do you expect more from meta
oh right i forgot react is owned by the zuck people
interesting
maybe they'll borrow some ideas from svelte
though they did introduce runes which basically reactified svelte 💔
runes are pretty cool
writes like react with less bloat
my choice is still react though since my favourite UI libraries live on it
i havent migrated my project to runes yet (they let you enable a compatibility mode with latest versions so everything keeps working until you migrate) so cant fully say if i hate them or not, but dont know i feel like what made svelte svelte was that variables were just reactive by default and automatically inferred it, but i suppose runes solve a lot of problems with that automatic inferencing and loss of precision
i already opt in to writing my own animations and components so it allows me to stay in svelte full time, ive always had issues with outdated react component libraries which then cause issues when you try npm install but i suppose thats not an issue with more popular components
yo
anyone knows a free good api
for ai
chat bot ?
cause i ran out fo free from chatgpt
my chatbot doesn workt anymore
😭
It’s not unlimited but Gemini is kinda the same
how limited is it?
It has a daily cuota, depends on how much your chatbot is used
i see
Me personally, I use it on daily basis and rarely have reached that quota
got it
alr
Didn't know Gemini had a free api tier
gemini api is so bad dude @tacit kindle
you chat like 4-5 chats or msg
then it says quota over
😭
oof
dyn dyn dyn dyn dyn dyn dyn
whenever is see async my ptsd gets triggered
ts was a bug in my code i highkey spent a full half day finding the error
i've been using Rust for like 5 years at this point and I've never for once used dyn

time to make them be
why
how do you make this dyn compatible?
the Backend trait is used everywhere throughout the app's backend
so i can port my app easier
step 1 make all functions accept &self, if you need the new() fn, put it in a seperate trait
step 2: use the same error type everywhere, it can just be something like anyhow where you can downcast if needed
step 3: remove all other direct types on the trait and use boxes/arcs with dyn content, or once again a wrapper type that makes that part easier
step 4: rewrite for 23408hours and profit
Vtable abuse
vtables scare me
to clarify role name is not the pk, it's not really anything other than another piece of data.
It isn't something a user can create, it is internal roles
That's why it's not in it's own table, it's simply just a role name assigned to them in a role field on the user table




