#development

1 messages · Page 105 of 1

earnest phoenix
#

Something called a testing bot might be something you want to look at in the future

#

Display avatar URL will give the avatar URL of the guild as well

#

If the user has a guild avatar URL

#

Or not avatar at all and just a default avatar

#

I'd rather use the display avatar

#

Though to get your bot's avatar, just avatar url should be good

sharp saddle
#

it only happens on that page

#

i can't show code cuz it's big :skul

lyric mountain
sharp saddle
#

that's the problem, what's that i'm using? LMAO

#

i checked here and there is nothing related to lib JIMP

lyric mountain
#

does other songs return xml too?

sharp saddle
#

it's actually radio image

#

so it returns png

#

not xml

lyric mountain
#

then it's returning an image inside a xml

#

try printing the received data if u know how to reproduce

sharp saddle
#

actually i found what package is getting error

#

so, that package uses jimp

#

but i still confused on how it says that the image url returned xml

lyric mountain
#

it might not even be a xml, just wrong mime

sharp saddle
#

yes

#

maybe that

#

i'll handle errors

#

to avoid restart

#

idk

#

ok, I just found out what it was

#

an image url was returning an error, I just changed it.

#

Ty @lyric mountain

lyric mountain
#

yw

lament rock
#

about to start a c++ rabbit hole

#

First project will be rewriting an audio service I depend on into cpp

lament rock
#

real

earnest phoenix
#

my condolences

sharp geyser
#

I got lazy and stopped learning C++

#

I should get back to it tmrw

oblique sky
#

Go learn Rust

lament rock
#

I'm crying trying to learn how to install deps

#

like how the fuck can I not build uWebsocket

#

(I mean, I know why, because it tries to do rm which isn't valid on windows)

#

like this is not understandable at all

#

I'm tossing in the towel for today and gonna leave it to tomorrow me to figure out how to install dependencies cleanly

#

I'm very sure I'm doing something horribly wrong because it says it supports windows. I believe it, but like. what the fuuuuck why is this insanely complicated

lament rock
#

I now have time to reflect on why I wanted to learn it in the first place and realized that I need an interpreted language in order to support a plugin system like I currently do and cpp wouldnt be able to work like how I have it at all

#

so I struggled for nothing

civic scroll
deft wolf
#

I'm assuming your bot just wasn't able to respond within 3 seconds of receiving the interaction

#

Also, account generation is something that will get you banned sooner or later

#

I don't know how that would help you

#

Reading the documentation, I'm sure there is an option in discord.py to defer interactions

#

It doesn't change anything, it's all in the documentation

#

It's even on reddit, just search for it

wheat mesa
#

@lyric mountain what’s the best way of storing resources that I need for my game to run? Right now I’m using new File("path/to/image/image.jpg") but this is a bad idea since I wouldn’t have the source code folder inside of the final compiled jar

#

I saw something about .getResource() online but I don’t really understand how to use it or how I should be doing this

#

Perhaps I shouldn’t be storing my images folder within my source code directory and instead separate from it? I’ll eventually need to package them alongside a jar file though so not sure still

earnest phoenix
#

That's for what the resources folder is made for

#

Located under src/main next to the java folder

#

Then yes, you can use functions to get the resource

lyric mountain
#

to retrieve them u use getClass().getClassLoader().getResource("relative/to/root")

#

u can also use without getClassLoader(), but I like having it relative to root (without it'll be relative to class)

wheat mesa
#

I can’t seem to get that to work (I’m in my test/java folder and I have a resources folder in test/resources

#

??

wheat mesa
#

I’ll have to debug more when I get home

wheat mesa
lyric mountain
#

the test folder is supposed to have unit tests

#

and mimic the original structure

wheat mesa
#

I’m using it as an isolated way of testing my engine

#

this is not nearly the same thing

lyric mountain
#

minecraft wrappers have a whole framework around it

wheat mesa
#

Minecraft mods != base Java

#

Very different

lyric mountain
#

look at how I imported my sprites waffle, there I use the resources folder

#

might help u find out why yours isn't working

wheat mesa
lyric mountain
#

also, the structure is very important, make sure your folder sequence is correct

#

iirc it's src/main/java/resources

#

for test it's src/test/java/resources

wheat mesa
#

Oh that might be why

#

I was doing src/test/resources

lyric mountain
#

ah

#

actually, no, I wrote it wrong lul

#

scr/main/resources was correct

#

can replace main with test

neon leaf
#

does anyone know why it sometimes returns nothin? this only happens when using zlib compression streams, on both I use an fs readstream, when not compressing I write each chunk & else I pipe it into compression and then write each chunk (js)

sudden geyser
#

src/main/java/com/company/app/Main.java :)

wheat mesa
#

@lyric mountain so I’ve looked at your example and tried the same thing, but getClass().getClassLoader().getResource("ship.jpg") returns null

#

The file name is correct and my folder structure is like
test
java
java files
resources
resource files

lyric mountain
#

put the resources in main folder

#

see if it works

#

it's a guess cuz test is for unit tests, so I suppose it "borrows" the resources folder from the main path

teal bay
#

Gg

wheat mesa
#

Still no luck

lyric mountain
#

weird

#

is your code inside a com.example package?

wheat mesa
#

Yup

#

com.waffle

#

I apologize for the quality, working at school rn but this is my structure

lyric mountain
#

no no no

#

src/main - src/test

#

inside each you create the java/resources folders

#

and then inside java you create com.waffle

wheat mesa
#

Agh

#

I’ll probably have to fix this file structure on a proper IDE when I get home

#

This is a mess on replit, basically impossible to do it

lyric mountain
#

it is

#
src
  ├ main
  │    ├ java
  │    │    └ com.waffle
  │    └ resources              
  └ test
       ├ java
       │    └ com.waffle
       └ resources
#

same structure sir

#

Src/main/java

#

you don't have a test folder because nobody unit tests a minecraft mod

#

most ides will create it since it's recommended to unit test

#

it's useful if your mod uses a lot of math

earnest phoenix
hushed robin
#

can someone help with the question i asked earlier?

wheat mesa
#

No

hushed robin
#

☹️ 🫡

eternal osprey
#

hey guys suppose we have 1100 as a binary number. we will then sign extend it with 001100

#

would the msb be 0 now?

#

instead on 1

lyric mountain
#

leftmost zero bits are irrelevant

#

000000000000000000000001100 == 1100

eternal osprey
#

so the msb would still be 1?

lyric mountain
#

no idea, but the value doesn't change at all

eternal osprey
#

cuz i need to know whether we have a carry flag for the alu

lyric mountain
#

just how 099 is still 99 in decimal

wheat mesa
#

MSB should never be 0

#

That would make it an insignificant bit

eternal osprey
#

but there it looks whether the msb has a carry out

wheat mesa
#

Afaik

lyric mountain
#

ah, so that's what "most significant" means

#

then yeah, it'll always be the first non-zero bit

#

or the last, in this case

#

since binary goes rtl

lyric mountain
#

1 would be the first bit (1)

eternal osprey
#

hmmm i see

#

yeah i like needed it to compute what alu flags we would get

lyric mountain
#

idk why msb would be relevant for flags, like, u just get the individual bit values

eternal osprey
#

based on the msb we can check whether we have the carry out flag

#

if the msb has a carry out, it will have the carry flag. else it won't .

lyric mountain
#

no idea what that means

eternal osprey
#

didn't you get this at cs?

lyric mountain
#

no, deepest we got was C

#

and they never talked abt bitflags, had to learn it on my own

wheat mesa
#

You’re in a pretty deep area of CS

#

Generally speaking most programs don’t go this far down low level unless you specifically opt for it

lyric mountain
#

chitty is basically wielding a shovel already

quartz kindle
#

zeros do count for most significant bits

lyric mountain
#

the ground is way up

quartz kindle
#

as long as you have a fixed bit size

eternal osprey
quartz kindle
#

the number 255's most significant bit is 1 if its an 8 bit number, and 0 if its a 16 bit number for example

earnest phoenix
#

Carry flag is just if the, e.g., addition has an additional 1 at the beginning in fixed size registers

  1001
+0111
-----
0000 CF=1

So you do have a MSB as being 0

#

The register will just contain 0000 while the CF will be set

eternal osprey
earnest phoenix
#

Probably the same with different words

eternal osprey
#

yeah indeed

earnest phoenix
#

A CF is already happening when doing 1+1 in the middle of an addition for example

#

It's just more important when it will lead to an 'overfloe' of the register size

#

So it sets the CF to 1 and stores the result without that additional 1 at the beginning of the result

eternal osprey
#

yeah indeed, ah i see.

#

just the only thing throwing me off was detecting where the msb is located

#

because we could have 0011 for example.

knotty quartz
#

Hey! Would it be possible to swap an sqlite database (easily) to a PlanetScale or another one (Online), so I can fix this hosting error and I can get arid of sqlite

eternal osprey
#

would that 0 count as the msb, or would the left 1 be the msb?

quartz kindle
knotty quartz
earnest phoenix
quartz kindle
#

anyway the only way to migrate between different databases is to run a script that reads all rows from the old one and inserts all rows in the new one

knotty quartz
#

(By errors I self host at the moment and my WiFi keeps being weird due to storms, work on it ect..)

eternal osprey
#

whahahahah alrighty, i will try to ask my teacher if i get to see him this week. Thanks for the help

lyric mountain
#

if you are, tho, going from "sql -> nosql" then it'll be a huge effort

#

sqlite is so basic that its types are supported by any sql db that follows the standards

knotty quartz
earnest phoenix
#

Probably makes more sense as it should be constant

lyric mountain
#

idk what planestcale is, but can't u self host a db?

eternal osprey
lyric mountain
#

also, sqlite is file-based, why would it error from wifi issues?

earnest phoenix
#

Would make more sense if always 0 in there

#

Yeah

knotty quartz
#

Yes, but it won't work on the other site, I am hosting on, due to the current self hosting issue.

eternal osprey
#

oehhh i see now

#

nah you smart

knotty quartz
eternal osprey
#

thanks for all the help mate

earnest phoenix
knotty quartz
lyric mountain
#

galaxygate, hetzner, contabo

quartz kindle
#

google compute engine is free if you have a credit card

lyric mountain
#

only ones I know that are cheap

#

I personaly use contabo, haven't had issues with it since they changed their infra

quartz kindle
#

im on hetzner, cant complain

knotty quartz
#

Would you know how to transfer the database data tho?

quartz kindle
#

the only way is as i said, make a script that reads all rows and inserts them in the new db

#

sqlite doesnt have an online interface from which to extract data

#

so you cant import it directly

knotty quartz
#

tyy

quartz kindle
#

you need to read the file yourself

earnest phoenix
#

If you want you can generate SQL queries from existing data with IDEs like WebStorm etc.

#

Connect to the SQLite database file and then you can dump the data and schemas of your database in SQL queries which can be used with other databases

eternal osprey
#

constantly getting flagged for suspicious activity when creating an account or buying a vps, long ticket times. They might have changed it already tho

#

a signed computation, if we have a number like: 1001 it would be -1 right and 0001 1?

#

and 8 would be 01000, whereas -8 would be 10111+1 = 11000

quartz kindle
#

signed numbers must know the bit size in advance

#

1001 is -1 only if you know for sure its a 4 bit number

#

if its an 8 bit number, -1 would be 10000001

earnest phoenix
#

Depends what technique you use

#

Could also very well be 11111110

#

Sign magnitude vs 1's complement

quartz kindle
#

you still need to know the bit size in advance no?

earnest phoenix
#

Also 2's complement but forgot how that one works

#

No because you just need to invert them

quartz kindle
#

unless there is such a thing as a variable bit signed number

#

where the sign bit can be anywhere

earnest phoenix
#

Oh yeah remember the 2's complement now, it's just adding 1 to the result of the 1's complement

eternal osprey
#

the bit size would still be needed right

#

oowh no, because it just looks at the msb my bad

#

the msb basically is a dummy value in signed computations as it just tells us whether it's positive/negative right

quartz kindle
#

yes

eternal osprey
#

pff fuck my live

quartz kindle
#

thats why you need to know the bit size, to know what position the sign number actually is in

lyric mountain
#

Sqlite database dumps will be in plain sql, which can be restored in any sql db

eternal osprey
earnest phoenix
eternal osprey
#

my teacher explained that shit

#

thank you guys once again

quartz kindle
#

ye

lyric mountain
eternal osprey
#

bro i had to create a whole cpu in digital

earnest phoenix
#

Well, SQLite data types are not the same as every SQL database

#

So SQLite queries may not work at all

quartz kindle
#

and some sql queries are also different

earnest phoenix
#

That as well

#

Postgres is known to be different for example

#

With small changes you can then get your queries to work for the targeted database

#

With simple queries you may not need any changes

lament rock
#

day 2 of c++
I want to die

#

CMake seems to be the only valid option for dep resolution

#

which is fine, but why is this such a struggle to setup and find up to date info

#

I've already installed so many other "solutions" that were "recommended"

lyric mountain
#

u managed to find the compiler, which is already a good thing

eternal osprey
lament rock
#

without git dep support

eternal osprey
#

these alghorithms were the best that have ever happened in my life.

lyric mountain
#

it's just that most people don't bother to implement their own sorting algos

lament rock
#

idk why things are so non standard because cpp has had so much time to standardize something

lyric mountain
#

see that door right on the end of the alley? the one written "WinAPI"?

#

ye, don't go near it

lament rock
#

even trying to figure out good software to host a web service isn't black and white because people recommend one by MS which isn't being maintained anymore and I had to dig a lot deeper to find uWebSocket

#

which I used in js and was amazing

#

still decided to make my own server software tho

#

The next question becomes how do my users cleanly install this shit regardless of platform

#

do I just include whole ass repos in my repo so they can build it

wheat mesa
#

should I buy a 2nd monitor when I'm in uni for comp sci

#

is it worth it

eternal osprey
#

hmm not really needed i think? I did invest in a macbook tho, that retina screen is just to0 crispy

wheat mesa
#

this look right btw kuuhaku

#

I think this is better now

eternal osprey
#

but so far, i've had numerous problems regarding coding on mac tho, so yeah also a downside

wheat mesa
#

tbh I'm just going to throw linux on my first gaming laptop I got a while back and use that for on the go programming/notes in college

lyric mountain
#

and resources as resources folder

#

but yeah, that's correct

wheat mesa
#

alright, and if I wanted to use ship.jpg from my Player class, how would I do that?

#

oh fuck setting java as sources folder made my IDE go bananas

#

lmao

lyric mountain
#

regardless of where ur acessing it

#

that's why I prefer over relative paths

lyric mountain
wheat mesa
#

yeah

lyric mountain
#

lemme grab my configs real quick to show u

#

there's a proper way to do it

wheat mesa
#

I think it's cus I changed the package names all around

lyric mountain
#

else intellij will think u have 2 modules

wheat mesa
#

it automatically did stuff like this, I'm changing it back around to see if it fixes

#

The imports are all fucked around because they're not in the right packages cus of this

#

hahahaha

#

after changing packages around

#

seems good

lyric mountain
#

full pic

wheat mesa
#

is that a bad idea..?

#

oh wait

#

let me get rid of src

lyric mountain
#

mark test as test

wheat mesa
#

Alright got it all compiling and running again

quartz kindle
#

thats what most open source c++ libs try to do, if they are small enough

wheat mesa
#

perfect, got the resources working now, thanks @lyric mountain 🙂

quartz kindle
#

otherwise for big libs, they are usually compiled separately then statically linked

lyric mountain
wheat mesa
#

yeah it is very odd

#

glad I got this out of the way though

wheat mesa
#

anyone know how to get audio to overlap itself in java? I'm making an audio system right now and I can't for the life of me figure out how to allow a sound effect to play over itself: ```java
public class SoundEffect {
private InputStream inputStream;
private AudioInputStream audioStream;
private Clip audioClip;
private DataLine.Info info;
private long clipTime;
private boolean overlapClip;

public SoundEffect(String pathToResource) throws UnsupportedAudioFileException, IOException, LineUnavailableException {
    inputStream = getClass().getClassLoader().getResourceAsStream(pathToResource);
    audioStream = AudioSystem.getAudioInputStream(inputStream);
    AudioFormat format = audioStream.getFormat();
    info = new DataLine.Info(Clip.class, format);
    audioClip = (Clip) AudioSystem.getLine(info);
    audioClip.addLineListener(new SoundClipListener());
    audioClip.open(audioStream);
}

public void start() {
    if(overlapClip) {
        // What can I do to play both clips at once here instead of restarting the currently playing clip?
    } else if(!audioClip.isRunning()) {
        audioClip.setMicrosecondPosition(0);
        audioClip.start();
    }

}

}

#

(Also this is meant for short-form sound effects, hence why it's being stored in-memory)

sharp geyser
lyric mountain
#

btw, don't forget to close the streams when ur no longer using them

wheat mesa
topaz terrace
#

how do i know the connection between the mongoDB and the client user?
how do i know the ram usage of the bot? how much is left? what is the total of the ram?
how do i know the cpu usage of the bot? how much is left? what is the total of the ram?

deft wolf
#

So, I'm sure there is a guide on the Internet on how to connect a bot with a MongoDB. Look for the right one for your language

#

As for the ram/cpu consumption, I personally use htop on VPS. I can see exactly how much ram and cpu my bots use

solemn latch
#

👀 client to db connections, or bot to db?

lyric mountain
topaz terrace
#

oh

topaz terrace
lyric mountain
topaz terrace
#

oh

lyric mountain
#

in that site u can find the other stuff

eternal osprey
#

hey how do i reverse the 2 complement result?

lyric mountain
#

the what

eternal osprey
#

so spose we get 1001 as a result of a two complement computation

#

which is calculated by flipping all the bits and adding a 1 to it,

#

i thought about reflipping then -1 but it seems to be wrong af

lyric mountain
#

so u want 0110?

eternal osprey
#

no not really

#

i try to find the a positive number from a negative number

#

obtained by the two's complement

lyric mountain
#

idk how to help with that

hushed robin
#

guys is there anything on the youtube api to get video events

earnest phoenix
#

what events

cursive musk
#

Ok, so I'm learning discord.jsV14 and this is the code snippet i have from the tutorial so far:

module.exports = {
  name: "verify",
  async execute(interaction) {
    // Get the verification role
    const role = await interaction.member.guild.roles.cache.find(
      (role) => role.id === "999398259095240756"
    );
    // Add the role to the member
    await interaction.member.roles.add(role);

    // Create a button for the user to press
    const verifyButton = new MessageButton()
      .setCustomId("verify_button")
      .setLabel("Verify")
      .setStyle("SUCCESS");

    // Create an action row to contain the button
    const row = new MessageActionRow().addComponents(verifyButton);

    // Send a message with the button to the user
    await interaction.reply({
      content: "Press the button to verify!",
      components: [row],
      ephemeral: true,
    });

    // Await a button interaction from the user
    const filter = (i) =>
      i.customId === "verify_button" && i.user.id === interaction.user.id;
    const buttonInteraction = await interaction.channel.awaitMessageComponent({
      filter,
      time: 15000,
    });

    // If the user pressed the button, update the original message to show that they have been verified
    if (buttonInteraction) {
      await interaction.editReply({
        content: "You have been verified!",
        components: [],
      });
    } else {
      await interaction.editReply({
        content: "Verification timed out!",
        components: [],
      });
    }
  },
};
#

One question though, how the hell do I see the button 😅

deft wolf
#

The message is edited to "You have been verified!"?

#

Also, I'm not entirely sure if it's possible to edit a message that is "ephemeral" into a regular one

cursive musk
#

hmm, ill check thanks

deft wolf
coral kernel
#

Hmm how do I know if the user has voted for the bot?

earnest phoenix
vital tapir
#

Can I know what language should I use to code a discord bot?

deft wolf
#

Preferably the one you are most familiar with

vital tapir
deft wolf
#

Then JavaScript is usually recommended. It's fairly simple for beginners and there are plenty of tutorials on the internet

vital tapir
#

I keep seeing it appear along with python while researching this topic

deft wolf
earnest phoenix
# vital tapir Can I know the difference of javascript and node.js?

JavaScript is a programming language, used for making websites interactive and dynamic. It usually runs in the browser.

Node.js is like JavaScript's cool cousin. It lets you use JavaScript outside of the browser, like for running servers and building back-end stuff. (including dc bots)

vital tapir
earnest phoenix
#

yh

#

u could say that

vital tapir
#

Then is there any difference in terms of how the code works between javascript and node.js?

earnest phoenix
#

well, Google is very useful for that

vital tapir
quartz kindle
#

but node.js does offer its own extra tools, just like browsers also have their own browser-only extra tools

sharp geyser
#

its a wild tim

#

in its natural habitat

hushed robin
#

guys

#

does anyone know a answer to the question i asked earlier

#

😪

flat prawn
#

Hi

hushed robin
#

hola!

#

how are you?

sterile vault
#

I'm making a library for PHP to make it Object Oriented in an almost total way.
Here is an example of array and string handling with my idea:

$array = new NextArray();

$array->add('hola');
$array->add('uwuwuw');
$array->add('Fox');

echo $array(1); // OUTPUT: 'uwuwuw'

$array->set(1, 'Top.gg is awesome');

echo $array(1); // OUTPUT: 'Top.gg is awesome'

I have also implemented string management:

$string = new NextString();

$string->set('FoxWorn3365 is beautiful');
$array = $string->explode(' ');
$array->values(); // OUTPUT: [  [0] => "FoxWorn3365],  [1] => "is",  [2] => "beautiful"
echo $string; // OUTPUT: 'FoxWorn3365 is beautiful'

if ($string->contains('FoxWorn')) {
  echo "{$string} contains 'FoxWorn'";
} else {
  echo "{$string} is horrible!";
}

For the second case, here is how it should have been done without the oop library:

$string = 'FoxWorn3365 is beautiful';
$array = explode(' ', $string);
var_dump($array); // OUTPUT: [  [0] => "FoxWorn3365],  [1] => "is",  [2] => "beautiful"
echo $string; // OUTPUT: 'FoxWorn3365 is beautiful'

if (stripos($string, 'FoxWorn') !== false) {
  echo "{$string} contains 'FoxWorn'";
} else {
  echo "{$string} is horrible!";
}

What do you think?
Could it be useful or is it better to stay in the world of classical PHP?
Small spoiler: with this lib arrays are handled as objects so they require less memory

earnest phoenix
sterile vault
#

poor PHP

quartz kindle
sterile vault
#

ik

quartz kindle
#

people tend to prefer native way of doing things instead of a third party thing that basically does the same thing you can already do natively but with a different syntax

#

but then again, people also use lodash and shit they dont need for no reason

sterile vault
sterile vault
earnest phoenix
#

It isn't, that's correct

#

Why do you think it should be one

#

Do you even know what your constant DB is after you've assigned it that value?

neon leaf
#
const DB = { '735808489775038505': true } 
Object.keys(DB).forEach((e) => console.log(e, DB[e]))```
#

you are working with an object here, you need to convert it to an array first

#

Object.keys turns DB into an array with its keys

flat prawn
neon leaf
#

just like always

#

instead of providing a string as message argument provide an object with the embeds key

hushed robin
#

i tried

lyric mountain
#

just a tip btw, if ur going to get only the keys consider storing it as an array to begin with

#

{ "something": true } can be stored as ["something"]

#

that way u remove the middleman (Object.keys())

neon leaf
#

this should work like <array>.map(), right?

quartz kindle
#

ugh, ; return

lyric mountain
#

was about to say that

neon leaf
#

I have removed it already

quartz kindle
#

xD

lyric mountain
#

well yeah, it should but...why are u making a custom impl?

neon leaf
#

to have more customization about what the end user gets to do with the data

lyric mountain
#

how would it be more customizable?

neon leaf
#

well I can add more and remove stuff

#

like in my case I dont want the user to modify data so I removed that part

quartz kindle
#

although that implementation does not conform to the original imlementation

neon leaf
#

ah

#

what is array? the full array of the original or the current one?

lyric mountain
quartz kindle
#

the original

neon leaf
lyric mountain
#

they can still do that tho

quartz kindle
#

so you're creating an extended Map

#

not an extended Array

neon leaf
neon leaf
lyric mountain
#
const map = {}
map.map((k, v) => map[k] = 123)
quartz kindle
#

so you're not directly extending Map, you're creating a separate class that has both array and map methods

neon leaf
#

yes

lyric mountain
#

kiiiiiiiiiiiiiiiiiiiiiiiiiiiinda

quartz kindle
#

possible yes

#

js can do anything

#

the question is if its the right tool for the job

lyric mountain
#

the lag will be unbearable

boreal iron
lyric mountain
#

u could try other langs

boreal iron
#

FakE out for another 6 months

lyric mountain
#

anything can be made in any lang

#

it just happened that python is usually chosen for that

#

yes, you've discovered why AI is such a complex area

quartz kindle
lyric mountain
#

you don't simply put "efficient" and "JS" in the same sentence

boreal iron
quartz kindle
#

lmao

boreal iron
lyric mountain
#

if u want efficiency you'll need to use a strongly typed lang

#

and ofc, compiled

quartz kindle
lyric mountain
#

best to take some courses on that area

neon leaf
#

I think I made the code look 10x worse

lyric mountain
#

then maybe in what, a couple years you'll be able to write one

boreal iron
quartz kindle
#

xD

boreal iron
#

:P

lyric mountain
#

neural networks

#

ofc not only that, but mostly

#

like, if u want to make an AI from zero don't expect to finish it anytime soon

#

training? you wont even run the project for a long period

#

training is the last of the last of the steps

quartz kindle
quartz kindle
#

actually you want to execute .map on the values right, then .map(k => callback(this.data[k]))

neon leaf
#

this is it then, correct?

lyric mountain
#

like, to put in perspective, the whole world, every country investing billions into AI research (for warfare ofc) was able to make chatgpt just now

quartz kindle
#

training is the easy part, the hard part is developing a training method that actually works

lyric mountain
#

it's virtually impossible for a single normal human to be able to develop an AI from zero during lifetime

#

it is, but still nowhere close of being a true AI

#

and it's been what, 50 years of AI research?

#

yes

quartz kindle
#

might not be what people expect tho

lyric mountain
#

what I mean is, it's a gargantuan task to even make a "simple" chatbot

neon leaf
lyric mountain
#

datasets are mostly useless outside their projects

#

it wasn't few years

#

AI research started loooooong ago

#

remember him?

#

there's also a little niche site called Google

#

it mostly uses machine learning to get relevant results

#

AI was among us for a long time already, they just weren't as talkable as chatgpt

#

all those little advancements led to what we have now

quartz kindle
#

lmao

lyric mountain
#

it wasn't a sudden jump

#

pretty much

#

like, u can make a retrieval-based chatbot, but it won't be a fluid as you might want

#

yes, but they're paid

wheat mesa
#

ChatGPT was just way more public than the rest of AI/ML research

lyric mountain
#

yeah, making an AI by yourself would be as easy as carving a CPU out of a silicon nugget with a chisel

quartz kindle
lyric mountain
quartz kindle
#

:^)

lyric mountain
#

wanna bet it'll use tensorflow?

quartz kindle
#

a masterclass that teaches you to use existing third party libs

#

jenious

#

using existing libraries, not actually from scratch using your own code

lyric mountain
#

how to make chatgpt in 5 minutes
1 - grab chatgpt api token
2 - send requests to chatgpt
3 - show the user the answer and claim u made it

quartz kindle
#

:^)

#

dropshipping with extra steps

lyric mountain
#

gn

copper cradle
#

I'm just tired of always hearing the same 5 songs

boreal iron
#

Do it! He will not know what or who fucked with him

earnest phoenix
#

Why jamming when you can takeover

#

Play your music for them

muted heart
#

Hey guys

sudden geyser
#

hi

sharp geyser
copper cradle
sharp geyser
#

ong

#

They wont expect you to bomb your own house

copper cradle
#

yah

radiant kraken
#

😐

earnest phoenix
#

👀

fair forge
#

Polska?

deft wolf
#

Nie, pisz po angielsku bo to anglojęzyczny serwer

quartz kindle
#

yes piss in english

spark flint
#

lol

earnest phoenix
#

Can Anyone tell me what is the best location to host my discord bot with lowest ping? here's are the locations

#

The closest to where Discord is hosting their API

#

Which is, with some small thinking, pretty obvious

spark flint
#

lol

opaque harbor
hushed robin
#

looks like one of those discord bot host things

#

🤢

earnest phoenix
#

it is a host 🙂

opaque harbor
earnest phoenix
#

Imagine being

I can't tell you

#

Much cringe

spark flint
#

shhhh they are under nda OMG

earnest phoenix
indigo crown
#

uhm is top.gg's background url broken?

#

it only allows this format

#

but the new format has a /a/ in the middle

#

the top.gg page doesn't allow that?

earnest phoenix
#

?

#

Also, is that even related to development?

indigo crown
#

sry wrong channel

#

support?

sharp geyser
hushed robin
#

🥰

#

can someone answer my question tho

#

i asked awhile ago

wheat mesa
#

No

spark flint
#

no

hushed robin
#

😢

hushed robin
sharp geyser
hushed robin
#

i will reply to it

sharp geyser
#

Wdym by events

earnest phoenix
#

lol

hushed robin
#

like

#

when someone uploads a video

#

i want to do something

hushed robin
#

it's just a host

sharp geyser
#

Have you tried reading the docs for youtube api?

hushed robin
#

yes

#

i can't find

earnest phoenix
hushed robin
#

wym but no

earnest phoenix
#

think

hushed robin
#

you telling them the host doesn't affect you

#

at all

earnest phoenix
#

omg someone will know the host i use!1!1!1!1!!!1!!1!

#

must be kept secret!!!

deft wolf
#

They will hack me

earnest phoenix
#

national defense !1!1!1!1!1

sharp geyser
#

doesnt want everyone to know about it

hushed robin
earnest phoenix
#

LMAO

hushed robin
#

looks complicated

sharp geyser
#

💀

craggy pine
earnest phoenix
#

omg!

sharp geyser
#

Have you even tried googling for one

#

I just googled this shit I know nothing about it

#

So I cant say if there is or isnt a lib

hushed robin
#

bruh

#

it's through webhooks

sharp geyser
craggy pine
#

^

hushed robin
#

i don't want to forward my port

#

☹️

craggy pine
#

Would result in way less asking in this discord for help

sharp geyser
#

Why would you forward your port

hushed robin
#

cus

#

it uses webhooks it says

craggy pine
#

You don't port forward for webhooks...

sharp geyser
#

Just make it use a discord webhook

earnest phoenix
#

Because my vps is my crappy laptop

hushed robin
craggy pine
#

bruuh

#

just research things b4 asking

hushed robin
#

are you sure

#

i think i do

sharp geyser
#

I mean if its not shown to the public then sure ig

#

but a discord webhook would work fine

earnest phoenix
craggy pine
#

fair

#

but

#

what events are you wanting exactly?

earnest phoenix
#

If you host that webhook on your laptop and expect google to reach it, won't work without PF

hushed robin
#

i was told it was bad to forward a port on my home internet

sharp geyser
#

ok Miyuka no offence, but you are bringing this conversation backwards not forwards

hushed robin
sharp geyser
#

Just have it send to a discord webhook

#

😔

hushed robin
#

how

sharp geyser
#

reading the docs

hushed robin
#

docs of what

earnest phoenix
#

And is one of those questions about posting a message when a YouTuber posts a new video or what

sharp geyser
#

if it sends a webhook then that means it expects a webhook url

twin warren
#

@river flicker
You said that the ?kanal-kilit command is not working, if I delete this command, will the bot be added to top gg?

earnest phoenix
#

There are 69420 bots doing that already, time to make it 69421

craggy pine
sharp geyser
#

It is

hushed robin
#

this ain't a public bot

sharp geyser
#

but I doubt battleless would use IFTTT

hushed robin
#

this will be for me only

earnest phoenix
#

If this then ask

sharp geyser
#

he hates complicated things but also seems to hate things that will make his life easier

hushed robin
earnest phoenix
craggy pine
#

I just linked it above

hushed robin
#

i wanna do it myself tho

#

☹️

sharp geyser
earnest phoenix
#

I just invented it

sharp geyser
earnest phoenix
#

Best would be IFTTAANDOYO

hushed robin
#

yeah but i don't want to forward a port

earnest phoenix
#

If this then ask and don't search on your own

rustic nova
#

IFTTD

sharp geyser
#

not my fault its too complicated when it tells you exactly what to do

rustic nova
#

if this then delete

hushed robin
#

so this is a bad solution

earnest phoenix
#

IFCTDDI

#

If complicated then don't do it

#

chad service

rustic nova
#

a vps is your solution then

hushed robin
#

yeah but

#

testing is going to be annoying

craggy pine
#

Ok so.

#

You get answers, and you just push them away.

sharp geyser
#

ok yea

#

this looks really easy to do

hushed robin
#

no i'm looking for another answer

#

that doesn't involve me forwarding a port

sharp geyser
#

Assuming this works how it says then it is incredibly easy to do

earnest phoenix
craggy pine
hushed robin
#

😐

earnest phoenix
#

Interesting kek

hushed robin
#

does anyone know

sharp geyser
#

The only method i found was what I linked

#

it seems google only uses PubSubHub

hushed robin
#

😢😢

sharp geyser
#

but me reading through the docs figured out how it works rather easily

earnest phoenix
hushed robin
#

twitter api is better

earnest phoenix
sharp geyser
#

cause yknow when you actually read

#

shit makes sense

hushed robin
#

i know how it works

sharp geyser
#

Then fucking do it

craggy pine
hushed robin
#

i don't want to forward a port i've said this multiple times

sharp geyser
#

💀

#

Doesn't look like you have to

craggy pine
#

Then use a vps... oh wait testing would be annoying

hushed robin
#

yes i do

sharp geyser
hushed robin
earnest phoenix
#

wait wat testing is annoying on a vps lmao

sharp geyser
#

I've answered your question after you continuously asked for an answer

earnest phoenix
#

it's literally the same as testing locally kek

sharp geyser
#

if you dont like my answer go find your own

craggy pine
earnest phoenix
#

Use the goddamn remote coding feature IDEs offer jeez

hushed robin
#

this is not ideal

sharp geyser
#

I wonder if you can google it cause im not wasting anymore time

earnest phoenix
#

We say we use 10% of our brain only

hushed robin
earnest phoenix
#

Feel like people use 0.01%

sharp geyser
#

which I also found on the youtube docs

earnest phoenix
#

9 year old code slaps

sharp geyser
#

ong

craggy pine
#

Var

hushed robin
craggy pine
#

google it

hushed robin
#

no i'd just prefer to not have to deal with ports

#

with the twitter api i didn't have to

#

why with youtube ☹️

rustic nova
craggy pine
#

Different companies...

earnest phoenix
#

ngrokdeez

sharp geyser
#

dietz nutz

earnest phoenix
hushed robin
#

it works well

craggy pine
#

Let me ask the ceo of youtube real quick

hushed robin
rustic nova
#

port tunneler

sharp geyser
#

because people who use the youtube api using pubsubhub actually have the commitment to buy a vps or port forward

sharp geyser
hushed robin
#

ok but twitter api is better cus u don't need to do all that

rustic nova
#

cool

rustic nova
#

yk

#

ngl

#

imagine there being another good solution

#

oh yes, VPS! good idea

sharp geyser
#

there is

#

a vps

earnest phoenix
#

ngrok rocks

hushed robin
#

if someone has another solution pls let me know

craggy pine
#

vps

sharp geyser
rustic nova
#

yes

#

a vps

hushed robin
#

bro

rustic nova
#

you wont get a better one

hushed robin
#

ive been through this

earnest phoenix
hushed robin
#

so many times

sharp geyser
#

something Aurel wishes he had

hushed robin
#

testing will be difficult

rustic nova
#

then run a vscode dev server on it

craggy pine
#

my brain is slowly becomming mush

rustic nova
#

test on the machine directly, ez

earnest phoenix
#

But I don't know!1!!1!11

hushed robin
#

i'm not taking 3 minutes every time i want to restart my app and test

sharp geyser
#

I could do it in 1s

#

tf it taking you 3m for

hushed robin
#

cus

#

i gotta commit to github

#

then pull

#

then restart it

sharp geyser
#

Thats like no

craggy pine
#

wat

sharp geyser
#

just directly connect to your vps with an ide

#

you could make your life so much easier by just googling how to do that

earnest phoenix
hushed robin
#

that seems like an unideal solution

earnest phoenix
#

Already suggested that

sharp geyser
#

unideal?

earnest phoenix
#

Don't know their reply though kek

sharp geyser
#

Now you gotta be trolling

hushed robin
#

no

#

i'm not trolling i just don't want to do all that

earnest phoenix
rustic nova
#

literally, just

  • get a vps
  • run a vscode dev server on it, or just connect to it with ssh to have it setup itself
  • profit
earnest phoenix
#

Man never trolled in his entire life

hushed robin
#

i like trolling in rust

sharp geyser
#

So would you rather waste 3m to test something or connect directly to the project on your vps and code that way

rustic nova
#

literally develop on the machine you're gonna prod on

sharp geyser
earnest phoenix
#

absolutely

hushed robin
#

how do u want me to develop on my vps

rustic nova
#

literally

hushed robin
#

it's weak

rustic nova
#

read my last messages

sharp geyser
#

The same way everyone does

hushed robin
#

it has only command line

rustic nova
#

ok? still possible

sharp geyser
#

Are you fucking dumb

hushed robin
#

no

sharp geyser
#

Apparently so

rustic nova
earnest phoenix
#

lmao love how you guys actually keep trying

rustic nova
#

this literally allows you to code on your vps

sharp geyser
#

At this point this guy should be blacklisted from the dev channel

craggy pine
#

^

rustic nova
#

literally, no dealing with portforwarding either

earnest phoenix
#

Voted

hushed robin
#

i have not broken any rules

sharp geyser
#

bad for you

#

not bad for us

#

its a heaven send if it happens for us

hushed robin
#

i don't desverse a ban

earnest phoenix
#

I'd be able to unblock him because then I won't see messages either way

sharp geyser
#

trying to help you is like teaching a brick wall to walk

hushed robin
rustic nova
#

gonna list off your solutions here again

  • get a vps, work on it using remote development
  • portforward, which is not secure in itself
  • ngrok to just tunnel
earnest phoenix
#

Also love how my 13 blocked people are from this server only KEKW

hushed robin
sharp geyser
#

No we aren't....

rustic nova
#

or ifttt yes

#

unless you dont wanna depend on another service

#

then we're back on a vps

sharp geyser
#

oh no he wants to do it himself

#

but denies the answers we give him

rustic nova
#

a vps then

hushed robin
rustic nova
#

then there's no way to do it yourself

sharp geyser
#

are you sure he even has 3$ for a vps

hushed robin
#

☹️

hushed robin
rustic nova
#

tell me

sharp geyser
#

Its not the wrong fucking answer

rustic nova
#

what is your goal again

sharp geyser
#

you are just the wrong fucking person to tell it to

hushed robin
#

i'm spending $14 a month on a do vps

earnest phoenix
#

"himself"

craggy pine
rustic nova
#

describe your goal in a short, yet descriptive sentence

earnest phoenix
#

Can probably change the SO logo to be OpenAI logo

sharp geyser
#

in reality all we ever do is copy stack overflow

#

thats 90% of development

quartz kindle
#

what do you guys think of JESF as a lib name

#

lmao

sharp geyser
#

Aint no way fake and tim show up at the same time

earnest phoenix
#

the other 10 are documentation

craggy pine
#

My name jesf

sharp geyser
#

this some voodoo shit

boreal iron
#

Uhh

boreal iron
hushed robin
earnest phoenix
quartz kindle
#

javascript efficient serialization format

earnest phoenix
#

has JavaScript in its name

sharp geyser
#

my JESF

earnest phoenix
#

sucks

quartz kindle
#

my name jesf

rustic nova
craggy pine
#

Hey tim the joke is copywritten, I'll need 1000 robux

rustic nova
#

like, get events for when a video was uploaded?

craggy pine
quartz kindle
craggy pine
#

D:

quartz kindle
#

:^)

sharp geyser
#

and I own tim so his money is now my money

boreal iron
#

Nope you don't

quartz kindle
#

i have no money

sharp geyser
#

love me 40 cents a day

#

I know cause I took it all

craggy pine
rustic nova
#

this

quartz kindle
#

you took all my 40 cents

sharp geyser
#

I already linked this

rustic nova
#

yeah

craggy pine
#

that was an answer already

sharp geyser
#

"too complicated"

earnest phoenix
#

man aurel being a parrot kek

rustic nova
#

there's no other way around it if you want to do it yourself, as that is what youtube supports

#

shush

sharp geyser
#

ong

#

Aurel loves copying me

quartz kindle
# rustic nova https://github.com/pubsubhubbub/

IMPORTANT NOTE: The PubSubHubbub protocol has now been adopted by the W3C and published as a Recommendation. It's also been renamed WebSub for clarity and concision. Please consider upgrading all older PubSubHubbub implementations to WebSub.

quartz kindle
#

xD

rustic nova
#

but yes

#

"WebSub" is what youtube uses, theres no other way around it if you wanna "do it yourself"

boreal iron
#

Anything is better than pubblubbsubbaubhub

sharp geyser
#

youtube still calls it PubSubHub tim so blame youtube for the wrong name

rustic nova
boreal iron
rustic nova
#

ofc not

quartz kindle
#

pubsubhubbub is a great name tho, why did they change it

#

stupid old dudes and their "professionalism"

#

deciding the future of js/web

#

smh

boreal iron
#

Dunno why but my dirty me is speaking it differently than it is written down giving it another meaning

rustic nova
#

yeah nothing around WebSub as mentioned

hushed robin
#

bruh

#

imma just do polling

#

bad solution but it'll work

lyric mountain
#

see, that's what happens when someone answers their questions

quartz kindle
#

battleless 9 times out of 10:
"how do you do X? nevermind i'll just do Y"

boreal iron
#

Mr Bae in disguise

lyric mountain
#

nah, bae just wrote cursed code and took 4x longer to understand what you're saying

#

battle takes NaNx longer to understand and refuses to show any code

earnest phoenix
#

Just ask ChatGPT for the code

#

You will then get it

earnest phoenix
#

^ didn't get the joke

#

Though not really a joke but more like reality

wheat mesa
#

@lyric mountain do you know how to compile something to a jar file? I’ve tried a few times but I keep getting cannot find class com.waffle.Main when I try to run it

earnest phoenix
#

IntelliJ > Build Artifacts

wheat mesa
#

Via command line

#

(Also tried Intellij at home, couldn’t get it to work with creating a jar)

earnest phoenix
#

What is the content of your manifest file

#

And commands you've used

wheat mesa
#

Wait I think I might’ve gotten it to work by a miracle

#

Damn it

#

I got it to work on replit, but when I downloaded it on to this PC I’m getting invalid or corrupt jarfile: path/to/jar/file

#

I ran jar cvmf MANIFEST.MF TestJar.jar -C build . -C PlayBrew/src/test/resources .

#

It works on replit when doing java -jar TestJar.jar but I get that error when I attempt to double click open it on a windows computer

rustic nova
#

ngl

someone explain this behaviour to me

#

isn't data() essentially the same, except without the data-

#

or are return values cached?

earnest phoenix
#

my god jquery

rustic nova
earnest phoenix
#

Is that still used in 2023

#

jeez

rustic nova
#

yes

#

what else do you use then? nextjs or react?

#

stink

earnest phoenix
#

nestjs kek

rustic nova
#

working with bootstrap to make a dashboard to test out stuff

#

cool, site isnt made/hosted with nodejs

#

but with python flask using gunicorn

earnest phoenix
#

becoming even worse

rustic nova
#

Shush

#

cry about it

quartz kindle
#

i havent used jquery since like 2012

earnest phoenix
#

real

rustic nova
#

cry

earnest phoenix
#

so does everyone else that is in a mentally sane state KEKW

earnest phoenix
wheat mesa
#

Ok so I think my problem is that replit is somehow corrupting the jarfile upon downloading it

earnest phoenix
#

What do you have in that manifest file

wheat mesa
#

Main-Class: com.waffle.Main

earnest phoenix
#

The issue is the double click

#

Does it have a main function or something

wheat mesa
#

It works just fine on replit running with the java command

earnest phoenix
quartz kindle
rustic nova
#

fair enough yeah

wheat mesa
#

Something is going wrong with the download, when I try to view the jar’s contents with jar tf TestJar.jar (only getting problems on windows, using this command on replit’s side is working just fine) I’m getting invalid CEN header

earnest phoenix
#

what kind of design idea is that

rustic nova
#

thanks Timstink

#

also yeah doesnt make sense

wheat mesa
quartz kindle
#

Since jQuery 1.4.3, data-* attributes are used to initialize jQuery data

#

it wasnt even supposed to be like this

earnest phoenix
#

Yeah then Replit doesn't like you downloading the file kek

wheat mesa
#

Maybe the encoding is different?

rustic nova
#

sense much

wheat mesa
#

But even then it shouldn’t matter

rustic nova
#

so easy fix is, just use attr

wheat mesa
#

Since they’re just bytes

quartz kindle
#

the whole concept around .data() is to store data in jsland but associated with html somehow, only since 1.4.3 does it use data- attributes because they thought "why not" i guess

#

so basically, .attr is html, .data is not html, it just uses html by accident

earnest phoenix
#

So don't use data and remove it from your brain

wheat mesa
#

Something is being majorly fucked

quartz kindle
#

Using the data() method to update data does not affect attributes in the DOM. To set a data-* attribute value, use attr

wheat mesa
#

This works perfectly fine on replit

earnest phoenix
#

As an archive pretty much

#

With 7zip or whatever

#

Also in a hex editor - e.g. xxd

wheat mesa
wheat mesa
earnest phoenix
#

Can you send over the JAR or also not possible?

earnest phoenix
#

Otherwise use PowerShell

#

Has a function Format-Hex iirc

wheat mesa
#

Doing that gave me a very large output

earnest phoenix
#

Yeah which is normal

#

Only important part is the top

wheat mesa
#

I expected that