#development

1 messages · Page 301 of 1

stark kestrel
#

Well that sort of makes sense, though I haven't seen people getting laid off because someone with an LLM came

#

People claim lay offs are because of it, haven't seen clear cases so far

long marsh
stark kestrel
#

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

stark kestrel
long marsh
#

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.

stark kestrel
#

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, ...

long marsh
#

Yeah for sure

stark kestrel
#

People just tend to use them wrong

long marsh
#

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.

stark kestrel
#

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

civic sundial
#

what

deft wolf
#

Exactly, "the what"

civic sundial
clever tundra
civic sundial
clever tundra
civic sundial
clever tundra
#

Quite frankly I have no clue

civic sundial
frosty gale
#

the awful and unsafe pattern where you have a class free its own memory allocated by new in the destructor

#

biggest footgun ever

lyric mountain
#

make the class call the constructor in the destructor instead :v

sharp geyser
#

Only thing I use AI for is to analyze errors mmLol

#

Every now and then I get junie to examine my code if I run into a problem and suggest a fix

tacit kindle
#

why does my databse get randomly deleted / isnt findable after each update and yes i have a database and yes it did work before

tacit kindle
# stark kestrel 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

stark kestrel
#

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

prime cliff
#

In the terminal be like docker run -d mongodb bloblul

stark kestrel
#

My guess is that people still consider JSON files or whatever as database

prime cliff
#

MongoDB is not stored as json files though it's still a database async read/write with collections and tables (many json documents)

stark kestrel
#

Ok?

#

I was talking about their issue

[...] it is outside the codes directory but the code searches there as welll [...]

quartz kindle
solemn latch
#

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

craggy pine
#

“Give me bot token for mee6 bot”

prime cliff
#

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

solemn latch
#

Oh we're joking ^-^

prime cliff
#

Dam whooosh

solemn latch
#

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.

prime cliff
#

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

solemn latch
#

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

wheat mesa
#

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

solemn latch
#

I think theres a difference legally with scraping public data and tracking data thats against your own policies

wheat mesa
#

A huge chunk of the training data used for these LLMs was illegally scraped

solemn latch
#

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.

wheat mesa
#

Not that I think they are violating their terms, but it just wouldn’t surprise me if they did

solemn latch
#

Although still will always be a concern

#

yeah

#

I think we are probably on the same page, I doubt they are but they could

prime cliff
wheat mesa
#

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 😉

solemn latch
#

lmao

#

I hope not

prime cliff
#

Or selling user data at any point which is the common corp thing, even if you pay

solemn latch
#

Tbh, I dont think they will do that either. Since its buisness keys that have these policies.

#

for non scraping

#

or tracking

wheat mesa
#

Honestly I think a lot of these companies aren’t valuable because of the technology, but rather the data they have access to

solemn latch
#

It would be like open AI training on Microsoft's employees requests.

Microsoft would be pissed, huge lawsuits, etc.

wheat mesa
#

Microsoft would be happy given their ownership stake in OpenAI 😉

#

As long as that 1 trillion dollar IPO actually happens!

solemn latch
#

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

wheat mesa
#

Maybe micron

green garnet
solemn latch
#

You need an approved bot on top.gg

green garnet
#

If I've only published a server, but not a bot, I can't get it, right?

solemn latch
#

The api is currently only intended for bots

green garnet
clever tundra
#

not easily without breaking a lot of rules

green garnet
#

what?

#

xD

clever tundra
#

web scraping exists but is against guidelines

green garnet
#

well thanks

tacit kindle
#

guys i am so cooked my database still doesnt work

#

😭

quartz kindle
#

noob

tacit kindle
#

i cant make updates proply like this

quartz kindle
#

whats the problem with your database?

#

what database is it?

tacit kindle
#

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

quartz kindle
#

whats your coding language?

tacit kindle
quartz kindle
#

what are you using to connect to your database? JDBC?

tacit kindle
#

one sec

tacit kindle
pearl trail
tacit kindle
pearl trail
#

on the program you’re talking about

tacit kindle
quartz kindle
#

like, show your code

#

the code that uses the database

tacit kindle
tacit kindle
tacit kindle
#

?

tacit kindle
#

its 3k

#

lines

#

or sth like that

quartz kindle
#

well first of all, thats not java

#

thats js

pearl trail
#

java is shorthand of javascript

quartz kindle
#

what does the console output when you run it?

deft wolf
#

Someone fast, paste that one image

pearl trail
quartz kindle
#

burn that book

#

heresy

deft wolf
#

Java peepoCoffee

quartz kindle
#

show the full output in the console

tacit kindle
tacit kindle
# quartz kindle show the full output in the console

🔍 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

quartz kindle
tacit kindle
#

it does exist

quartz kindle
tacit kindle
lyric mountain
frosty gale
warm surge
quartz kindle
#

better-sqlite3 > *

#

its just better

frosty gale
#

looks very similar to better-sqlite3

#

maybe a lot of the code was inspired from it

pearl trail
#

wahh does that mean nodejs size is now larger 😲

radiant kraken
#

probably

hazy heron
#

Bun

radiant kraken
#

i haven't heard that name in years

stark kestrel
#

apparently still alive KEKW

radiant kraken
#

$100,000 for a domain is insane

#

@bitter granite can you help me with this domain /s

#

do people even buy these holy shit

neon leaf
#

startups do

radiant kraken
#

$15,000 is a giant gamble

#

do startups invest that much?

neon leaf
#

tbh 15k is nothing to most silicon valley startups

#

they raise millions

radiant kraken
#

💀

#

holy

#

i'm sure top.gg was an expensive domain name but that domain change was done when they were already popular

hazy heron
radiant kraken
#

nice

frosty gale
#

can i take my domain to pawn stars

radiant kraken
#

what is this website?

frosty gale
#

its the godaddy domain appraiser

radiant kraken
#

damn there's a whole page for it 😭

frosty gale
#

lmoa the whole page just breaks if you want to appraise google.com

radiant kraken
#

LMFAO

frosty gale
#

thinking of selling this domain ive bought a while ago and has just been sitting around, idk

frosty gale
neon leaf
#

I mean it is cool though, since it uses the same api as local fs

radiant kraken
#

@bitter granite WAIT I FOUND A GREAT DOMAIN NAME

frosty gale
#

i need to make my own S3 api

frosty gale
#

i presume its standardised

sharp geyser
#

Oh didnt see you talkin bout it after

#

😭

delicate zephyr
bitter granite
quartz kindle
radiant kraken
#

it's secret 😔

lyric mountain
pearl trail
neon leaf
sharp geyser
frosty gale
#

damn exclusive gov domain only 2k?

#

i dont get why they just refuse to appraise certain websites like google or government websites

sharp geyser
#

Don't want people knowing google.com is only worth 1$ 🧌

stark kestrel
#

So pretty much free for them 🤷‍♂️

#

Kinda like Google's TLD

sharp geyser
#

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.

pearl trail
sharp geyser
#

[ [...] ]

#

thats the only field im concerned about, every other field is correct

wheat mesa
#

What are you expecting for it though, 1d array?

sharp geyser
#

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

wheat mesa
#

Mmm

sharp geyser
#

I was trying to make the query as performant as possible

#

within reason

pearl trail
#

i see, thanks

radiant kraken
#

interesting

hazy heron
winged mountain
#

I hope you have a wonderful holiday season—tell me, are you having a good Christmas holiday so far?

radiant kraken
#

yes

prime cliff
#

This seems like some weird AI bot.... or just weird xD
It's the 5/6th now

#

Erm they also posted that in general

pearl trail
#

talos os makes k8s setup much easier

#

no need to config smth with flannel KEK

radiant kraken
#

😭

#

you are insane!

#

what are you making?

pearl trail
#

got a project from a company, learning k8s to run the program later

#

fun to learn infra :D

radiant kraken
#

i'm so happy for you! good luck on it! ❤️

pearl trail
#

thanks so much :>

main swan
#

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

deft wolf
#

Good luck, try on fiverr or upwork

main swan
#

I am under 18

neon leaf
#

fiverr allows under 18 use as long as your legal guardian owns the account

wheat mesa
#

oh no, VaaS

#

Vibe as a Service

prime cliff
#

Oh god the zoomers are now using AI

lyric mountain
tacit kindle
#

like arcane does

#

likelyhood of succes 0.1% prolly less tbh

deft wolf
#

And while you wait for your bot to become popular on its own, you will have to pay for its hosting kekGiggle

tacit kindle
deft wolf
#

For now

tacit kindle
tacit kindle
#

ya gotta be positive

deft wolf
tacit kindle
#

lol

tacit kindle
#

dawg all my friend only give 10/10 cause theyre my friends that aint helpful at all

main swan
brazen rose
#

Wrong channel and wrong server

bitter granite
ivory hawk
#

Lol

stark kestrel
tawdry sail
#

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/

vestal stratus
#

holy shadcn

frosty gale
vestal stratus
frosty gale
neon leaf
#

time to get my hands dirty with some c++ again

sharp geyser
#

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)

neon leaf
#

mantine?

sharp geyser
sharp geyser
#

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.

stark kestrel
#

I love Go's -ldflags

vestal stratus
frosty gale
#

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

neon leaf
frosty gale
neon leaf
#

ye idk what formatter to use so didnt use any

frosty gale
#

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#

stark kestrel
#

never used c++ but seen lots of people use it

eternal osprey
#

is there a way to check whether a member has a specific tag?

#

Pretty new to those tag thingies

#

like this

sharp geyser
#

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

#

@eternal osprey ^^

eternal osprey
#

i am using djs v14.

#

aha, so user.primary_guild.tag. You're the best, thank you!

real rose
#

takes up so much space ahah

eternal osprey
#
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?

warm surge
#

v14 wont be out for while

#

15*

sharp geyser
#

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

winged mountain
#

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.

craggy pine
#

This for some reason screams, "I'm going to scam someone"

prime cliff
#

They have been posting weird messages since they joined including double posting in general and development again

#

@solemn latch

lament rock
#

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

sharp geyser
#

One of these days I will make an alt that just sends periodic bot like responses

#

for no better reason than I am bored

frosty gale
#

this looks like a very poor attempt at trying to get someone to message her then its probably just the typical crypto investing scam

pearl trail
#

the cons of putting vms to hdd xD

neon leaf
#

k8s on hdds 🥀

frosty gale
#

can kubernetes automatically spin up proxmox instances??

neon leaf
#

they have the talos k8s nodes in proxmox vms

frosty gale
#

ah i see

pearl trail
frosty gale
#

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

neon leaf
#

better to have it than to need it

pearl trail
#

and also maybe think about having NAS

radiant kraken
#

😭

#

you are scary man

pearl trail
#

cant say mini but its just like a computer with router xD

#

no place to put em KEK

radiant kraken
#

😬

#

sheeeesh!!!

radiant kraken
pearl trail
#

disk too slow for etcd to do it's thing

radiant kraken
#

oooohhh

radiant kraken
pearl trail
#

nooo 😭 thank you tho

radiant kraken
#

no no no no its fine

frosty gale
#

hdds when you literally have to do any IO at all that isn't sequential: ☠️💀

pearl trail
frosty gale
#

linux/ext4 runs somewhat ok on hdds but windows absolutely dies because of the amount of arbitrary r/w's it does

neon leaf
#

im maybe gonna buy a few hundred tbs of hdds soon

#

however i dont need it

#

but then i have it

#

so all good

frosty gale
#

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?

neon leaf
#

i do full-disk backups to hetzner storage boxes via restic

#

reaching the limits of my 40mbit uplink at home

pearl trail
pearl trail
#

whoa

neon leaf
#

not gonna ship stuff though, just money

pearl trail
#

nah jk, it's too far

#

xD

radiant kraken
pearl trail
#

noonono im just kidding 😭

radiant kraken
#

you have a patreon right

pearl trail
#

eh no

#

idont think it's configured right

frosty gale
#

github sponsorships

radiant kraken
#

oh right

neon leaf
#

paid tim to star my repos

radiant kraken
#

wait takiyo doesnt have it

pearl trail
radiant kraken
#

takiyo turn on your github sponsors now 🫵

neon leaf
#

so when send link to sponsor

teal kelp
#

Hi

teal kelp
#

Is it worth working on Java for discord?
Not to measure, I do love no JS

I just want to try something new

radiant kraken
#

yes

#

learning is learning

teal kelp
#

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.

wheat mesa
#

Java is very different from JavaScript

teal kelp
#

Well, I definitely gonna learn it

#

Might have to watch a videos

wheat mesa
#

That’s fine, but I would recommend probably not starting with a discord bot as your first introduction to Java

teal kelp
#

At the moment, our disco bot is no JS

wheat mesa
#

It’s not a particularly hard language, it’s just a big difference coming from JavaScript

teal kelp
#

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.

teal kelp
#

The only way to fix it is for Java

#

Which is a little frustrating

deft wolf
#

Why tho?

wheat mesa
#

I highly doubt that the ONLY way of fixing your bot is switching languages

#

I don’t know where you’re getting that from

radiant kraken
teal kelp
#

The music thing that we’re using, which is used by many other bottles lava link which is like a music thing

radiant kraken
#

one of the notably challenging parts is its generics

wheat mesa
#

Ehhhh, maybe. It depends on how you learned. Java being statically typed and compiled is a pretty big jump from how flexible js is

deft wolf
radiant kraken
#

but its OOP is still pretty high level compared to something like C++

teal kelp
#

Yeah, but it’s breaking it at the moment

#

And the newest virgin

deft wolf
#

Yea because it's trash in general

teal kelp
#

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

pearl trail
teal kelp
#

I’ll probably just stay with no js as music is not really needed

frosty gale
#

good idea, js sucks anyways

teal kelp
#

Actually, no GS pretty easy

#

I started using it

#

My first bot started in 2017 using it

frosty gale
#

i was just picking on you because its called node.js so it sounded like you were saying no javascript 😭

teal kelp
#

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.

teal kelp
#

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

wheat mesa
#

Use git

pearl trail
#

zip >>

teal kelp
#

I don’t think I even have it any more

#

I think my friend deleted the office storage device

wheat mesa
#

Git can be easily managed on a cloud provider like GitHub or GitLab, definitely highly recommended to not lose anything

teal kelp
#

I’m pretty sure he’s deleted it sad face

wheat mesa
#

It also helps if you make a mistake, you can revert to a previous commit almost instantly

teal kelp
#

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.

frosty gale
#

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

teal kelp
#

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

lyric mountain
#

99%

teal kelp
#

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

lyric mountain
#

that's why u use bare linux instead of panels mmLol

teal kelp
#

We hosted ourselves it’s cheaper and reliable

radiant kraken
#

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

clever tundra
#

my vote:
upvote

wheat mesa
vivid fulcrum
#

channels are also good 👍

#

is your frontend web?

radiant kraken
#

which would be super frequent

pearl trail
#

finally got gateway API working + make authentik using it 😭 this thing is much much different than docker

radiant kraken
#

you are amazing!

wheat mesa
pearl trail
#

thanks 😭

wheat mesa
#

Channels are for async communication

radiant kraken
#

what do you think of polling an atomic number every ~16-50ms?

wheat mesa
#

If you want realtime then you might have better luck with Arc<RefCell<T>> yeah?

prime cliff
#

Uhhhh why is your auth not secure

radiant kraken
#

refcell? what about atomic numbers?

humble gyro
#

yum free credentials

radiant kraken
wheat mesa
#

Sorry I meant Arc<Mutex<T>>

radiant kraken
#

god no

#

mutexes are quite heavy in this case

prime cliff
#

Btw i would change authentik. to just auth.

wheat mesa
#

You could also just do Arc<AtomicU32> or something

sharp geyser
#

props to you for doin all that

radiant kraken
#

ikr

#

takiyo the ultimate goat

sharp geyser
#

authentik was just wayyyy too limiting for my usecase though tbf

radiant kraken
radiant kraken
sharp geyser
#

if this is a rust question beyond me

#

and if its a frontend question even more so

#

💀

radiant kraken
#

uh it's more of a multithreading/concurrency question

sharp geyser
#

mmmm

radiant kraken
#

my project is entirely multithreading-based

#

hahahaha

#

lots of message passing

sharp geyser
#

I've never touched the idea so idrk myself

pearl trail
sharp geyser
pearl trail
radiant kraken
#

idk

#

i have not touched the frontend yet

sharp geyser
#

oh

#

erm

radiant kraken
#

for the past month i have been working on the directx backend

prime cliff
#

Wait local only with a domain 🤔 what kind of wizard stuff are you doing

radiant kraken
#

slow progress 😭

sharp geyser
prime cliff
#

Wait are you proxying with a... domain and ...

#

Wtf.....

sharp geyser
#

I've not touched multi-threading in any capacity

radiant kraken
#

maybe takiyo

frosty gale
pearl trail
#

and proxying yes

radiant kraken
prime cliff
#

That's kinda of excessive levels of dev stuff and insane lol

pearl trail
#

xD fun to learn

radiant kraken
#

yeah you're always crazy

#

😭

#

teach me please

prime cliff
#

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 🙃

wheat mesa
pearl trail
#

its also ssl enabled for local

radiant kraken
#

sheeeeesh

pearl trail
#

i use nginx for proxying most stuff, so easy. that authentik thing is im just trying k8s’s ingress

radiant kraken
#

truly insaneee 🫡

#

what a prodigy

wheat mesa
#

I need to learn k8s

#

Maybe I should set up a home lab or something of that sort

radiant kraken
#

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

sharp geyser
#

why did you go and take on 4

#

😭

radiant kraken
#

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

sharp geyser
#

yeah well takin on 4 projects and in uni is wild

pearl trail
radiant kraken
#

why so?

#

which part of it do you find challenging to learn?

sharp geyser
#

k8s is like docker on steroids

wheat mesa
#

k8s uses docker

sharp geyser
#

yeah

wheat mesa
#

It’s an orchestration tool for containerized applications

pearl trail
# radiant kraken why so?

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
wheat mesa
#

Docker compose is a very very basic version of k8s basically

sharp geyser
#

Its very useful for scaling your docker apps across servers

pearl trail
#

the configs are hard too xD

radiant kraken
#

sounds like angular for docker

wheat mesa
#

I learned a bit of k8s but never actually used it for anything

#

Haven’t had a reason

radiant kraken
#

but i understand why its an industry standard

wheat mesa
#

Most people will never need k8s in a personal capacity, unless you have a project that gets really big

#

Otherwise k8s is overkill

radiant kraken
#

yeah

wheat mesa
#

Just for learning mostly

pearl trail
#

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

sharp geyser
#

I pray mercatus reaches that need

#

that means I either suck at managing performance OR I really need it

wheat mesa
#

Usually a mix of both

radiant kraken
pearl trail
#

thank you!

sharp geyser
#

btw waffle did I tell you mercatus v3 is underway mmLol

wheat mesa
#

I’ve seen some of your screenshots but didn’t know that it was v3

radiant kraken
#

also please let us know of the things you've learned along the way 😭

wheat mesa
#

Good shit

sharp geyser
#

Now im back at it and im much further along then I was the other 2 times

pearl trail
sharp geyser
#

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

wheat mesa
#

I’m procrastinating at work rn

radiant kraken
#

I'm less procrastinating and more doing slow progress

#

🐌

wheat mesa
#

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

sharp geyser
#

One thing I dread still is....Stripe

wheat mesa
#

Trying to figure out model loading rn with materials and meshes and such

sharp geyser
#

the bane of my existence stripe

radiant kraken
#

or "this is going to be time consuming"

#

and the moment i focus on my project its already 2am

wheat mesa
#

Yeah

frosty gale
#

pci level 1 or some kind of nonsense

sharp geyser
#

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

radiant kraken
#

😭

patent bramble
#

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).

Discord Developer Portal

Build games, experiences, and integrations for millions of users on Discord.

prime cliff
patent bramble
prime cliff
#

You didn't but there are still cases of same ids

patent bramble
#

That's not what I was referring to though.

vivid fulcrum
#

snowflakes are used for that very purpose

#

to avoid it

neat tulip
#

I need a bot that notifies me when someone new joins a server

craggy pine
#

One of the more simplier things people can code so just go on top.gg and search for one Shrekratge

stark kestrel
#

Why search when you can ask KEKW

frosty gale
#

(unless time magically goes backwards)

neon leaf
#

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

prime cliff
radiant kraken
#

my directx backend is finally complete!!

#

now time to test it 😬

regal night
#

guys i have a question how does one use dropdowns with modals

#

or selectmenus

#

u could say

stark kestrel
civic sundial
#

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

clever tundra
#

chances are lavalink is blocked by youtube or the network stuff you need cannot be done at your level

civic sundial
#

what level do i need then

clever tundra
#

site developer for the host, or something that isnt blocked by youtube

#

basically you need to own the host or find smth that works

civic sundial
civic sundial
clever tundra
#

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

civic sundial
clever tundra
#

yes

civic sundial
#

well thats cheap

clever tundra
#

~£33 new

civic sundial
#

also it is not in many svs prob like in 5

clever tundra
#

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

civic sundial
clever tundra
#

3b or anything newer is good. the more ram the better

civic sundial
clever tundra
#

8gb ram is better than 1gb ram

#

its not all about ram though

civic sundial
#

and also it will connect to my internet and if my internet dies the bot dies ?

clever tundra
#

technically yes

#

it needs constant internet and usb power for bot to work

civic sundial
civic sundial
clever tundra
#

cpu is more important for music bots

#

heres a tier list of the important stuff

civic sundial
clever tundra
#

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

civic sundial
clever tundra
#

depends what youre talking about

civic sundial
clever tundra
#

depends what the bot is and what youre hosting on

civic sundial
pearl trail
#

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

radiant kraken
#

can't wait to see the amazing projects you cook up with it

civic sundial
#

cuz there is these two .eu and .de

pearl trail
pearl trail
#

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

civic sundial
#

oh yeah

civic sundial
radiant kraken
#

takiyo do you have a go-to domain registrar?

pearl trail
pearl trail
radiant kraken
radiant kraken
clever tundra
#

@low marten guh... status says its alive

pearl trail
radiant kraken
#

ooooh

pearl trail
#

and also modern ui xD

low marten
#

Sorry I'll turn it back on

clever tundra
#

dw lol

radiant kraken
clever tundra
#

just thought it was funny that status said it was all ok

civic sundial
pearl trail
pearl trail
#

tho i got it

low marten
clever tundra
radiant kraken
radiant kraken
sharp geyser
#

its also what I used for mercatus' domain

sharp geyser
#

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

stark kestrel
#

Not all/every (no registrar has that either way) but wouldn't call it "a few" or "just the basics"

prime cliff
#

Cloudflares registrar is the best though, there is porkbun i think too that people like

stark kestrel
#

Moved from Namecheap to CF last year

sharp geyser
#

Oh wow

#

they expanded since I last checked

#

my fault

#

I remember trying to buy a domain from them and it said unsupported TLD

sharp geyser
#

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.

frosty gale
#

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

sharp geyser
#

who tf...orders 100 domains

#

even as a reseller that seems absurd

clever tundra
#

how do you move it fully to cloudflare? they increased my price too to the point where its not even funny

sharp geyser
#

transfer it

clever tundra
#

im stupid right

sharp geyser
#

though that will usually end up costing more

#

depending on the domain*

clever tundra
#

yeah

#

its the same cost to transfer as it is to renew

lament rock
sharp geyser
#

so is ActionsFor basically just unpacking the array?

lament rock
#

No because you aren't inferring the Array elements

sharp geyser
#

then what exactly is ActionsFor doing?

#

Because it works

lament rock
#

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

sharp geyser
#

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

lament rock
#

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

sharp geyser
#

Ah I see

#

Then what exactly does ActionsFor do?

#

Is it just a helper type for getting the appropriate array in the object?

lament rock
#

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

sharp geyser
#

Ah okay

#

Thank you!

lament rock
#

Very cursed way of doing it imo lol

sharp geyser
#

How would you do it?

lament rock
#

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

sharp geyser
#

Interesting

lament rock
#

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

sharp geyser
#

Mmmm, yeah unpacking the array like you suggest though leaves it to be undefined

#

at least after my testing

lament rock
#

What does the type of the thing you're passing into UnpackArray evaluate to when you hover it

sharp geyser
#

string[] from what I can tell

lament rock
#

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

sharp geyser
#

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

lament rock
#

Well. Hopefully now you know about infer

sharp geyser
#

@HasPermission({ organization: ['create'] })

lament rock
#

I've had to make the most cursed types ever using infer

sharp geyser
#

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

lament rock
#

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

queen needle
#

I regret looking

lament rock
#

It's pretty bad

frosty gale
#

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

hidden gorge
#

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

lament rock
# hidden gorge just a quick question is there any good way to play a wav file in js without usi...

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

GitHub

A light-weight LavaLink compatible replacement. Contribute to AmandaDiscord/Volcano development by creating an account on GitHub.

hidden gorge
lament rock
#

I can understand that as I see you're using the speaker module. All of my points still stand

queen needle
#

but if it's somewhere in the browser spawning a hidden audio element and using that would yield the best results

lament rock
#

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

stark kestrel
#

@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

radiant kraken
#

i don't mind it really

frosty gale
#

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

stark kestrel
#

I should probably just put renovate for minor versions and not patch

neon leaf
#

very interesting crate

quartz kindle
#

claude code be like

frosty gale
radiant kraken
#

frosty gale
#

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

kind lily
#

guys can someone recommend a 1$ nodejs server/test server

quartz kindle
#

i use it for testing and running small stuff

frosty gale
quartz kindle
#

f u

frosty gale
kind lily
#

I thought it turns off after a while

quartz kindle
quartz kindle
frosty gale
#

not much of a server if it cant run 24/7

quartz kindle
#

jokes on you, my server runs 48/14

tacit kindle
frosty gale
quartz kindle
#

no it means it runs 48 hours per day for 14 days per week

radiant kraken
#

oh 😭

#

i really gotta get some sleep

quartz kindle
#

lmao

radiant kraken
#

my brain is not working

pearl trail
radiant kraken
#

how's your project going??

pearl trail
#

not much, waiting for further notice

#

until then, i will learn infra

radiant kraken
#

ooohh

wheat mesa
#

Good afternoon

radiant kraken
#

good luck with it! topggParty

radiant kraken
wheat mesa
#

I lowkey thought this was general chat whoops

radiant kraken
quartz kindle
pearl trail
#

interested in graphql also KEK

#

idk is even using graphql worth to try or not

radiant kraken
#

learn everything you can grasp upon! topggHappy

pearl trail
neon leaf
sharp geyser
#

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',
            });
        }
neon leaf
#

this check doesnt make sense

#

with an && itd make sense

sharp geyser
#

Why doesn't it make sense

neon leaf
#

this check will make everyone authorized

sharp geyser
#

if the role isn't developer or isn't admin then perform the if

neon leaf
#

the rest can pass

sharp geyser
#

What

#

Am I like genuinely stupid I don't understand what you're saying

sharp geyser
neon leaf
#

then use &&

#

if not developer and not admin, unauthorized

sharp geyser
#

wait

#

omg

neon leaf
#

neuron activation?

sharp geyser
#

Yeah

#

It finally turned on

#

I just got off work

#

Dumbass customers rubbed off on me

neon leaf
#

lol

sharp geyser
#

thank you

neon leaf
#

root@remotedev:~/projects/0x7d8/wings-rs# cargo clean
Removed 111117 files, 101.3GiB total

oh my days

solemn latch
#

your car was not going.

warm surge
sharp geyser
#

Not a thing

warm surge
#

huh

#

damn

#

i would just use users id for that

#

make shit easier and not have to fetch main server roels

#

roles

sharp geyser
#

What

#

This isn’t discord

pearl trail
#

very future proof

warm surge
sharp geyser
#

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

radiant kraken
lament rock
#

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()

pearl trail
#

very awsome

radiant kraken
pearl trail
radiant kraken
#

i know, but how would role IDs work here?

#

unless you were not being sarcastic

pearl trail
#

oh bruh mb gng, didn't read the code

#

tho a bit weird for smth like that without id

radiant kraken
#

why so?

pearl trail
#

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

radiant kraken
#

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

radiant kraken
pearl trail
pearl trail
radiant kraken
pearl trail
radiant kraken
#

not sure, have not looked into his database's schema yet

pearl trail
#

atp idk is that normal or not. now i doubt my knowledge

radiant kraken
#

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

pearl trail
#

hm, alr then if it’s already the best approach for him. only he know how their app works xD

radiant kraken
#

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

pearl trail
#

indeed, and today is none, need to prepare finals MahiroCruel

radiant kraken
#

oh god

#

you got this takiyo!!!

#

i'm sure you will score 100! 🤭 i believe in you!

frosty gale
radiant kraken
#

hold on let me check mine

acoustic fern
#

Holy moly

vivid fulcrum
#

new css features combating JS

radiant kraken
frosty gale
vivid fulcrum
#

node_modules joined the game

radiant kraken
#

my react homework's node_modules 😃

frosty gale
#

react projects have such an obscene amount of files just for a fresh install

vivid fulcrum
#

did anyone use CRA when it was still a thing?

#

that was ultraaaa bloated

radiant kraken
#

my uni does

#

our homework instructed us to use react (the lecture note mentions CRA) + react router + express + mongoose

frosty gale
#

i hate this corporate speak "sunsetting"

vivid fulcrum
radiant kraken
#

huh? it's not that bad for me

#

lots of vulnerabilities tho 😃

vivid fulcrum
#

for sure

vivid fulcrum
radiant kraken
#

it was like 5 minutes tops for me

#

which is still bad but

vivid fulcrum
#

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

radiant kraken
frosty gale
#

oh right i forgot react is owned by the zuck people

vivid fulcrum
#

not anymore

frosty gale
#

interesting

#

maybe they'll borrow some ideas from svelte

#

though they did introduce runes which basically reactified svelte 💔

vivid fulcrum
#

runes are pretty cool

#

writes like react with less bloat

#

my choice is still react though since my favourite UI libraries live on it

frosty gale
#

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

frosty gale
tacit kindle
#

yo

#

anyone knows a free good api

#

for ai

#

chat bot ?

#

cause i ran out fo free from chatgpt

#

my chatbot doesn workt anymore

#

😭

idle panther
#

It’s not unlimited but Gemini is kinda the same

tacit kindle
idle panther
#

It has a daily cuota, depends on how much your chatbot is used

idle panther
#

Me personally, I use it on daily basis and rarely have reached that quota

ivory hawk
#

Didn't know Gemini had a free api tier

gusty void
#

gemini api is so bad dude @tacit kindle

#

you chat like 4-5 chats or msg

#

then it says quota over

#

😭

tacit kindle
neon leaf
#

dyn dyn dyn dyn dyn dyn dyn

gusty void
#

ts was a bug in my code i highkey spent a full half day finding the error

radiant kraken
neon leaf
#

its very useful in big codebases

#

and if u want to save some binary space

radiant kraken
#

i can see that

#

sadly none of my traits are dyn-compatible though

neon leaf
#

time to make them be

radiant kraken
#

i'm afraid i can't

#

my backend has to be Sized

neon leaf
#

why

radiant kraken
#

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

neon leaf
#

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

radiant kraken
#

😭

#

tbh i've never used anyhow for errors, i've been using thiserror

wheat mesa
neon leaf
#

lies

#

my vtable consented

radiant kraken
#

vtables scare me

sharp geyser
#

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

radiant kraken
#

he prob suggested making the app more flexible by making discord-style enable/disable section roles

#

it's gonna occupy more space sure but i can see where it could be flexible