#development

1 messages Β· Page 246 of 1

crystal wigeon
#

HOW

eternal osprey
#

can i ping a category?

lyric mountain
#

u cant

eternal osprey
#

arigato kuuhaku-kun

feral aspen
#

I feel the whole (x = y) operation is redundant, what do y'all think?

#

It's either way going to assign the value of y (as a result of x being null) to x.

lyric mountain
#

wdym?

feral aspen
#

As in, why not x = x ?? y;?

lyric mountain
#

well, their example is shitty

feral aspen
lyric mountain
#

operator combination is always value = value operator newvalue

#

value = value & newvalue becomes value &= newvalue

feral aspen
lyric mountain
#

ah, that makes sense now

#

basically, if you have x = x ?? (x = func()) func will never be ran if x isn't null

#

whereas in x = x ?? func() it will

feral aspen
#

If x isn't null in x = x ?? func(), why would it execute func()?

#

The value of x is x, we don't need func() no more as x isn't null.

lyric mountain
#

idk, that's what it's saying

feral aspen
#

& it doesn't make sense. πŸ˜‚

#

I asked ChatGPT, it rephrased from one example to another. πŸ’€

#

I never knew this assignment operator existed; I studied JS before it came out.

lyric mountain
#

either way, JIT will make those optimizations pointless

#

the only optimization that is worth doing is using |0 to trunc a double, instead of casting to int or doing parseInt

feral aspen
#

The only convo in all of Top.gg that discussed this operator. πŸ˜‚

crystal wigeon
#

Is there a way to load gifs on canvas faster?

#

I hate it taking 5 seconds to load a 300kb gif

feral aspen
lyric mountain
#

the latter is null

#

when using a || b remember that js is coded with spaghetti and parmesan, if you use a boolean operator it will evaluate to a boolean if no valid value is returned

#

if ur intention is to assign if x is null then always use ??

#

otherwise do the full thing and if (x) x = console.log()

quartz kindle
sharp geyser
#

no

#

hi tim

#

:)

radiant kraken
#

hi misty :)

lyric mountain
quartz kindle
#

and in this case, neither is

pearl trail
#

y is it evaluated

sharp geyser
quartz kindle
sharp geyser
#

tim never said hi to me

#

time to go to the brazilian jungle

radiant kraken
sharp geyser
#

Good

#

Finally got my rust plugin to function normally

quartz kindle
#

its not that a ?? b is different than a ?? (b), is just that they use the () to emphasize that the contents of () are never reached if the operator short-circuits

sharp geyser
#

Went from using

Facepunch.Sqlite (Rust's own sqlite dll that wraps sqlite3) -> Sqlite.Data.Sqlite (Official sqlite3 dll) -> Microsoft.Data.Sqlite -> EF6 -> EFCore -> LiteDB

quartz kindle
sharp geyser
#

Finally stuck with LiteDB cause I said fuck it we using embeddable dbs

#

I honestly was just trying to get EF6 / EFCore to work because of the challenge

#

Realized its not worth it to try and force it to work in .net standard 2.1

#

When you can't even use migrations

radiant kraken
#

proud of ya

sharp geyser
sharp geyser
#

It blows

#

or im just not smart enough to understand their usage

lyric mountain
#

facepunch as in the same gmod facepunch?

sharp geyser
#

because if you do a
SELECT * FROM something; it returns you only the first column

sharp geyser
#

Facepunch that made Gmod, Rust and some other random game

sharp geyser
#

So im curious what they do internally

feral aspen
#

If it’s just going to assign the value to x in the end, why does it do it again in the parenthesis, if you got what I mean.

lyric mountain
#

ah, no, it was mozilla

sharp geyser
#

what

#

are you talkin bout

lyric mountain
#

wait lmao, u were talking about the other rust

sharp geyser
#

buddy....

#

We are talking about games

lyric mountain
#

it's not my fault if 3 things share the name rust KEKW

sharp geyser
#

but we were talkin in the context of games val_WaaGone

earnest phoenix
#

3?

#

whats the other rust

lyric mountain
#

iron oxide

earnest phoenix
#

πŸ’€

sharp geyser
#

Rust the game, rust the language and rust the stuff that happens to metal when is wet

craggy pine
#

rust the movie

earnest phoenix
#

also do yall ever just

sharp geyser
#

wtf

#

why do you have 1202 confidential things in your editor

earnest phoenix
#

source code of many tv apps on the tvs memory

#

they fucking put the source code of the apps on the storage

#

ive also found a very interesting tv api while surfing through the code that can do stuff from installing apps to changing system config

#

which i might reimplement and use

lyric mountain
#

funny versioning method

#

why bother with version numbers, just ship the code with the product

earnest phoenix
#

fr

earnest phoenix
#

it looks so good tho

frosty gale
earnest phoenix
#

did i mention that the devs have a very broken english

lyric mountain
earnest phoenix
#

(samsung devs are korean)

lyric mountain
#

also you can factory reset the tv by recompiling and reinstalling from the source

earnest phoenix
lyric mountain
#

I think it was supposed to be KEKW

earnest phoenix
#

one of the folders is inaccessible

#

its the firstscreen (home menu) but the compiled code is still there

#

well compiled as in js code

lyric mountain
#

js source code

#

when u change to channel 0 and suddenly you're watching FALSE

quartz kindle
earnest phoenix
#

i could prob make a better app store for this piece of shit os :teef:

lyric mountain
#

tv app store are always shitty

quartz kindle
#

for example, when you explain how a + b * c works, you show them a + (b * c)
so when you explain how a ??= b works, you show them a ?? (a = b)

earnest phoenix
quartz kindle
#

there is no difference in execution nor result, its used simply to illustrate the concept

earnest phoenix
#

but if you have the api url and the required headers you can just change the countrycode in the url :trolley:

lyric mountain
#

just install ubuntu on the tv and get a tv app

earnest phoenix
#

i really wish there was an install app function but for wgt file

earnest phoenix
#

good luck

lyric mountain
#

https://www.youtube.com/watch?v=eAsmTGDwRRg hell nah they already thought of it

Ubuntu TV is an Ubuntu GUI designed to increase usability on a television. It requires Ubuntu 12.04 to install but is not well supported anymore.

Twitter: @_sudotech

Want to support the channel? Bookmark and use my Amazon Affiliate link: http://amzn.to/2lzHxNz

Gear I use:
Camera: Panasonic G7 - http://amzn.to/2jZJgKV
Microphone: Audio Technic...

β–Ά Play video
earnest phoenix
#

you cant install other oses

#

let alone run your own binaries in the os

#

due to security measures

#

another thing i like about the confidential/private api is that i can debug apps that i cant normally

feral aspen
#

The only thing I'm misunderstanding is its sole need of adding a (a = b) while other operators don't.

quartz kindle
#

its just to emphasise the difference between something like a += b and a ??= b

feral aspen
#

It'll take a while to get it, but that means it's not redundant; the paranthesis, right?

quartz kindle
#

a += b is the same as a = a + b
a ??= b is the same as a = a ?? b, but not in the same way as the one above

#

because in the one above, both a and b are always evaluated

#

which is not true for the other one

#

im guessing they just want to emphasise that particular difference

feral aspen
#

ohh, looking at it that way gives an image

feral aspen
quartz kindle
#

no, in this case they use the parenthesis for the opposite reason

#

to show that the they are isolated

feral aspen
#

The way I look at it is that b will always be assigned to a (due to paranthesis) but if a (before-hand) is truthy, then that value will be assigned to a. (from their perspective)

quartz kindle
#

the entire expression on the right-side does not exist unless the left-side fails the check

feral aspen
#

If we do it in the equivalent method? a = true and a = a ?? (a = console.log(1)), what's going on here? I just want to visualize what's happening here.

pearl trail
# earnest phoenix you cant install other oses
  1. open the back cover
  2. remove everything except panel, and power supply (to power the panel)
  3. buy a hdmi to xx-pin lcd converter
  4. grab a raspberry pi, connect everything
  5. close back cover
  6. done
#

and use kodi

feral aspen
#

if a doesn't exist? it logs 1?

quartz kindle
#

its more accurate to explain it like this
a ??= b is the same as a = a ? a : b

crystal wigeon
#

has anyone used gif-encoder-2?

#

im facing some blocking code issues.

#
    ctx: CanvasRenderingContext2D,
    x: number,
    y: number,
    buff: Buffer,
    callback?: () => void
) => {
    try {
        const gif = parseGIF(buff);
        const frames = decompressFrames(gif, true);
        if (!frames) return;
        const gifEncoder = new GIFEncoder(
            ctx.canvas.width,
            ctx.canvas.height,
            "neuquant",
            true,
        );
        gifEncoder.start();
        gifEncoder.setQuality(30);
        gifEncoder.setRepeat(0);
        // gifEncoder.setFrameRate(30);

        // add the already created canvas as the first frame
        drawImage(ctx, frames[0], x, y); // need to draw first frame
        callback && callback();
        gifEncoder.addFrame(ctx);
        console.log("gif started");
        console.time("gif");
        for (let i = 1; i < frames.length; i++) {
            // avoid blocking code
            await new Promise((resolve) => setImmediate(resolve)); 
            const f = frames[i];
            drawImage(ctx, f, x, y);
            // To draw items on top of gif you need callback here on each frame
            callback && callback();
            gifEncoder.setDelay(f.delay);
            gifEncoder.addFrame(ctx);
        }
        await gifEncoder.finish();
        console.timeEnd("gif");
        // need to continue rest of the drawings
        return gifEncoder;
    } catch (err) {
        loggers.error("canvasGif.drawGifOnCanvas: unable to draw gif", err);
        return;
    }
};
quartz kindle
crystal wigeon
#

how do i fix this flork_think

feral aspen
#

var a; a = a ?? (a = 4); console.log(a)

#

It will log 4 as a result of a at the left operand being undefined, right?

crystal wigeon
#

who writes code like this wtf monkaHmm

#

and yes if a is undefined or null it'll print 4

#

but if a is 0, it wont print 4

feral aspen
feral aspen
crystal wigeon
#

i mean its just a shorthand

#

a ??, means a should have some value. even if it is 0 this will be true

#

but a ? : means a will be falsy even if a is 0

#

a ? : is just a shorthand if else

feral aspen
#

Yup

crystal wigeon
quartz kindle
#

what is the issue?

crystal wigeon
#

its causing event loop block

#

its mainly the for loop thats doing that, but i have setImediate there

#

idk why its still blocking

quartz kindle
crystal wigeon
#

its about 5mb

quartz kindle
#

how large is the resolution?

crystal wigeon
#

169 frames, reso is 688x196

#

im not resizing the reso

quartz kindle
#

hmm, not too big but 169 frames is a lot

crystal wigeon
#

hmm

#

right but still it shouldnt cause blocking code no

quartz kindle
#

it should not block the main thread in the same sense as a while(true) would, but it can starve or slow down the event loop

#

try with a setTimeout instead

crystal wigeon
#

hmm

quartz kindle
#

setTimeout is slower than setImmediate, maybe it gives the main thread more breathing space

#

otherwise you could use workers

crystal wigeon
#

lemme try with settimeout then

sharp geyser
#

@quartz kindle

#

I know you posted it here before

crystal wigeon
#

nopt its still blocking

quartz kindle
quartz kindle
#

see where exactly it is blocking

crystal wigeon
#

it is blocking exactly in the loop

#

i added a "start gif" log

#

and whe that appears no other command works

#

until it completes

#

it takes 8s

#

which is a lot

quartz kindle
#

that doesnt make sense

crystal wigeon
#

fr

quartz kindle
#

i mean

#

8 seconds is a lot

#

even with a setTimeout, other code is given what, 4-5ms to do its thing? then it blocks for 100ms?

#

and it does that 169 times in a row

#

5ms for other code to run, and 100ms drawing the frame

crystal wigeon
#

lemme time how long it takes to draw 1 frame

#

i mean i do have other images to be drawn but they take less than 100ms

#

which is still a lot but my lappy isnt great

#

but it loads in 20ms on my server

quartz kindle
#

check timers for each line, drawImage, calback, addDelay, addFrame

crystal wigeon
#

yep

quartz kindle
#

also, is this a gif that users upload? or is it some predefined gif you use for many things?

crystal wigeon
#

user uploads it. but im making sure its not more than like 2mb. the reason this was is 5mb is i was testing and i didnt realise i uploaded a lower reso gif which was like 800kb but due to the fitting im doing with sharp it bloated.

#

ok so frame drawn is less than 50ms

#

frame added is more than 150ms

#

so thats 2s

quartz kindle
#

i guess a worker will be needed then

crystal wigeon
#

yea

#

,mm

#

thanks

frosty gale
crystal wigeon
snow kite
frosty gale
#

I'm surprised a man of your caliber is willing to help me out.

real rose
#

This is so crazy chat

frosty gale
#

he didnt reply

eternal osprey
#

how come that i can still see the category while for my user the view channel option is disabled?

#

all other roles i ahve are set to / as well

real rose
#

each individual channel probably

#

if you're doing the category permission after creating the chanels

#

then it wont update

eternal osprey
#

i synced them with the category

real rose
#

o

eternal osprey
#

idk its so strange

real rose
#

must be missing something small

eternal osprey
#

hmm

#

no i don't think so i went through everything rn

#

look wtf

#

am i tweaking or is discord

#

it says no access but i can still see them bitches

#

the last image with the "gives access to" is basically after making the channels visible again

#

idk what this tomfoolery is

lyric mountain
#

wdym "see the category while for my user the view channel is disabled"?

#

also, it's impossible for you to hide a channel from yourself, but you can use "view server as role" feature to see as your members would

eternal osprey
#

i clicked on the hide category button, and well it shows my user and then view channel ❌

#

so that's good

#

but i can still see that category

#

buttt, my embed shows No Access so i am confused

lyric mountain
#

cuz I'm still not understanding how exactly ur doing the setup

eternal osprey
#

it's okay i got it fixed

#

i didn't set it to private

#

i got one other question for you ku

#
function twoSum(nums: number[], target: number): number[] {
    for(let i =0 ; i < nums.length; i++){
        let remainder:number = target - nums[i];
        nums[i] = Number.MAX_SAFE_INTEGER;
        let index:number = nums.indexOf(remainder);
        if(index !== -1) return [i, index]
    }
};```
this is a very simply problem, i tried to stay away from 2 nested loops and came with this soltuion. You got any improvements regarding runtime?
lyric mountain
#

what is that supposed to be?

eternal osprey
#

it returns the indices of 2 numbers in the nums array, that sum up to target

#

so:
nums = [1,5,1,2], target = 7:
returns [1,3]

lyric mountain
#

I'm unsure why you need that

#

but well, sometimes it's better to just use the simple way and let runtime optimize it

proven lantern
# eternal osprey ```ts function twoSum(nums: number[], target: number): number[] { for(let i ...

if you use a map you can make it faster

const std = @import("std");

pub fn twoSum(allocator: std.mem.Allocator, nums: []const i32, target: i32) !?[2]usize {
    var map = std.AutoHashMap(i32, usize).init(allocator);
    defer map.deinit();

    for (nums, 0..) |num, i| {
        const complement = target - num;
        if (map.get(complement)) |j| {
            return [2]usize{ j, i };
        }
        try map.put(num, i);
    }

    return null;
}

pub fn main() !void {
    var gpa = std.heap.GeneralPurposeAllocator(.{}){};
    defer _ = gpa.deinit();
    const allocator = gpa.allocator();

    const nums = [_]i32{ 2, 7, 11, 15 };
    const target: i32 = 9;

    if (try twoSum(allocator, &nums, target)) |result| {
        std.debug.print("Indices: [{}, {}]\n", .{ result[0], result[1] });
    } else {
        std.debug.print("No solution found\n", .{});
    }
}
#

did you know that you define where i starts in zig for loops without using =? pretty cool

starts at 0
for (nums, 0..) |num, i| {

starts at 1
for (nums, 1..) |num, i| {

quartz kindle
#

not sure how much more optimized an array.indexOf is compared to a for loop, if it even is

proven lantern
#

how should i do performance tests between rust and zig? is there a website that will do it for me?

#

leetcode doesn't support zig yet

proven lantern
#

wow so much fastness

#

is the rust runtime slowing things down by 2x? why is rust so slow?

frosty gale
#

zig users grasping at straws to appear superior to other languages in any way

proven lantern
#

the performance is amazing

#

here's the time for zig when running in safe mode. that's a more fair comparison

#

how can i make this optimized for rust?

#

oh nice

#

rust 17,529 microseconds
zig 10,487 microseconds

#

a bit closer when they are both optimized

frosty gale
#

zig users when they find out about cold starts

proven lantern
#

zig would be even faster if the cold start time was included. zig has a simplier runtime that takes less time to init

radiant kraken
sage bobcat
#

One message removed from a suspended account.

proven lantern
#

don't be violent.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

tawny lava
sage bobcat
tawny lava
proven lantern
south flume
#

C# is a really good language

#

if it wasnt for go it would be my primary language

sharp geyser
# proven lantern oh nice

Sorry but I prefer the negligable "drawback" in performance than the unreadable zig code you post here

#
Failed executing console command 'b' in 'Economics v1.0.0 by misty.dev' [callback] (Object reference not set to an instance of an object)
   at void Carbon.Plugins.Economics.CheckBalance(BasePlayer player, string command, string[] args)
   at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)

C# can suck my balls

#

My code has not changed since I pushed it to github

#

First time testing it to see where I left off and this shit happens

proven lantern
#

someone forgot to lock dependencies

#

lol

sharp geyser
#

?

#

fym

proven lantern
scenic kelp
#

versions are stored in csproj

#

you are using reflection though so wouldn't surprise me if something fucked up there

sharp geyser
#

No idea what those words mean

scenic kelp
#

System.Reflection

#

reflection

#

dynamically invoking stuff at runtime

#

do you do a null check on baseplayer

proven lantern
#

zig supports reflection at compile time

frosty gale
#

im fine with zig more or less but it's funny dismissing it's benefits

scenic kelp
#

okay cool i'm talking about c#

proven lantern
#

C# doesn't have that feature unfortunately

scenic kelp
#

...because it has runtime reflection

sharp geyser
#

Nothing in that method runs

#

Had a friend test it on their rust server and it works for them so I chalked it down to my rust server broken asf

scenic kelp
#

must be something with the lib you're using idk

crystal wigeon
#

is uh

#

Amanda here?

#

i forgot the username

#

@lament rock i remember you had shared your code for gif encoder, can u help me make it async kekcry I followed your stepsn and got things to work but its blocking the event loop

sharp geyser
#

You know they aren't the only ones who can help right

crystal wigeon
#
export const drawGifOnCanvas = async (
    ctx: CanvasRenderingContext2D,
    x: number,
    y: number,
    buff: Buffer,
    callback?: () => void
) => {
    try {
        const gif = parseGIF(buff);
        const frames = decompressFrames(gif, true);
        if (!frames) return;
        const gifEncoder = new GIFEncoder(
            ctx.canvas.width,
            ctx.canvas.height,
            "neuquant",
            true,
        );
        gifEncoder.start();
        gifEncoder.setQuality(30);
        gifEncoder.setRepeat(0);
        // gifEncoder.setFrameRate(30);

        // add the already created canvas as the first frame
        drawImage(ctx, frames[0], x, y); // need to draw first frame
        callback && callback();
        gifEncoder.addFrame(ctx);
        console.log("gif started");
        console.time("gif");
        for (let i = 1; i < frames.length; i++) {
            // avoid blocking code
            await new Promise((resolve) => setTimeout(resolve, 0)); 
            const f = frames[i];
            console.time(`frame-drawn-${i}`);
            await drawImage(ctx, f, x, y);
            console.timeEnd(`frame-drawn-${i}`);
            // To draw items on top of gif you need callback here on each frame
   
            console.time(`frame-bc-${i}`);
            callback && callback();
            console.timeEnd(`frame-bc-${i}`);

            console.time(`frame-delay-${i}`);
            gifEncoder.setDelay(f.delay);
            console.timeEnd(`frame-delay-${i}`);

            console.time(`frame-added-${i}`);
            await gifEncoder.addFrame(ctx);
            console.timeEnd(`frame-added-${i}`);
        }
        await gifEncoder.finish();
        console.timeEnd("gif");
        // need to continue rest of the drawings
        return gifEncoder;
    } catch (err) {
        loggers.error("canvasGif.drawGifOnCanvas: unable to draw gif", err);
        return;
    }
};```
#

currently for some reason idk why it keeps blocking the event loop, especially when the drawing is complete and it is sending back the data on discord

sharp geyser
#

Maybe something inside .finish

crystal wigeon
#

no cayse i see the time end log

#

for "gif"

sharp geyser
#

iirc nodejs also holds a thread up while its processing and wont continue until it releases when using async

crystal wigeon
#

i mean it shouldnt block other code no

#

other incoming requests

sharp geyser
#

Maybe

#

It's async

crystal wigeon
#

yeah

sharp geyser
#

It's not perfect

crystal wigeon
#

the Papi guy was also using the same gif encoder so thought best to ask him

sharp geyser
#

I also wasn't sayng that I could help, but its better to post your code here rather than pinging a specific person at 3am

#

js is beyond me now a days

#

im rust boi

crystal wigeon
#

its 1pm for me kekcry i can wait no rush

crystal wigeon
#

do you have any lib recommendations?

sharp geyser
#

ahahahahaha

#

Yea good luck

#

There are a number of them

crystal wigeon
#

wtf why is discord send message taking 6 seconds

#

??

#

im sending an attachment

#

and it takes 6s? wtf

spark flint
#

it has to upload to discords CDN

#

remember that

#

check how big the file is

#

and your upload speed

crystal wigeon
#

it is blocking the event loop lol

#

my next message is not being sent until the one sending the attachment completes

spark flint
#

then something in your code is stopping it

crystal wigeon
#

but i timed everything

#

the only time it blocks is when .send() is still in progress

spark flint
#

then idk what you can do tbh, the upload issue is Discord sadge

crystal wigeon
#

i mean i dont mind the slow upload but like why block the entire event loop

#

how

spark flint
#

is this js or python

crystal wigeon
#

js

#
        const msg = await message.channel.send({
            files: [ attachment ],
            components: buttons ? [ buttons ] : [] 
        });
        console.timeEnd("message sent");
        if (msg) {
            sentMessage = msg;
        }```
#

this all im doing like wtf

#

the creating attachment takes .05ms

spark flint
#
console.time("message sent");
context.channel?.send({
    files: [ attachment ],
    components: buttons ? [ buttons ] : [] 
}).then(msg => {
    console.timeEnd("message sent");
    if (msg) {
        sentMessage = msg;
    }
})```
#

i'd personally do that

crystal wigeon
#

but why

#

why not use promise

spark flint
#

because then its sending the message sent after the message is sent

crystal wigeon
#

and why would that be blocking like tf

spark flint
#

but doesn't block the event loop

#

because its await

#

await means wait until the function finishes running

#

and the function is taking 6 seconds to finish running, so its blocking other events for 6 seconds

crystal wigeon
#

yeah but the thing is my other command before this was already processed but it waited until this message was sent to send the oehter one

#

wait

#

async / await is not supposed to block things no?

#

it shouldn't block other requests

spark flint
#

it does

crystal wigeon
#

other requests are made to completely different functions

#

tf

spark flint
#

if it’s in the same function, yes

crystal wigeon
#

its not in the same function

#

thats what im saying

spark flint
#

idk then

crystal wigeon
#

ik it waits until the function finishes but like

spark flint
#

might be because your device can’t handle that much

crystal wigeon
#

lol good joke kekcry

#

im literally only sending 2 commands kekcry

quartz kindle
#

its not normal for a message to take 5 seconds to be sent

#

and most discord libs send messages sequentially

crystal wigeon
#

tbf im trying this on my local machine so there is a network latency

#

i see

#

thats why djs is shit

quartz kindle
#

thats the way they handle rate limits

#

you send two messages to the same channel, they are gonna be sent sequentially

crystal wigeon
#

that makes sense cause its waiting for 1 message to be sent than sending the message which was already processed

#

actually ig adding an attachment is why its taking longer?

#

becuase if i just send some text message it doesnt lag much

quartz kindle
#

so if you time your other command as well, you might see that its not actually being blocked, just its response is getting queued

quartz kindle
#

if your internet sucks, that is gonna suck

crystal wigeon
#

nah my internet is fast. i always seen latency cause im from like asia region

#

and my discord server is in us

quartz kindle
#

you could try not using djs to send

#

but using raw http

crystal wigeon
#

it takes 100+ ms to send normal message

#

hmm

#

maybe jsut for the attachment i could do that

quartz kindle
#

that would bypass djs's rate limit system

crystal wigeon
#

ok but now like how do i compress optimize the gif flork_think im using sharp to resize it. and it says set the transparency to #000 to make it smaller

#

but i still see the gif becomes larger after it resizes

#

is there nothing for gif similar to mozjpeg

quartz kindle
#

are you using gifencoder's optimization options?

crystal wigeon
#

yea that too

#

im using sharp to only resize it

#

which creates a bigger gif, then use gif encoder to draw on canvas

#

with optimzation opts

#

but anyway im exploring rust to see if i can draw the gif and canvas faster

#

and simply send it back

quartz kindle
#

what about the workers?

crystal wigeon
#

but workers are also gonna be slow no?

#

the entire canvas with gif drawing is taking 6s - 8s which is absurd

#

so ye there 3 things i need to optimize

quartz kindle
#

yeah its gonna be slow

#

ideally you would want a multi-threaded gif encoder

#

that could encode frames concurrently

crystal wigeon
#

yeah, how do i do that hto flork_think

#

isnt it gonna mess up the order?

#

if i tried to maybe use promise.all

lyric mountain
quartz kindle
#

they both claim to be very fast by using native code / wasm

lyric mountain
#

my major gripe with gif is that it's very very very hard to stay within discord limits

#

especially if u allow user upload

quartz kindle
crystal wigeon
frosty gale
#

but it depends on what youre doing

sage bobcat
lyric mountain
#

someone said reflection? zoomeyes

sharp geyser
#

so

sage bobcat
#

One message removed from a suspended account.

lyric mountain
scenic kelp
#

erm you did a bad job of making fun of me

sharp geyser
#

lol

#

funny

lyric mountain
#

but can you handles find classes on their own?

fallow sapphire
#

People, am I the only one for whom the "Submit bot" button isnt working?

#

hmm

deft wolf
fallow sapphire
deft wolf
#

You get it when your bot is accepted on top.gg

fallow sapphire
fallow sapphire
deft wolf
#

Exactly

#

You can ask for a role in the #support channel and as soon as a mod sees your message, they will give you the role

scenic kelp
#

that's not a substitute for reflection at all

#

ok nvm i misunderstood what tey are

#

what's the point of having that on top of reflection

#

also doesn't exist as a concept in C#!

eternal osprey
#

when i send emails with nodemailer why is my email getting in the spam inbox?

#

Why do other businesses appear in my regular mailbox lol

spark flint
#

it likely has nothing to do with nodemailer

#

and to do with your email server IP or domain

eternal osprey
#

i am deadass using my hotmail account to send it over

#
 const mailOptions = {
    from: '"xxx" <yyy@hotmail.com>',
    to: recipient,
    subject: "Email confirmation code",
    html: HTML,
    text: `We had problems displaying the layout of the email. Instead, below you can find a fall-back textual version of the email. 
    
    Here is your email confirmation code: ${ID}`,
  };

My auth options:

 const transporter = nodemailer.createTransport({
    service: "hotmail",
    auth: {
      user: "yyy@hotmail.com",
      pass: "pass",
    },
    port: 587,
    secure: false,
  });
#

i am not using a custom domain

#

Or MUST i have a custom domain?

quartz kindle
#

check the 2nd and 4th answers

frosty gale
#

mail servers are extremely picky and petty with marking mail as spam

#

your emails need to perfectly conform to the rfc standard for starters

#

years of trying to combat mail spam introduced some very shitty heuristic detections that most providers use nowadays for some reason

#

if anything it's an insult calling them a heuristic

eternal osprey
#

i got a 9/10 my shit still getting spammed

eternal osprey
frosty gale
#

why are you not getting 10

eternal osprey
#

my reverse dns is not matching the sent dns

quartz kindle
eternal osprey
#

idk if i can control that though? That's something hotmail does for me..

eternal osprey
frosty gale
#

immediate spam mark

quartz kindle
# eternal osprey owh really?
 const transporter = nodemailer.createTransport({
    service: "hotmail",
    auth: {
      user: "yyy@hotmail.com",
      pass: "pass",
    },
    from: "yyy@hotmail.com", // <--
    port: 587,
    secure: false,
  });
eternal osprey
frosty gale
#

because it's used as a method to check if the ip you're sending mail from matches the domain

eternal osprey
#

i can't really fix that lmao

#

any other free email providers that support nodemailer?

#

I know gmail has one

quartz kindle
#

used to have that error because i actually left out the from in the transporter thinking it was in the optionsMail so i didn't have to add twice but once i added it to the transporter it worked

frosty gale
#

why is it failing the reverse dns though

#

does hotmail not have one?

#

might also be the fact that hotmail is used a lot for spam so providers like to penalise it

quartz kindle
#

then rip

#

try gmail or something

frosty gale
#

or endulge in a fun project and make your own

#

(but it costs money albeit not much)

eternal osprey
#

NOOOO

#

gmail has the same

#

tf

#

why the fuck am i blacklisted on the chinese email list

#

i'ts over for me, i can never go to china

frosty gale
#

i have no idea why youre getting sent to spam

#

i thought the emails were sent on the behalf of whatever provider youre using which attaches their reputation along with it?

lyric mountain
lyric mountain
#

Unless the receivers add you to their contacts, or you have your address known and proved, you'll be sent to spam when automating messgaes

quartz kindle
#

like if i use smtp to send an email from my google account, does the receiving end see that it was not sent from google itself?

surreal sage
#

zod or joi

fallow sapphire
#

Small question: If your bot is mention-based (you have to mention it to interact with it) how do you notify the reviewers that its the case?

pearl trail
#

mention it in the bot's description

deft wolf
#

When you submit a bot there is a field called "note to reviewer" or something like that

#

You can edit this while your bot is still in the queue afaik

fallow sapphire
#

Oh shoot

#

I put it in the bot's about me but seems like it didn't update

deft wolf
#

Try restarting your Discord

fallow sapphire
warm surge
#

@sharp geyser hey question

#
    listen 80 default_server;
    listen [::]:80 default_server;

    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;
    
    error_log /var/log/error_log;

    ssl_certificate /etc/nginx/ssl/origin-certificate.pem;
    ssl_certificate_key /etc/nginx/ssl/oliverbot.xyz-private-key.key;  
    server_name oliverbot.xyz;

    root /home/website;
    location = / {
        try_files $uri $uri.html $uri /homepage/index.html =404;
    }
     location = /status {
       try_files $uri $uri.html $uri /status/index.html =404;
    }
    error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 494 495 496 497 500 501 502 503 504 505 506 507 508 510 511 /error;
    location = /error {
     try_files $uri $uri.html $uri /error/error.html =404;
    }

    location /api/ {
        proxy_redirect          http://localhost:8000 https://oliverboy.xyz/api/;
        proxy_pass_header       Server;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Scheme $scheme;
        proxy_set_header        Host $http_host;
        proxy_set_header        X-NginX-Proxy true;
        proxy_connect_timeout   5;
        proxy_read_timeout      240;
        proxy_intercept_errors  on;

        proxy_pass              http://127.0.0.1:8000;
    }   
    
 }
server {
     listen 40;
     listen [::]:40;
     server_name domain webster.lol;

     root /home/webster;

     index index.html index.htm;

     location / {
          try_files $uri $uri.html $uri /index.html =404;
     }
}``` is this right for 2 web servers?
pearl trail
#

i'd suggest you put those in different file. while it still works, but why not

warm surge
pearl trail
#

while it still works, but why not

warm surge
#

ah

#

Misread

pearl trail
#

yeah well, unless you have tons of proxies, that should be fine

warm surge
#

Alright

warm surge
real rose
#

why did you mispell nginx numerous times

pearl trail
#

what does that "Status: active" mean? what is active? because when i executed that, ufw is disabled (i can access any ports outside the rules)

real rose
#

For the specifics between the contradictory statuses, I'm not certain. I just blindly know from experience that they're different

warm surge
pearl trail
#

i see, that's reasonable

lapis badger
#

hi

quartz kindle
quartz kindle
pearl trail
#

yea

quartz kindle
#

then you wouldnt need a port 80 at all

pearl trail
#

ic

#

@warm surge do you use dns record manager on your domain's registrar?

eternal osprey
#

coming back to yesterday, what can i do?

 const transporter = nodemailer.createTransport({
    service: "Gmail",
    host: "smtp.gmail.com",
    port: 465,
    secure: true,
    from: '"xxx" <xxx@gmail.com>',
    auth: {
      user: 'xxx@gmail.com',
      pass: "google_pass",
    },
  });

  const mailOptions = {
    from: '"xxx" <xxx@gmail.com>',
    to: recipient,
    subject: "xxx Code",
    html: HTML,
    text: `We had problems displaying the layout of the email. Instead, below you can find a fall-back textual version of the email. 
    
    Here is your email confirmation code: ${ID}`,
  };
,```
i am still getting in the fucking spam
#

if i can't fix this i might have to buy a custom smtp server

#

man bin that shit

#

your code takes up the whole screen

fallow sapphire
#

Is that js??

#

Istg, why no people use normal, compuled languages

#

And I have to understand whatever this is

#

Hey

eternal osprey
#

??

fallow sapphire
#

Ar least this has semi colons

fallow sapphire
eternal osprey
#

i am just defining an object and using nodemailers package, are you good in the head brother?

eternal osprey
#

idk how you want to dynamically change the document with langauges like java and c++, but if you know how to lmk

naive fiber
fallow sapphire
#

God dayum

#

Isnt this like

#

A discord bot development server or smth

#

XD

#

Anyways ill shut up now

#

Im yapping nonsense

#

Fr

eternal osprey
sage bobcat
eternal osprey
#

that's what i been saying

#

mr pumpkinhead was yapping fr fr

neon leaf
#

is there any good api that lets me do a simple get request and get back an image with text from a query param in it

pearl trail
frosty gale
#

keep in mind your config might be fine it just might be the subject/email contents that get flagged as spam

#

gmail doesn't exclude it's own emails from spam

#

but I wouldn't expect good results for whatever you want to use this for by piggybacking off of free email services

eternal osprey
#

It works all of a sudden i swear

#

I enabled tls

#

And it finally works lmao

warm surge
winged linden
#

Hey has anyone worked with telegram before?

#

If yes is it possible to fetch all members of a specific group using a bot?

sharp geyser
#

Check their documentation out

deft wolf
#

I don't understand their documentation at all, I'm too spoiled by the simplicity and readability of the discord.js documentation

winged linden
deft wolf
#

I personally used the telegraf.js wrapper but it was just some simple messages

winged linden
winged linden
deft wolf
#

At the bottom it says that bots can use this method

winged linden
#

Ah sounds wonderful let me see

frosty gale
urban delta
#

why is this happening?

#

i try to put unicode of all languages

#

but whatever i try it don't work

#

why it use to work before with unicode

#

and now it's not working?

warm surge
#

@quartz kindle

sage bobcat
#

One message removed from a suspended account.

warm surge
#

i meant 443

#
    listen 80;
    listen [::]:80;

    listen 443 ssl;
    listen [::]:443 ssl;
    
    error_log /var/log/error_log;

    ssl_certificate /etc/nginx/ssl/origin-certificate.pem;
    ssl_certificate_key /etc/nginx/ssl/oliverbot.xyz-private-key.key;  
    server_name oliverbot.xyz;

    root /home/website;
    location = / {
        try_files $uri $uri.html $uri /homepage/index.html =404;
    }
     location = /status {
       try_files $uri $uri.html $uri /status/index.html =404;
    }
    error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 494 495 496 497 500 501 502 503 504 505 506 507 508 510 511 /error;
    location = /error {
     try_files $uri $uri.html $uri /error/error.html =404;
    }

    location /api/ {
        proxy_redirect          http://localhost:8000 https://oliverbot.xyz/api/;
        proxy_pass_header       Server;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Scheme $scheme;
        proxy_set_header        Host $http_host;
        proxy_set_header        X-NginX-Proxy true;
        proxy_connect_timeout   5;
        proxy_read_timeout      240;
        proxy_intercept_errors  on;

        proxy_pass              http://127.0.0.1:8000;
    }   
    
 }
server {
    listen 8080;
    listen [::]:8080;

    listen 443 ssl;
    listen [::]:443 ssl;

    ssl_certificate /etc/nginx/ssl2/origin-certificate.pem;
    ssl_certificate_key /etc/nginx/ssl2/webster.xyz-private-key.key;  

     server_name webster.xyz;

     root /home/webster;

     location / {
          try_files $uri $uri.html $uri /homepage/index.html =404;
     }
}```
sage bobcat
#

One message removed from a suspended account.

warm surge
#

can you help faithie

sage bobcat
#

One message removed from a suspended account.

warm surge
#

nginx

sage bobcat
#

One message removed from a suspended account.

warm surge
#

ah

#

anyone ping me if you could help

frosty gale
quartz kindle
warm surge
#

My ssl on oliver is fine

#

Ssl for Itzwebster.xyz isn’t working

quartz kindle
#

why is the server name webster.xyz

warm surge
quartz kindle
#

lmao

warm surge
#

I THOUGHT I CHANGED THAT SHIT

#

THANK YOU @quartz kindle

quartz kindle
#

yw xd

#

also, why do you have port 8080 too?

warm surge
#

I was trying figure out why its not working

quartz kindle
#

alr

junior kraken
#

do unverified bots have a limit for the amount of users can use it in dms or is there just a server limit

rare merlin
#

anyone know why when i have the ref, the Choices is re-rendered whenever theres any changes (but when i remove the ref, it isn't) - it shouldn't be re-rendered everytime because whenever i remove an items it's instantly added back

Component: https://gist.github.com/fronkdev/66d64f6b430fea59374887c9a6bb82a4
Choices: https://gist.github.com/fronkdev/8177c28f6d0d7bc8ac02d1bdd37d2483

i believe the cause is because of useImperativeHandle(ref, () => instance, [instance]); but im not sure how else I'd approach this

frosty gale
slender wagon
#

Genuine question what language should i learn next it has to be multithreaded

#

I only know js and ts atm

digital swan
#

rust or go is probably a safe choice

surreal sage
#

how do I properly do this

lament rock
#

You want to use an =

surreal sage
#

uhh where

lament rock
#

Ah nvm im r word

surreal sage
#

regsdfg

sage bobcat
surreal sage
lament rock
surreal sage
#

this just gets removed by formatter

lament rock
#

Whats the underline say even

surreal sage
lament rock
#

Are you certain that the first param of every ClientEvent[T] is the Client

surreal sage
#

wait

#

i think its because event var isnt as const

lament rock
#

Maybe

surreal sage
lament rock
#

also, I wouldn't type annotation index using a typeof variable unless the signature is too complex to reconstruct

surreal sage
#

english please

lament rock
#

but in this case it isn't, though I'd still just use
ClientEvents[keyof ClientEvents]

#

instead of typeof event

surreal sage
#

ehmm

#

defeats the purpose of the event constant

#

it wouldnt give the proper ...args for it then

lament rock
#

Whats the purpose anyways if its type signature is overwritten to be keyof ClientEvents

surreal sage
#

for this

#

and so i can change all types with changing that var

#

it's easier...

lament rock
#

…

surreal sage
#

IT WORKS

#

dont touch

#

trevleok

lament rock
#

Perhaps I have been spoiled by the enlightenment of raw gateway interaction. I just have one listener for all gateway messages and then switch case off that listener for each event and dont even abstract any of it behind classes that dont even do much useful

surreal sage
#

30 line index.ts !!

lament rock
#

A discord bot is killed every time one starts up with discord.js

rose warren
sharp geyser
#

Just depends on how much you want to suffer to accomplish that goal

digital swan
surreal sage
#

rust is

#

horrifiying

sharp geyser
#

how so

pearl oriole
#

What this error?

sharp geyser
#

It means it couldn't make the request to the url you put in there

#

Either your webserver isn't online, or you gave it an incorrect url

surreal sage
civic scroll
pearl oriole
surreal sage
#

incompatible types

#

ermm

minor epoch
#

Maybe you have a package missing?

civic scroll
surreal sage
#

ya but | string[]

civic scroll
#

it evaluate for all possible types

#

if it doesn't fit the constraint, the error will be thrown

#

if you are sure that it is only string[] at the time of using it, explicitly cast it as such

minor epoch
#

Ya'll how do I get the bot developer role?

civic scroll
#

do not use type unions with incompatible type signatures

surreal sage
#

its not my type

#

it's discord.js'

#

😭

minor epoch
#

Looks like an invalid component to me @surreal sage

sharp geyser
minor epoch
#

Meaning it doesn't make sense and or isn't valid.

civic scroll
# surreal sage ya but | string[]

also okay suppose i have A | B where A extends Array and B extends Map

consider:

// const variable: A | B;

variable.has("blabla");

what happens when variable is actually A?

pearl oriole
sharp geyser
#

Guess not

civic scroll
#

consider

for (let item of variable) {

what happens when variable is B?

#

@surreal sage

surreal sage
#

im so confused

sharp geyser
#

| when using two types is a union type, just because one side is an iterable (aka array in this case) doesn't mean the other side is as well

civic scroll
surreal sage
#

im more confused as to why the type is that

sharp geyser
#

did you set it?

surreal sage
#

no

#

it's discord.js

sharp geyser
#

Well

civic scroll
#

your mistake then

sharp geyser
#

it likely accepts a resolveable to a role

#

or an array of ids

surreal sage
sharp geyser
#

Its hard to say without context

surreal sage
civic scroll
# surreal sage im so confused

simple put
if a var is of type A | B and you wanna call var.someMethod() for example
then both type A and B must have someMethod method implemented

sharp geyser
#

roles isn't a union type

#

you overrode it somewhere

civic scroll
surreal sage
civic scroll
#

usually that roles should be a Collection

sharp geyser
#

Well you had to of

civic scroll
#

what is its actual type

sharp geyser
#

Its a GuildMemberRoleManager

#

Nothing more, nothing less

civic scroll
#

another layer of abstraction?

#

geez

sharp geyser
#

Its discord.js

civic scroll
#

they really dropped the collection

#

my condolences

sharp geyser
#

their classes extend other classes, that extend other classes that extend more classes

surreal sage
#

they didn't drop it

sharp geyser
#

they abstract their base classes

civic scroll
#

this is java corporate hell

sharp geyser
#

Theres a class that has 5 layer deep inheritence

#

Also, they don't abandon collections

#

its just a "cache" property

#

they use collections for cache

neon flicker
#

Is there a question limit for modals?

#

If so, what exactly is the limit?

deft wolf
#

I think it's 5

#

From discord.js guide

earnest phoenix
quartz kindle
#

do modals still only support text inputs?

deft wolf
#

I think so

quartz kindle
#

thats such bullshit lmao

#

whats so hard about at least adding drop downs

deft wolf
#

It seems to me that they have plans to do so, but it is possible that something is still limiting them

quartz kindle
#

afaik they had plans to do so over a year ago

#

and still nothing

earnest phoenix
#

More than a year yeah

#

datetime slash command option type was also data mined at some point

#

Like a year ago or something as well

#

It has never seen the light

quartz kindle
#

also variadics/arrays

#

i readlly needed that

frosty gale
#

so things like keeping devs happy are the lowest priority

quartz kindle
#

discord is gonna have an ipo?

#

rip discord, its over

frosty gale
#

its anticipated to happen eventually

#

people thought it would happen years ago but they pushed it back

#

probably because they werent making enough money to have people confidently invest

quartz kindle
#

what was the name of that discord clone back then?

frosty gale
#

probably guilded but im not sure what roblox is doing with it now since they acquired it

#

ceo of guilded definitely got a lucky escape out of this one, bought by a massive corporation

deft wolf
#

For some time now, you have to have a Roblox account to use Guilded iirc

frosty gale
#

yeah i heard its partly to boost their roblox numbers

#

but its also because keeping authentication in one place is usually a better idea

#

i would setup a separate identity service though and make roblox and guilded share it

quartz kindle
#

why do all good things have to fall into the usual corporate trap

frosty gale
#

makes no sense at the moment that you have to log into some lego game to login to your gaming chat client

frosty gale
sharp geyser
#

So I am making a desktop application with tauri, and I have an auth system that relies on logging in with steam, which means I have to open a link in their browser when they click "Sign in" on the desktop app. Would the session be saved and useable back inside the desktop application or would it be unuseable as it was saved in the scope of the browser.

quartz kindle
#

like usual

frosty gale
#

its terrible but we've gotten to the point where you cant be a normal part of society without accepting some of these stupid terms

quartz kindle
#

can always move everyone to session or something

#

idk why more people arent using session

frosty gale
#

signal is good too i heard

#

some gov did a subpoena on their data and all they gave back is the persons last login date and account creation date lol

quartz kindle
#

yeah lmao

frosty gale
#

if only companies stored the data they actually needed that would be nice

earnest phoenix
#

We are forced to use Threema gigachad

frosty gale
sharp geyser
#

Its not oauth2

#

you have to be a partner to use oauth2

#

I am using their old ass openid 2.0 stuff

#

Only thing open to the public

#

My issue is though, will my desktop application have access to this session I save from my backend api, if its opened in the browser

frosty gale
#

i doubt it since its not good practice to share tokens between 2 services but you can test it by getting a session then logging out in the steam client to see if it invalidates your token

sharp geyser
#

Thats not what im talking bout

#

Never mind

frosty gale
#

oh i think i know what youre talking about

#

i would imagine so

sharp geyser
#

openid also has no "invalidating" because it doesn't give you a token

#

at least not 2.0

#

or not steam itself

#

Steam gives you a steam id back that you then use to query for more information from their web apis

eternal osprey
#

suppose that i am in a file:
file1.js -> can i call a function in ts?

#

Of course you can stupid

#

you can convert it

sharp geyser
#

I am essentially opening a new tab

#

So the cookie / session would not be accessible between tabs

eternal osprey
#
function createEmbed(title: string, description: string, timestamp: boolean) : EmbedBuilder {
let embed = new EmbedBuilder()
.setTitle(title)
return embed;
}

wait is this not possible to do?

#

Ain't no way can't i integrate ts in my djs projects anymore...

quartz kindle
#

why would that not be possible?

eternal osprey
#

nvm i used Require instead of import

sharp geyser
#

anything in js is possible in ts

#

ts doesn't stop you from doing what js does as you can use js in ts without using any of ts features

quartz kindle
#

the power of any

#

:^)

sharp geyser
#

πŸ’€

eternal osprey
#

damn i se

#

but now if i want to call my ts functions i first need to transform it to js right

#

and then call that js function

sharp geyser
#

thats when you'd use the tsc

#

it will transpile your ts code into js code

#

and then you can run it as normal node ./transpiledjsfile.js

eternal osprey
#

i see

#

so ts is mainly just for... the sake of the development?

#

after that it's just a plain js code

sharp geyser
#

it will look unreadable

#

but yes

eternal osprey
#

i see

sharp geyser
eternal osprey
#

yeah that's what i mean with sake of the develop,ent

#

like it makes everything more typesafe

sharp geyser
#

ts is a dynamically typed superset of js

eternal osprey
#

less prone to bugs etc

sharp geyser
#

your code won't be type safe after transpiling tho

#

as js ignores types

eternal osprey
#

tf am i writing ts code for then

sharp geyser
#

your own sake

quartz kindle
#

ts is just a js maker

pearl trail
#

ts is C#

sharp geyser
#

Its was invented to make development easier

pearl trail
#

and looks cool

sharp geyser
#

It introduced types to js so that way devs aren't making common mistakes like passing in a number in a function that accepts only a string

#

πŸ’€

#

but if you are making a npm package ts is very powerful, especially if others also use ts with your package

#

You can bundle types with your package that force those types you made onto them

#

If you write a method that takes in a number, it will force them to give it a number

quartz kindle
#

you technically dont need to code in ts to do that, but yeah

sharp geyser
#

I mean yea you can use jsdoc

#

but jsdoc smelly

#

stinky

#

annoying to write

quartz kindle
#

i love writing them

eternal osprey
#

i see so ts is basically js but then fancier

sharp geyser
#

If you want to think of it that way sure

#

Its type system can get very powerful though

eternal osprey
#

this looks well..

sharp geyser
#

It allows you to do some wacky things

eternal osprey
#

can i just remove the embed.ts then

#

idk i like ts as it reminds me of java

sharp geyser
#

yea

pearl trail
#

it's good to use ts, until you need an old module, unmaintained yet still working, is the only module that can do what you want, doesn't support typings

eternal osprey
#

man me n java are bae

sharp geyser
#

you can use old modules with ts

#

just gotta write your own typings

#

πŸ’€

pearl trail
#

with some comments

#

wdym

sharp geyser
#

you can write typings for modules

#

doesn't have to be yours

pearl trail
#

no like I can't do import on that module

sharp geyser
#

you can

pearl trail
#

no

sharp geyser
#

yes

pearl trail
#

well I forgot that module so can't give it but no

sharp geyser
#

You 100% can

gray kernel
#

Merhaba

sharp geyser
#

You just have to write your own typings for it so ts can find the typings

pearl trail
sharp geyser
#

Thats the only reason ts wont import it

gray kernel
#

Hello me Turksh

sharp geyser
#

I just said its possible

#

πŸ’€

gray kernel
#

İnğilizce no me

quartz kindle
#

lmao

sharp geyser
#

tbh you can still use require though

#

just require it trollface

pearl trail
#

yeah that's what I did

sharp geyser
#

Thats like the only way to do it

low orbit
#

Hey! Does anyone have any ideas how I can solve the border being different sizes? I want the same size border all around
https://play.tailwindcss.com/MFmughejy2

pearl trail
#

I mean not wrong tho, yeah

sharp geyser
#

unless you put your own .d.ts file inside the node_modules folder of that package

#

But that gets removed when you run npm update afaik

pearl trail
#

yeah that, it's all fun until you pull it on server through git

#

yeah kekw

sharp geyser
#

Only other solution: fork it, and upload it yourself

#

providing its not protected by a license

pearl trail
#

~~as long as you didn't get caught ~~

sharp geyser
pearl trail
#

☠️

sharp geyser
#

yea why cant i

pearl trail
#

damn

sharp geyser
#

I mean

#

Im on laptop

low orbit
#

Removing w-full and h-full shows the border all around but it's still not the same size, especially when resizing the screen

pearl trail
#

so they do be pay walling mobile user

sharp geyser
#

it is precisely the same size

#

It all looks fine to me

#

It might look differently sized because of the bg colors

#

but they are the same thickness

low orbit
sharp geyser
#

Chrome

eternal osprey
#

is it also possible to use ts when working with api call handling and or using a lot of modules

#

packages

#

etc

pearl trail
#

ofc

#

why not

eternal osprey
#

okay thanks

#

i don't see it having use when creating discord bots tbf

eternal osprey
#

i think i will only use ts for serious shit like when creating websites, actual programs etc

sharp geyser
#

Anything you can do in js, you can do in ts

eternal osprey
#

πŸ—£οΈ

pearl trail
#

yes I agree

eternal osprey
#

Tell 'm Aaron

sharp geyser
#

Quite literally anything, so asking "if this is possible" will always be "yes"

pearl trail
#

I stopped use js and use ts in every project after I found out

eternal osprey
#

is it possible to create graphics using ts?

sharp geyser
#

Sure

neon leaf
sharp geyser
#

just ask ur mother

eternal osprey
#

heh

sharp geyser
#

ok thats mean