#development

1 messages · Page 141 of 1

hushed robin
#

wait

wheat mesa
#

You can get sunburnt in the winter

lyric mountain
#

so even with an umbrella u can get burn

hushed robin
#

why dont pools put a cover ontop of the pool then

lyric mountain
#

oxygen, people like breathing

wheat mesa
#

Because people like the sun

hushed robin
#

...

sage bobcat
#

One message removed from a suspended account.

wheat mesa
#

There are such things as indoor pools you know

hushed robin
#

it won't stop u from breathing

#

like

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

up high

#

so it blocks the sun

wheat mesa
#

It gets very stuffy in indoor pools

sage bobcat
#

One message removed from a suspended account.

wheat mesa
#

Plus it’s expensive

#

Your average neighborhood pool isn’t going to have the budget to make an entire enclosure for a pool

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

whys it expensive

earnest phoenix
#

It absolutely does, you do great back-end! mmLol

hushed robin
#

theres a place near my house with an indoor pool

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

u have to pay ofc bbut it's like like $25 for a month pass

#

so not very expensive

earnest phoenix
#

Vulkan is like 15x harder than OpenGL KEKW

lyric mountain
#

also indoor pools have that chlorine smell

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

hushed robin
wheat mesa
#

But it’s a lot better for advanced 3D renderers

earnest phoenix
#

Yeah

wheat mesa
#

I gotta learn this stuff

sage bobcat
wheat mesa
#

Once I learn linear algebra in college I’ll be a lot more inclined to do 3D stuff

hushed robin
lyric mountain
wheat mesa
#

I’m doing it in my first semester of uni so hopefully I’ll get it down quickly

civic scroll
hushed robin
#

i should buy a little kitty pool to swim in

sage bobcat
#

One message removed from a suspended account.

lyric mountain
#

how do u know it's florida:

hushed robin
#

what is miami-dade country

wheat mesa
#

A big area

#

A very big area

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

oh

sage bobcat
hushed robin
#

thats why i gussed

wheat mesa
#

My county has roughly a million people in it

#

Which honestly is more than I expected

hushed robin
#

how illegal would it be to theoretically scam doordash

wheat mesa
#

Theft I would assume?

hushed robin
#

hm

wheat mesa
#

Also that’s just fucked up, the people who work for doordash need tips

hushed robin
#

woah i don't scam

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

in theory

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

i was wondering bc i see it on tiktok

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wheat mesa
#

Like people saying they never got their food?

hushed robin
#

idk people are mean

sage bobcat
#

One message removed from a suspended account.

hushed robin
sage bobcat
#

One message removed from a suspended account.

wheat mesa
#

Cus that ultimately hurts the driver

hushed robin
#

and got my food and money back

wheat mesa
#

Not the company

#

The driver gets in trouble when you do that

hushed robin
#

but i actually didn't get my food

#

so i didn't scam

wheat mesa
#

Well that’s okay then

#

But if you do that intentionally then that’s fucked up

hushed robin
#

what happens to the driver

#

do they get charged for it?

wheat mesa
#

They get a contract violation

hushed robin
#

is it like 3 strikes

#

n u gone

wheat mesa
#

Enough of those and they can get terminated

#

Similar to that idea yes

hushed robin
#

damn

wheat mesa
#

Not sure of the particular number

hushed robin
#

i would never scam anyone

#

has anyone played breakpoint

#

i wonder if it's good

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

i play sometimes

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

hushed robin
#

bro it’s a joke

#

🗿

#

ofc i play games

#

but i don’t often tbf

#

because everything is boring nowadays

prisma nebula
#

BRUH STILL NOT WORKING

#

😫

hushed robin
prisma nebula
#

Their is 0 error showing

#

And they are linked to each others

earnest phoenix
sage bobcat
hushed robin
civic scroll
#

i plan to use sth like iced in conjuction with wgpu

proven lantern
#

copilot is pretty nice sometimes. i hope this works

earnest phoenix
hushed robin
sage bobcat
#

One message removed from a suspended account.

hushed robin
#

you must be gullible

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

civic scroll
#

what if as an easter egg, i make the kernel panic screen look like a horror being

sage bobcat
hushed robin
civic scroll
#

the easter egg will be disabled by default

#

unless your machine crashes in halloween

#

i have some inspiration i can take

#

from ddlc

#

a less spooky version is honkai impact

sage bobcat
quartz kindle
#

what do you think looks better for an api request parameters?

date: { // chose one
  timestamp?: number,
  jdut?: number,
  jdet?: number,
  utcdate?: { date: number[], apparent: boolean, julian: boolean },
  localdate?: { date: number[], apparent: boolean, julian: boolean }
}

or

date: {
  type: "timestamp" | "jdut" | "jdet" | "utcdate" | "localdate",
  value: "number" | { date: number[], apparent: boolean, julian: boolean }
}
sage bobcat
#

One message removed from a suspended account.

proven lantern
civic scroll
#

like calculating an inverse of a color

civic scroll
#

oh wait

hushed robin
#

i will give u a function

#

wait a moment

quartz kindle
#

like, those are all the possible values, the user will only send one of those

sage bobcat
#

One message removed from a suspended account.

civic scroll
#

then first will be doable

#

you will need a prioritise hiearchy though

quartz kindle
#

ye for example the user can send date: { timestamp: 123123 } or date: { utcdate: { ... } } for example

hushed robin
# proven lantern copilot is pretty nice sometimes. i hope this works
function getContrastingColor(backgroundColor) {
  // Convert the hexadecimal color to RGB
  const hexToRgb = (hex) => {
    const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
    const fullHex = hex.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b);
    const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(fullHex);
    return result
      ? {
          r: parseInt(result[1], 16),
          g: parseInt(result[2], 16),
          b: parseInt(result[3], 16)
        }
      : null;
  };

  // Calculate the contrast ratio
  const calculateContrastRatio = (rgb1, rgb2) => {
    const l1 = calculateRelativeLuminance(rgb1.r, rgb1.g, rgb1.b);
    const l2 = calculateRelativeLuminance(rgb2.r, rgb2.g, rgb2.b);
    return l1 > l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);
  };

  // Calculate the relative luminance
  const calculateRelativeLuminance = (r, g, b) => {
    const sRGB = (c) => {
      const v = c / 255;
      return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
    };
    return 0.2126 * sRGB(r) + 0.7152 * sRGB(g) + 0.0722 * sRGB(b);
  };

  // Determine the contrasting color
  const contrastWhite = calculateContrastRatio(hexToRgb(backgroundColor), {
    r: 255,
    g: 255,
    b: 255
  });
  const contrastBlack = calculateContrastRatio(hexToRgb(backgroundColor), {
    r: 0,
    g: 0,
    b: 0
  });

  return contrastWhite >= contrastBlack ? '#ffffff' : '#000000';
}
civic scroll
#

i see too many magic numbers

#

what is 0.03928

hushed robin
#

google

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

what

sage bobcat
#

One message removed from a suspended account.

hushed robin
#

i don't know myself

#

this is from chatgpt

#

lol

proven lantern
lyric mountain
hushed robin
lyric mountain
#

as luminance is based on human eye

hushed robin
#

ben try chatgpts function

#

copilot vs chatgpt

civic scroll
#

so you use chatgpt 💀

hushed robin
#

yeah

#

i didn't claim i wrote it

#

lol

civic scroll
#

💀

proven lantern
civic scroll
#

oh yeah haven't thought about that

proven lantern
#

i think i need to get r, g, and b and then move it as far away from the original number as possible

civic scroll
#

actually i would convert the color to HSL then take the bound that is the furthest from the color's lightness value

lyric mountain
#

hsl uses luminance too

#

it's the same calculus

civic scroll
#

yeah

lyric mountain
#

there's no need to calculate distance to white and to black

#

if dist to white is 30%, then to black it's 70%

proven lantern
#

hsl seems to do things.

hushed robin
#

will Math.PI
give me all the digits of pi

lyric mountain
#

no

hushed robin
#

bru

lyric mountain
#

but it'll give enough

civic scroll
hushed robin
#

how can i get them all

lyric mountain
#

you can't

hushed robin
#

fr?

lyric mountain
#

pi is an irrational number

hushed robin
#

wym

lyric mountain
#

it means it never ends

neon leaf
#

should I do my built-in openapi 3 documentation like this?

server.path('/', (path) => path
  .http('GET', '/wait', (http) => http
    .document((docs) => docs
      .queries((queries) => queries
        .key('duration', (key) => key
          .description('The Duration in Seconds for waiting')
          .required()
        )
      )
    )
    .onRequest(async(ctr) => {
      if (!ctr.queries.has('duration'))) return ctr.status((s) => s.BAD_REQUEST).print('Missing the Duration query...')

      await new Promise((r) => setTimeout(r, Number(ctr.queries.get('duration')) * 1000))
      return ctr.print(`waited ${ctr.queries.get('duration')} seconds`)
    })
  )
)```
lyric mountain
#

nor repeats patterns

hushed robin
#

oh

lyric mountain
civic scroll
#

use it in conjunction with color inversion if you want some color variety

proven lantern
#

ohh, that would be all i really need

hushed robin
proven lantern
#

it can be the same color with different lightness

lyric mountain
#

you don't say

civic scroll
#

use color inversion, then change the lightness value

lyric mountain
#

I meant why is it taking the biggest out of the three

civic scroll
#

you can also play around with saturation

hushed robin
#

idk

#

i'm not a math type of guy

civic scroll
#

in rust i think maximum was f128

lyric mountain
civic scroll
#

there is also f256 and above but that takes alot of storage and computing power at scale

proven lantern
civic scroll
#

oh, max is 64 bit float

lyric mountain
#

here's the formula for calculating it out of an integer field

hushed robin
#

whats the best way to queue requests

civic scroll
#

put them in a queue?

hushed robin
#

(and easiest)

civic scroll
#

provide a context

lyric mountain
#

if ur using an array it's simpler, but calculating colors with the rgb field is much faster

hushed robin
#

api requests

#

so i don't get ratelimited

proven lantern
civic scroll
lyric mountain
civic scroll
#

or keep something up to check for rate limits

lyric mountain
#

it's a percentage

hushed robin
#

hm

lyric mountain
#

for red, green and blue

proven lantern
hushed robin
#

is there an npm package that does that

proven lantern
#

colors are crazy

civic scroll
#

you can just code it

lyric mountain
#

wikipedia likely has biological info abt their eyes

earnest phoenix
lyric mountain
#

the difference about using lightness vs luma is that the former doesn't take into account the eye

hushed robin
civic scroll
#

yes

#

you can just delay

lyric mountain
#

also do note I have this line, but it's not required

hushed robin
#

sounds complex

lyric mountain
#

it's simply for multiplying the output with the alpha channel

#

since no matter how bright a color is, if it's invisible then it has no luminance

hushed robin
#

@civic scroll whhy

#

i need it to do a max of 3 requests / second and 60 requests / minute

#

r u sure there's no package that does this

quartz kindle
#

you dont solve ratelimits with queueing

#

thats just delaying the problem

proven lantern
quartz kindle
#

if the user is consistently exceeding the rate limit, they will fill up your queue and starve your resources the same way

hushed robin
#

then how can i resolve it

quartz kindle
#

ratelimits are handled by blocking requests until the time interval passes

#

the lower/earlier the blockage, the better

civic scroll
lyric mountain
#

despite infrared being colorless

civic scroll
#

depends on the service you are requesting to

hushed robin
quartz kindle
#

thats not a good idea

civic scroll
hushed robin
#

well

lyric mountain
#

green allows the eye (human) to perceive more details than any other color

quartz kindle
#

the user has to wait and retry if they hit a rate limit

civic scroll
#

delay the send

hushed robin
#

i want queue to prevent the ratelimit

quartz kindle
#

every single api out there does it like that

hushed robin
#

in general

civic scroll
quartz kindle
lyric mountain
hushed robin
quartz kindle
#

your question before suggested you wanted to implement rate limits in a server you own

hushed robin
#

it's a discord bot

civic scroll
#

so you are the client

quartz kindle
#

then its not your rate limit

#

you want to avoid hitting the discord rate limits

#

is that correct?

hushed robin
#

no

#

api ratelimit

quartz kindle
#

then what

hushed robin
#

not discord

#

api

#

different

quartz kindle
#

what api

hushed robin
#

api

#

why

quartz kindle
#

do you own this api?

hushed robin
#

no

quartz kindle
#

then you're the client

#

not the server

hushed robin
#

ok

quartz kindle
#

you're the one requesting, not serving requests

hushed robin
#

yea

civic scroll
#

so yeah, time to ration and send your requests periodically

quartz kindle
#

then yes, a queue will work

civic scroll
#

save some spaces for urgent requests as well, if you have contingency cases

lyric mountain
#

you'll need to read the docs to find out their ratelimits btw

hushed robin
hushed robin
#

3 requests / second

#

60 requests / minute

lyric mountain
#

you don't need a lib for that, just make a list and store tasks on it

#

then pop next, wait a second, pop next, wait, pop, wait, pop

#

track the ratelimit based on the 60/m instead of the 3/s

#

as that's the lower limit

hushed robin
#

what if someone requests 4 times in a second then

#

it will ratelimit

proven lantern
lyric mountain
#

you're only pop-executing once per sec

#

the queue will accumulate, but it doesn't matter

civic scroll
lyric mountain
#

you can make it more intricate by calculating the remaining requests for that minute, to have a faster throughput

civic scroll
#

you can send in bursts

lyric mountain
#

but the pop-execute with fixed interval is enough for now

civic scroll
#

or spread them out

#

yeah

hushed robin
#

so only 1 request per second

lyric mountain
#

60/m means 1 per second yeah

hushed robin
#

hm theres a lot of logic to this tho

lyric mountain
#

ffs you can't avoid doing logic

hushed robin
#

thats why i prefer a package

lyric mountain
#

try to make something on your own at least once

hushed robin
#

😐

lyric mountain
#

also, check if whatever api ur using is behind cloudflare

#

if it is, getting too many 4xx errors will get u banned for a while

hushed robin
#

how

lyric mountain
#

cloudflare bans ips with too many failed attempts

civic scroll
#

check for response's header

lyric mountain
#

that ban isn't permanent, but it's long

hushed robin
civic scroll
hushed robin
lyric mountain
#

those Cf headers

hushed robin
#

i dont see

lyric mountain
#

then it isn't using cloudflare

hushed robin
#

ok

#

w

#

so if i go over the ratelimit i won't get banned?

lyric mountain
#

not by cloudflare

#

doesn't mean they don't have their own ban logic

civic scroll
hushed robin
#

wait

#

i can host the api myself

#

to bypass ratelimits

neon leaf
#

?

lyric mountain
#

what exactly is the api for?

hushed robin
#

a website

#

since it doesnt have an api

lyric mountain
#

is it still about kick?

hushed robin
#

what

lyric mountain
#

*kick

hushed robin
#

oh no

#

i made my own package to use their api

#

kick has an api but it's private and cloudflare will block u if u try

#

this website doesn't have one at all

lyric mountain
#

anyway I don't see why exactly you'd use a third-party api to scrap

hushed robin
#

it's like an api for the website

#

because they don't have one

#

and they get the data by scraping the website

lyric mountain
#

are u sure whatever site ur trying to scrap doesn't have an api?

#

because, like, if it has dynamic data it has to be retrieving data from somewhere

lyric mountain
#

well, yes

hushed robin
#

here

#

i'll send the website

lyric mountain
#

ahhhhh it's mal

hushed robin
#

yea

lyric mountain
#

there's anilist

hushed robin
#

er

#

i don't understand graphql

civic scroll
#

could be a good time learning it

lyric mountain
#

it's easier than trying to scrap mal

hushed robin
#

i mean

#

i'm not the one scraping

lyric mountain
#

they even have a playground for testing their graphql

hushed robin
civic scroll
#

nice thing is with graphql you can request only what you want

lyric mountain
#

yep

hushed robin
#

do i need an api key for it

lyric mountain
#

yes ofc, just like every decent api

civic scroll
#

go on see their docs

hushed robin
#

bruh

#

i don't wanna do allat

civic scroll
#

like you said, google it up

hushed robin
#

and it doesn't need an api key

lyric mountain
#

1 req/s tho

hushed robin
#

no

#

3 reqs / s

#

60 reqs / m

lyric mountain
#

60 per min is literally 1 per sec

hushed robin
#

but

#

u can also do 3 / s

lyric mountain
#

the 3/s doesn't matter if ur worried about queueing

hushed robin
#

the jikan api is open source

#

maybe i can selfhost it

civic scroll
rustic nova
#

You're still hitting ratelimits

hushed robin
#

no

rustic nova
#

As jikan scrapes myanimelist

hushed robin
#

so

civic scroll
lyric mountain
#

they likely added the ratelimits because MAL is limiting them

rustic nova
#

So you're still getting ratelimited at some point

hushed robin
#

yeah because theres a fuck ton of people using the public jikan api

rustic nova
#

Ok

hushed robin
#

if i selfhost it'll only be me

rustic nova
#

Ok

lyric mountain
#

not exactly

civic scroll
lyric mountain
#

jikan likely caches the data they scrapped

hushed robin
#

they do

#

for 24 hrs

lyric mountain
#

1m people doesn't mean 1m scraps

rustic nova
#

I should selfhost discord ngl so I can get my bot ratelimited and not care ngl

civic scroll
#

the same database that MAL uses

rustic nova
#

The public jikan API also Caches requests

hushed robin
#

why does such a popular website not have an api

lyric mountain
#

so yeah, many people requesting but only a few scraps

hushed robin
#

makes no sense

rustic nova
#

Ok

civic scroll
#

but there is anilist

#

like kuu said

hushed robin
#

true

lyric mountain
#

graphql ain't even hard

hushed robin
#

but anilist has horrible docs

lyric mountain
#

horrible? u kidding

hushed robin
#

yea

#

i also don't want to create an account to request an api key

lyric mountain
#

why fear it? malicious intents?

civic scroll
#

@rustic nova can i ask design-related questions here?

hushed robin
rustic nova
#

Sure

civic scroll
#

oh thanks

#

i mean it's development though mmLol

rustic nova
#

Design development

lyric mountain
#

which could cause a token revoke

civic scroll
hushed robin
#

i don't get graphql

#

what is the point of it?

rustic nova
rustic nova
lyric mountain
hushed robin
#

why is anilist trying to be unique

civic scroll
rustic nova
#

Ok

lyric mountain
#

they aren't, graphql is fairly standard in huge datasets

civic scroll
#

again, bandwidth is valuable

#

and every kilobyte saved is worth it

lyric mountain
#

btw sayu, what do u think of my card decoration designs?

hushed robin
#

i don't understand the docs

lyric mountain
#

did it for my card quality system, wanted ur input on it

lyric mountain
quartz kindle
#

graphql is weird af tho

#

the syntax

#

i just implement its principles in json

#

dont feel like going full graphql syntax

lyric mountain
#

the syntax is basically reverse json

civic scroll
hushed robin
#

send help

civic scroll
frosty gale
#

battleless is the GOAT

hushed robin
#

fr?

hushed robin
rustic nova
#

Yes

hushed robin
#

"Yes"

lyric mountain
hushed robin
#

red on purple

civic scroll
#

sorta?

#

the colors are clashing though

#

both the subject and the stars are garnering for attention

lyric mountain
#

I mean, yeah, there's one color for each rarity

civic scroll
#

the design is fine but you may need to change to color

lyric mountain
#

of what?

#

the border isn't fixed btw, it's based on the card's rarity

civic scroll
#

make the badge based on the border's color instead

#

for the stars...

#

why do i feel like 4-edged stars would fit more

lyric mountain
#

I think that's possible, as I'm able to snapshot the image's palette to get the main color

#

then I can simply hue rotate it

civic scroll
lyric mountain
#

I'll make a version with 4-point to see how it ends up later

civic scroll
lyric mountain
#

hm?

proven lantern
#

i didn't do it right

#

oh, that just finds what it currently is

lyric mountain
#

yep, then u compare against eachother to see which is the most distant

#

or just consider if luma > 0.5 then it has more contrast with black

proven lantern
#

oh, and just use black or white as the background

#

ezpz

hushed robin
proven lantern
#

#f1c40f this gold color is getting a white bg

#

i think the comparison is backwards

prisma nebula
#

I camt install pip install discord-py-slash-command
On replit

#

Why

#

Or how to solve

#

It says it is not read

#

I used shell

hushed robin
prisma nebula
#

That ducks

#

Need tk create tons of files

#

And idh time

#

1 day left

hushed robin
#

u don't need to

#

it'll be the same thing with python

lyric mountain
hushed robin
#

why are you switching up languages, have u even used python before?

prisma nebula
#

Need to what everyone saying diff things

hushed robin
#

what

proven lantern
lyric mountain
#

First one is gold?

prisma nebula
#
pip install discord-py-slash-command
civic scroll
#

what's the error

#

and also if you are on a node env, it may restrict you

proven lantern
#

ignore silver. the text should be black, but the color isn't applying for some reason

prisma nebula
#

That discird_slash isn't installed etc but when I use pip install discord-py-slash-command
It doesn't install

prisma nebula
prisma nebula
civic scroll
#

@lyric mountain @rustic nova what do you think?

proven lantern
#

when this is 0 toString(16) just returns 0

#

so i need to add a condition for anything less than 16 right?

#

probably

lyric mountain
civic scroll
#

it can be toggled

lyric mountain
#

0 in hex is 0

#

What u want is to pad it

civic scroll
lyric mountain
proven lantern
hushed robin
#

@civic scroll

#

wheres your operating system on github

lyric mountain
proven lantern
#

well i guess 15 would work, but not be what is expected

civic scroll
proven lantern
lyric mountain
#

#123 is the same as #112233

civic scroll
#

at least #000 -> #fff

civic scroll
#

i don't wanna host

hushed robin
#

wym no

lyric mountain
#

Use padLeft(6) for adding missing zeroes

proven lantern
#

i ned to 0 fill

#

yeah

hushed robin
lyric mountain
#

With graphql u make a fixed schema of what data you want

hushed robin
lyric mountain
#

And then send the variables as a field

lyric mountain
#

then when u move to your code u use variables

hushed robin
lyric mountain
#

quotes on ANIME I think

hushed robin
#

error still

lyric mountain
#

try query($id: 1)

hushed robin
#

error

lyric mountain
#

ah, wait, remove () from query

#

since ur passing no params

#

it says "$ expected", so it was expecting a variable

hushed robin
#

oo

#

yes

#

worked now

#

w

#

where are the docs

lyric mountain
#

press ctrl space

#

the docs are somewhere in the playground anyway, else I'd not be able to build my schema

hushed robin
#

its here

#

but

#

i don't get it

#

how do i get the upcoming airing episodes

lyric mountain
#

current episode + 1

hushed robin
lyric mountain
#

if u need the name, there's likely a property for that

lyric mountain
hushed robin
#

i don't understand

#

ok i figured it out however

#

it only returns 1 result

#

oh nvm

#

i did it

#

w smart battleless

#

btw is there anyway i can get events of the releases

#

or do i need to do polling

lyric mountain
#

polling

#

simply track the scheduled release and re-fetch again

hushed robin
#

ok

#

graphql is kinda easy

#

now that i used it for a little

lyric mountain
#

using it is easy

#

implementing tho

hushed robin
#

i mean

#

how will it be much harder

#

i just need to make my stuff into variables

lyric mountain
#

imagine you're the one making the server

#

adding graphql to your api is...annoying

hushed robin
#

oh like that

#

probably is difficult i guess

lyric mountain
#

yes when I say "implement" I mean hosting it

#

for you it'll be just a regular json

#

but with the fields u asked for

hushed robin
#

can't i just store the airings once then just check my database to check if one has released yet

#

like once per day

#

that way i don't need to make lots of api requests

lyric mountain
#

it gives u a timestamp

hushed robin
#

what does that mean

lyric mountain
#

either of those fields

hushed robin
#

is there like

#

an autocomplete plugin for visual studio code

#

like their editor

hushed robin
lyric mountain
#

there is a graphql plugin yes

#

but you need to download their schema for it to work

hushed robin
#

but will it show me anilist stuff

#

where

lyric mountain
#

it's also in their site, but I dont remember where

hushed robin
#

wtf

#

so how do i add that into

#

graphql

lyric mountain
#

idk, read the plugin

hushed robin
#

bru

lyric mountain
#

for java I simply put that in the resources folder

#

you need to see the instructions for whatever plugin ur gonna use

hushed robin
#

is this good

lyric mountain
#

try it

hushed robin
#

be viruses

lyric mountain
#

maybe, just read the comments or see the rating

#

tho I doubt they'd allow it to exist on the marketplace if it was

hushed robin
#

why are none made by a verified user

#

is there like a

#

url for episodes

#

that i can link to

lyric mountain
#

u wont find an url for watching the episo, but u can compose an anilist url for it

#

all anime and episodes have an id

hushed robin
#

whats the url

#

for episodes

#

i can't find it on anilist website

#

r u sure episodes have a url

lyric mountain
#

replace whatever looks like an id on the url

hushed robin
#

i want to link to an episode

#

hm i see

#

i can get the external links of the anime, so i'll just filter it out by common streaming services

lyric mountain
hushed robin
#

no

#

it doesn’t exist

#

there’s no list of episodes

#

so idk what the point of the episode id is

lyric mountain
#

but they all link to cruchyroll

#

still, u can scrap this part if u want the urls

hushed robin
lyric mountain
hushed robin
#

oh

#

its hiding

#

wait

#

some anime dont have

quartz kindle
#

fun fact, i had a project that did similar type of scrapping, just for manga not for anime

#

i was gonna make a manga manager for desktop

#

its name was Waifu

frosty gale
#

blocked

quartz kindle
#

jealous much?

#

:^)

frosty gale
#

definitely

quartz kindle
#

shelved for 5 years lmao

hushed robin
#

i am not scraping

#

this is using official api

earnest phoenix
#

Una pregunta

quartz kindle
#

@frosty gale

#

:^)

frosty gale
#

she is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not realshe is not real

quartz kindle
#

:^)

hushed robin
quartz kindle
hushed robin
#

nwjs?

quartz kindle
quartz kindle
hushed robin
#

idk what that ios

quartz kindle
#

same shit as electron, but slightly different

hushed robin
#

wait

#

you can make desktop apps with javascript?

quartz kindle
#

yes

#

but its not full js of course, they use different stuff for the rendering part

#

for example electron and nwjs bundle a copy of the chromium browser to serve as the user interface

#

so you code your app with html+css and js for funcionality

hushed robin
#

so

#

it's just a website

#

in a window

quartz kindle
#

yes

#

but offline

hushed robin
#

lol

#

how does this code look

quartz kindle
#

there are other runtimes that use different renderers

hushed robin
#

will this work

#

for graphql

quartz kindle
#

no idea, never used graphql

hushed robin
#

wow

quartz kindle
#

btw you dont need to do query: query and variables: variables

hushed robin
#

thats what the guide says on the anilist website

quartz kindle
#
const something = 1;
const obj = {
  something
}
``` this is a shortcut for `something: something`
#

if you dont define a key, js will create a key for you with the same name as the variable name

hushed robin
#

so

#

i can just do this?

quartz kindle
#

ye

hushed robin
#

ok

pale vessel
#

that fetch looks sus tho

#

I hope it's some custom fetch that you had

#

that's probably ai generated code

hushed robin
#

ai generated

#

I wrote this myself

#

@pale vessel

pale vessel
#

why you pinging me leave me alone

spark flint
hushed robin
#

how why where when what

sharp geyser
#

I mean it doesn't look like anything you'd make yourself

hushed robin
#

guys

#

can u get the command and input used from the message object of the response to a slash command

rotund heart
#

i added my bot to top.gg before joining this server, and i cant find my bot page

#

anyone know why?

sage bobcat
rotund heart
sage bobcat
#

One message removed from a suspended account.

rotund heart
#

i added and closed the tab a while ago and i cant get to the bot page now

sage bobcat
#

One message removed from a suspended account.

rotund heart
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

rotund heart
prisma nebula
#

How can i install that

#

Nvm

split patrol
#

any1 know of any free VPS for hosting typescript discord bot

hushed robin
#

no one is giving out a free vps

split patrol
hushed robin
#

then it’s not a vps

#

there are some sketchy free services just google them

split patrol
hushed robin
# split patrol

If you were getting a VPS you would be able to host a bot written in any language

split patrol
hushed robin
#

can’t you just compile it to JavaScript

split patrol
hushed robin
#

why not

split patrol
#

@hushed robin one of the staff members said he'll/she'll change up the start command for me lolll

#

thank God!

prisma nebula
#

How to solve I installed oackage

#

Package

prisma nebula
#

What no

prisma nebula
#

Someone help pls

silk prairie
prisma nebula
#

Idk

rustic nova
#

Sounds like copying the code didn't work out hm

slender wagon
#

Do you guys know any host that accepts crypto?

#

i need a vps

#

i am gonna do shenanigans

silk prairie
#

lol

hushed robin
slender wagon
#

oh really?

hushed robin
slender wagon
#

great

eternal osprey
#

hey guys

#

does anyone have a good formula for amount of xp required to level

#

because i have this

(currentLevel+1)^2 * 10 + 5.

but it is way to low

#

i was thinking about a 150 multiplier

silk prairie
frosty gale
# hushed robin galaxygate does

they only let you pay with bitcoin and litecoin which i would hardly call anonymous might as well pay by card and make it easier

lyric mountain
#

@civic scroll my attempt at something flatter

lyric mountain
craggy pine
#

Why go long short long? I assumed they’re rarities?

lyric mountain
#

hm, u have a point

#

just a sec

lyric mountain
craggy pine
#

Gotcha

lyric mountain
#

there, fixed lengths

civic scroll
#

ngl reminds me of

lyric mountain
#

I'll need to make one color for each ribbon then

#

but first I need to make new borders to match the flat design

sage bobcat
#

One message removed from a suspended account.

shy compass
#

I do

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

deft wolf
#

It's not even discord invite

#

Weird af

silk prairie
#

maybe its secret code

quartz kindle
#

XNHPJA75

sage bobcat
#

One message removed from a suspended account.

real rose
#

was his first message back may 4th too

#

no ida

sage bobcat
#

One message removed from a suspended account.

real rose
#

cant find it linking to anything tho

#

imgur images, invites etc.

silk prairie
#

did he delete the message?

quartz kindle
#

ray did, no idea why tho

silk prairie
sage bobcat
quartz kindle
#

does that automatically mean they had evil intentions?

#

tons of people dont speak very good english and dont know how to express themselves correctly we shouldnt delete their messages just because we dont understand them lol

hushed robin
#

what happened

deft wolf
#

Nothing special

hushed robin
#

what’s wrong with saying I do

#

I do too 🗣️

earnest phoenix
#

Hello

#

Anyone here?

#

I got some error on developer

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

i didnt say it was you, but you did defend the removal, so i explained why i disagreed

#

anyway lets move on

civic scroll
frosty gale
#

voltrex cannot fix skill issues

#

only you can

spark flint
#

does anyone have any good suggestions for S3 storage hmm

#

Cloudflare R2 costs a lot for 1tb

#

using IDrive E2 atm but looking at their reviews lots of people report data loss

proven lantern
#

I use S3 storage from a small company called Amazon.

spark flint
#

amazon costs a lot

#

i'm looking at S3 compatable storag

#

Wasabi looks good but idk if I can be bothered to contact and ask for public bucket access lmfao

#

I'm having a good experience with IDrive but their reputation for data loss is putting me off

#

i proxy the file through Nginx anyways and cache there

#

might move to Varnish

proven lantern
#

What's the cost per gb per month for those services?

spark flint
#

Wasabi is $5.99/tb/month

#

IDrive is $10/tb/year for first year then $40/tb/year

#

(or $0.004/gb/month / $4/tb/month)

#

Cloudflare R2 iirc is like $14/tb/month

#

might look at bunny.net, it's primarily video serving so that would help

#

$0.015 / GB-month for R2

#

yeah so $15/tb/month

neon leaf
spark flint
#

i'd rather one which is managed like S3

#

because if I do something wrong and remove all the files thats on me KEKW

neon leaf
#

I mean I can install minio for you

spark flint
#

i've used it before

#

and both times

#

corrupted it

neon leaf
#

just dont touch the vps ever again

#

problem solved

proven lantern
#

this is S3 pricing

#

this is your current cost per gb
0.005849609375

#

just use s3

#

ezpz

#

talk to a sales rep and see if they can lower the price some more

spark flint
#

s3 is more expensive

proven lantern
#

oh, i missed a 0

#

whoops

quartz kindle
spark flint
#

what provider

#

also that doesn't seem very scalable

quartz kindle
proven lantern
quartz kindle
#

lmao

spark flint
#

thats not S3 though

hushed robin
#

do they send you the storage

quartz kindle
#

idk

proven lantern
#

build your own server and rent space at a server colocation place

earnest phoenix
earnest phoenix
proven lantern
hushed robin
#

bruh

rustic nova
#

probably when it rolls out in every country

hushed robin
#

whatever they decide to

#

wait

#

is there a discord employee in this server

proven lantern
rustic nova
proven lantern
#

that's not fair

spark flint
proven lantern
#

it's been in alpha stage for 8 months

#

it's like the gmail beta

hushed robin
#

why does it error if I make it null?

proven lantern
#

dont ever use null ever

#

fixed

#

null = bad part of JS

hushed robin
#

but

lyric mountain
hushed robin
#

how can i make it not count that part?

lyric mountain
#

don't include it

hushed robin
#

but

#

that won't be possible

#

bc i will have parameter on my bots command

#

and if not filled it will be null

proven lantern
#

it will be undefined

#

you make it null. js makes it undefined

hushed robin
#

no

#

it will be null

#

?

proven lantern
#

js never makes things null

hushed robin
#

js didn't

proven lantern
#

only the dev can do that

hushed robin
#

discord.js did

proven lantern
#

oof

#

dont use discord.js

pale vessel
#

gql isn't js

#

simply don't add the filter if the value is null

proven lantern
#

or dont use null and use undefined instead. undefined will be dropped from the json like you expect

#

and want

civic scroll
proven lantern
#

soo

civic scroll
#

it sends null

proven lantern
#

yes

#

json sends null

hushed robin
proven lantern
#

not undefined

civic scroll
#

but also what happens if the backend is not js

#

so yeah for the parts you can control, null declares the intention clearer

proven lantern
civic scroll
#

plus, you save like

#

3 characters

#

i let undefined for runtime stuff

hushed robin
civic scroll
#

but for whatever i define, i make it null

#

but ig

let variable: T;

works too

proven lantern
hushed robin
#

is this you ben

civic scroll
#

eg

const [formData, setFormData] = useState<Nullable<FormData>>(null);
#

could argue FormData | null looks nicer

#

but yeah it's my personal pref

proven lantern
#

what's the last part do? (null) is that invoking something of defining defaults?

civic scroll
#

so null is agreed upon as empty value of known type

lyric mountain
hushed robin
#

what

lyric mountain
#

generate the graphql request dynamically

hushed robin
#

sounds like it'll be a lot of code

civic scroll
#

you sound like you won't go beyond 1000 lines in a single codebase

lyric mountain
#

if (somefilter) filters += ", somefilter: 123"

civic scroll
#

also

#

kuu

lyric mountain
#

heyo

frosty gale
#

battleless should make a bootloader

civic scroll
#

what do you think about the details & preview sidebar

#

oh wait

#

there

#

one is in compact mode

pale vessel
# hushed robin how tho

you can also use variables


const query = `
query($someVar: String) {
    Media(someFilter: $someVar) {
        ...
    }
}
`;

const variables = {
    someVar: null // could be a string or null
};

// body for the API request
const body = JSON.stringify({ query, variables });
lyric mountain
#

the background symbols are a bit distracting

civic scroll
#

should i decrease opacity

lyric mountain
#

maybe, the contrast between the text and them is a bit too low

proven lantern
civic scroll
hushed robin
civic scroll
#

so for best bet ima use null

pale vessel
#

I tried with string for the search filter and it worked

civic scroll
#

gotta avoid the language magic for default values

pale vessel
#

you can try with other filters and variable types

civic scroll
#

null if empty and value of T otherwise

pale vessel
lyric mountain
#

a bit better ig

#

about the preview idk, I always disable it on windows KEKW

civic scroll