#development

1 messages · Page 287 of 1

pearl trail
#

follow the changes or stay in this kind of situation ¯_(ツ)_/¯

loud canopy
#

i just wont ask message intent

#

question

#

all my bot does is use

#

slash commands

#

and MAYBE i will add dms notification

#

what intents are those

pearl trail
#

nothing

loud canopy
#

ok

quartz kindle
#

dm intents are not priviledged, you can just turn them on in your code

loud canopy
#

and also

#

i need to get user's id avatar ect

#

is that any intent

#

or not

pearl trail
#

nope

loud canopy
#

ok

queen needle
#

No intent

quartz kindle
#

nope, you get it from the user object

loud canopy
#

good

#

if after this

pearl trail
#

unless you're listing a guild's member

loud canopy
#

like if after i give no intent

#

i start getting funny business

#

im blaming you tim

quartz kindle
#

lmao

quartz kindle
#

step 1: turn off the intent

loud canopy
#

(im joking ofc)

quartz kindle
#

step 2: test your commands

#

step 3: if something doesnt work, fix it with slash commands

loud canopy
#

thing is

#

my whole bot runs on 1 command

#

told you

#

/login

#

anything else is buttons

#

im not a fan of either

  1. 274294 commands
  2. star wars intro chat
quartz kindle
#

my whole bot also runs on 1 command

#

its called /command

pearl trail
#

tim makes hole bot?

#

interesting

queen needle
#

/command <command name>

quartz kindle
#

inter seting

queen needle
quartz kindle
loud canopy
#

but thats more than one no?

quartz kindle
#

its been years and its still that way

quartz kindle
#

and use it as if it was the prefix

queen needle
#

subcommands or just a match case with argument?

quartz kindle
#

before:

.abc 1 2 3
.xyz 10 20 30

after:

/command abc 1 2 3
/command xyz 10 20 30

#

my prefix was .

loud canopy
#

@quartz kindle im gonna make an enemy in my game and im going to call him tim

quartz kindle
#

make me the final boss

loud canopy
#

what class would you like to be

#

rogue , mage , knight, jester, ranger

queen needle
#

Make him a jester please

quartz kindle
#

lmao

loud canopy
#

okay okay gotchu

quartz kindle
#

what does a jester even do

#

is it like shaco from league of legends

loud canopy
#

yes

#

i mean

#

i draw icons for the enemies myself

#

and i have thsi guy

quartz kindle
#

reminds me of deoxys

loud canopy
#

i made a golem

quartz kindle
#

a jester named "tim", definitely makes sense

loud canopy
#

for farming

#

like

#

this guy

#

someone then dmed me this

quartz kindle
#

hahahah

loud canopy
#

i can hear this gif

sharp geyser
#

Nah just make Tim a computer guy

loud canopy
#

if you give me permission

#

i draw from ur pfp

#

its gonna look uncanny af

sharp geyser
#

His attacks are messing with another’s attack by rewriting the code behind it

loud canopy
#

bc i suck at drawing

quartz kindle
sharp geyser
#

Honestly seeing a Tim laying down attacking is scary enough

sharp geyser
#

Yep

#

Would be more Tim like than a golem

loud canopy
#

tim what country are you from

#

so i can make an accurate racist drop

sharp geyser
#

Uganda

quartz kindle
#

lmao

loud canopy
#

bc i had a french guy

#

i made him drop a baguette

#

that deals +999 dmg

quartz kindle
#

hahahahah

loud canopy
#

but has -99% accuracy

quartz kindle
#

well, im not brazilian but i live in brazil, so you can use the huehuehuehuehue

sharp geyser
loud canopy
quartz kindle
#

or a banana

loud canopy
#

i need to study brazil stereotype to make the most accurate one

quartz kindle
#

make it so when im defeated i say "huehuehuehuehue"

loud canopy
#

ok i can do that

#

i have dialogues for each enemy with greet, rage, defeat, victory

quartz kindle
small tangle
#

jester seems like a perfect fit for a tim

loud canopy
#

jester is a fun class

#

glasscannon build no defense with random chance of crit and random chance of crit multiplier

#

you either deal 5 dmg or 500

#

or miss 5 turns in a row

#

gambling addiction class

quartz kindle
#

xDDD

small tangle
#

@solemn latch ^^

golden coral
#

Hey, I wanted to ask from where you get the server_count of bots...

queen needle
#

Users submit it through it top.gg's api

golden coral
#

xD

loud canopy
#

UnicodeEncodeError: 'charmap' codec can't encode character '\u2618' in position 213: character maps to <undefined>

#

today i learned that if im logging an error in console

#

and someone's username has emojis in it i get an error bc the console doesnt accept ashi characters by default

#

ffs XD

#

@quartz kindle tell me this is good
print(f"[ERROR] {self.__class__.__name__} encountered an error: {str(error).encode('ascii', 'ignore').decode()}")

#

i made it ignore ascii

pearl trail
#

looks like k8s is something i can’t learn in 1 day xD

wheat mesa
#

K8s is a full time career

pearl trail
#

lmfao, i can see why

oblique shoal
neon leaf
delicate zephyr
neon leaf
#

lame

delicate zephyr
neon leaf
#

not running android

delicate zephyr
#

wouldnt run android on a dedicated server like ever lmao

neon leaf
delicate zephyr
neon leaf
#

cuz its one of 6

#

i bought it without purpose

delicate zephyr
#

why do you have 6 of them

neon leaf
#

not 6 of the same ones obv

delicate zephyr
#

surely that costs an arm and a leg

neon leaf
#

ye around 2.4k€

delicate zephyr
#

damn

neon leaf
#

not horrible

delicate zephyr
#

we got a good deal kekW thank you hetzner

neon leaf
#

this is the main one

delicate zephyr
#

Who do you host with

#

or is it colo

neon leaf
#

its all homeservers

#

lol

delicate zephyr
#

ahhh

neon leaf
delicate zephyr
#

We ise hetzner

#

so

neon leaf
#

yea I also have like 7 servers @ hetzner

#

hetzner is nice

delicate zephyr
#

askes hetzner to unblock mail ports

#

instantly did it

#

they goated

neon leaf
#

ye tho most of their ips have a horrible rep

#

I had to fix my rep for like 6 months

delicate zephyr
#

the one we had doesnt luckily

#

we got a /28 tho

#

and 3 out of 14 ips were blacklisted somewhere

#

just picked one that wasnt LuL

eternal osprey
#

bro ngl discord is getting fucking annoying with all this added bullshit

#

all i want is a place where i can chat, voicechat and that's it

#

i don't need damn quests or videos or games or whatever.

#

adware cuh

delicate zephyr
#

gotta remember

#

nothing is ever free

#

and if it it

#

either they're showing ads or YOU are the product

queen needle
#

id rather sell my data

quartz kindle
queen needle
#

why python*

loud canopy
#

not by default

#

i have to import a library for emoji

#

but i cba

#

i just filter them out

lean wedge
#

lets go it works :D

neon leaf
#

1.1.1.1 is down

delicate zephyr
prime cliff
lean wedge
prime cliff
#

Essentially error logging aka Sentry

lean wedge
#

👍

surreal sage
#

nothing like docker image builds taking 8m

sharp geyser
#

Using docker wrong

prime cliff
#

Yea you're using docker wrong

sharp geyser
#

wtf

#

How is that even possible

sharp geyser
#

@quartz kindle whats your opinion on this code

quartz kindle
#

is that js even?

#

the code is as bad as yo mama is fat

sharp geyser
#

Tis not but principals behind it still remain the same

#

What's so bad about it tim

#

please explain

quartz kindle
#

idk the semantics of whatever language that is

sharp geyser
#

Its C++ technically (or GML)

quartz kindle
#

but globals = bad
switch with essentially nothing inside = bad

sharp geyser
#

Ahaha

#

You heard of Pirate Software?

quartz kindle
#

you heard of yandev?

sharp geyser
#

The self proclaimed 20+ year experienced game dev

#

That's his code

#

😭

quartz kindle
#

xDDD

sharp geyser
#

Even yandev is better than this dude

quartz kindle
#

i mean

#

the logic is easy to understand

sharp geyser
#

Tim do not even try to defend the guy

#

I mean sure, but its fucking terrible code that can be replaced with an if statement

quartz kindle
#

"make this a switch because i will need to add cases in the future"

sharp geyser
#

Bro heard "Switch/case fast'

#

and uses it everywhere

quartz kindle
#

but then he never does

sharp geyser
#

He has TONS of switch case statements that are useless

quartz kindle
#

lmao

sharp geyser
#

he also uses 2 dimensional arrays that are global and uses magic numbers to index them

quartz kindle
#

i mean

#

that actually is fast

#

but horrible to maintain

sharp geyser
#

Yeah...but he has THOUSANDS

quartz kindle
#

xDD

sharp geyser
#

😭

#

Not to mention

#

Using a map or an object is quite literally not any worse

#

than a 2D array

quartz kindle
#

slightly worse

sharp geyser
#

Negligable

quartz kindle
#

did you know that in js, in some cases, array.indexOf can be faster than if(obj[key])

sharp geyser
#

Well yeah

#

I dont know what indexOf does under the hood

quartz kindle
#

its pretty much an array.find()

#

but with a precompiled function

sharp geyser
#

How is that faster than a direct whatever

quartz kindle
#

exactly

sharp geyser
#

its 12am im tired brain no think of word

quartz kindle
#

just js being js

#

:^)

sharp geyser
quartz kindle
#

its because objects actually suck

sharp geyser
#

Interesting

quartz kindle
#

js does a whole lot of shit when accessing an unknown key of an object

sharp geyser
#

Honestly tim, how did you learn all this shit about the internals of the language and performance stuff

quartz kindle
#

its not just a simple lookup

sharp geyser
#

I try but I can never wrap my head around it

#

and i feel like I am missing a lot of theoretical knowledge when it comes to programming

#

like algos and shit

quartz kindle
sharp geyser
#

Yeah I guess

#

I just don't know where to start. I've really refined my basics

#

but I feel stuck in anything else

#

and going to uni for it seems pointless since I want programming to be fun and stress free

#

not like an obligation

quartz kindle
#

programming? fun and stress free? HAHAHAHAHAHAHAHAHAHA

sharp geyser
#

Well you know what I mean

#

trying to meet deadlines

#

type shit

quartz kindle
#

well

sharp geyser
#

I want to program for myself cause thats where I found enjoyment

quartz kindle
#

tbh i never had an actual job as a programmer, so idk how it actually works

sharp geyser
#

😭

quartz kindle
#

like an office job

sharp geyser
#

Can you just implant your knowledge into my brain

quartz kindle
#

im dumb af

sharp geyser
#

Brother no

#

💀

#

I see the shit you talk about in here

#

r/wooosh

quartz kindle
#

im a master procrastinator

sharp geyser
#

WEll yeah still waiting on that astrology api

quartz kindle
#

exactly

sharp geyser
#

Been waiting for like 5 years now

#

😭

quartz kindle
sharp geyser
#

GTA 6 gonna come out before your api does

quartz kindle
#

see this is why i procrastinate so much, i hate spending hours looking at shit like this

loud canopy
#

i hate balancing

lethal dragon
#

Anyone can help me how custom css of long desc work or how we use image n here

deft wolf
#

You don't need custom css to use images there, css is used to style elements

#

In short, to apply css you can either use <style> tag inside which you enter your css or you can also use the so-called "inline css", i.e. the style value of individual elements

#

w3schools has an explanation of each element and examples of its use. Just remember not to use tags like <html>, <head> or <body> because top.gg already has them on their website

clever harness
#

Have anyone explained before for votes tracking?

#

To linking top.gg with my bot to track realtime votes and to make a leaderboard

wheat mesa
#

Every time I get a better job, things get easier

sharp geyser
#

I mean sure

#

But my point is I don’t want something I found love for as a hobbyist to turn into an obligation

wheat mesa
#

That’s fair

#

I rarely do my own projects anymore

sharp geyser
#

And that’s what I find the worst

wheat mesa
#

Mostly because of a lack of time and I want to be spending more time with family

sharp geyser
#

If I get a job in that field I’ll hardly have any time for my own shit

#

Which imo is terrible since that means I’m never actually doing what I want

wheat mesa
#

Part of it is the result of getting married, another part is the result of not wanting to burn out

sharp geyser
#

Yeah that’s fair

wheat mesa
#

But yeah I totally get what you mean

#

Make a shitty low effort roblox game and make a million dollars

#

Boom

#

Then you can do whatever you want

sharp geyser
#

Ahaha that’s not even my goal anymore. At first it was supposed to be a cash grab but my perfectionism and thirst to learn won’t let me make something half assed

wheat mesa
#

Something that you have to learn in SWE is that no system is ever perfect. It’s good to spend time on design, but ultimately you are going to run into problems you couldn’t anticipate anyways, so it’s best to not overengineer things that are not predictable

sharp geyser
#

Speaking of which I had a question about ECS if you’re available to answer

wheat mesa
#

Sure

sharp geyser
#

Basically I’m wondering about querying

#

When I was embarrassingly making that game about cleaning up after animals

#

I had 3 components Animal, Poop and Model. I was wondering if when I needed to do something with those entities I was wondering if I needed to query for all 3 components even if I wasn’t needing any of the stored data in them

wheat mesa
#

Generally speaking, your systems will query components with either the need to access their data, or to update their data

#

Entities themselves are not very useful, they just denote an ID that points to a collection of components

sharp geyser
#

Yeah

#

It’s hard for me to form a question exactly how I want to ask it

#

I was basically wondering if there was a need to query for every component attached to an entity or just the components I need

wheat mesa
#

You usually don’t care about a specific entity, you care about the behavior that a component or collection of components provides

sharp geyser
#

Hm have I been using an ECS all wrong then

wheat mesa
#

For example, a physics system might query for a TransformComponent and a VelocityComponent (completely fictional, just making this up for the purpose of an example). The physics system doesn’t care about which entities this applies to, it just wants to say “Hey, your new Transform = Transform + Velocity * dt”

#

Systems act upon groups of specific components, hence why they query for them. They don’t usually care about the specific behavior an entity has. If you’re trying to compare it akin to something like Unity’s game scripts, the scripts themselves are components

sharp geyser
#

Ah I see

pearl trail
#

guys, i wanna ask a funny question.
is having our app manage it's load balance by itself (e.g. cassandra) the same as using k8s? as of my limited understanding about k8s rn, what k8s do is "just" picking which pod on a cluster to handle that request, while still having the request sent to the picked node. example: cf -> node a -> [pick a pod to handle]. if cf always choose node a, then it's always node a that gets traffic but with additional proxy traffic from another node.

while making an app that manages it's own load balance using pool of ips and ports of the instance, and select which instance the app to choose then proxy it. which is the same as what k8 does, but yes it increases the development time and "reinvent the wheel(?)"

or k8 is better because k8 is known for "many" users so we standardize it, production-ready, and trusted instead of giving a random app their private ips?

lament rock
pearl trail
#

xD, that explains enough my question. thank you for the opinion misc_pray

sharp geyser
# wheat mesa Systems act upon groups of specific components, hence why they query for them. T...

Is it normal to do this kinds of thing in an ecs or is this usually split into 2 systems

import { useEvent, World } from '@rbxts/matter';
import { Players } from '@rbxts/services';
import { components } from 'shared/ecs/components';

function spawnPlayer(world: World) {
    for (const [_, player] of useEvent(Players, 'PlayerAdded')) {
        world.spawn(components.Player({ player }));
    }

    for (const [id, { player }] of world.query(components.Player)) {
        if (player.Character) world.insert(id, components.Model({ model: player.Character }));
    }
}

export = spawnPlayer;
#

I handle both adding the Model component and Player component in the same system

#

I'd usually do it in the same for loop, but player.Character can be null if the Character hasn't spawned yet

wheat mesa
#

Probably fine. I’m not super well versed in the usage of ECS patterns, I just know how they work and the basic idea of using them

sharp geyser
#

Ah okay

#

:p

#

Thank you!

pearl trail
#

average goland experience

neon leaf
#

*average go experience

pearl trail
sharp geyser
#

average experience

sharp geyser
#

s

#

when we gonna use the invis charcode character

pearl trail
sharp geyser
#

Really

#

that's such a weird standard

pearl trail
#

because its not an actual average variable (like params, variables), its a receiver. it just a way to access the type, nothing else

#

it acts like “this” in other languages

#

back to personal preference ig, but yes mostly people use abbreviation for this specific case

sharp geyser
#

Ah ok

loud canopy
#

@quartz kindle how do some bots have buttons inside embeds?

#

and yes i default pinging you because youre the voice of truth

delicate zephyr
loud canopy
#

something tells me this isnt a thing in .py yet

delicate zephyr
#

it is

sharp geyser
#

@queen needle You were interested in my other game, so maybe you will be interested in this one.
Current Commit history.

Currently implemented : Plots spawn at designated locations when a player joins. Player automatically claims an Unclaimed plot when they join the game. Basis for data storage is laid out, outlining player data like coins and pets and inventory.

In the attached video you will see a semi-transparent block, that is the plot itself. Player is moved there on join after it is claimed.

What needs to be done next is destroying the plot on leave, and marking the plot spawn point as unclaimed

queen needle
#

Hell yeah!!

sharp geyser
#

Still A LOT to do

#

but got one of the biggest headaches done

quartz kindle
#

poop wins

sharp geyser
#

Nah poop gone

#

stealing pets in

#

😏

quartz kindle
#

shame

long marsh
# sharp geyser Really

Conventionally speaking, the Go creators also pushed for smaller variable names in general

sharp geyser
#

wild concept coming from "code should speak for itself"

queen needle
#

they're giving into the 500 magic numbers

regal nexus
#

Does anyone have unreal Engine agent?

pearl trail
#

could have done this much shorter, simpler in js KEK

neon leaf
#

would be impossible in rust™

#

only if you serialize and then deserialize into an intermediary type

pearl trail
neon leaf
#

I mean I guess technically you could write a procedural macro (takes in raw tokens, processes them with rust code, outputs new tokens)

#

but thats cheating tbh

#

aka in real code I just construct the struct from scratch if i need to censor it (no do-it-all function sadly)

pearl trail
#

yeah, that'd be a pain if have a lot of structs and a lot of fields

clever tundra
#

Shame it's taken so long

#

The entire thing started February 28th I think

deft wolf
#

Discord.py will start supporting components v2? We won't be able to laugh anymore that it's taking them this long 😔

prime cliff
deft wolf
#

Yes but the average person asking on ddevs either doesn't want to or can't do it and prefers to wait until the library officially supports them. It is a bit awkward to answer “discord.py doesn't support them yet”

sharp geyser
#

@queen needle @radiant kraken Found a new bug, thankfully roblox has a way to test with multiple fake clients or I never would of found itSo it spawns both plots properly but for whatever reason, only 1 of the players get put into their designated plot

#

I see why now

#

Never I do not see why

#

💀

queen needle
#

💀

craggy pine
#

That's a new one.

waxen flame
#

Unsure if right channel, but I am wondering when long descriptions will have documentation for customizing the buttons and stuff.

lunar flicker
craggy pine
waxen flame
#

I'll try that at some point

fierce quail
#

/play didi

pearl trail
sharp geyser
# queen needle 💀

Found out why but I love fixing things only to find new problems and holes in my logic

queen needle
#

What now

sharp geyser
#

Basically when a player leaves the plot isn’t "unclaimed" or it fails to claim it when a new player joins

prime cliff
#

😄 More details and a floating jump to section bar

sharp geyser
#

@queen needle @radiant kraken May have taken an hour AND a lot of code refactoring and changing how things work, but finally I can officially state that the bug where when a player leaves and another joins the plot is not despawned / spawned again is squashed

queen needle
#

YEAH WOOO

sharp geyser
#

I honestly

#

Want to kick myself in the ass for how i was doing it prior

#

I was giving myself a bigger headache

#

I thought "Oh, well why don't I just use 1 SINGULAR component to represent both the plot & the plot spawn point what could go wrong"

#

"I can just patch the component to change the model from the spawner to the plot then back again when a player leaves"

#

Turns out, a lot harder than just separating them into their own components

prime cliff
sharp geyser
#

Same here

#

I am not trying to make something perfect

#

but I don't want to regret my decision later when I realize I have to refactor 3+ things to make my one addition work

sharp geyser
#

Really not sure how I can insure the player's Character exists

#

I mean I am already doing that in one system. Which I have this system set to run AFTER that system that ensures the player's character exists

#

For now it works 99% of the time, there's a very rare edge case the character doesn't exist in time

queen needle
#

when in doubt sleep your way out

sharp geyser
#

If anything I put moving them to the plot in another system TrollSus

sharp geyser
#

Squashed that new bug

#

Found out that task.spawn and task.defer exist, and that they do not yield the current thread like task.wait does

#

So I used it to wait until the character existed and moved them to the plot

#

It's virtually instant still, so there doesn't appear to be any latency problems

#

Also added a Character component separate from the Model component to better differentiate between a player's character & enemies' models

#

Now I sleep goodnight folks

queen needle
sharp geyser
#

Ah

#

Yeah you can't do that

#

sleep or anything equivalent yields the thread

#

and ECS systems can't be yielded

sharp geyser
#

Made it even better for the character & data portion

#
import { useEvent, World } from '@rbxts/matter';
import { Players, RunService } from '@rbxts/services';
import { getPlayerData } from 'shared/charm/datastore';
import { components } from 'shared/ecs/components';
import { SystemTable } from 'types/Ecs';

function spawnPlayer(world: World) {
    for (const [_, player] of useEvent(Players, 'PlayerAdded')) {
        const id = world.spawn(components.Player({ player }));

        player.SetAttribute('serverEntityId', id);

        task.defer(() => {
            let data;
            let tries = 0;

            while (!data && tries < 5) {
                data = getPlayerData(player.UserId);
                if (!data) {
                    tries++;
                    RunService.Heartbeat.Wait();
                }
            }

            if (!data) {
                warn(`Data not found for player ${player.Name}`);
                return;
            }

            const character = player.Character ?? player.CharacterAdded.Wait()[0];

            world.insert(id, components.Player({ player, data }), components.Character({ character }));
        });
    }
}

export = {
    system: spawnPlayer,
} as SystemTable;

Now I handle setting the data & character in the spawnPlayer system

#

and just do a if(!data || !character) check in any other systems that rely on the Player & Character components

pearl trail
#

guys, if aws s3 bucket have all Block Public Access settings disabled but have no bucket policy, will public users able to get the object from direct url? or we must have "principal * action get object" policy to unlock it to public?

sharp geyser
#

Pretty sure you need to set a policy that allows public access

#

May be wrong cause I haven't used S3 in ages

vivid fulcrum
#

that's how I wrote it before before becoming prisoner to js coding style

pearl trail
#

xD iirc that package is a port for roblox's lua

#

so maybe it follows the official's naming to prevent confusion

dusky raven
#

do u guys think its harder to make a discord bot in js or python and how much is the difference of performance between the 2?

quartz kindle
#

js is slightly more performant than python on average

dusky raven
#

actually?

#

i thought js was like lighter or sum

quartz kindle
#

isnt that what i said?

#

performant = faster/lighter

dusky raven
#

ok stop yelling at me now

quartz kindle
#

im not yelling lol

vagrant notch
#

as tim said js performs better than python but not a significant amount at least for smaller bots

dusky raven
#

python will be perfect for a ai bot

vagrant notch
#

if thats what youre making then sure go with python

#

for other projects though i usually prefer typescript

prime cliff
#

🙂 time to get this working fully

vivid fulcrum
#

what's your frontend framework

#

mudblazor?

prime cliff
#

Radzen

#

Has some really nice charts and table stuff

vivid fulcrum
#

cool, I've been looking for a good library. I tried mudblazor and it's clunky

prime cliff
wheat mesa
wheat mesa
#

You’re really just going to be making calls to some other model provider like OpenAI or Claude or whatever

dusky raven
#

Too late already started

#

Isnt claude like hundreds of dollas

wheat mesa
#

Use whatever language you feel comfortable with

vagrant notch
wheat mesa
#

Depends how much you use it

#

All of the major AI models have API pricing that is based on how many tokens you send/receive in a month

lyric mountain
#

ofc frameworks should also be taken into account, but I'd not worry about raw language performance

wheat mesa
#

I think that languages should be taken into account if you intend to scale, but if it's a personal project, just use whatever language makes you happy

quartz kindle
#

arguably even at scale it matters much less than we think

#

as long as its well designed and optimized, the difference between languages will not be that big

vagrant notch
#

it just depends on you, what language you prefer and what languages have a better ecosystem for what youre making

quartz kindle
#

even between js and c++ we can see differences as small as 1 to 1.3

near pulsar
#

Not sure what im doing wrong but when posting stats with top.gg I can make the request and get status 200 however the data on the page itself doesnt actually change?

wheat mesa
#

but it is important to choose an appropriate language for what your goal is at the end of the day

#

probably not going to be writing a game engine in python as opposed to C++

quartz kindle
#

js game engine here i go

#

:^)

wheat mesa
#

I mean... you can, just a matter of whether or not you should

quartz kindle
#

node native addon vulcan api

#

gg

wheat mesa
#

as an aside, I HATE parsing excel files and processing them

quartz kindle
#

but thats basically c++ and not js

wheat mesa
#

please save me from web dev hell

queen needle
wheat mesa
#

god I wish I got to use typescript

#

I wish the internal libs here had jsdoc at the very least

queen needle
#

Elixir or go for backend or ts somwtimes

queen needle
wheat mesa
#

been looking through the fucking de-minified source files for props that may or may not exist in these react libs lmfao

quartz kindle
#

lmao

wheat mesa
#

I don't even get autocomplete on props because they don't have ANY typedefs or jsdoc

queen needle
#

💀

#

I pray for you

wheat mesa
#

I have to literally f12 into the source of the component and hunt for the props

quartz kindle
#

nothing is inferred at all?

wheat mesa
#

nope

#

because they don't usually put the props down as object destructuring

queen needle
#

So it's JavaScript with no comments jsdoc or example usage?

wheat mesa
#

they just put props like so

const SomeComponent = (props) => {
    const { someProp, anotherPropIWontFuckingUse, ...rest } = props;
    
    // Oh yeah and down here just because fuck you we're gonna use props.someHiddenProp instead of destructuring it above
}
#

so glad that my coworker is the one mainly in charge of frontend

#

someone would actually have to euthanize me if I had to work on that stuff all the time

quartz kindle
#

cant be worse than reverse enginnering google meet webrtc

queen needle
#

Who TF does thst

quartz kindle
#

i did

queen needle
#

Why

quartz kindle
#

for a chrome extension

wheat mesa
#

this stuff is pretty difficult to do because we aren't allowed to use pretty much ANY external libs

#

and there is little to no internal docs on the libraries we have

queen needle
wheat mesa
#

so I'm hunting through decompiled source files half of my day

quartz kindle
#

lmao

wheat mesa
#

oh even better, my API types are all defined in a separate repo/project, and I'm not allowed to add new types because that would require a whole review process and upgrading the nuget package for every micro-api that uses it

#

so I have to make helper DTOs and so I'm using DTOs from two different projects at any given time

quartz kindle
#

rip

wheat mesa
#

still better than my last internship lmfao

quartz kindle
#

hijacking WebRTC lmao

const ___onmessage = Object.getOwnPropertyDescriptor(RTCDataChannel.prototype, "onmessage");
Object.defineProperty(RTCDataChannel.prototype, "onmessage", {
    get() {
        return ___onmessage.get.call(this);
    },
    set(val) {
        const fn = function(d) {
            if(d.target.label === "collections" || d.target.label === "reactions") {
                document.dispatchEvent(new CustomEvent('@_@', { detail: { type: d.target.label, data: d.data } }));
            } else if(d.target.label === "audioprocessor") {
                if(d.data.byteLength > 2) {
                    document.dispatchEvent(new CustomEvent('@_@', { detail: { type: "audio", data: "self" } }))
                }
            }
            return val(d);
        }
        return ___onmessage.set.call(this, fn);
    }
});
queen needle
#

The more you describe the happier I am Im not majoring in comp sci

wheat mesa
#

thank you for reminding me

queen needle
quartz kindle
#

more like a necromancer than a wizard

wheat mesa
quartz kindle
#

with the amount of zombie/dead projects i have

wheat mesa
#

honestly my least favorite part of SWE is having to deal with the bureaucracy of it

queen needle
wheat mesa
#

nah

#

this internship is sick

quartz kindle
#

what should i cook for lunch

wheat mesa
#

hindsight is always 20/20, I can complain about design decisions but it's really difficult to foresee these sorts of things when you're the one writing things

queen needle
quartz kindle
#

i think im gonna make some pasta with veggies

#

there isnt much else to make anyway

wheat mesa
#

the CS internship job market is kinda cooked but if you work hard you can land one

#

my first internship paid me 19 an hour and I drove 80 miles each day that I worked (3 days a week during the semester)

queen needle
#

I plan to be a french teacher anyway so, but I did think about comp sci for a little

wheat mesa
#

it was hard work but it paid off

#

got a ton of real experience

quartz kindle
#

awesome

wheat mesa
#

I have experience with actual production software now, got to be involved very closely in the process of creating new features, etc.

#

It was an intern mill but at the same time there's not a lot of internships that give you the opportunity to work on real software

queen needle
#

that's awesome tho

wheat mesa
#

Now my internship is at a big company, I get paid significantly more, the drive is 1/6 of what I used to drive, and I get hybrid as well

#

it's been a great experience so far, just wish I got the chance to work on more technical things than web dev

#

been pushing to be a part of a kafka project they're working on but I might have to wait until the fall before I can get involved on that

prime cliff
#

Working 🙂

sharp geyser
#

@quartz kindle how does Array.isArray work under the hood?

neon leaf
#
const isArray = (arr) => arr instanceof Array
#

mayhaps

sharp geyser
#

Ah right

#

Forgot instanceof is a thing

queen needle
#

It does more than that

#

"
The abstract operation IsArray takes argument argument. It performs the following steps when called:

If Type(argument) is not Object, return false.
If argument is an Array exotic object, return true.
If argument is a Proxy exotic object, then
a. If argument.[[ProxyHandler]] is null, throw a TypeError exception.
b. Let target be argument.[[ProxyTarget]].
c. Return ? IsArray(target).
Return false"

prime cliff
#

^ This is why JS scares me

#

Also what is that an exception on a bool return function LUL pirate software would like a piece of that

quartz kindle
#

Arrays have a hidden private field when created

#

It performs a branded check, similar to the in operator, for a private field initialized by the Array() constructor.

#

essentially something like this

class MyClass {
    #isMyClass = true;
    static isMyClass(instance) { return instance.#isMyClass; }
}

const mc = new MyClass();
console.log(MyClass.isMyClass(mc))
neon leaf
#

maybe actually convert to bool tho

#

(for false)

#

MyClass.isMyClass([])
Uncaught:
TypeError: Cannot read private member #isMyClass from an object whose class did not declare it
at MyClass.isMyClass (REPL4:3:50)

quartz kindle
#

weird

neon leaf
#

when write a better js fs libary sir tim

#

with larger pool for blocking operations™

quartz kindle
#

lmao

quartz kindle
neon leaf
#

doesnt it only use 1 extra thread for the blocking ops?

quartz kindle
#

node has a threadpool of like 4 threads minimum

neon leaf
#

ah ok

quartz kindle
#

and i think it scales with available cpus

neon leaf
#

wasnt quite sure, since uh I havent used nodejs in about 1 year

#

when rust/c like streams in js

#
const reader = new StreamReader(fs.createReadStream('whatever.bin'))

const data = new StreamData(512) // essentially just uint8array with "fixed" length
while (true) {
  const read = await reader.read(data)
  if (read === 0) break

  console.log('Read Data: ', data.slice(0, read))
}
const reader = new StreamReader(fs.createReadStream('whatever.bin'))

while (true) {
  const len = await reader.readVarInt()

  const data = new StreamData(len)
  const read = await reader.read(data)
  if (read === 0) break

  console.log('Read Data: ', data.slice(0, read))
}
#

its so much more convenient in my opinion

quartz kindle
neon leaf
#

yea but u cant read custom sizes easily

#

its been very useful to me when working with tcp stuff like minecraft

#

since I can just read the exact packet easily

#

no extra logic

quartz kindle
#

ah you want to read a custom size?

#

you can

#

brb finish league game

quartz kindle
neon leaf
#

cursed

quartz kindle
# neon leaf cursed

here's a js custom websocket using it:

    _onReadable() {
        const socket = /** @type {NonNullable<typeof this._socket>} */ (this._socket);
        while(socket.readableLength > 1) {
            let length = readRange(socket, 1, 1) & 127;
            let bytes = 0;
            if(length > 125) {
                bytes = length === 126 ? 2 : 8;
                if(socket.readableLength < 2 + bytes) { return; }
                length = readRange(socket, 2, bytes);
            }
            const frameSize = 2 + bytes + length;
            /** @type {Buffer | null} */ const frame = socket.read(frameSize);
            if(!frame || frame.length !== frameSize) { return; }
            const fin = frame[0] >> 7;
            let opcode = frame[0] & 15;
            let payload = frame.subarray(2 + bytes);
            if(fin === 0) {
                this._wsFragments.buffers.push(payload);
                if(opcode > 0) {
                    this._wsFragments.opcode = opcode;
                }
                return;
            }
            if(opcode === 0) {
                const frag = this._wsFragments;
                frag.buffers.push(payload);
                payload = Buffer.concat(frag.buffers);
                opcode = frag.opcode;
                frag.buffers = [];
                frag.opcode = 0;
            }
            this._processFrame(opcode, payload);
        }
    }
#

yes, its kinda cursed

#

lmao

neon leaf
#

so

#

when implement mine

quartz kindle
#

lmao

neon leaf
sharp geyser
#
import { LuminaColorScheme } from '../theme';
import { isLuminaColorScheme } from './is-lumina-color-scheme';
import { LuminaColorSchemeManager } from './types';

let currentScheme: LuminaColorScheme = 'dark';

export function createMemorySchemeManager(): LuminaColorSchemeManager {
    const subscribers = new Set<(value: LuminaColorScheme) => void>();
    return {
        get: (defaultValue) => {
            return isLuminaColorScheme(currentScheme) ? currentScheme : defaultValue;
        },
        set: (value) => {
            currentScheme = value;
            subscribers.forEach((fn) => fn(value));
        },
        subscribe(callback) {
            subscribers.add(callback);

            return () => {
                subscribers.delete(callback);
            };
        },
        clear: () => {
            currentScheme = 'dark';
        },
    };
}

Anyone wanna guess why this causes severe lag

#

hint the ubsubscribe is called 20,000 times

#

:))

#
export function useProviderColorScheme({
    manager,
    defaultColorScheme,
    forceColorScheme,
}: UseProviderColorSchemeOptions) {
    const [value, setValue] = useState(() => manager.get(defaultColorScheme));
    const colorSchemeValue = forceColorScheme || value;

    const setColorScheme = useCallback(
        (colorScheme: LuminaColorScheme) => {
            if (!forceColorScheme) {
                setValue(colorScheme);
                manager.set(colorScheme);
            }
        },
        [manager.set, colorSchemeValue, forceColorScheme],
    );

    const clearColorScheme = useCallback(() => {
        setValue(defaultColorScheme);
        manager.clear();
    }, [manager.clear, defaultColorScheme]);

    useEffect(() => {
        const unsubscribe = manager.subscribe(setColorScheme);
        return () => unsubscribe();
    }, [() => manager.subscribe(setColorScheme)]);

    return { colorScheme: colorSchemeValue, setColorScheme, clearColorScheme };
}

Found the culprit

#

Fixed with a simple task.defer

neon leaf
queen needle
#

New Call of Duty looks wild

neon leaf
#

these games are stretched way too long

#

from 1am to 3:30am

#

with 20 rounds (minimum choice

warped sierra
#

im the only one able to run eval but even so, gotta have safeguards

queen needle
#

Client id redacted??

#

I never redacted things I just made it use tio if a none owner used it

warped sierra
#

it redacts alot more than just client id

#

🔒 Redacted sensitive data: DB_URI, DISCORD_TOKEN, CLIENT_ID, OWNER_ID, BOT_ERRORS, API_KEY, NODE_ENV, VERIFICATION_TOKEN_EXPIRY_MS, VERIFICATION_BASE_URL, CLEANUP_INTERVAL_MS, RATE_LIMIT_WINDOW_MS

#

it check similar regex patterns so anything that fits any pattern just gets redacted

queen needle
#

Idk if the command is only for you I personally don't believe in redacting, as if you expose something that is your fault for not being careful of what you run and where you run it but I understand the point

limpid onyx
#

If they have access to eval, they can bypass your redaction

pearl trail
#

guys, am i just that dumb in math or what...

#

that * 100000000 doesnt do anything, whether i remove it or not

neon leaf
#

have you tried converting to floating point numbers before doing the arithmetic

pearl trail
#

dang didn't knew it, had to add ::numeric to one of the var

#

thank you

queen needle
#

My message 🥲

#

I'm sorry automod

quartz kindle
#

auto mood

queen needle
queen needle
warped sierra
#

@ivory siren

lethal dragon
limpid onyx
#

What?

prime cliff
#

Or you know just http request it to your own api logger xD

cinder mango
spark flint
acoustic bough
frosty gale
#

they are sort of the same thing on a fundamental level

neon leaf
#

ig text is standardized to be utf8

frosty gale
#

id leave that up to the application to worry about outside of the protocol but thats just my low level thinking

neon leaf
#

yea I agree

prime cliff
#

Pog Finally done sentry error logging, still needs a bunch of work/features but hey it works

quartz kindle
#

for example discord api sends uncompressed json as text and compressed json as binary

#

which libs use as a hint to whether or not they should decompress

prime cliff
astral wigeon
#

how do i check if my bot was approved

queen needle
#

You'll be notified via carrier pigeon

lucid skiff
#

so many bots are getting declined it's scaring me

solemn latch
#

If you read the bot guidelines and the "how we review" article you should have no issues.

sharp geyser
#

Currently only have Container and Button (TextButton) ported over

#

But it's responsive

#

Container grows based off child elements

#

So it's height will grow as more elements are added

sharp geyser
#

@radiant kraken ^^

#

Thought you might be interested as well

tiny verge
#

Tes

radiant kraken
#

great job aaron!

#

yeah i saw you creating that repo and organization on github

sharp geyser
#

Stalker

radiant kraken
#

yeah i stalk everyone i follow on github

#

(it's called github feed)

patent bramble
#

Is there an API to change a bot's status if it's only using webhooks and not gateway? 👀

deft wolf
#

I don't think so. The status is related to the gateway connection. Without it, there is no status

patent bramble
#

dang, lame

frosty gale
#

throwing this out there in case anyone can offer any tips
for some reason intermittently when i access my site running on nginx with a letsencrypt cert i am getting this error in nginx logs:
2025/07/20 10:06:18 [crit] 3003836#3003836: *5722 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: xx.xx.xx.xx, server: 0.0.0.0:443
from the browser/curl perspective you get an ssl error:
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed
but right after a refresh the site works completely fine, so i have no idea what could be wrong with my ssl config if that

#

has been happening for months and its starting to drive me insane

#

the only thing i saw on stackoverflow was that its probably russian hackers hitting my site but im not russian unless theres something i dont know 😕

#

ssl labs also gives me a good score

#

strange issue

vagrant notch
#

have you tried on other devices

neon leaf
#

🔥🔥🔥

frosty gale
#

its such a bizarre issue i am absolutely stumped, and on top of that nginx claims that the client closed the connection but curl claims that the server closed it?

#

maybe i can get some info running a wireshark on it, but im definitely trusting nginx at this point

#

actually same issue is happening on termux on my android, now im fully confsued

#

wireshark it is i guess

neon leaf
#

that sounds like a common 2 servers 1 port problem

#

may be running another server without knowing

frosty gale
#

that would explain a lot, i'll do some more digging on that

thin dome
frosty gale
thin dome
frosty gale
#

ah i thought you meant something else, but i did try disabling tls 1.3 fully and only leaving tls 1.2 and the issue seems to persist

#

confirmed it was disabled via ssl labs

#

will see if i can find anything interesting on wireshark but it does look like im only running one ssl server, nginx config also looks fine

$ sudo lsof -nP -iTCP:443 | grep LISTEN
nginx   3163374     root    7u  IPv4 11517713      0t0  TCP *:443 (LISTEN)
nginx   3163375 www-data    7u  IPv4 11517713      0t0  TCP *:443 (LISTEN)
nginx   3163376 www-data    7u  IPv4 11517713      0t0  TCP *:443 (LISTEN)

$ sudo ss -tlnp | grep :443
LISTEN 0      511          0.0.0.0:443       0.0.0.0:*    users:(("nginx",pid=3163376,fd=7),("nginx",pid=3163375,fd=7),("nginx",pid=3163374,fd=7))
prime cliff
#

I think you're just micromanaging something that shouldnt really be micromanaged?

thin dome
# frosty gale ah i thought you meant something else, but i did try disabling tls 1.3 fully and...

Got it. Tell me which OpenSSL version you are using because TLS 1.3 is only supported in OpenSSL 1.1.1+ so if it's still active, you may need to recompile NGINX or alter your NGINX build or use a different method to disable TLS 1.3. Also check if you are using a reverse proxy or CDN because a proxy terminating TLS with TLS 1.3 enabled might interfere with NGINX if the backend doesn't match expected settings.

prime cliff
#

Noones really gonna care about supporting older safari versions unless they complain

frosty gale
# thin dome Got it. Tell me which OpenSSL version you are using because TLS 1.3 is only supp...

using debians openssl

$ openssl version
OpenSSL 3.0.16 11 Feb 2025 (Library: OpenSSL 3.0.16 11 Feb 2025)

although i did try disabling tls 1.3 as mentioned before and the issue did persist, so not sure if thats the cause here, but i did confirm it was fully disabled

as for reverse proxies or cdns, im not using cloudflare, the only thing i have is a hetzner firewall -> directly to nginx -> nginx routes to app via proxy_pass

frosty gale
#

so all modern browsers and operating systems which is very unusual

prime cliff
#

So then it's something else nothing to do with ssl or older browsers then

#

If it was an ssl issue you would usually get a browser warning too

frosty gale
#

for some reason i cant replicate the issue on my wsl on the same machine, but on my android termux and chrome/brave on windows it keeps happening

#

yeah and its intermittent too which makes things much more confusing

#

its like a dice roll whenever i make a request for it to happen

prime cliff
#

What's your domain or what are you trying to test?

#

Also are you using Clouflare maybe it's a ssl setting that needs fixing

#

You could also use cloudflare ssl certs instead of lets encrypt too

frosty gale
#

i was originally on namecheap but switched over to cloudflare, both had the same issue, although i am hesitent on moving to cloudflare

i did do a wireshark and for some reason it looks like the failing request attempts to use tls 1.0?? it would explain why it would fail but im not sure the client tries to use tls 1.0 right after successfully using tls 1.3, will try look into this

#

i wonder if temporarily enabling tls 1.0 on my server will fix the issue, only to debug

prime cliff
#

Depends what program you're using it will check tls 1.0 and then upgrade to a newer version or can be forced to use a specific tls version

thin dome
# frosty gale using debians openssl ``` $ openssl version OpenSSL 3.0.16 11 Feb 2025 (Library:...

I see. Make sure you are using secp256r1 as the curve which is widely supported and OpenSSL 3 introduces provider architecture so disable default providers which can block certain ciphers or curves. You should also double check for conflicting ssl_ directives because sometimes they can be set in both http {} and server {}. Last thing you can try is disable TLS 1.3 at OpenSSL system level.

thin dome
#

in your log_format in NGINX add
log_format tlsdebug '$remote_addr - $ssl_protocol - $ssl_cipher - $status';
and use it in your access log
access_log /var/log/nginx/access.log tlsdebug;
now you'll see if a request came in as TLS 1.0 or not.

thin dome
frosty gale
#

i understand, but only to test to see if it would solve the issue

frosty gale
#

and it doesnt try to follow it up with tlsv1.3, i have no idea why it would do this

#

i notice the issue tends to happen with rapid subsequent requests

thin dome
#

it does not follow up because its not supposed to

#

its supposed to fall back from tls 1.3

#

not the other way around

frosty gale
#

though now i did force tls 1.3 with my curl client and it does send the request under tls 1.3 but still fails, hmm

#

i wonder if this is something to do with some kind of tls connection reuse config, i can now reproduce it almost every time when i do an initial request and immediately try another request, will see if i can disable tls reuse to see if it helps

thin dome
frosty gale
#

my curl and browser does support tls 1.3 fine but the issue persists, i have also tried to force tls 1.2 but the issue still happens on tls 1.2

thin dome
thin dome
#

and if it still shows 1.0 or 1.1 in wireshark just log it

#

to make sure

frosty gale
#

i see what the underlying issue is now after looking at wireshark dumps, for some reason sometimes when establishing the TLS connection, the server doesn't send a serverhello and sends a fin effectively ending the connection

#

i cant see how the issue would be to do with the ciphers or protocol if it happens intermittently, if it happened consistently then sure

#

i wonder if this is some strange hetzner or server config bug that goes beyond nginx

#

i'll run a wireshark trace on the servers end, its possible the hello's are being lost somehow

frosty gale
#

i've fed the dumps into chatgpt, if its some rate limiting that's happenign somewhere that would explain a lot as to why nginx thinks the client closed the connection while the client thinks the server did

frosty gale
#

it looks the problematic https request doesnt even receive a clienthello from the servers perspective, i'll test this from my work pc and network and if the issue persists, im starting to think hetzner has some kind of weird dos protection that drops the packets

warped sierra
#

im making a client bot rn. its finished but i got 2 hrs left soooo, made a animated ping command because im so bored

wheat mesa
warped sierra
#

yes they will

#

i mean its for a private server so not really gonna be an issue

#

none of them will be checking the ping

slender wagon
#

I have a feature that analyzes chat conversations (usually 30 minutes to 2 hours long). During live chats, I cache the messages temporarily, then periodically dump the cache into JSON files to clear memory. After the chat ends, I run AI analysis on the complete conversation stored in the JSON. This works fine.
Now I'm building a website to share these processed chats, but storing them as JSON files isn't ideal for a web platform. After the AI finishes processing, should i
Delete the JSON and save everything to a database, or
Keep the processed chat content on a CDN?

The chats are finalized after AI processing and won't change anymore. I'm trying to figure out the best approach for serving this content which is basically static to users on the website.

quartz kindle
#

do you use ssr?

#

is the json file loaded server side or client side?

#

you could store them in a folder configured to be served as static files by your webserver, and add caching headers to them as well

slender wagon
#

Yes but i plan on scaling

#

So a cdn would be great

#

They aren’t that expensive

quartz kindle
#

shouldnt be expensive unless your files are huge

slender wagon
quartz kindle
#

pfps can be served directly from discord's cdn

slender wagon
#

And then i can store the likes in db linked to messages that have likes

#

Thats confusing

#

But sounds good in my mind

quartz kindle
#

yeah just be sure to add caching if possible

#

specifically browser caching with etags

slender wagon
#

Cdn has that by default but if u are talking about the rest of the site

#

I will really need caching

neon leaf
#

why is it so easy to aquire tech debt

#

u write code in a rush once and suddenly modifying that code and everything around it is awful and will never get fixed due to it being annoying to

prime cliff
#

You just have to get good at reworking and organizing code better, i'm getting a bit of tech debt but i have it fairly organized

neon leaf
#

yeah, my debt is in places I think Ill never have to modify again

#

and then I have to modify them

lament rock
patent bramble
wheat mesa
#

good architecture from the start tends to acquire less tech debt in my experience

#

de-couple your services as much as possible

patent bramble
#

IMO testing without properly implementing does it too

#

"eh, this works, let's just slap it into a function and ship it"

wheat mesa
#

I'd say it's more of an architecture question

patent bramble
#

lack of knowledge of a certain matter can accelerate it. Hacking code together

wheat mesa
#

There's stupid tech debt which is more like "this is a bad practice and I know it but I don't care right now", then there's genuinely bad tech debt like "I designed this system poorly from the start, now it would be hell to redesign"

patent bramble
#

yeah for sure

wheat mesa
#

e.g. making a giant monolith application for a web app when a few micro backends/frontends would be a better choice for modularity and team collaboration

#

system design is underrated and underappreciated

lucid skiff
#

not sure where to but suggestions, but one i have is to somehow provide an average decision time of bots by taking the average elapsed time from submission to decision of the last 10 bots or something like that

#

just suggesting this because it seems to be taking longer than 2 weeks 😔

wheat mesa
#

Giving time estimates makes users upset when the actual time is longer than the estimate, and overestimating timing to compensate makes users angry with feeling like it’s going to take a long time

lucid skiff
#

ah i see that makes sense

#

(don't worry, im not angry its taking longer than usual, more just paranoid something will break last-minute)

radiant kraken
#

has anyone here used alacritty? what do you guys think of it?

warped sierra
sharp geyser
#

How the fuck does pnpm link work

#

Like both local and global linking don't do shit

#

The test project still can't resolve the package for either

#

and now I feel like i've fucked it up beyond repair cause it wont even unlink now

quartz kindle
#

pnpm is a scam

#

its cool in theory but in practice it has so many issues its not even funny

sharp geyser
#

but blazingly fast 🚀

#

but yeah no im realizing that

#

I first swapped to pnpm because it's features seemed cool

#

but like you said in theory

#

in practice its becoming a huge issue val_Sadge

quartz kindle
#

did the same years ago

#

regretted it so much i went back to npm and never looked back

#

i tried yarn as well

sharp geyser
#

yeah yarn was meh

#

I'm thinking of swapping to npm again as well

sharp geyser
#

npm link & npm link package-name

#

💀

warped sierra
#

I used yarn for like 2 years before just going back to npm

long marsh
#

Everyone comes back to npm in productionalized systems.

lament rock
#

Still using yarn

#

ik npm got its perf fixed just using yarn packages

loud canopy
#

rn it just levels but i want to add like "can be crafted" , "class specific" , "slot specific"

#

shouldn't be that bad <= clueless

vagrant notch
#

but for most things npm is better

sharp saddle
#

is there a way to set Rich Presence using browser?

#

using oauth2, or something?

civic scroll
#

ik why i'm in css jail

sharp saddle
civic scroll
sharp geyser
sharp saddle
wild valley
prime cliff
#

You technically can but you need to run a program on your computer that uses Discord and the website can communicate with said program to set your Discord clients status

#

There was a service that did this but for some weird reason i can't find it on google waitWhat

#

Ah that was it premid https://premid.app/ they have a lot of website specific rpc status like youtube, instagram, etc

sharp saddle
prime cliff
#

You can use browser extensions to use IPC to communicate with your Discord client, so just develop your own extension i guess 😄

wild valley
quartz kindle
#

i mean, it actually makes sense if you pay attention

#

but it looks terrible at first hahaha

civic scroll
#

ik

#

it's so bad that i think there must exist a better alternative

quartz kindle
#

well you could make your own variable with that, at least you dont pollute your classes

prime cliff
#

There is technically .less that lets you put css inside each other
.class1 {
.class2 {
}
}
Depends on what lang/lib you use to convert that to css though

quartz kindle
#

you can already do that with pure css

civic scroll
#

yes, css supports that now

quartz kindle
#

in the most recent browsers

#

which honestly what took them so long

#

fucking finally

#

and most frameworks should support that in raw css files and still transpile it for older browsers anyway

lyric mountain
quartz kindle
lyric mountain
#

nah, 3 years ago

quartz kindle
#

lmao

queen needle
lyric mountain
#

nice, node path renderer seems to be working perfectly

#

recursion ftw

#

while we're at that, does anyone know any tabletop map backdrop creation tool to recommend?

neon leaf
#

please end me (I am reboxing a box to downcast it back to a box)

#

punishment for not using async everywhere yet

quartz kindle
neon leaf
#

yes

#

this happens when you work with dynamic data in rust and just want to get it done quick

pure vessel
#

There have to be a better way to do this

quartz kindle
#

the most you could do would be something like ```js
const user = pk.d.user;
const tag = user?.primary_guild;
if(!user || !tag) return;

delicate zephyr
#

using ors can getting annoying

quartz kindle
delicate zephyr
#

lol

limpid rain
#

hi

vagrant notch
#

this morning i pushed a change that broke one of the key features of my service and i had no idea until now (its night time) 💔

raven token
vagrant notch
#

but still quite tragic

#

it was just a save button that was broken

#

its supposed to be disabled if theres no detected changes

#

but it stayed disabled even after changes were made

#

so someone asked me whether it has autosave

#

and then i realized the mistake i had made

quartz kindle
#

nice try scammer

lyric mountain
#

aight, update on the generation thing

#

now it highlights only paths reachable by the player

#

I need to make a path's color consistent lmao

long marsh
#

Just landed a new job 😄

neon leaf
#

congrats

long marsh
#

The pay is wild $225k/yr 😮

neon leaf
#

america?

long marsh
neon leaf
#

yea, what I was thinking too

long marsh
#

My skill is purposed to Generative AI / building agentic workflows ... so it makes sense for the company imo

#

I'll likely build them something that makes millions of dollars...

quartz kindle
#

hey if you need an assistant let me know xD

wheat mesa
prime cliff
#

Average game of league

neon leaf
#

I was today years old when I found out my app isnt leaking memory, its just really fragmented

#

switched to jemalloc, will see if it helps

long marsh
#

Texas maybe?

wheat mesa
#

I’m an intern rn, hence why I don’t make 200k a year lol

patent bramble
#

Does Discord not have an API to get a list of members with x role? Only way I see to do this currently is to pull every member of a guild and check them for the role. All fine until you start reaching guilds with 10k+ members. Also doesn't really help if the guild is popular and members are always joining/leaving, might skip over some since it'll definitely end up getting rate limited.

knotty night
warped sierra
#

if you are doing large checks then split it into chunks

#

Listen to events like:

guildMemberUpdate (to track role changes),

guildMemberAdd / guildMemberRemove.

#

use cache where you can

patent bramble
#

Dang I should've specified. I'm not using gateway, just webhooks and HTTP lol

#

You aren't wrong about the events, but I can't use those here lol

quartz kindle
patent bramble
#

The goal is a webhook only bot. It's dumb that I can't get the list of members with a role from the not API but users can from the user API.

quartz kindle
#

you need to spawn a shard with a large shard count value (i believe the limit is 32 bit unsigned int), and calculate the shard id based on the guild id

#

the issue is you can only do this 1000 (2000+ for large bots) times per day, due to shard identify limits

feral aspen
#

hi~ how do y’all store your .env values?

since we don’t push them to github, how do you make sure they’re available when pulling the repo on another device?

do you keep them in google drive, a usb, or something else?

knotty night
#

I just copy and paste them from my VSC

#

So I just make a new file on the production machine wether it be, shared web hosting, vps, vds

#

Even though they are not stored on GitHub, when pulling the latest from GitHub it will not delete the file

feral aspen
#

I think I should have both .env (ignored) & .env.example (pushed w/ empty values), correct since it's best practice?

feral aspen
#

i was told a password manager like 1password is good?

small tangle
#

Oops ping

feral aspen
neon leaf
stark kestrel
#

Thanks a ton @radiant kraken 🔥

Will test while in the train later today ^^

quartz kindle
quartz kindle
#

but i also have all my code mirrored/synced into a Mega cloud storage

radiant kraken
#

i genuinely didn't expect you looking at my project lmao!

feral aspen
quartz kindle
stark kestrel
feral aspen
#

mb

neon leaf
#

the free plan is very generous, just no 2fa support afaik

quartz kindle
#

im using Ente for 2fa now, after Authy shutdown their desktop client

#

Ente is pretty nice, they have mobile, desktop and web clients so you can access your 2fa from anywhere

#

they also have a privacy-focused image hosting service

small tangle
neon leaf
#

@quartz kindle sir, do you have anything planned on <t:1753639200:F>

quartz kindle
#

lmao idk yet

neon leaf
#

mm, you should totally join my mc event

feral aspen
quartz kindle
#

cool

#

you can also selfhost your own bitwarden

#

they have a free open source server

neon leaf
#

and a rust alternative 🔥🚀

quartz kindle
#

of course the crab strikes again

#

xD

quartz kindle
neon leaf
#

discord is on my website

feral aspen
neon leaf
#

and you have all data on ur servers

feral aspen
#

ohh, so i don't pay for the paid features if i self host?

neon leaf
#

yes

feral aspen
#

alr, i'll look into the docs then

neon leaf
quartz kindle
#

you just have to manage your dafa yourself and the risks it imposes (like your vps terminating you and not giving your data back)

neon leaf
#

user.0.0 🥀

arctic kernel
covert gale
#

i just pay for bitwarden, it's extremely cheap

#

i'd rather not lose all my passwords because of a bad rm -rf or something alike

sharp geyser
#

Wow wtf that is cheap

#

💀

covert gale
#

yeah, its actually crazy

sharp geyser
#

When did bitwarden become that cheap

#

I remember it being expensive asf

neon leaf
covert gale
#

even with backups sometimes stuff can happen :p

neon leaf
#

yea I also dont selfhost bitwarden anymore

covert gale
#

unlikely but something could happen that knocks off your homeserver and backup at the same time

stark kestrel
#

i use proton pass, free, simple and convenient

covert gale
#

there's also the whole thing with that a vulnerability in vw is more likely just due to being open source and the ability for bad actors to submit real prs that could introduce vulns

#

see: xz situation

prime cliff
#

Oh dam bitwarden actually lowered their prices a lot wtf

covert gale
#

i'd rather just pay the 10$/yr or whatever it costs rather then deal with all that stuff

sharp geyser
stark kestrel
#

@radiant kraken now i understand what you meant with the size of the files KEKW

radiant kraken
#

now imagine if i were to include 20 more precompiled binaries

stark kestrel
#

Small question though, haven't used the lib a lot - won't be that huge the resulting compiled binary?

radiant kraken
#

no

#

it's just the git history making it big

stark kestrel
#

lovely