#development

1 messages Β· Page 134 of 1

lyric mountain
#

it's sad that discord refuses to render apngs

slender wagon
#

yoooo we are into something

#

this is a apng

#

noo this is from the second one

#

it's not a apng

#

OH i know now

#
 const buffer = canvas.toBuffer("image/png");
    fs.writeFileSync(`watermarked${i}.png`, buffer);

this saved all the frames

#

and it looks very correct with the background too

#

@quartz kindle you were right, now i gotta figure out how to actually use it

quartz kindle
#

πŸ‘

slender wagon
#

there is still an issue tho but gonna figure that out later

#

like after a few frames u can see that they aren't being cleaned

#

oh nvmm that's my bad

#

so i am kinda limited to doing that here:

 // Encode the APNG image
  console.log(
    "HELLOOO",
    frames,
    +" " + "WIDTH" + " " + canvas.width,
    canvas.height,
    apng.frames.length
  );
  const apngBuffer = UPNG.encode(
    frames,
    canvas.width,
    canvas.height,
    0,
    new Array(apng.frames.length).fill(frameDelay)
  );

  console.log(`Encoded APNG image: ${apngBuffer.byteLength} bytes`);
  try {
    await ctx.replyWithDocument({
      source: Buffer.from(apngBuffer),
      filename: "watermarked.apng",
    });
    console.log("Sent APNG document");
    //Saving it locally for testing purposes
    // console.log("apngBuffer before:", apngBuffer);
    fs.writeFileSync("watermarked.apng", Buffer.from(apngBuffer));
    console.log("Saved watermarked.apng");
    // console.log("apngBuffer after:", apngBuffer);
  } catch (err) {
    console.error(`Error sending APNG document: ${err.message}`);
  }

since the encoding function wont take canvas.toBuffer to generate the apng

quartz kindle
#

what format do the frames have to be for UPNG.encode?

slender wagon
#

Uint8Array

quartz kindle
#

if it doesnt accept a Buffer object, you can convert it to Uint8

#

but the thing is you also need to make sure it does accept png bytes as returned by canvas.toBuffer

#

and not some different kind of raw byte data

jaunty basalt
#

Has anyone ever coded a bot using Eris?
If yes, then pls tell, I need help.

slender wagon
quartz kindle
slender wagon
#

since i wasn't able to make it at this moment i'll be working later on it. however i made one manually with the frames the bot generated

#

yes commiting it manually cuz i am at work

#

also thank you very much @quartz kindle i might bother u a bit later

quartz kindle
#

xD

peak drum
#

just update to slash commands xd

quartz kindle
#

message deletes do not include any message data

#

unless the message was already cached

#

thats what the raw api provides

#

anything other than that is added by your library based on your cache

#

the only way to log message deletes is to keep them in the cache at all times

#

which is terrible for memory usage, unless you store them all in a database, which is also terrible for performance and storage

lyric mountain
#

tim do u know any secret tech that I can use to count how many trues are in this resultset?
the first 3 columns are grouped, but the next 2 cannot be (else they'll become 2 lines)

#

I'm trying not to use a subquery

jaunty basalt
lyric mountain
#

I could use a window, but then the owned columns would need to be grouped

#

it's postgres btw

#

ignore the dangling window there

civic scroll
#

kuu you reminded me of my sql exam

#

😭

lyric mountain
#

lmao

civic scroll
#

i had to write the query on paper

lyric mountain
#

well, solved it with a subquery anyway, tho I hate to add indentation levels on queries

quartz kindle
#

trues as in n_owned and c_owned?

lyric mountain
#

yes

quartz kindle
#

per user?

#

or global?

lyric mountain
#

based on the resultset

#

like this

#

oops, put idx there by mistake

quartz kindle
#

so in that image the result should be 4?

civic scroll
#

kuu

lyric mountain
#

there are more results below the image

civic scroll
#

wtf is that rarity system

#

epic and legendary, which is more

lyric mountain
#

basically there are 14 trues for "n_owned" and 1 true for "c_owned"

civic scroll
#

oh legendary

#

but wtf

quartz kindle
#

thats normal rpg rarity system lol

#

all rpgs use that

civic scroll
#

what rarity is astolfo

quartz kindle
#

common -> rare -> epic -> unique -> legendary

lyric mountain
#

used to be ultra rare, but it was appearing when filtering by "rare"

#

cuz shared name

lyric mountain
civic scroll
#

don't tell me i have to register and try to get astolfo by myself

lyric mountain
#

lmao, well I don't have one to show either

grim aspen
civic scroll
#

what should i do to get Sayuri into the system /j

quartz kindle
lyric mountain
quartz kindle
#

if you only have one shard, you can do client.shards.get(0).latency

lyric mountain
#

anyway, back to the api

jaunty basalt
solemn latch
#

πŸ‘€ eris still exists?

quartz kindle
#

so you can use client.shards.get(0).latency

jaunty basalt
hushed robin
solemn latch
#

it got a new release 3 months ago

quartz kindle
#

it should collect ping information slowly over time

civic scroll
#

where is the string coming from

civic scroll
#

also, avoid usage of eval

quartz kindle
#

i made a 4-stage eval system on my bot lmao

civic scroll
#

as a way to inspect the program's value?

hushed robin
solemn latch
#

crazy

#

rip eris

civic scroll
#

should have used CLI REPR

quartz kindle
#

it goes through 4 different evals

#

to handle edge cases

#

for example, one with function, one without function, and 2 more for async

hushed robin
#

eval command is so easy to make i thought it would be hard

quartz kindle
#

not really, but i wanted it to support stuff like /eval await fetch(something)

#

and show the actual result, and not Promise<pending>

civic scroll
#

i had this

quartz kindle
#

should be enough yes

civic scroll
#

a jumble mess

quartz kindle
#

xD

hushed robin
#

unless someone hacks your account 🧌

frosty gale
#

unless discord decides to send a custom id for some reason

#

trust no one add 2fa

civic scroll
#

3 classes

quartz kindle
civic scroll
#

i liked overengineering

quartz kindle
#

xD

civic scroll
#

😎

quartz kindle
#

heres my eval lmao

#
async function ev(f) {
    try {
        const result = eval(`(()=>{
            return ${f}
        })()`);
        const p = result instanceof Promise;
        let error = false;
        return {
            promise: p,
            data: p ? await result.catch(e => { error = true; return e; }) : result,
            error
        };
    } catch(e) {
        // no-op
    }
    try {
        return {
            data: await eval(`(async()=>{
                return ${f}
            })()`)
        };
    } catch(e) {
        // no-op
    }
    try {
        const result = eval(`(()=>{
            ${f}
        })()`);
        const p = result instanceof Promise;
        let error = false;
        return {
            promise: p,
            data: p ? await result.catch(e => { error = true; return e; }) : result,
            error
        };
    } catch(e) {
        // no-op
    }
    try {
        return {
            data: await eval(`(async() => {
                ${f}
            })()`)
        };
    } catch(e) {
        return {
            error: true,
            data: e
        };
    }
}
civic scroll
#

e

quartz kindle
#

v

harsh nova
#

Check docs

hushed robin
#

message.content.includes('<@id>')

#

🧌

harsh nova
#
discord.js

discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.

#

Assuming you use d.js

jaunty basalt
solemn latch
deft wolf
#

Search for message mentions

hushed robin
hushed robin
#

yes it's still a thing

#

it does

#

?

deft wolf
#

New docs TROLL

hushed robin
#

huh

#

where

#

weird lol

harsh nova
#

Discord js docs site has always had issues with that. It's fixed by clearing cache / local files for the website

neon leaf
#

does anyone know zod? If so is there a package that adds decorators to it? so like

class Hi {
  @Validate(z.number(), z.number().nullable())
  public increased(initial: number, increaseBy: number = 1): number {
    return initial + increasedBy
  }
}```

or

```ts
class Hi {
  @Validate()
  public increased(@T(z.number()) initial: number, @T(z.number().nullable()) increaseBy: number = 1): number {
    return initial + increasedBy
  }
}```
neon leaf
#

if not ill just make it

hushed robin
#

[Error: the surface type is not appropriate for the operation

#

what does this mean

lyric mountain
#

absolutely no context

hushed robin
#
app.get('/:channel/followers', async (req, res) => {
    const channel = req.params.channel;

    client.getChannel(channel).then(channel => {
        const canvas = createCanvas(0, 200);
        const ctx = canvas.getContext('2d');

        ctx.font = '50px';
        ctx.textAlign = 'center';
        ctx.textBaseline = 'middle';

        ctx.fillText(channel.followersCount, canvas.width / 2, canvas.height / 2);

        canvas.toBuffer((err, buff) => {
            if (err) console.error(err);
            res.set('Content-Type', 'image/png');
            res.send(buff);
        });
    });
});
hushed robin
#

there ya go

#

context

lyric mountain
#

now show the error stacktrace

hushed robin
#

that's literally it

neon leaf
lyric mountain
#

js always show the call stacks

hushed robin
#

πŸ’€

lyric mountain
#

are u using a custom logger?

hushed robin
#

no

#

all my code is above

lyric mountain
#

where are u catching uncaught exceptions?

hushed robin
#

what

pale vessel
lyric mountain
#

node crashes on uncaught exceptions now, since that's clearly uncaught u oughta be catching them somewhere

hushed robin
#

ok

#

nah same thing

hushed robin
#

i'm not catching anything

#
const express = require('express');
const Client = require('kick-api-wrapper');
const { createCanvas } = require('canvas');

const app = express();
const client = new Client();

app.get('/:channel/followers', async (req, res) => {
    const channel = req.params.channel;

    client.getChannel(channel).then(channel => {
        const canvas = createCanvas(0, 200);
        const ctx = canvas.getContext('2d');

        ctx.font = '50px';
        ctx.textAlign = 'center';
        ctx.textBaseline = 'middle';

        ctx.fillText(channel.followersCount.toString(), canvas.width / 2, canvas.height / 2);

        canvas.toBuffer((err, buff) => {
            if (err) console.error(err);
            res.set('Content-Type', 'image/png');
            res.send(buff);
        });
    });
});

app.listen(3000, () => {
    console.log('Listening on port 3000');
});``
#

this is all the code

#

everything

lyric mountain
#

hm, perhaps express catches it then

#

well, do you know how to use a debugger?

hushed robin
#

oh wait i'm slow

#

it's cus my canvas width is 0

#

🧌

lyric mountain
#

that was the issue?

hushed robin
#

yea

#

fixed now

#

oh

jaunty basalt
hushed robin
#

whys it fully black

lyric mountain
#

@quartz kindle then yeah, canvas also doesn't support 0-length dimensions

hushed robin
#

why doesn't increasing the size of the font work

#

it's the same size

lyric mountain
#

it's fontSize

#

not font

hushed robin
lyric mountain
#

else it'll try to find a font named 50px

#

because the first arg is font name

hushed robin
#

also fontSize does not work

lyric mountain
#

did u restart the code?

hushed robin
pale vessel
hushed robin
#

wtf

lyric mountain
#

classic discord

hushed robin
#

ok i fixed

#

big now

hushed robin
quartz kindle
#

localhost

hushed robin
#

why isn't it embedding

deft wolf
#

You are joking right?

pale vessel
#

you can't be serious

quartz kindle
#

lmao

lyric mountain
quartz kindle
#

maybe

hushed robin
deft wolf
lyric mountain
hushed robin
#

why is it black

lyric mountain
#

black text + black background

hushed robin
#

it invisible

lyric mountain
#

browser background

hushed robin
#

guys

#

how do i make it automatically update

lyric mountain
#

update the image?

#

or update the site output?

hushed robin
lyric mountain
#

it'll not

#

because images are static

hushed robin
#

yeah ik

#

so how do i make update

#

i will update image

lyric mountain
#

you don't, images are static

#

what part of static don't u get?

#

you can make the site return different images tho

#

which is the second thing I mentioned

lyric mountain
#

but it'll not work on discord

hushed robin
#

this is what i want

lyric mountain
#

simply generate the image and return it

hushed robin
#

like when i'm on the website

#

i want it to automatically update

#

with new image

lyric mountain
#

make the website fetch the image every X seconds

hushed robin
#

how

#

setInterval?

lyric mountain
#

yes

#

wont ask why tf ur using an image tho

hushed robin
#

i need to

#

😐

lyric mountain
#

why?

#

cant the site generate it instead?

hushed robin
#

setInterval isn't working

quartz kindle
#

lmao

lyric mountain
#

or simply use a text with css styles

hushed robin
#

image is the same

#

😐

lyric mountain
#

because canvas literally uses css

hushed robin
#

this isn't a website

quartz kindle
lyric mountain
quartz kindle
hushed robin
#
app.get('/:channel/followers', async (req, res) => {
    const channel = req.params.channel;

    client.getChannel(channel).then(channel => {
        const canvas = createCanvas(500, 100);
        const ctx = canvas.getContext('2d');

        ctx.font = 'bold 50px sans-serif';
        ctx.textAlign = 'center';
        ctx.textBaseline = 'middle';

        ctx.fillText(channel.followersCount.toLocaleString(), canvas.width / 2, canvas.height / 2);

        canvas.toBuffer((err, buff) => {
            if (err) console.error(err);
            res.set('Content-Type', 'image/png');
            res.send(buff);
        });
    });

    setInterval(() => {
        client.getChannel(channel).then(channel => {
            const canvas = createCanvas(500, 100);
            const ctx = canvas.getContext('2d');
    
            ctx.font = 'bold 50px sans-serif';
            ctx.textAlign = 'center';
            ctx.textBaseline = 'middle';
    
            ctx.fillText(channel.followersCount.toLocaleString(), canvas.width / 2, canvas.height / 2);
    
            canvas.toBuffer((err, buff) => {
                if (err) console.error(err);
                res.set('Content-Type', 'image/png');
                res.send(buff);
            });
        });
    }, 1000)
});
lyric mountain
#

PUT THE INTERVAL IN THE SITE

#

not in the api

hushed robin
#

???

#

no

#

there is no site

#

this is it

hushed robin
lyric mountain
quartz kindle
#

you cant res.send multiple times lmao

lyric mountain
#

can u give any context at all?

hushed robin
#

bruh

#

so how do i update it?

lyric mountain
#

you don't

hushed robin
#

...

quartz kindle
#

its a server, the server answers to people's requests

lyric mountain
#

the requester is who decides if they want to update or not

quartz kindle
#

once a request has been answered its gone

lyric mountain
#

you have no control over it

quartz kindle
#

a new request has to be made

hushed robin
#

so how can i achieve what i want

lyric mountain
#

you cant

quartz kindle
#

which is?

hushed robin
#

update image

quartz kindle
#

update image where

hushed robin
#

here

hushed robin
#

i want it to update like every 60 seconds

quartz kindle
#

make your page request the image multiple times

hushed robin
#

how

pale vessel
#

setInterval

quartz kindle
#

or reload page

lyric mountain
#

worth to note that reloading will not work for embedding that image in other places

#

only if someone opens the url on the browser

hushed robin
#

so how do i do this

quartz kindle
#

look

#

where do you want to use that image?

#

what app/software/program are you gonna use

#

to VIEW the image

hushed robin
lyric mountain
#

finally a context

quartz kindle
#

well, whatever that open broadcast software is, its there that you need to re-request the image every x time

lyric mountain
#

you don't need that, obs supports scripts

hushed robin
#

you don't know obs?

lyric mountain
#

you don't need an api at all

hushed robin
lyric mountain
#

inb4, it's either python or lua

quartz kindle
#

i know obs as "obs", not by its full name lmao

hushed robin
#

no

#

i'm not programming in python or lua

lyric mountain
#

simply make a script to fetch the number, then style it with built-in obs styler

hushed robin
#

no

quartz kindle
#

lol

lyric mountain
#

so unless u make a site that displays the number not as an image, you can't

hushed robin
#

how do other places do it then\

lyric mountain
#

see my message above

#

and for that, you'll need react or svelte or next.js or jquery or whatever

pale vessel
#

you can also just have an HTML file as an overlay that updates the image constantly

lyric mountain
#

also note that each html source is a new browser window on obs

lyric mountain
#

and each will affect your stream performance

#

I know because I used to stream in the past

hushed robin
#

i don't do websites

lyric mountain
#

then you dont get what u want

#

plain and simple

hushed robin
#

😐

#

i will figure it out

lyric mountain
#

either make a website to display the count or make a python/lua script

#

no other way around

quartz kindle
#

make your api return a video stream

#

and load it as a video

#

:^)

lyric mountain
#

lmao

quartz kindle
#

then you can change your damn images

lyric mountain
#

I used to have like 3-4 web sources on my stream, until I noticed how it fucks your transmission

#

because each source takes a slice of cpu time

quartz kindle
#

there has to be a video codec out there thats stupid efficient at not re-sending the same pixels

#

so the transmission rate should effectivelly be 0bps outside of heartbeats

#

until the image actually changes

hushed robin
#

i will find it

lyric mountain
#

you'll not, I guarantee

hushed robin
#

you underestimate my smartness

lyric mountain
#

I don't even think you have smartness, can't underestimate a void

hushed robin
#

i'm just going to work on a new project

#

this one will be for later

lyric mountain
#

gave up already eh

hushed robin
#

no later

#

does anyone have project ideas for me?

lyric mountain
#

ah yeah, Later

hushed robin
quartz kindle
hushed robin
#

it's too complex

#

wtf happened to github

frosty gale
#

but i think it would make things complex

#

in addition youd also have to send the location the changed pixels are supposed to be in since youre not sending the whole canvas

#

maybe that trade off just isnt worth it

hushed robin
frosty gale
#

best bet is lossless compression rn lol i think

wheat mesa
hushed robin
#

i'm a beginner

wheat mesa
#

But I thought you knew everything

frosty gale
#

wtfs even in it to be 1.4k lines

#

oh it also handles all events

quartz kindle
wheat mesa
#

You gotta pick one, either β€œI’m a beginner” or β€œI know everything”, can’t pretend you know everything then hide behind the β€œbeginner” idea every time you’re wrong

quartz kindle
#

and make it play at 0.2 fps

lyric mountain
#

funny enough, a py script for that is as easy as it gets

lyric mountain
#

I used to have one for displaying spotify song name

#

and automatically skipping ads ofc

neon leaf
#

Tim, is it possible to infer types from a parameter decorator?

quartz kindle
quartz kindle
neon leaf
#

hm

frosty gale
#

js needs decorators

#

literally most useful feature

quartz kindle
#

pls no

hushed robin
neon leaf
quartz kindle
frosty gale
#

imagine setting the required data from a request body with something like @required({ a: int, b: string })

hushed robin
quartz kindle
#

because its not good

frosty gale
#

does c++ have decorators

hushed robin
quartz kindle
#

also gonna make it support fetch

#

and deno+bun

neon leaf
#

I mean I am doing something similar, it works but the number param isnt inferred, would be useful If I can get that to work

lyric mountain
wheat mesa
#

Not necessarily decorators

lyric mountain
#

which is Aspect Oriented Programming

neon leaf
#

I already have the logic down

lyric mountain
#

but then wdym with "isn't inferred"?

neon leaf
#

number is any

#

for the editor

lyric mountain
#

well, it'll not work ofc

#

annotations are meaningless by themselves

#

they depend on something else to use them for something

#

for that reason, they only work during runtime, unless you make a plugin for your editor to pre-process them

neon leaf
#

you never know with ts 🀷

lyric mountain
#

nah, the concept is the same

#

annotations/attributes/decorators whatever are just "landmarks" for reflection

#

they contain metadata that can be used, but they do nothing on their own

neon leaf
#

are you sure you are on the same page as me?

lyric mountain
#

likely, ur trying to make this infer that number is a number right?

neon leaf
#

yes

lyric mountain
#

then yeah, wont work at code time

#

annotations do nothing without something else to process

#

they just say "hey, this class/method/param is marked by me, do you need it?"

hushed robin
lyric mountain
#

this is an example that I use on my DAO class

#

both annotations (@NotNull and @Language) hint to the IDE what data is expected to those params

#

they only work because the IDE is actively looking for places annotated by them

#

when I try using it, a highlighting will appear telling me it cant be null

quartz kindle
#

so its required to make it work on all engines

lyric mountain
#

so to sum it up, if you want your annotations to infer types, you'll need to write a plugin for whatever editor u use

quartz kindle
#

node/bun/deno/browser

hushed robin
#

what is bun and deno

quartz kindle
#

other js runtimes

#

like node

slender wagon
#

hi guys i am back

lyric mountain
#

wanna talk about the elephant in the room?

frosty gale
#

isnt bun dead

slender wagon
slender wagon
#

and here i am one lunch and a cigar later

quartz kindle
#

meanwhile Graves still cant have a cigar

frosty gale
#

you all doubted him but hes giving it a shot

hushed robin
frosty gale
#

looks to be on the right track so far

hushed robin
#

this is different

#

it's much simplier then making a client to connect to the gateway

#

🧌

quartz kindle
slender wagon
quartz kindle
slender wagon
#

HAHAHA

#

stupidd

#

i never like when such changes happen

#

but i bet they had a bunch of Karens on them

quartz kindle
#

yeah the whole company is filled with them

#

they had a massive class action lawsuit

#

hundreds of women accused the company of toxic gaming culture

frosty gale
#

its true though a cigar is not inclusive

#

absolutely disgusting

#

how are you even defending this Timothy?

quartz kindle
#

lmao

hushed robin
#

🫠

lyric mountain
#

almost, but kinda

hushed robin
#

is it ok to use v6 of the discord api

#

cus it still works i'm seeing

lyric mountain
#

it's the next to die

quartz kindle
#

they probably did go through a massive review for inclusivity and what not

lyric mountain
#

and then there's kled

quartz kindle
#

apparently there are companies that are specialized in that, and you hire them to go through your entire company and point out everything they find wrong

proven lantern
#

after dark and darker is released all other companies can stop making games

hushed robin
#

guys in jsdocs can u mark something as optional?

lyric mountain
#

write it out

hushed robin
#

why

#

thats so much effort

lyric mountain
#

...jsdocs are literally just documentation

#

@param blablabla This parameter is optional

proven lantern
#

square brackets

#

last two params are optional;

#

equal sign for defaults

quartz kindle
#

also, jsdoc will automatically mark it as optional if you set default values for your parameters

quartz kindle
#

at least it does on my vsc

proven lantern
#

that's fancy

quartz kindle
hushed robin
#

nooby

#

i don't like github why is it so difficult to use

quartz kindle
#

just use github desktop

hushed robin
#

how do i remove folder from repository

lyric mountain
#

or vsc git menu

lyric mountain
hushed robin
#

no

#

like

#

i made repository

#

then i deleted

#

now i try to make again

#

and it says it already is a git repository

proven lantern
#

git clone?

lyric mountain
#

did u really delete the repo or just disable?

hushed robin
#

delete

lyric mountain
#

try acessing the url

hushed robin
#

why

lyric mountain
#

to see if u can

hushed robin
#

it's deleted

#

i went to page

#

clicked delete

#

typed in the name

#

then it deleted

lyric mountain
#

go to the url

hushed robin
#

idk the url

lyric mountain
#

https://github.com/yourname/repository

#

also I think github keeps it for some time before actually deleting

hushed robin
lyric mountain
#

in case u want to restore it

hushed robin
#

how fix

#

😠

proven lantern
#

hub

#

is the repo private?

lyric mountain
hushed robin
#

i deleted it

hushed robin
proven lantern
#

what are you trying to accomplish?

lyric mountain
#

it doesn't mean the repository exists, it means the folder you're trying to delete holds git data

#

git != github

hushed robin
#

so how do i

#

abloish that data

quartz kindle
# hushed robin

that means that whatever folder you tried to create a repository in, already has a hidden .git folder (thats how github tracks your local repositories)

lyric mountain
#

open the folder, delete folder

quartz kindle
#

you have to remove that

lyric mountain
#

throught windows

hushed robin
lyric mountain
#

.git

#

it's in the root of your project

hushed robin
#

that ain't there

proven lantern
#

might be a hidden folder

quartz kindle
#

its hidden by default, so maybe they cant see it

#

delete the parent folder

#

:^)

hushed robin
#

wym

lyric mountain
#

enable hidden files and delete it

hushed robin
#

im not deleting my code

proven lantern
hushed robin
#

omg

#

i see it

lyric mountain
#

do note

quartz kindle
hushed robin
#

ok i deleted

quartz kindle
#

xD

lyric mountain
#

you'll lose your entire git history for that repo

hushed robin
#

i made that repo a moment ago

#

i just accidently leaked something so i had to dleete

lyric mountain
#

why did u delete then?

proven lantern
hushed robin
#

this is why

lyric mountain
proven lantern
#

Command + Shift + Period for mac

hushed robin
#

no

#

it was public

lyric mountain
#

...was it a token?

hushed robin
#

no

grim aspen
#

it was system 32

#

i bet

lyric mountain
#

cuz like, github is infested with bots, depending on what u leaked it was already grabbed

proven lantern
#

remember when people used limewire and they would share their entire harddrive? i would download people's AIM friends lists pretend like i knew everyone. they were so confused

lyric mountain
hushed robin
#

there

lyric mountain
#

if it was just people lurking they'd not find your repo at all

hushed robin
#

my code is now posted on github\

#

without leaks

slender wagon
#

everything large is infested with bots

#

like discord

#

like bad bots yk

grim aspen
#

whatever you leaked

hushed robin
#

it did

lyric mountain
#

regenning it is the only way to be sure

hushed robin
#

i deleted the repository and remade

proven lantern
#

who can validate my elo logic?

lyric mountain
#

can try

hushed robin
proven lantern
lyric mountain
# hushed robin no

fk then, until you find out deleting a repo doesn't erase its existence from the internet

lyric mountain
grim aspen
#

BRO

hushed robin
#

github can't hold me data without permission

grim aspen
#

that's lacking some sense of knowing the internet

proven lantern
#

here's the input to the one i'm confused about. for 1v1v1v1... matches

lyric mountain
grim aspen
#

if you deleted something from the internet that doesn't mean it's truly deleted

lyric mountain
#

anyone could literally download your repository the moment it was created

#

plus services like wayback machine exist

proven lantern
#

what should the new Elos be?

lyric mountain
#

tho wayback only stores meaningful sites, but someone else could have their own version of it for storing only github pages

proven lantern
#
    {
      newPlayerRatings: [
        {
          id: '123',
          distinctPlayerElo: 1248,
          overallPlayerElo: 1248,
          combinedPlayerElo: 1248
        },
        {
          id: '321',
          distinctPlayerElo: 1216,
          overallPlayerElo: 1216,
          combinedPlayerElo: 1216
        },
        {
          id: '456',
          distinctPlayerElo: 1184,
          overallPlayerElo: 1184,
          combinedPlayerElo: 1184
        },
        {
          id: '654',
          distinctPlayerElo: 1152,
          overallPlayerElo: 1152,
          combinedPlayerElo: 1152
        }
      ]
    }
hushed robin
#

thats illega

proven lantern
grim aspen
#

it's not illegal if it's following the data collection law

lyric mountain
quartz kindle
#

battleless finding out that people actually do illegal things everyday

#

especially online

lyric mountain
#

idk what I should look at tbh

proven lantern
#

if the new elo ratings look correct

#

or off

grim aspen
proven lantern
#

the k-factor is 32

queen needle
proven lantern
#

here's the chage for a 1v1

    {
      newPlayerRatings: [
        {
          id: '123',
          distinctPlayerElo: 1216,
          overallPlayerElo: 1216,
          combinedPlayerElo: 1216
        },
        {
          id: '456',
          distinctPlayerElo: 1184,
          overallPlayerElo: 1184,
          combinedPlayerElo: 1184
        }
      ]
    }
hushed robin
hushed robin
#

they wouldn't do that

lyric mountain
#

ik sayuri's site is stored there

grim aspen
#

bro they aren't google

lyric mountain
hushed robin
lyric mountain
#

slowly

wheat mesa
hushed robin
#

i j walked

grim aspen
#

listen i don't think you're getting point

lyric mountain
#

I'm not talking about github, I'm talking about the rest of the internet

#

anyone can download public repos

grim aspen
quartz kindle
frosty gale
#

openai using your hard made code to train their proprietary cash cow large language models

#

free of charge

grim aspen
hushed robin
proven lantern
quartz kindle
hushed robin
#

so i think i'm ok

hushed robin
proven lantern
grim aspen
#

ok so i'm simplifying

#

so like in new york they have a crosswalk right?

lyric mountain
#

like, instantly

grim aspen
#

well jaywalking you don't use the crosswalk but you cross somewhere else instead of using the crosswalk

quartz kindle
#

so basically crossing the road outside of crosswalks, during red light, in between traffic jam, etc?

lyric mountain
#

not for discord tokens tho, as github checks before the push happens

proven lantern
proven lantern
lyric mountain
#

bots

wheat mesa
#

Scraping

hushed robin
#

can i sue them

proven lantern
wheat mesa
#

You can sue anyone for anything

lyric mountain
#

I mean, you can, if you find who is

wheat mesa
#

Doesn’t mean you’ll win

hushed robin
#

ill just ask github who they are

lyric mountain
#

they dont know

#

they cant know

grim aspen
#

battleless logic

proven lantern
#

they are owned by microsoft

lyric mountain
#

and if they knew, they wouldn't tell u

#

because that's privacy breach

proven lantern
#

microsoft gets government military contracts

lyric mountain
#

also keeping a copy of a public repository is not illegal

hushed robin
wheat mesa
#

Not without a subpoena

#

Most companies do not voluntarily give user data to individuals without a subpoena

#

Since giving away user data like that would violate their privacy policies most likely

hushed robin
#

so i'll one of them

#

simple

spark flint
wheat mesa
queen needle
#

The case of the century

hushed robin
#

nah

#

this is a civil conversation

grim aspen
#

that would be something

hushed robin
#

im a good guy know?

lyric mountain
#

you'd break anubis' scale with how good you are

night veldt
#

Init

hushed robin
#

whats your guys favorite song

quartz kindle
#

whats the most illegal thing you ever did?

hushed robin
#

I want a good future

quartz kindle
#

you already said you did jaywalking

hushed robin
#

well

quartz kindle
#

so too late

grim aspen
#

lmao

hushed robin
#

that's not a bad illegal

wheat mesa
#

He’s probably violated some user data laws somehow

hushed robin
#

huh?

wheat mesa
#

Almost everyone has jaywalked before ngl

grim aspen
#

tfw battleless admitted to crimes

wheat mesa
#

Usually not a big deal unless it actually affected cars

proven lantern
quartz kindle
#

everyone in the world has done something illegal at least once in their lives

hushed robin
#

guys what about my orginal question?\

quartz kindle
#

who cares

#

lmao

wheat mesa
#

based tim

grim aspen
#

i saw that dot

hushed robin
#

wha

quartz kindle
#

dot posts are auto-deleted by topggbot

hushed robin
#

u guys r mean

quartz kindle
#

you make it so easy

#

:^)

grim aspen
#

pretty explainable

hushed robin
#

I'm kind to u guys always

lyric mountain
quartz kindle
#

you're not kind to our neurons

hushed robin
#

anyways

#

I have to go now

hushed robin
#

have a good afternoon everyone

quartz kindle
#

lmao, have a good one

#

c ya later

proven lantern
#

it's not afternoon yet

hushed robin
#

it's 2pm

grim aspen
#

timezones

proven lantern
#

can i have a good time now too?

quartz kindle
#

its 9pm

proven lantern
quartz kindle
proven lantern
quartz kindle
#

timzones

wheat mesa
#

1:58pm actually

grim aspen
#

oh that's right timezones don't exist

#

we're all on different times

proven lantern
grim aspen
#

ok aztec

proven lantern
#

i updated my unit tests so that it expects what the functions was already doing instead of changing the function.

#

now they all pass!

lyric mountain
#

btw, that's for a discord game right?

proven lantern
lyric mountain
#

ah ok

#

was going to warn about potential cheesing

slender wagon
#

YOOOOO I GOT IT WORKING

#

idk why the fuck the elephant is yellow btw

proven lantern
slender wagon
#

@proven lantern thoughts on the elephant being yellow

proven lantern
slender wagon
#

IKR!

proven lantern
#

must be pink

slender wagon
#

yes

proven lantern
#

make it a gif pls

#

or web3

#

i mean webm

slender wagon
#

sure

#

crazyyy isn't it

frosty gale
slender wagon
#

one small elephant for the elephant two small steps for me

slender wagon
proven lantern
slender wagon
#

no

#

giv again

proven lantern
slender wagon
#

lmfaoo yes

#

the elephant has to be pink

#

all i gotta do now is figure out the color issue

#

and get the artist to remake their gif into an APNG

proven lantern
#

what song are you going to animate it to? yakety sax might be a good one

slender wagon
#

yes might do that

#

@quartz kindle i got rid of the getImageData and did what u said:

  const buffer = canvas.toBuffer("raw");
    const uint8Array = new Uint8Array(buffer);
    const arrayBuffer = uint8Array.buffer;
    
    frames.push(arrayBuffer);
#

had to figure out what types the encoder accepted

lyric mountain
slender wagon
lyric mountain
#

did u convert to gif?

#

cuz it was posted here as a gif

proven lantern
slender wagon
#

also my friend contacted me for a rich presence someone set up for him and he wants to turn that off, it's running on one of his servers but he can't find it

#

is there a way he could turn it off from his discord by resetting something?

quartz kindle
slender wagon
#

gotchya

quartz kindle
#

from what i hear its pretty fast

#

much faster than top.gg verification

frosty gale
#

why does js have so many buffer/static arrays

#

its so annoying

#

altenrating between arraybuffers and uint8arrays

quartz kindle
proven lantern
#

why are integers still used?

#

fail

#

DEC64

quartz kindle
#

why not

frosty gale
#

ngl im more of a uint8array type of girl than an arraybuffer one

proven lantern
#

overflow isn't handled correctly

slender wagon
#

frames.push(buffer.buffer);

working very well

#

thanks tim

frosty gale
#

when you see a junior js developer using normal arrays to store large buffers and files instead of statically typed arrays (i cant interfere its a canon event)

quartz kindle
lyric mountain
#

me when byte[]

proven lantern
#

It can provide very fast performance on integer values, eliminating the performance justification for a separate int type and avoiding the terrible errors than can result from int truncation.
https://www.crockford.com/dec64.html

#

eliminating the performance justification for a separate int type

hushed robin
#

can vary

#

my first verified bot took 30 minutes

slender wagon
#

why elephant yellow

hushed robin
#

and my second verified bot took 2 weeks

#

yea I was surprised too

#

If they don’t escalate your application it shouldn’t take that long

lyric mountain
slender wagon
lyric mountain
#

yellow is the anti of light blue

slender wagon
#

but hey i am hapy

lyric mountain
#

why not take it a step further, make the channels random lmao

#

you either get a blue elephant, a yellow elephant or a pink elephant

proven lantern
#

tween between colors

#

it would be so annoying to write code like this

#

yes

#

i used Uint8Array once when i was base64 encoding/decoding images

slender wagon
#

i think i'll get creative and make a discord bot that no one will use with this

lyric mountain
#

it's usual for bot devs to never get deeper than arrays

#

as the processing is mostly abstracted

#

you need to willingly push yourself deeper to have the need to use lower data structures

#

for example bitfields

proven lantern
#

you should use a programming language like rust or c++ if you want to do system level stuff

lyric mountain
#

don't mean system-level deep

quartz kindle
#

you only need it if you actually work with binary data

proven lantern
#

programming languages have a lot of baggage

quartz kindle
#

if you're using nodejs you probably have used Buffer at some point

#

which is (mostly) the same as uint8array

proven lantern
#

you can ignore like 90% of features that languages have

#

you'll write better code by avoiding the bad partsβ„’

slender wagon
#

why is apng so not supported i'll make a video of it

proven lantern
#

JS has null and undefined, but you'll write better code if you never use null and only use undefined

slender wagon
#

telling the developers how amazing it is

lyric mountain
quartz kindle
#

yeah, you only use them when you need them, if you dont need dont use

slender wagon
#

man not supporting transparent background automatically makes the extension a shit one

lyric mountain
#

apng deserves to take the throne of the false king that's gif

quartz kindle
#

because null is normal in most languages

#

undefined is not

proven lantern
quartz kindle
#

json uses null

#

it doesnt use undefined

proven lantern
#

oh yeah

#

js returns undefined for an undefined var

#

so you need it

#

typeof x === 'undefined'

lyric mountain
#
function behavior() {
  return undefined
}
#

this function is undefined behavior

quartz kindle
#

:^)

proven lantern
#

you can get away with never using null

frosty gale
lyric mountain
quartz kindle
#

but i use null quite a lot

#

i find it nicer to inisitalize variables as null rather than as undefined

proven lantern
quartz kindle
proven lantern
#

JSON.stringify will remove undefined like you would want, but it erroneously keeps null values

quartz kindle
#

but yeah its mostly a matter of semantics

lyric mountain
#

I mean, null is a valid value in json

earnest phoenix
#

null is to denote an empty value where a value could be present, undefined is to denote something that is just void

#

That's how they were designed in mind in JavaScript

proven lantern
#

any plans to remove null?

earnest phoenix
#

There's absolutely no reason to remove null

quartz kindle
#

like if you're working with schemas and well defined structures, you're not gonna want to add/remove fields randomly, that will break your schemas

proven lantern
#

undefined is used in the language

quartz kindle
#

instead you replace them with null

proven lantern
#

null is extra

earnest phoenix
lyric mountain
#

null has a meaning that undefined cant have

#

null means there is a place for a value, but it's empty

proven lantern
#

i never use null and have no problems

quartz kindle
#

null does have uses

#

although not many

proven lantern
#

null is a code smell for me

lyric mountain
#

null means there's a spot for a value, undefined means the abscence of a spot whatsoever

earnest phoenix
frosty gale
#

pointers need to be added to js change my mind

quartz kindle
#

lmao

#

but yeah it makes sense somehow

#

theres gonna be a v15?

#

let me guess, more breaking changes for no reason?

lyric mountain
earnest phoenix
#

We wanted to change it's type to null just like how undefined has it's own type, but since this type decision was made by the creator of JavaScript where it was made in 10 days... and it broke way too many websites when we tried to removed it

quartz kindle
#

exdee

#

thats the problem with big things, once they get big, you cant change them anymore

#

and soemtimes things get too big too fast

#

and then its too late

frosty gale
#

bro made the whole language in 10 days while it takes yall to 5 years for a single proposed change to be added πŸ’€

earnest phoenix
#

Yeah, if you want to change something like that in something incredibly big you have to go through tons of bikeshedding

slender wagon
lyric mountain
#

bikeshedding

quartz kindle
#

never heard that word either lmao

earnest phoenix
frosty gale
#

i know that was a joke:) it sounds funny

lyric mountain
#

tf it's actually a thing

frosty gale
#

i know theres a lot of consideration that goes into not breaking every browser and website

quartz kindle
lyric mountain
#

shedding bikes all the day

quartz kindle
#

im not procrastinating anymore! im bikeshedding!

frosty gale
#

although honestly i think proposed changes take too long even very good ones

#

they take so long the original proposers get discouraged and abandon it

#

maybe thats the point

quartz kindle
#

hoestly tho, some proposed changes are just bad

#

yes its normal

lyric mountain
#

u can also make a lua bot

quartz kindle
#

use whatever you feel better about for any given job

frosty gale
#

show discord.php some love

lyric mountain
#

idk, I don't use lua

#

only for scripting my mouse

#

also u could try to make mods for starbound

#

can be a fun project if u like lua

#

the game itself no, but the modding api is in lua

#

like, the game (as in, the core game) is made in cpp iirc

#

but they included a framework for integrating lua into it dynamically

earnest phoenix
frosty gale
#

yeah but years?

proven lantern
lyric mountain
#

most games use it as a modding language

#

lua was made as an embedded language

proven lantern
#

browsers could ship with 2 engines for the 2 javascript versions

lyric mountain
#

not really, but because it's very flexible

#

u can setup a safe environment where the mods are sandboxed from the core

#

and choose exactly what u want to allow modders to use

earnest phoenix
# frosty gale yeah but years?

Generally it doesn't take years for proposals to be accepted, the longest it has taken for a proposal to be accepted has been a year, because good design is not easy to achieve, while also ensuring full stability and good implementations across multiple JavaScript engines

frosty gale
#

thats more reasonable i just thought it took way longer for some reason

#

maybe because some were abandoned for years instead

lyric mountain
#

but if u love oop so much u could try java

#

which is a lang made entirely around oop

earnest phoenix
#

The most important implementations are the ones on V8 and SpiderMonkey

frosty gale
#

i cant interfere its a canon event

lyric mountain
#

anywhere really

#

even websites, although your experience will be...poor

lyric mountain
#

java is too strict for websites

frosty gale
#

when firefox names their js engine after ben 10

proven lantern
earnest phoenix
frosty gale
#

using java

lyric mountain
proven lantern
lyric mountain
#

wdym?

frosty gale
#

only product that uses smalltalk on earth is scratch

lyric mountain
#

java is entirely oop

#

lmao

earnest phoenix
queen needle
#

I say we just delete JavaScript and start over

quartz kindle
#

so im playing around with geocoding apis and find it funny to see many "professional" apis with lots of paid plans being simply clones of openstreetmap

#

lmao

frosty gale
#

if the maintainers of discord.js also maintainted the js standard the web would be over as we know it

#

it would be like macos where older programs cant run every update

earnest phoenix
lyric mountain
queen needle
frosty gale
#

the .cache thing broke every discord bot

quartz kindle
#

.cache.cache.cache.cache.cache

earnest phoenix
quartz kindle
#

every cache should have its own cache

#

for performance

lyric mountain
frosty gale
proven lantern
lyric mountain
#

isn't bdfd made over djs?

quartz kindle
#

ye

#

going full circle

frosty gale
#

lmao

lyric mountain
#

discombobulate

earnest phoenix
lyric mountain
#

cuz coding hard

#

proceeds to write shakespeare in bdfd

proven lantern
#

it all started when i was programming his dog feeder before a long vacation

earnest phoenix
#

πŸ’€hd_skull skull anotherskull

quartz kindle
#

null created Ben Wick

earnest phoenix
#

Nothing we're just communicating funny programming jokes with telekinesis

frosty gale
#

wait discord.js started using bigints internally instead of strings for ids?

earnest phoenix
#

Nope

sick agate
#

good old discord.js

frosty gale