#development

1 messages · Page 118 of 1

sick agate
#

wtf

wheat mesa
#

That is not how it works at all

neon leaf
#

no

hushed robin
#

brooooooooooooo

summer torrent
#

it's javascript's runtime

hushed robin
#

you guys are so confusing

wheat mesa
#

Nodejs is an engine that implements the javascript specification that is defined by the EMCA committee and a bunch of people

hushed robin
#

i don't get how you make a language out of nothing

lyric mountain
#

it'll be hard to explain as he thinks js = coding

wheat mesa
#

You can’t really

#

Everything is abstraction upon everything else

summer torrent
#

javascript ≠ node.js

sick agate
lyric mountain
#

js is a language, english is a language, stone carving is a language

hushed robin
solemn latch
earnest phoenix
#

The funny part is how everyone tries to explain it and everyone explains it differently. No doubt they don't understand shit anymore...

lyric mountain
#

tl;dr: it's a language, nothing more than a way to explain things

wheat mesa
#

Ok so @hushed robin how do you think a computer works

#

(I just want to gauge an understanding here)

hushed robin
#

you put parts together

#

and turn it on

#

and it works

wheat mesa
#

No, I mean like, how do you think it processes things

#

The code that you give it

hushed robin
#

bruh

#

do i look like a genius to you

sick agate
#

you seem to be likely trolling yho

wheat mesa
#

On a nanoscopic level, everything in your CPU is a very complex circuit run by billions of little transistors

#

It's all electricity

sick agate
#

yup

hushed robin
wheat mesa
#

And some of the things in your computer take that electricity, and use it as meaning

hushed robin
#

i don't know how computers work internally bruh

wheat mesa
#

For example, your RAM is basically billions of little switches that are either on or off depending on the signals they have been sent

hushed robin
#

billions?

wheat mesa
#

(Flip flops, don't worry about the meaning)

#

Yes

#

Billions

sick agate
#

yeah

hushed robin
#

physical?

neon leaf
#

yes

sick agate
#

yes

hushed robin
#

bruh

#

how we do that

wheat mesa
#

1gb of ram = more than 1 billion bits, aka 1+ billion little switches

wheat mesa
#

We spend incredulous amounts of money as a society researching how to make things small, that's how

lyric mountain
hushed robin
#

so

sick agate
#

isn't the latest tech 5 nm? nowadays

solemn latch
#

👀 we're below 13nm now right?

hushed robin
#

bruh

#

atoms?

lyric mountain
#

ah yeah, 5nm then

hushed robin
#

bruh

sick agate
#

yeah

lyric mountain
#

a cpu is a lattice of billions of very tiny transistors

hushed robin
#

why can't we do more complex things then

#

if we can make things this small

lyric mountain
#

because physics don't allow

wheat mesa
#

The diameter of a gold atom is 0.144 nanometers

sick agate
#

we are messing with the psychics enough

wheat mesa
#

So yeah, our transistors are a mere few hundred atoms wide

lyric mountain
#

if they go any smaller quantum shenanigans will start messing things up

hushed robin
#

what will mess up

wheat mesa
#

Technically the quantum world starts applying at the nanoscopic scale so yeah

lyric mountain
#

that's too complex for u to understand, don't try to go too deep in that yet

hushed robin
#

ok

sick agate
#

yeah

lyric mountain
#

but basically things at atom scale don't work like we know it

earnest phoenix
lyric mountain
#

they start doing things that they shouldn't

wheat mesa
#

just wait until you take a physics class and learn that all matter is a wave 😉

#

but it just doesn't matter until you get into a small scale

earnest phoenix
#

Could go as small as 0.2nm theoretically but not realistically

hushed robin
#

i did chemistry last semester

#

i barely got past

lyric mountain
#

at 0.2nm the cpu will simply start teleporting things around

earnest phoenix
#

Actually IBM already has 2nm, my bad

wheat mesa
#

not the same as physics, chem is more about how atoms interact than the quantum world

sick agate
wheat mesa
hushed robin
#

my teacher bumped me up 3% so i would pass

#

w teacher

wheat mesa
#

Ok so to get back on track, everything is an abstraction on top of other things. C is an abstraction on top of assembly, C++ is an abstraction on top of C, Javascript is an abstraction on top of C++, and it goes up and up

#

Fundamentally everything in your computer is being processed due to the laws of physics

hushed robin
#

sounds complex

#

i wonder how we achieved this

wheat mesa
#

So languages don't really "exist", they are implemented on top of other smaller things

hushed robin
#

very impressive

wheat mesa
#

To be fair we did discover the electron roughly 130 years ago, that's a super impressive transition

#

(We discovered electricity before then)

hushed robin
#

hm

wheat mesa
#

Let's just say that scientists are very smart

earnest phoenix
#

Yet Electron is still a wacky framework

grim aspen
#

I still wonder how we thought mixing ingredients to make something together

sick agate
#

trying and seeing

hushed robin
#

one day some guy decided to mix

#

and yknow

wheat mesa
#

Back to the topic though, javascript is simply a standard made by people saying "Hey, javascript should look like THIS.", then it is the job of people like Voltrex working on javascript engines to conform to that standard and make it work

hushed robin
#

it just worked

#

and spread it around

grim aspen
#

“Hm let’s mix eggs, flour, other ingredients” “oh look it’s a cake”

hushed robin
#

i don't really get this still

#

but

wheat mesa
#

What don't you get

hushed robin
#

how javascript made of nothing

wheat mesa
#

Ok I'll walk you through the compilation process

earnest phoenix
#

JavaScript is just a syntax

wheat mesa
#

(And behavior)

sick agate
#

yup

hushed robin
#

no

#

i think it's a waste of time tbh

sick agate
#

meh not really

earnest phoenix
#

Engines, made out of code, interpret that syntax according to the JavaScript standard and make your computer do stuff

hushed robin
#

i don't understand much i don't think i will understand this process

earnest phoenix
#

When you run a JS code, you use the engine that was coded in, e.g. C++, and give it some file to read, interpret and act accordingly

wheat mesa
#

Step 1: Look at the file the user has written
Step 2: Take those strings the user has written, and convert them into "Tokens"
Step 3: Take those tokens, and "parse" them into a tree-like structure that represents a flow of code
Step 4: Do compiler magic that isn't important for you to know right now and turn that tree-like structure into instructions for the engine to execute
Step 5: Execute these instructions in the engine
Step 6: You're done, yay

lyric mountain
#

Oh oh, wait, I know how I can explain

#

Code is just a "letter" u write to the engine

#

To tell it what to do

#

It's like we chatting in this channel

hushed robin
#

so

#

what engines are websites made on

lyric mountain
#

My texts aren't made out of anything

#

They're just that, text

hushed robin
#

cus my bot is on node.js but what about a website

eternal osprey
#
IntegerProperty value1 =  new SimpleIntegerProperty(0);;
    IntegerProperty value2 =  new SimpleIntegerProperty(0);
    IntegerProperty value3 =  new SimpleIntegerProperty(0);
    IntegerProperty value4 =  new SimpleIntegerProperty(0);
    DoubleProperty total = new SimpleDoubleProperty(1.0);```
```java
public void createSegments(){
        TextField[] array = new TextField[4];
        for(int index = 0; index < allValues.length; index++){
            TextField textField = new TextField(null);
            array[index] = textField;
            root.add(textField, 0, index);
            Label label = new Label();
           label.textProperty().bind(Bindings.concat(Bindings.format("%.4f", allValues[index].divide(total))));
            label.setMinWidth(200);
            label.setMaxWidth(200);
            root.add(label, 1, index);
        }```
hey so this will ofcourse show NaN as it tries to create a doubleproperty for a division with a 0. Is there any way to fix this? And upon startup actually showing 0.0000 instead of fuck NaN
summer torrent
wheat mesa
#

Also on another note, this is a super cool visualization of size (Our transistors are around 10 * 10^-9 meters)

summer torrent
#

and framework maybe

hushed robin
#

tbh

#

do you guys think neuralink will be able to make people really smart

wheat mesa
#

I would never get something like that implanted in my head

sick agate
#

yeah no

wheat mesa
#

No matter how superhuman it made you

hushed robin
#

i would

wheat mesa
#

I do not trust someone else with that power

hushed robin
#

being super smart would be fun

sick agate
#

it would be but like

#

can't you just look at your smartphone

hushed robin
#

i also wonder why

#

there are no other smart animals on earth

#

why are only we smart

eternal osprey
lyric mountain
#

To be fair, smartness is inversely proportional to fun

solemn latch
#

👀

hushed robin
lyric mountain
#

The more intelligent you are, the more you see the world is boring

earnest phoenix
#

Completely off topic for this channel though lmfao

sick agate
hushed robin
grim aspen
sick agate
wheat mesa
#

don't confuse him more please

#

that's not correct

hushed robin
#

i am much smarter than a dog

earnest phoenix
#

not even philosophy kek

hushed robin
wheat mesa
#

that's not correct

eternal osprey
hushed robin
#

yes

eternal osprey
hushed robin
#

a dog cannot learn a language

#

can it?

wheat mesa
#

that doesn't make them not intelligent

eternal osprey
#

my dog can eat his own shit

wheat mesa
#

also you know that dogs take orders from humans all the time right

sick agate
#

yeah

wheat mesa
#

they may not understand what is being said, but they recognize the sound you make

#

and what action comes with it

sick agate
#

and then isn't language same

#

just a defined set of sounds

hushed robin
#

they don't actually understand anything

wheat mesa
#

that doesn't make them not intelligent

#

you'd be surprised to know that there are other species with forms of communicating with each other

#

dolphins are super smart

hushed robin
#

well yah

wheat mesa
#

so are birds

hushed robin
#

but are their languages as complex as a human language?

wheat mesa
#

probably more complex given that we can't fully decipher them ourselves

wheat mesa
#

I don't see how that doesn't make them intelligent though

wheat mesa
hushed robin
#

because

earnest phoenix
#

Is a human language even complex? How do you define something for the entire humanity for it to be considered complex.

hushed robin
#

more complex = smarter

wheat mesa
#

complex is relative

earnest phoenix
#

That's just speculations and random talk based on what you think and know.

wheat mesa
#

I bet you don't understand the languages at a low level that computers use, that doesn't make computers intelligent and humans unintelligent though

hushed robin
#

cus why has another animal not learned it?

eternal osprey
wheat mesa
#

oh

#

that's why it seems not so dogshit

sick agate
#

they don't have very large interconnected communication ways

earnest phoenix
#

Speaking japanese may be complex for you but not for a Japanese born human. Does that make the Japanese born human less smart just because they talked the language this their birth? Highly doubt

hushed robin
#

no but

#

if i really tried i could learn Japanese

#

if another animal really tried they coudln't learn it

wheat mesa
#

But it wouldn't be as easy for you as a native speaker

sick agate
#

every foreigner i have listened to trying to spell my name had issues

eternal osprey
#

for some reason that NaN only appears when my initial values are 0

earnest phoenix
#

Off topic for this channel either way at this point. Also being an endless loop of the same sentences over and over.

hushed robin
#

true cus u don't understand

wheat mesa
hushed robin
#

i haven't coded in awhile

eternal osprey
wheat mesa
#

actually from the look of it you might be dividing NaN by 1

hushed robin
#

i wanna make website but too hard and other things are boring so i'm not quite sure what to do uhh

wheat mesa
eternal osprey
wheat mesa
#

since your fields are empty initially it might be setting the value to NaN

eternal osprey
# wheat mesa

I am using the built in javafx properties, this is not really about doubles.

wheat mesa
eternal osprey
#

do you know how binding works? i can';t just manually change it because once i bind it it's set

wheat mesa
#

Mathematically dividing by 0 isn't defined, so NaN makes sense there

#

What is your intended result?

eternal osprey
#

well, if i startup the priogram i wanna see 0.0000

wheat mesa
#

From what I'm seeing online, you can define your own model class for this

#

That way you can control the binding behavior

#

Instead of being stuck with whatever default behavior SimpleDoubleProperty has

#

I might have to try javafx, their MVVM actually looks pretty intuitive

hushed robin
#

can you use whitespace in buttons

#

i want the buttons and select menus to align

#

so i want to use whitespace in those two disabled buttons to achieve that

grim aspen
#

actually it is

#

you would simply add whitespace to the 'label' attribute of the button

hushed robin
#

well

#

i'm trying

#

and no working

grim aspen
#

any errors?

hushed robin
#

no

#

there's just no whitespace

#

no work

#

:(

grim aspen
#

hm

hushed robin
#

very sad

#

L discord

#

also

#

does anyone know if Fandom has an API?

#

I want to get data on items from a game but manually inputting each item will take forever

#

seems it doesn't, scrapping it is

wheat mesa
#

I mean, looks like you searched a grand total of 9 minutes before coming to the conclusion that scraping is the easier option. I'd much rather spend some time digging to see if there's an API

hushed robin
pale vessel
#

Isn't fandom based on a heavily modified version of MediaWiki?

#

And MediaWiki has an API

wheat mesa
#

that's what I found in ONE google search

pale vessel
#

lol there it is

wheat mesa
#

maybe not

#

idk

hushed robin
#

uh

wheat mesa
#

random reddit post

hushed robin
#

looks old

#

and too hard

#
#

but it's kinda wacky

lyric mountain
#

So expect a spike in ram usage

#

Not big, but noticeable (even more if the library instantiates it on every request)

lyric mountain
#

Because browsers have to allocate some resources

#

Just like chrome or firefox

#

Much less than then since it's a headless browser, but still needs to

hushed robin
#

whats a headless browser

lyric mountain
#

A browser without visual interface

grim aspen
#

Shiiii may have to download one

hushed robin
#

oh ok

prime quest
#

how do you guys get the bot developer role

earnest phoenix
prime quest
#

ok ez

earnest phoenix
#

I do btw, all maintainers have direct commit access

#

But nobody should directly commit something in such extremely large and important repositories without a PR with appropriate amount of approvals and testing (through CI and stuff) unless absolutely necessary

earnest phoenix
rustic nova
#

you should make nodejs depend on one image called coconut.jpg

earnest phoenix
slender wagon
#

is it a good idea to send all my server crashes logs on a webhook

civic scroll
#

how do i become better at rendering

earnest phoenix
civic scroll
#

are there any guides to map soft mass deformation

#

i should program a physics simulator

earnest phoenix
slender wagon
#

yep i just finished reading through it

#

seems like a cool tool

#

i will prolly implement it

#

gives out alot of cool info

eternal osprey
#
IntegerProperty value1 =  new SimpleIntegerProperty(0);;
    IntegerProperty value2 =  new SimpleIntegerProperty(0);
    IntegerProperty value3 =  new SimpleIntegerProperty(0);
    IntegerProperty value4 =  new SimpleIntegerProperty(0);
    DoubleProperty total = new SimpleDoubleProperty(1.0);
public void createSegments(){
        TextField[] array = new TextField[4];
        for(int index = 0; index < allValues.length; index++){
            TextField textField = new TextField(null);
            array[index] = textField;
            root.add(textField, 0, index);
            Label label = new Label();
           label.textProperty().bind(Bindings.concat(Bindings.format("%.4f", allValues[index].divide(total))));
            label.setMinWidth(200);
            label.setMaxWidth(200);
            root.add(label, 1, index);
        }

hey so this will ofcourse show NaN as it tries to create a doubleproperty for a division with a 0. Is there any way to fix this? And upon startup actually showing 0.0000 instead of NaN

solemn latch
#

👀 you could just not run the function the first time until an input is provided.

eternal osprey
#

hmmm, not sure whether that would work tho

solemn latch
#

why wouldnt it?

eternal osprey
#

cuz we are creating labels and textfields inside this createSegemnts function, so if we don't call this function on startup, it will basically.. well give me nothing

solemn latch
#

👀 so, your function for creating them also does the math too?

shouldn't that be a separate function, thats only called on input?

eternal osprey
#
public void addEvents(TextField[] fields){
        for(int i = 0; i < 4; i++) {
            TextField field = fields[i];
            IntegerProperty property = allValues[i];
            field.textProperty().addListener(
                    new ChangeListener<String>() {
                        @Override
                        public void changed(
                                ObservableValue<? extends String> observable,
                                String oldValue, String newValue) {
                            if (!newValue.matches("[1 -9]\\d{0,3}")) {
                                field.setText(oldValue);
                            }
                            property.setValue(Integer.parseInt(newValue));
                        }
                    });
        }
    }``` check the segments method, you see that addEvents() call? Refers to above.
#

What the first method does, it will create the labels, and fields and binds them to their own private value. Then i created another method to bind a listener to each textfield.

#

so that's why its a bit hard

solemn latch
eternal osprey
#

because if we bind it, we cannot set a value manually iirc. It would destroy the bind and not update anymore.

solemn latch
#

are you not setting it manually here?
property.setValue(Integer.parseInt(newValue));

eternal osprey
#

that is the textfield, we are not bnding that one, only the label. And the label is also the one that gives problems.

solemn latch
#

ah, I see.

#

I also see I have no idea whats going on, and I cant really be helpful 😦

eternal osprey
#

ah i understand you, thanks for trying to help tho :.

#

<3*

topaz terrace
#

what went wrong?

#
 fs.readFile("../../restart.txt"), (err, data) => {
            if (err) {
                return;
            }
            if (data) {
                const restart = data.toString();
                const [messageId, time, userid] = restart.split(",");
                const user = client.users.cache.get(userid);
                console.log(time)
                const timeLeft = Math.floor((Date.now() - time) / 1000);
                user.send({
                    embeds: [
                        new Discord.EmbedBuilder()
                            .setTitle("Started!")
                            .setDescription("The bot has started up!")
                            .setColor("#a8f1b0")
                            .addFields({ name: "Time taken", value: `<t:${timeLeft}:R>` }),
                    ],
                });

                fs.unlink("../../restart.txt", (err) => {
                    if (err) {
                        return;
                    }
                });
            }
        }```
earnest phoenix
#

Note the ) after .txt" at the first line

topaz terrace
#

oh wait

#

i got a new error

#

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of Object

#

fixed

#

but

#

why does the time says 19 days ago

solemn cipher
earnest phoenix
#

So there's most likely something wrong with their calculations and now the way it's getting displayed.

solemn cipher
#

unless I missed something important and that’s what they wanted

earnest phoenix
#

And no you can have multiple formats

keen garden
#

Hi

solemn cipher
lyric mountain
#

Thus the timestamp tag won't work obviously

#

Duration requires a start and an end, you'll need to manually do that

daring apex
#

do replit have variable limit ?

lyric mountain
#

If you are worried about this, then you are using replit secrets wrong

#

Use a config file for anything that's not really sensitive

dry delta
#

What should be put in secrets and config.json

lyric mountain
#

things like urls, paths, ids, numbers, etc which do expose anything dangerous can be put in config

wheat mesa
#

@lyric mountain stupid question, but do you know how to colorize the output on intellij's console?

#

Tried using ANSI escape codes, doesn't seem to work properly

lyric mountain
wheat mesa
#

The built in console, I believe it's powershell

lyric mountain
#

cuz intellij technically doesn't have a console per se

#

but well, it should work with ansi escape codes

#

my logs use it and do appear colorized

wheat mesa
#

Very odd

lyric mountain
#

try switching to pshell

#

the default is cmd

#

it's in the config, search for terminal

wheat mesa
#

Yeah it's using pshell

lyric mountain
#

weird

#

try cmd then mmLol

wheat mesa
#

Doesn't work either

lyric mountain
#

see if there's any plugin for that

#

it's weird that yours isnt working

wheat mesa
#

ok nevermind

#

I hate the internet

#

it was double escaping the backslash

#

\\u001B..... instead of \u001B.....

lyric mountain
#

lmao

humble echo
#

i need help pls

#

how can it not find it what did i do wrong??

earnest phoenix
#

You're closing the for loop early, and so the commandFiles variable goes out of scope

humble echo
#

early??

earnest phoenix
#

Notice the } after you call .filter()

humble echo
#

oh thank you

#

love you my bro<333

earnest phoenix
#

You're welcome

wheat mesa
#

man I hate fighting bugs in an ECS

#

😭

#

IT DOESNT MAKE SENSE

#

aghhhhhh

#

For some reason my removeGameObject() method doesn't work

#

Something is wrong with it, I just can't figure out what

#

hmmmm, I can't seem to remove components correctly either

#

maybe there's more wrong with this than I thought

#

oh maybe I'm stupid

#

yup that was it

#

I was calling the same listener more than once because my code is bad

lyric mountain
wheat mesa
#

It's because I was a moron

#

dw

#

fixed it

earnest phoenix
#

im tryna add a reaction to the embed thats being sent to another channel and i keep on getting errors

Code:

        setTimeout(function(){
            client.pollChannel.send({
                embeds: [poll]
            })
            pollChannel.react("✅");
            pollChannel.react("❌");
        }, 1500)

Error:

            pollChannel.react("✅")
            ^

ReferenceError: pollChannel is not defined
deft wolf
#

You add reactions to the message, not to the channel

earnest phoenix
#

i also did message.react("emoji type") and it gave me message is not defined

#
            message.react("✅");
            ^

ReferenceError: message is not defined
        setTimeout(function(){
            client.pollChannel.send({
                embeds: [poll]
            })
            message.react("✅");
            message.react("❌");
        }, 1500)
rustic nova
#

did you even define message, you need to define it

earnest phoenix
#
            message.react("✅");
                    ^

TypeError: Cannot read properties of undefined (reading 'react')
deft wolf
#

Exactly, your message must be the embed you sent

sharp geyser
#
const msg = await client.pollChannel.send(...)
msg.react(...)
rose warren
#

Over 76% of my MAUs are now using slash commands. Adoption seems to have tapered off. Probably can't get the other ~24% to adopt them without being more aggressive about it.

#

Also interesting that my MAUs are still growing consistently at an all-time high, and total command calls have managed to get back up to the point they were at before slash commands in Jan 2022 👀

slender wagon
#

JWT or express-session

spark flint
#

Monthly active users

delicate zephyr
#

but thats purely down to the fact I already have a redis instance running for cache

daring apex
lyric mountain
#

There's none

#

No limit

#

But at some point you need to ask yourself if you really need that many constants there

solemn latch
#

👀

#

the limit is how much memory you have

topaz terrace
#

do i need to add .save() after i use the model.create funciton in mongoDB js

deft wolf
#

I'm afraid that without this you won't even save this file

topaz terrace
#

how do i find everything in the collection in mongoDB Js?

latent rapids
#

Who made the topgg discord webhook vote website again?

#

I remember it's one of the mods.

deft wolf
#

Woo?

deft wolf
slender wagon
#

And as a db i am using prisma

pale vessel
neon leaf
#

so I have a union type with a bunch of strings, how can I give the user intellisense for them but also allow any string at the same time? (ts)

wheat mesa
#

type something = "a" | "b" | string; should work afaik?

neon leaf
#

then something ends up as just string

wheat mesa
#

Hmmmm

#

Does ```ts
type Test = "a" | "b";
type Something = Test | string;

neon leaf
#

same thing

wheat mesa
#

You could use an enum

#

It’s probably not exactly the result you want but it would work

neon leaf
#

afaik they fixed enum stuff in 5.0 so you cant input anything anymore

wheat mesa
#

And then just have your type be type S = EnumType | string;

wheat mesa
neon leaf
#

oh right, lemme try

wheat mesa
#

Seems to work for me on ts playground

#

Unfortunately I’m on mobile so testing is kind of difficult

bitter dagger
#

/help

lament rock
#

Yeah that looks correct since A.a is assignable to type string and itself

#

since the type of the enum includes its members

#

itd be another story if you Extract<A, string>

#

But your example shows all enum members as being strings

#

Although I consider it bad practice to use mixed type anything

neon leaf
#

is this reliable? like will it always stringify the full function?

topaz terrace
#

im trying to get the client variable defined in src/index.js my current pwd thingy is src/imports/embed. i already add module.exports = {client} thingy.

civic scroll
#

why are you trying to export a variable

topaz terrace
#

i need it to get slashId

#

slashId is in client

deft wolf
#

What do you need slashid for?

#

I assume that slashid is the id of the slash command

topaz terrace
#

i need it for my

#

appeal command

#

its for the embeds

carmine magnet
#

hello, I'm trying to do things with conditional typing in typescript but it doesn't work. I get the error 'data.dataAfter' is possibly 'null' and I don't understand why because I checked if data.action is not delete

radiant kraken
#

data.dataAfter!.id

carmine magnet
#

hm ok thank you

radiant kraken
#

@earnest phoenix help ```ts
src/index.ts:169:31 - error TS2550: Property 'replaceAll' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2021' or later.

169 const s: string[] = result!.replaceAll(result!.slice(-16), '').split('\n')
~~~~~~~~~~

Found 1 error in src/index.ts:169

#

tsconfig.json:

carmine magnet
#

it works thank you 👍

#

typescript is strange sometimes

radiant kraken
#

nah it's just typescript doing it's job

carmine magnet
#

🤷

earnest phoenix
radiant kraken
#

i tried esnext and it didn't work either

earnest phoenix
#

Use es2022

radiant kraken
#

doesn't work either

#

WAIT

#

@earnest phoenix it works now

#

sorry i was dumb

earnest phoenix
#

Nah it's alright

radiant kraken
#

@earnest phoenix i was working on migrating from Jest to Node.js™️ v20™️'s native™️ test™️ runner™️ so i was writing a separate test.ts file, how do i supply several --lib options?

#

--lib esnext --lib dom doesn't work...

summer torrent
#

just specify it in tsconfig

earnest phoenix
radiant kraken
summer torrent
#

nvm i didn't see "several" word

radiant kraken
#

@earnest phoenix so uh how do i write a proper TypeScript™️ test runner in Node.js™️ v20™️ for my own project?

earnest phoenix
#

Though note that we haven't marked Node.js v20 as LTS so be careful using it for the time being

radiant kraken
#

eh it will be LTS anyway

#

also the functions i use are very basic

radiant kraken
#

so i can get TypeScript to also check the types

earnest phoenix
#

Well there are bugs and stuff users reported after we released Node.js v20 so there are stuff that needs to be fixed, but sure if you want to use it

radiant kraken
#

but i dunno how to run it

radiant kraken
#

is there any other way

earnest phoenix
#

Why is that unintuitive?

#

Also you should use the test mode by using the --test CLI flag when you're running a test file that uses node:test

radiant kraken
earnest phoenix
#

How's that related to what I said?

radiant kraken
#

wait nevermind iara_ded_lost

radiant kraken
earnest phoenix
#

ESM requires the file extensions to be passed as well

radiant kraken
#

@earnest phoenix tysm, it works!!

#

sorry i've been stupid

earnest phoenix
#

You're welcome, and nah you're good

radiant kraken
#

@earnest phoenix ngl Node.js v20's test runner looks like a better replacement to Jest, you guys did a good job!

earnest phoenix
#

You're welcome for the test runner, though we got lots of optimizations to do as running multiple child processes for the test runner has quite a lot of overhead

wheat mesa
#

Time to learn how quadtrees work for enhancing my collision algorithm

#

currently my algorithm is REALLY bad KEKW

earnest phoenix
wheat mesa
#

idk that's something I've always done

#

and IntelliJ doesn't stop me by default so >:)

earnest phoenix
#

Does the formatter really not put such spaces by default?

lyric mountain
#

it should

#

btw @wheat mesa

#

u can use a spliterator if u want to multithread that loop

wheat mesa
#

Yeah I'm not worrying about optimization on that, I'm going to be completely replacing it with a new algorithm in a bit

#

Or did you mean for the Set<Integer> layer : entities part?

#

Cus I haven't bothered with making the ecs threadsafe yet

wheat mesa
#

I should probably turn that on

#

I'm sure there's an option for it

lyric mountain
#

spliterator is threadsafe iirc

wheat mesa
#

ah yeah I don't need to do that anyways, the method is hella slow and I'm going to replace those while loops

proven lantern
#

if i want to change a bots permission do i need to kick it and re-invite it with the right permissions or can i modify it some how through server settings?

rustic nova
#

you can modify the integration-role permissions

proven lantern
#

this is read only right?

rustic nova
#

under the roles tab

proven lantern
rustic nova
#

that is read only yes

proven lantern
#

that makes sense, i'll update the role perms

#

thanks

rustic nova
#

should be marked like this

proven lantern
#

it looks like discord only creates a role for the bot if permissions are needed. if the users gives the bot no permissions and then wants to add permissions later they will need to manually create a role, give it permission, and assign it to the bot if they want to give it permission without kicking it. it might be easier to instruct them to kick it and re-invite it with permissions

lyric mountain
#

it's exactly that

proven lantern
#

my bot has manage role permission now, but the api call is still failing with this error

{ message: 'Missing Permissions', code: 50013 }

This is the call

await axios.put(`${URLS.api}/guilds/${guild_id}/members/${player.id}/roles/${roleId}`, null, {
    headers: {
        Authorization: `Bot ${discordTokens[application_id]}`
    }
});

Is it failing because it's trying to give me a role and i am server owner? Do i need to use the interaction token instead of the bot token?

neon leaf
#

whats a regex that matches the first occurence and the last occurence of a word?

lyric mountain
#

u dont need regex for that

proven lantern
#

so does the bot role need to be moved up above the role it's trying to assign or else it fails right? this is to prevent the role from acquiring more permission that it was given

lyric mountain
#

yes

neon leaf
#

I want to ship a function from nodejs to html (yes, its infact needed), now .toString() works fine but there is one mayor issue, I do not get all variables that the function is referencing, so is it possible to get all external variables the function is referencing and getting their values (in nodejs)? or is that not possible

earnest phoenix
#

Sounds like some X & Y problem

neon leaf
lyric mountain
#

instead of embedding a foreign code into the page

neon leaf
#

Yeah but what about onclick handlers or stuff like that? I cant really do that in the server

#

Like Most Things I could do Sure but Not when you interact with the Page, i Just actually need it the way i described

lyric mountain
neon leaf
#

I dont think its a good idea to make a request on every event

wheat mesa
#

it begins

#

Still no idea why Java doesn't have a stdlib implementation of a Pair class

queen needle
#

what is that new Rectangle[4]? I've never seen something like yhat

wheat mesa
#

It instantiates an array of Rectangle objects with a size of 4

#

(Default values are null, null, null, null)

queen needle
#

Ohh that's awesome

wheat mesa
#

I'm beginning to like spacial data structures a lot

lyric mountain
wheat mesa
#

What's the difference

lyric mountain
#

it prevents the list from trying to resize during runtime

wheat mesa
#

Ah

#

Will do 👍

lyric mountain
#

List.of() and similar methods create a fixed-size list

wheat mesa
#

Wait what, List.of()?

lyric mountain
#

it's a static constructor

#

substring

wheat mesa
#

Yeah I know but like, it seems like it only accepts objects themselves

lyric mountain
#

or regext to strip numbers

lyric mountain
wheat mesa
#

ah

lyric mountain
#

there's another with number argument

#

dont remember what was it

wheat mesa
#

I could use Arrays.asList(new Class[4])

#

Is that what you were thinking of?

lyric mountain
#

I think so

#

this one will create an array-backed list

#

so fixed size too

#

anywhere u know the size it's worth to use fixed size lists as you save a ton of time not resizing it when it nears the limit

wheat mesa
#

ah I can't use arrays.aslist because I need a generic array

#

and casting would probably be scuffed

#

Also @lyric mountain List.of doesn't work because it creates an immutable list

sharp saddle
#

am too lazy to search, but well, someone explains to me what finally do when trying to catch a error? idk

#

like try {} catch {} finnaly {}

wheat mesa
#

finally will always run, regardless of whether or not you encounter an error

sharp saddle
#

hmm

sharp saddle
wheat mesa
#

Usually it's used for cleaning up resources to guarantee that they're properly handled

lyric mountain
wheat mesa
sharp saddle
wheat mesa
#

Which I would assume means it's a readonly list

lyric mountain
wheat mesa
#

I'll try it rq

#

yeah that isn't gonna work for me

#

actually

#

maybe it will

#

yeah it doesn't like null being given to it

#

And I need null for this

lyric mountain
#

damn

sharp saddle
#

oh it's Java KEKW

wheat mesa
#

I don't think the arraylist does any resizing as long as I don't go above the initial capacity I give it

lyric mountain
#

isn't it when u pass 50%?

wheat mesa
#

I thought it was once you reached capacity

lyric mountain
#

dont remember it

wheat mesa
#

yeah it doesn't resize

#

same here

lyric mountain
#

nice

wheat mesa
#

@lyric mountain this is more of a structure thing, but my core folder is starting to get overwhelmed with things that don't fully deserve their own package, but also shouldn't be in the core folder. What kind of package should I make for this stuff?

lyric mountain
#

model

#

or utils

#

at least that's what I put my structure classes into

wheat mesa
#

Maybe I should make a structures package?

#

A lot of these are just basic structures anyways

lyric mountain
#

could also call it struct

#

there's no rule abt that tbh, whatever u find appropriate

wheat mesa
#

fair

#

I can always refactor it later if I end up not liking it I suppose

lyric mountain
#

yep

#

btw

#

for things that are immutable u can use records

#

they're quite new to java, but are structures meant to hold information

#

they're pretty fast to instantiate and destroy many times per second

wheat mesa
#

Yeah I've used them a few times, one of the very few syntactic sugars java has added

#

Unfortunately most of my structures need to be mutable afaik

lyric mountain
#

ah

wheat mesa
#

Although there are a few I could convert

topaz terrace
#

how do i get the client that was defined in index.js?
i have tried adding js module.exports = {client} and then requiring it in my file, but it shows me this warning. (node:18252) Warning: Accessing non-existent property 'getclient' of module exports inside circular dependency

proven lantern
#

Is there a tutorial somewhere that goes into detail about how to use the monetize api? if i enable this and someone subscribes how can i programmatically know who subscribed? i want to list subscribers for a month on my website, but i'm not sure where to begin

earnest phoenix
#

With the Discord API docs

#

E.g. role objects have the available_for_purchase tag set

tough star
#

hello there -

#

any suggestion for a discord bots host?

#

free or not but at least cheap

earnest phoenix
#

^

deft wolf
#

Though prices may have changed

#

That's why it's worth checking for yourself

tough star
earnest phoenix
#

Search it up

deft wolf
#

Someone from the administration here probably has hosting or at least advertises it

radiant kraken
#

their only working code formatter doesn't even have configuration iara_ded_lost

earnest phoenix
#

lmfao

radiant kraken
#

@earnest phoenix time to make a pull request to Prettier to make it only comply to this very specific configuration and remove all configurations so it will become an "uncomprising code formatter" iara_evil

earnest phoenix
radiant kraken
earnest phoenix
#

Python community is goofy ahh

earnest phoenix
#

@radiant kraken what GUI library is good in rust

radiant kraken
#

why

earnest phoenix
#

Are ImGui Rust bindings good

radiant kraken
#

why are you using rust to make gui apps

earnest phoenix
#

Why not

#

Want to learn it that way gigachad

radiant kraken
earnest phoenix
radiant kraken
#

at this point i'd rather use C++/C#

earnest phoenix
#

Yeah ImGui is cpp

#

Though don't want to use cancer C++ 3HC_why

radiant kraken
#

use Go

#

wrap it in an import "C" or something

earnest phoenix
#

Well Go has ImGui bindings

#

Feels just pain to install though

radiant kraken
#

oof

earnest phoenix
#

Also using import "C" everywhere which makes sense

radiant kraken
#

@earnest phoenix yapf, the only other python code formatter that allows configurations doesn't even work mimu_thisisfine

earnest phoenix
#

Honestly black is awesome

radiant kraken
#

black is terrible

earnest phoenix
#

Wouldn't bother with tabs

#

Well autopep8 and black are considered being the best

radiant kraken
#

it would be awesome if it had configuration

#

it's way too strict with the whole "all Python code must comply with PEP 8"

earnest phoenix
#

Well it's syntax

#

How code should look like krShrug

radiant kraken
#

but other people have their own preferences too

earnest phoenix
radiant kraken
#

indentation, print-width, single or double quotes, etc

earnest phoenix
#

Then you can write your own trol

#

Or just don't use an autoformatter

#

Which will lead to inconsistent and more horrible code most of the time

radiant kraken
#

i can write a python lexer in rust

earnest phoenix
#

hi everyone

#

Lexer is one thing

radiant kraken
#

but it's too much effort mimu_thisisfine

earnest phoenix
#

Then deal with what's existing Trolled

feral aspen
#

Hello. :>

earnest phoenix
#

hi

radiant kraken
radiant kraken
#

@earnest phoenix sorry for the long response but i forgot about tauri https://youtu.be/-X8evddpu7M

Tauri is a tool for building cross-platform desktop apps on Windows, MacOS, and Linux with JavaScript & Rust. It is very lightweight and fast compared to similar tools like Electron.

#dev #programming #100SecondsOfCode

🔗 Resources

Tauri https://tauri.studio
Tauri GitHub https://github.com/tauri-apps/tauri
Reddit thread about Tauri https://w...

▶ Play video
#

some say it's a good UI framework for Rust

earnest phoenix
#

Yeah but that's with React so TS etc. not just plain Rust

#

We have the exact same in Go so not really worth it

radiant kraken
#

sadge

warm vine
#

how to make vote command from top.gg does anyone know

deft wolf
#

Vote command in what sense?

warm vine
#

do u know to make

#

if we do /lava-link and if we enter it should show u did not had vote the bot in top gg after a member vote that member can get lava link

#

like that

#

do u know to make

deft wolf
#

It depends on what language your bot is written in, but everything is based on topgg api. Look in the documentation for examples related to your language and possibly some external libraries

earnest phoenix
lyric mountain
#

or even how

warm vine
warm vine
earnest phoenix
warm vine
#

😦

earnest phoenix
#

And besides, v12 isn't able to handle quite a lot of the newer requests so your bot will frequently crash if you don't update

warm vine
#

😦

earnest phoenix
warm vine
#

can u tell how to do becaue i am in phone

#

@earnest phoenix

earnest phoenix
#

It's literally shown in the websites, read them

warm vine
#

but i cannot because my phone just have 1gb ram if i open google it will crash

#

bro

#

if i do npm uninstall discord.js
does not work

#

so what to do

#

i ned a helper

lyric mountain
#

simply updating d.js itself wont cut it

warm vine
#

if any thing so worng it all stop workin

lyric mountain
#

well, you need to fix those issues

warm vine
#

i need aa helper

quartz kindle
#

we dont have aa helpers, only bb helpers

lyric mountain
#

did you write your bot? or did you follow a tutorial?

warm vine
#

tutorial

lyric mountain
#

well, that's an issue

warm vine
#

yes i knw

#

after i hear the tutorial i made the code

lyric mountain
#

tutorials are timeless (they don't get updated with the framework), you need to focus more on "why" than on "how"

#

basically, try to understand why they did it, not on how they did it

deft wolf
#

Am I the only one who thinks it would be easier to write a bot from scratch on v14 than try to rewrite a bot from v12 first to v13 and then to v14?

lyric mountain
#

it is

#

same for implementing i18n or a11y, always easier to start again

warm vine
#

😦

#

my all hard work

#

for uptimer command

#

what if i do not add vote command ??

lyric mountain
#

you can't even add it for now

#

not without having the bot approved on topgg

#

even if you could, your bot is a ticking bomb as it is now, it'll start crashing more and more until it no longer starts

warm vine
#

??

#

iwill ad the bot tomarrow

lyric mountain
#

you cant develop a vote feature if you have no access to it

warm vine
#

ook

#

oo

#

wait me add now

#

ok

lyric mountain
#

the more you wait, the harder it'll be

deft wolf
#

Also queue is like 1-2 weeks long so they won't approve it right away

lyric mountain
#

AND there's the chance it'll get declined if it crashes during test

warm vine
#

no

#

it never crash

#

because i codded like that

lyric mountain
warm vine
lyric mountain
#

you said you followed a tutorial, did you make any custom command?

#

like, commands not included in the tutorial

warm vine
#

yes

#

ss comand and server info command

#

and ban and moew command

#

i just looked the uptimer command in yt

lyric mountain
#

ok, ig

lyric mountain
#

@wheat mesa btw, I forgot to tell u, there's a handy plugin for intellij called spotbugs

#

it spot bugs that the built-in analyzer can't catch (such as possible runtime issues)

wheat mesa
#

👀

#

I'm going to install this rq

lyric mountain
#

basically a second layer for code analysis

lyric mountain
#

was staring at my screen until i remembered I had it installed lul, didn't have much too fix, mostly possibly-null values in if branches

wheat mesa
lyric mountain
#

malicious code vulnerability lmao

#

I like it cuz it explains to you each catch

#

in the right panel

wheat mesa
#

some of the complaints are about unread/unwritten fields but it just can't tell that I'm using reflection for some stuff tbf

lyric mountain
#

ah yeah, it spots those cuz no getters/setters

#

fairly safe to ignore

wheat mesa
#

This might be useful later on when I clean up the codebase, but as of right now it's going to be annoying

#

I'm going to disable it for now then use it later

lyric mountain
#

afaik it doesn't analyze automatically, I just leave it there

#

ofc, make sure this is disabled

#

else it'll check on every commit

wooden ocean
#

I'm trying to connect to my lavalink server and it say connected then it throws this error
Node Main had an error: Unexpected op "ready" with data: [object Object]
and my music command throws this error

Promise {
  <rejected> TypeError: Cannot read properties of undefined (reading '0')
      at Object.run (/home/container/slashCommands/play.js:145:44)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}```
because of this line:
``` interaction.data.options[0].value;```
sharp geyser
earnest phoenix
#

lmfao @clear plinth can help you get out of here

earnest phoenix
rustic nova
#

Just gonna delete for precaution

earnest phoenix
#

feels like a failed phishing attempt

#

man forgot it was a server and not a dm

clear plinth
earnest phoenix
clear plinth
#

@verbal oriole again, no self promotion please

verbal oriole
#

I see.

earnest phoenix
#

You

deft wolf
#

I've only heard about kaliber 44

surreal raven
#

yoo

surreal sage
#

Is there something in Electron that I can use to encrypt user data with?
Not as in a function but as in like, a passkey

lament rock
lyric mountain
lament rock
#

isnt it webjs since it uses chromium

radiant kraken
earnest phoenix
radiant kraken
#

yeah i mean

#

generally

#

besides their languages

earnest phoenix
#

Nothing much as said

We have the exact same in Go so not really worth it
maybe some tiny differences that the average user does not care

radiant kraken
#

nice

wicked pivot
#

while I use a slash with my bot, as long as the command is not finished I cannot execute another one. It's normal ?

earnest phoenix
#

If you coded it like that, yes

wicked pivot
#

No, I didn't code that.

#

maybe the fact that I use Promise?

lyric mountain
#

if anything, it'd be not using a promise

#

js is monothread, if ur doing something that hangs the runtime it'll affect everywhere

wicked pivot
#
//exemple command
const {getMatch} = require('../utils/chess-data')
const {redifMatch} = require('../utils/createCanvas')
const { ApplicationCommandOptionType, AttachmentBuilder } = require('discord.js');

module.exports = {
    name: 'chess-replay-match',
    description: 'Replay a chess match',
    options: [
        {
            name: 'match_id',
            description: 'The match ID',
            type: ApplicationCommandOptionType.String,
            required: true
        }
    ],
    run: async(interaction) => {
        const match_id = interaction.options.getString('match_id');
        
        await interaction.deferReply({ephemeral: false});
        let start = Date.now()
        await interaction.editReply({content: 'Fetching data...'})

        getMatch(match_id).then(async(match) => {
            await interaction.editReply({content: 'Image creation...'})
            await redifMatch(match.coup, match.white, match.black, match.result, match_id).then(async(imgBuffer) => {
                let buffer = Buffer.from(imgBuffer, 'base64');
                let img = new AttachmentBuilder(buffer, {name: 'chess-replay-match.gif'})
                interaction.editReply({content: `Execution time ${Date.now()-start}ms`, files: [img], ephemeral: false});
            }).catch((e) => {
                console.log(e)
                return interaction.editReply({content: 'An error with the image creation. (To help us fix this problem, describe when this problem is triggered (/chess-link))', ephemeral: true})
            })
        }).catch((e) => {
            console.log(e)
            return interaction.editReply({content: 'An error with the data. (To help us fix this problem, describe when this problem is triggered (/chess-link))', ephemeral: true})
        })
    }
}```
```js
//handler
const {glob} = require('glob');
const {promisify} = require('util');
const globPromise = promisify(glob);

module.exports = async (client) => {
    let arrayOfSlashCommands = [];
    let slashCommands = await globPromise(`${process.cwd()}/src/commands/*.js`);
    slashCommands.map((value) => {
        let file = require(value);
        if (!file.name) return;
     
        client.slashCommands.set(file.name, file);
        arrayOfSlashCommands.push(file);
    });

    client.on('ready', async () => {
        await client.slashCommands.set([])
    });
}```

```js
//run
const client = require('../../index');

client.on('interactionCreate', async(interaction) => {
    if(interaction.isCommand()){
        const cmd = client.slash.get(interaction.commandName);
        if(!cmd) return;
        cmd.run(interaction);
    }
})```
earnest phoenix
#

Sending code won't change what was said

wicked pivot
#

I sent before receiving the answer

lyric mountain
#

what's redifMatch?

wicked pivot
#

creation of several images with canvas and then combined with giftencoder

earnest phoenix
#

There you go

wicked pivot
#

the command takes about 30s to execute

#

And so an alternative to that?

earnest phoenix
#

There's no alternative really, that's just how much it takes to execute, you can't do anything that makes it execute in much less time

#

Optimizing it won't make that big of a difference in this case

lyric mountain
wicked pivot
#

And if I make sure that everything is done in the order file (so no more promises we agree that the bot will not be "blocked"

lament rock
#

Don't use synchronous IO calls

lyric mountain
#

yeah, that's very likely it

earnest phoenix
#

Oh, then they're doing something that blocks the main thread, you could try showing what you're doing in the redifMatch() function

wicked pivot
#
async function redifMatch(data, white, black, result){
    return new Promise(async(resolve, reject) => {
        try{
            const canvas = createCanvas(840, 1180)
            const ctx = canvas.getContext('2d')
            const encoder = new gifencoder(canvas.width, canvas.height)

            encoder.start()
            encoder.setRepeat(-1)
            encoder.setDelay(500)
            encoder.setQuality(10)
            //
            //canvas 
            //
            for(let element of movement){
                let img = await loadImage(await createBoard(await chess.fen()))
                ctx.drawImage(img, 100, 280, img.width, img.height)

                encoder.addFrame(ctx)
            }
            encoder.finish()
            
            const buffer = encoder.out.getData()

            resolve(buffer)
        }catch(err){
            reject(err)
        }
    })
}```
Function is not complete too long for discord is useless (rectangle tracing/writing etc etc)
earnest phoenix
wicked pivot
#

In any case, the command takes around 30 to 60 seconds to execute and when it is executed it is as if the bot did not want to respond.

surreal sage
#

Is there something in URLSearchParams where it leaves out a param if it's value is something?

#

Like undefined?

wicked pivot
lyric mountain
#
const params = {}
if (something) {
  params["key"] = value
}
surreal sage
#

"boring"

#

ty tho

lyric mountain
#

the boring options is sometimes the best option

surreal sage
#

😭

lyric mountain
#

not all code needs to be shiny and techy

earnest phoenix
# wicked pivot https://sourceb.in/vnOTx7fMUW
  1. Declare variables that are not going to change with the const keyword like counter, img, etc etc
  2. Leave constants out of the functions where their values are always the same, like the cors variable
  3. Wrapping all of those functions in a Promise executor is a bad idea because not all of them need it
  4. Lines 34 and 35 can be refactored to
const lowLetter = letter.toLowerCase();

if (!(lowLetter in cors)) return;

counter[key][lowLetter]--;
  1. At lines 139 and 140, you can just do !element.includes()
  2. Finally, load all of the images you're gonna use in memory because you seem to be repeatedly loading the images you use many times, like the images of the chess pieces
lyric mountain
#

btw, just to add to it, gif might not be your best format

#

matches longer than a few turns will easily surpass the level 3 discord upload limit

wicked pivot
#

What format would you recommend? ?

lyric mountain
#

if discord supported apngs then it'd be the ideal option

mint needle
#

None

glass marsh
#

Hey I want to get my bot verified on discord. Do I have to enter my real information like name etc. in the terms of service?

earnest phoenix
#

No

glass marsh
#

okay thanks

earnest phoenix
#

The information you give during the verification is not the question they asked though.

#

The terms of service/use of their bot does not need to contain their real name etc. they can just use the bot's name or similar or simply "Bot"

#

Same for the privacy policy

glass marsh
earnest phoenix
surreal sage
#

CSS is totally my favorite

#

gotta love 20 rules for just one class

#

or one button

#

oh hell no

#

bye

#

no

#

nope

#

hell no

#

more work for the same thing

#

except you have to maybe google a bit

#

to get the right rules

#

but no thanks

#

there's a reason why I don't use style attributes and use css files instead

#

To not have a HTML mess

rustic nova
#

bootstrap

surreal sage
#

bootstrap decent

rustic nova
#

tru

surreal sage
#

but doesn't work for everything

rustic nova
#

slay

#

true

#

:(

surreal sage
#

😩

#
Material Design

Build beautiful, usable products faster. Material Design is an adaptable system—backed by open-source code—that helps teams build high quality digital experiences.

#

waiting for desktop

#

web support planned but tbd 😭

rustic nova
#

ye

surreal sage
#

shit looks good

#

good for quick apps

rustic nova
#

is that made by google

#

?

surreal sage
#

yea

rustic nova
#

guessed so

#

design looked familiar

surreal sage
#

the only guys who can have text this big and have it look good

#

but yea looks good

#

oh hell yeah

#

i thought you couldn't do .emit and .on on ipcMain with electron on just the back end

#

🔥

lyric mountain
#

that looks like windows 11 menus

surreal sage
#

lol

spark flint
#

tailwind is better imo but material is nice

surreal sage
#

Tailwind CSS is a utility-first CSS framework for rapidly building modern websites without ever leaving your HTML.

#

without ever leaving your HTML.

#

without ever leaving your HTML.

spark flint
#

yes

#

its great

surreal sage
#

what scares me ^

spark flint
#

class="bg-black" for black background

#

simple like that

surreal sage
#

i prefer this over 1 file

#

nrly relevant this img

surreal sage
#

Yes

#

I like sorted things

#

HTML is just 3 colors all over on default in VSC

#

and then 20 classes getting added

ancient nova
#

hello bois

#

i am back once again with a new PC

lyric mountain
#

did your former pc explode from fiddling with available memory?

feral aspen
feral aspen
#

What does that even mean?

lyric mountain
#

means ur ssl is invalid for that domain

feral aspen
#

I'm a bit confused.

lyric mountain
#

not for the base url, for the resource url

#

hm, did u try without www?

#

I noticed I get redirected the moment I access the resource url

feral aspen
#

Hmm, it does return revalidated as true when I don't access it via www.

ancient nova
#

won't do it again

#

it looks so clean i almost don't wanna start downloading every single app i had before

lyric mountain
#

cuz that matters

feral aspen
#

How do I check that?

#

Do you mean this?

lyric mountain
#

remove www

lyric mountain
#

where did u get yours?

feral aspen
lyric mountain
#

also damn why axios

feral aspen
#

Let me double check.

lyric mountain
#

it's such a bloated lib

feral aspen
#

Honestly, I've been following this one tutorial for like months and this dude kept talking how axios is this and that.

lyric mountain
#

axios is unnecessarily bloated, like, really

#

node fetch does everything axios can do but is more lightweight

feral aspen
#

I'll probably consider switching, really. I just need to figure out what I'm doing.

lyric mountain
#

btw, just as an aesthetics tip, use something else instead of secret for the name of the key

lyric mountain
#

secret doesn't sound very safe to be in an url

lyric mountain
#

or better yet, use a post request + body

#

which u should if that secret is something sensitive

feral aspen
lyric mountain
#

well, the error is gone at least

#

lets see network tab

#

is it portfolio.json?

feral aspen
#

Don't have a file with that name.

grim aspen
#

There’s gotta be a portfolio file

thin tide
#

I'm running about 100+ bots with a single script, how do I reduce the bots resource consumption? How do I make it more stable? Heroku crashes continuously. I'm using the code below, any other suggestions?

   intents: 1, 
  
   makeCache: Options.cacheWithLimits( 
     { 
       ...Options.defaultMakeCacheSettings, 
       MessageManager: 0, 
       ThreadManager: 0, 
       ThreadMemberManager: 0, 
       UserManager: 0, 
       GuildMemberManager: 0, 
       GuildBanManager: 0, 
       GuildEmojiManager: 0, 
       GuildStickerManager: 0, 
       GuildInviteManager: 0, 
       GuildStickerManager: 0, 
     } 
   ) 
 }```
feral aspen
#

The portfolio content is displaying fine, actually. I called the main file index.tsx in it, though it's the blog content that's not displaying.

deft wolf
#

Why do you run 100+ bots

grim aspen
#

That was going to be my first question

deft wolf
#

Looks like someone is doing something against ToS here

grim aspen
#

How are they running 100 bots in one file

rustic nova
#

I can tell you

#

heroku will not run your 100 bots

lyric mountain
deft wolf
#

I don't know if even my VPS with 4gb of ram would run it

grim aspen
#

The more I look at it the more questions I have

feral aspen
rustic nova
#

but can easily tell you

#

100

grim aspen
#

Without frying the vps, it’s nearly impossible

lyric mountain
#

first thing is WHY you're running 100+ bots in JS which by itself can barely handle a single bot

rustic nova
#

make sure you're on djs 500 for that

lyric mountain
#

I cant even see a single speck of reason to run more than 10 bots

#

like, focus on a few bot projects damn

rustic nova
#

max I've done is run 10 bots concurrently to test stuff, otherwise just separate processes

lyric mountain
#

I have 3 bot accounts, but only 1 working bot

grim aspen
#

My man’s on another IQ level above us