#๐Ÿ‘พ-core-development

1 messages ยท Page 16 of 1

quaint sapphire
#

oh, it aint even part of the standard library

#

hmm, nodejs has a crypto built-in lib

#

that could be used, but it is way overkill at this point

#

what about base64? we do have atob("...")

austere talon
#

why would you do that lmao

#

just use the string

quaint sapphire
#

it feels wrong to use the string as is

#

the string could be 2000 characters long

charred monolithBOT
woeful sable
#

I guess ideally the installer should only use root perms when it needs to, but that's probably out of scope here

charred monolithBOT
#
  1. The installer should do this
  2. I think this command straight up gives full host access to the host which some users might find undesirable. Would be useful to find out if there's a way to restrict it to git in a specific directory. Perhaps we could somehow expose a shell script to the flatpak
  3. it appears flatpak-spawn is in the flatpak-xdg-utils package which not everyone might have installed (I don't)
spark cove
#

good morning github

austere talon
#

password prompt and stuff

#

i think i could prompt the user for password but i don't really want to do that

woeful sable
#

probably requires messing with pam

austere talon
#

I'd rather use some framework like PAM

#

but not everyone will have that

#

not all systems have pam

woeful sable
#

ye I'm not sure if there's a portable and safe way to do it

charred monolithBOT
austere talon
#

but i dont think doas can read password from stdin

#

oh my god why do you do this doas

woeful sable
#

man doas

quaint sapphire
#

uh, what if you run it w/o args?

woeful sable
#

but ye i hate when clis do that

quaint sapphire
#

i hate it when they only support -h

#

but not --help

woeful sable
#

meanwhile gnu coreutils only support --help and not -h

austere talon
#

xd

#

well doas doesnt have a way to read password from stdin

umbral hedge
#

honestly i'd never even heard of doas until the other day lmao

#

sounds like a pain

austere talon
#

it is

umbral hedge
#

why do people use it

austere talon
#

so limited

umbral hedge
#

it's not like sudo is hard

austere talon
umbral hedge
austere talon
#

sudo is very bloated and had a bunch of bad cves in the past

woeful sable
#

sorry i ont have the mental capacity to use sudo

umbral hedge
#

as if such an important thing doesn't get scrutinised constantly by security researchers tho

#

rewrite sudo in rust trolley

#

blazing fast

austere talon
#

i tried using doas but

  1. it prompts for password every time (i know i can change it with config but why would i mess with its config if sudo does what i want ouf of the box)
  2. it has no support for environent variables: doas VARIABLE=hi sh -c 'echo $VARIABLE'
  3. just generally very limited
umbral hedge
#
  1. is very annoying wtf
#

why no variables

austere talon
#

i use 2 a bunch

umbral hedge
#

you love preserve-env

#

i think its uh

#

-E

austere talon
woeful sable
austere talon
#

from opendoas readme

woeful sable
#

u also have to configure sudo to do that but you probably forgot

austere talon
#

you dont

#

it does that by default

#

for 5 minutes

umbral hedge
#

sudo caches by default

#

yeah

woeful sable
#

j

#

sorry i dont have mental capacity to read on sudo defaults

austere talon
#

funny config

#

i bet one of those NOPASSWD ones is somehow abusable to spawn a root shell

#

but idc

umbral hedge
#

xdd

woeful sable
# austere talon

security through obscurity is very real and safe didnt u know /s

maiden fog
austere talon
#

how

#

all of those are there cause i automated them with scripts

#

so i cant really enter my password

#

wtf is ceserver i dont remember

woeful sable
#

it's my backdoor i forgot in your system mb

austere talon
umbral hedge
#

lmfao

maiden fog
# austere talon how

oh you probably use those cmds a lot and entering password must be annoying each time and are generally safe

austere talon
# austere talon LOL

oh yeah i was using cheatengine to do cursed shit in plants vs zombies with wine

umbral hedge
#

lmfao

#

hop on PvZ

maiden fog
#

Bloons*

austere talon
umbral hedge
#

lmao

#

someone hacked my game with cheatengine smh

austere talon
#

also one more thing about doas

#

theres no doasedit

umbral hedge
#

I never actually use sudoedit

austere talon
#

you should

#

sudoedit is superior

umbral hedge
#

owo

austere talon
#

it runs the editor as your own user instead of root

umbral hedge
#

sudo ven --hug

austere talon
umbral hedge
#

owo

woeful sable
#

nope i will su -c "echo 'key1=value1\nkey2=value2' > /etc/veryimportantconfig"

umbral hedge
#

husk

umbral hedge
#

nice

#

i will use now

woeful sable
#

rm /root/.config -rf && ln -s /home/username/.config /root/.config

austere talon
#

NOOOOO

#

thats such a terrible idea for security lmao

#

might as well just run everything as root then xd

austere talon
#

idk why

umbral hedge
#

oh

#

weird

austere talon
#

explode

umbral hedge
#

explo

remote spindle
#

explod

woeful sable
austere talon
#

that explains both restrictions

umbral hedge
#

oh

#

I think I actually remember hearing about this xd

austere talon
#

basically you can create symlinks to anywhere so you could bypass sudoedit restrictions by symlinking arbitrary files to ur home director

#

makes a lot of sense :w

woeful sable
#

you're using vim commands in discord

austere talon
#

LOL

#

:qa!

umbral hedge
#

vim /home/megu/ven

austere talon
#

:: packages not in the AUR: catppuccin-gtk-theme
:: marked out of date: android-apktool citra-qt-canary-bin klogg-bin riseup-vpn spotify ttf-twemoji-color
:: orphans: xf86-input-joystick

umbral hedge
austere talon
#

whats more unsafe:

  • symlinking your .config to /root/.config
  • installing flutter
#

(its the latter)

umbral hedge
#

lmfao

austere talon
#

every time i install flutter i feel like im installing 3 viruses to my system

umbral hedge
#

im a virus

austere talon
#

so your pr in install script works for running as root on wayland ? @woeful sable

woeful sable
#

yea

austere talon
#

mm okay

#

i would much rather just not run as root and instead only escalate the actual commands

#

but shrug

charred monolithBOT
#
[Vendicated/VencordInstaller] New tag created: v1\.0\.7
#

According to here, flatpak apps are isolated to other apps, and they can't access anything other than what their package bundles provides. A.K.A. node and git would need to be provided by the flatpack package if you would like to make it 100% sandboxed. As I understood, 2 is impossible to do without literally slapping git in it

For 3, due to the restrictions of 2, there isn't much to do without using flatpak-spawn or...

umbral hedge
charred monolithBOT
umbral hedge
#

apfel

spark cove
#

who is the ajrx person

austere talon
spark cove
#

ah

spark cove
#

teal did u ever get this cleared up cus i can explain it to you

quaint sapphire
#

explain what?

#

was i blind?

spark cove
#

yea

#

kinda

#

i think u misunderstand functional components

#

and what rerendering means with them

quaint sapphire
#

uhh, you might have misunderstood what i meant by using that word

spark cove
#

a rerender of a FC doesnt mean a new lifetime / instance

quaint sapphire
#

i meant that the component would be discarded and recreated if the text was to change

spark cove
#

that would be a remount

quaint sapphire
#

it wouldnt be updated

spark cove
#

thats not true

quaint sapphire
#

cause the text is not stateful

spark cove
#

in any case the tokens are stateful

#

i see what u meant though

quaint sapphire
#

the tokens wont change if the source code is not stateful

spark cove
#

the tokens will change if the theme changes

quaint sapphire
#

thats an oversight from me ig

charred monolithBOT
spark cove
#

also im pretty sure that props are part of the components "state"

#

which is why fibers keep track of memoized props

#

not entirely certain about that because i havent read the source code for that but i think its true

quaint sapphire
quaint sapphire
#

anyways this is a pointless convo

#

and i aint a react expert

charred monolithBOT
spark cove
#

because thats all that state does with FCs

quaint sapphire
#

I really don't think of anything

#

I'm no react expert

spark cove
#

thats ok

quaint sapphire
#

I'm just a brainless user of the lib

spark cove
#

thats okay lol, idk if u like knowing things but if u did a convo would help

#

anyways time to address code review

quaint sapphire
#

I like knowing things
I just don't control what they are

#

My brain works at random

charred monolithBOT
spark cove
#

@austere talon is it necessary that signal is a state

#

in useAwaiter

#

oh i didnt see pending

#

my b

charred monolithBOT
austere talon
#

discord uses dangerouslySetInnerHTML too right?

austere talon
#

i think setSignal was just for forceUpdate

#

it's a very dirty hack

#

just remove it and replace with dependency array

spark cove
#

oh i thought it was for cancel

austere talon
#

the signal was for

const [res, err, pending, refetch] = useAwaiter(() => fetch(...));

// on demand
refetch()
spark cove
#

this is kinda intersting

#

do u want me to rewrite the logic for pending

austere talon
#

feel free to change it as necessary

spark cove
#

so taht if deps change pending will go back to true

austere talon
#

just make sure it still works the same as before

spark cove
#

death

austere talon
spark cove
#

i'll change it and save the testing for later

austere talon
#

that was an oversight by me

spark cove
#

yeye

#

also thank god discord is on react 18

#

state batching ๐Ÿ™

austere talon
#

react 18 cool

#

but r.jsx() my hatred ๐Ÿ’”

spark cove
austere talon
#

React.createElement replacement

spark cove
#

i thought it was React.createElemen

#

difference?

austere talon
#

it is react createElement with slight changes

#

basically because createElement has some performance bottlenecks

#

and they didnt want to do breaking change

#

they made a new api

spark cove
#

nooo not a breaking change in a major release

austere talon
#

the difference is that children are now an array in props instead of being passed as varargs and the key is now passed as third argument

spark cove
#

did they deprecate

umbral hedge
#

breaking changes are a pain to work with

austere talon
#
jsx("div", { children: ["hi"] }, "my-key")
#

oh but also there is both jsx and jsxs

spark cove
#

that makes sense

austere talon
#

whenever you return an array it uses jsxs if i understood correctly

#

in dev it shows the key warning

#

in prod jsx = jsxs

spark cove
#

ah

austere talon
spark cove
#

interesting?

austere talon
#

React.createElement is still what you should use

#

jsx is only to be used by the compiler

#

but jsx() is way more painful to regex match than createElement

#

๐Ÿ˜”

spark cove
#

f

austere talon
#

cause children are so cursed

spark cove
#

what compiler uses .jsx format

austere talon
#

wdym

spark cove
#

or supports

austere talon
#

like jsx in general or do you mean the function

spark cove
#

in general

#

like what compilers support that format as of now

austere talon
#

babel, swc and esbuild i think?

spark cove
#

makes sense

austere talon
spark cove
#

is ref still in props

austere talon
#

oh also jsx() has the benefit that you dont need to import React anymore

spark cove
#

wha

austere talon
#

before you had to have React in scope

#

to use jsx

#

so you had to import React in every jsx file

spark cove
#

yea

austere talon
#

see that article i linked

spark cove
#

this was possible beforehand

#

but ig now its standardized

#

thats cool i think

charred monolithBOT
spark cove
#

@austere talon where should i put useIntersection

austere talon
#

util/react.ts?

austere talon
spark cove
#

kk

spark cove
austere talon
#

yeah

#

i should clean up utils

#

xd

#

actually probably dont move useAwaiter

#

cause it might conflict with other prs

spark cove
#

oh true ok

#

i'll leave that for u

#

well

#

im already updating useAwaiter that breaks people using refetch

#

or onError

austere talon
#

what did u change

spark cove
#

i removed refetch

#

and i put deps before onError

austere talon
#

maybe use an object instead

spark cove
#

sounds good

austere talon
#
useAwaiter(
  () => fetch(),
  {
    onError: e => ...,
    deps: []
  }
)```
#

so its easier to add new stuff in the future

spark cove
#

fallbackValue as well

austere talon
#

and not pain to use if you only want onError

spark cove
#

yea

austere talon
#

also dont forget to update plugins using it currently

spark cove
#

i did ya

#

i made a dirtyRefetch for reviewdb inside the plugin

#

that u can change later

charred monolithBOT
charred monolithBOT
austere talon
#

refs are so weird

#

how do i set the initial value of a ref

#
const ref = useRef()

return <input ref={ref} />
#

how do i set the initial input???

spark cove
#

initial will always be null no?

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors
Failed to load resource: the server responded with a status of 404 () ```
charred monolithBOT
woeful sable
#
dzshn:nya/ % z v
dzshn:is-even/ (main) % z ven
dzshn:is-even/ (main) % z venc
dzshn:vencord/ (main) % 

fastest cd'ing

spark cove
#

zsh my beloved

#

i wanna try fish

woeful sable
#

idk sounds fishy

muted mural
#

no

spark cove
#

@austere talon when u said named functions over arrow functions

#

did u mean like named rather than anonymous

#

or using the function keyword for named functions

#

i hope ven didnt go to sleep

remote spindle
#

he sleeped

spark cove
#

liar

charred monolithBOT
austere talon
spark cove
#

yea that makes more sense

#

yay vscode

austere talon
spark cove
#

wait

#

do u want stuff like copy to be a function

#

@austere talon

austere talon
#

you decide

#

I usually still use function inside closures

#

but doesn't really matter bleh

spark cove
muted mural
#

@austere talon merge or die

austere talon
#

wtf is that svg

#

svg almost as long as BDFDB

muted mural
#

very beautiful

austere talon
#

show

austere talon
#

lmao

#

why not just do copy button

muted mural
#

because raw

spark cove
#

does that make a fiber for each svg path

austere talon
#

did you just copy that patch from hide attachments lmao

muted mural
#

Yes ๐Ÿคซ

austere talon
#

MiniPopover api would be useful

spark cove
#

u should just

muted mural
#

wait i do need to check if they're compatible lol

spark cove
#

use the input context menu

spark cove
#

theres already the send message button toggle

austere talon
#

make sure they are

#

Well it should just work I think with how the patch is written

muted mural
#

uh

#

i enabled it but I don't see the button

#

hehe

austere talon
#

does that makeItem support onContextMenu?

austere talon
muted mural
#

i'm not sure

austere talon
#

Also hide attachments only shows up on messages with images

muted mural
#

oh

austere talon
muted mural
#

yeah not showing up n

#

raw is showing up

#

but not hide

austere talon
#

check console then

muted mural
#

nothign

austere talon
muted mural
#

not sure

austere talon
#

try it

#

would be cool to make right click copy whole message json or smth

muted mural
#

I was going to

#

but

#

lazy

austere talon
#

I mean assuming makeItem supports context menu it'll be a piece of cake

muted mural
#

wait quickmention also uses that patch

muted mural
#

i'm looking at the regex, it should be compatible

#

now i refreshed again and hideattachments is shown

#

really make a api

austere talon
#

both work?

muted mural
#

no

#

it's one or the other

austere talon
#

lol

#

yeah gotta change the patch then

#

or make Mini popover api

muted mural
#

er i changed the regex and this happened

#

it replaced the shift+hover

spark cove
#

lmk when ur done reviewing so i can push

brave geyser
#

Make context menu api smh

muted mural
#

ugh

brave geyser
muted mural
#

i won't be able to make the api ven

#

no time

#

@austere talon

muted mural
#

i love how you both are talking in github

austere talon
#

oh yeah the old code also uses unknown

#

I think someone else added that code

#

I would never use unknown

#

unknown is like very pain

#
const text = err?.message || String(err)```
#

if it's any this works, if unknown you gotta cast sillytime

muted mural
#

i don't even wanna know how you're making shiki with plaintext patching

austere talon
#

it's just one single patch

#

just replace discords codeblock react method

#

and return ur own component

charred monolithBOT
spark cove
#

yea the old plugin was functionally an instead patch too i think

charred monolithBOT
spark cove
#

i guess thats if ur trying to write type safety in a verbose way

austere talon
#

yes but type safety should be optional, not forced

austere talon
#

casting to Error is obsolete

#

so having err as any is nicer (imo)

muted mural
#

oh

#

so now it's just making it ts

spark cove
#

also i wouldnt say thats perfectly safe since err.message could be a non string

#

const text = err instanceof Error ? err.message : String(err) is not much more lengthy imo

#

although not a perfect solution if u care about err.message being empty

charred monolithBOT
#

The arRPC plugin isn't working for me using the userscript in a browser.

I see this in my browser's console:
Starting plugin WebRichPresence (arRPC)
but not any other relevant output/errors.

I've confirmed that pasting bridge_mod.js directly into my browser's console gets arRPC working so it seems like a Vencord issue.

Browser: Brave
OS: macOS 13.0.1
Userscript version: 1.0.0.1669865203194

muted mural
#

brave problems

charred monolithBOT
woeful sable
#

horror

austere talon
austere talon
#

I think instead of Use shiki instead of, it would make more sense to say Prefer shiki over

#

cause otherwise it sounds like it's using either or

charred monolithBOT
spark cove
#

instead of sounds like either or to me lol

#

maybe like "Use HLJS with Shiki as a fallback"

austere talon
#

yeah that's why I'm saying change it to Prefer bleh

austere talon
spark cove
#

oh Prefer

#

i like prefer more

muted mural
#

my god

spark cove
#

ok did that

#

46 chats moment

austere talon
#

lmao

spark cove
#

merged

#

my brain is not working

muted mural
charred monolithBOT
#

Actually, I just checked Chrome again, and though it doesn't work, it's at least showing an error:

Uncaught (in promise) TypeError: Rp.lookupApp is not a function
    at Ep (userscript.html?name=Vencord.user.js&id=983c6b8f-575f-415e-b54a-e9b78d2d09e8:52:5695)
    at wt.onmessage (userscript.html?name=Vencord.user.js&id=983c6b8f-575f-415e-b54a-e9b78d2d09e8:52:6801)
Ep @ userscript.html?name=Vencord.user.js&id=983c6b8f-575f-415e-b54a-e9b78d2d09e8:52
wt.onmessage @ userscript.html?name...
austere talon
#

gonna check it out tmrw and probably merge then

#

thanks for fixes!!

spark cove
#

its ok u can make sure its good tmr ya

#

also arrpc bug lol

muted mural
#

too tired to think but thinks that it looks good now

austere talon
#

not sure

charred monolithBOT
spark cove
#

and the those modules are in lazy loaded chunks

#

so if the websocket readys quick enough

#

it wont find them

austere talon
grave mangoBOT
austere talon
#

this seems to find the wrong module

spark cove
#

oh i was reading the arrpc userscript code

#

silly

austere talon
#

"Rp.lookupApp is not a function"

#

Rp = rpcManager

austere talon
spark cove
#

i figured it was async transpilation stuff hehe

austere talon
#

probably just needs a more precise filter and it'll work again

spark cove
#

kk

#

i got cookies

muted mural
#

how do i make an api

#

wait they have to be plugins?

#

pc- flashbacks

austere talon
#
  1. create file in src/api that exports methods to interact with it
  2. create complementary api plugin if needed that does patches
spark cove
#

maybe get them to run it

austere talon
#

they're plugins for simplicity

austere talon
muted mural
#

exactly what pc- was

austere talon
#

but does it have a lookupApp method

muted mural
#

cmon

austere talon
#

the idea is to hide api plugins from plugins page soon

#

idk why I even showed them in the first place lol

spark cove
#

yea my thoughts

muted mural
#

lol

#

they're fine staying there

#

i like how they're just disabled

austere talon
#

I wish they weren't plugins but then I'd have to reimplement all the life cycle logic and so on

spark cove
#

reusing the api is much better imo and u even had a required field

#

but from my perspective showing them is like showing all the utils and other api things

charred monolithBOT
austere talon
#

I think I will introduce a "hidden" flag on the plugins object that hides plugins from settings (moves them in its own "hidden" category)

#

or well we could just make that flag push them to the very bottom

#

so they still show up but all the way down ๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡

#

like in a different category like the required ones

spark cove
#

use case?

muted mural
#

i'm confused what does this do

spark cove
#

toggleable apis?

austere talon
#

api plugins aren't on by default

#

only if a plugin that depends on them is enabled

spark cove
#

ah was just gonna ask if theres deps

austere talon
#

but some users may still want to enable some apis without enabling plugins

spark cove
#

that makes sense then

austere talon
spark cove
#

ya

austere talon
#

Also some apis may have their own settings (potentially)

muted mural
#

confusion

#

what

austere talon
muted mural
#

that would be easy ngl

#

i was doing that in replugged before swc

austere talon
grave mangoBOT
austere talon
#

oh god that plugin is a class I forgot

#

cursed

spark cove
#

omfg

lament nimbus
#

Classes good

austere talon
#

typescript could have made classes so much better

lament nimbus
#

What's wrong with them

austere talon
#
interface IFoo {
   bar: SomeComplexType;
}

class Foo implements IFoo {
   bar = {} // WHERE INTELLISENSE TYPESCRIPT
}```
#

you literally have to type twice with classes

#

the definePlugin function on the other hand gives you full intellisense

muted mural
#

wtf how does this function work

austere talon
#

you can use functions as replacements

#

The replace() method returns a new string with one, some, or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function called for each match. If pattern is a string, only the first occurrence will be replaced. The original string is left unchanged.

lament nimbus
austere talon
#

it is

lament nimbus
#

Also is it different with abstract classes

austere talon
#

no

austere talon
#

another option would be specifying the entire data in the constructor super call but like now it's basically the same as the old definePlugin

karmic gazelle
#

vs code or jetbrains?

austere talon
#

the only benefit of using class is better this in nested objects but you can just work around that by just storing your plugin in a variable instead of directly exporting it

#

so I'm still against classes

#

you can use classes in ur plugins if u want tho lol

#

VuewIcons shows its possible

muted mural
#

@austere talon just checked, contextmenu does work

austere talon
#

neat

muted mural
austere talon
#

ye but only settings and NoTrack and notices api are required

charred monolithBOT
muted mural
#

just did the api

#

seems to have worked

#

time to test multiple buttons

austere talon
#

but does it always insert in that exact position or can you choose position

#

both are fine imo but the latter would be cooler

muted mural
#

too lazy

austere talon
muted mural
#

it isn't changing the icon or text tho

golden sand
charred monolithBOT
#

Because there are so few differences between manifest v2 and v3 aside
from header rewriting i just wrote two different manifests. We also generate a .xpi file that gets added to the nightly releases on main pushes. I am aware of #69, however that PR does not support manifest v2 (yet?), and it is still a few months till firefox releases manifest v3, so I think until then this would be a worthwhile effort to maintain.

charred monolithBOT
charred monolithBOT
solemn spoke
#

๐Ÿ˜ i wonder why ppl hit the fork button instead of the star button

honest cypress
#

They're about to make a token logger and submit it as a pull request /s

solemn spoke
#

interesting that there is 17 PRs to be merged

umbral hedge
#

open PRs does not mean they're ready to be merged

solemn spoke
#

lmfao

#

as i see, some, or most of them are waiting to be approved mostly

#

after they did all the requests

charred monolithBOT
muted mural
austere talon
#

did you add modal?

solemn spoke
#

@austere talon VEN PLS REVIEW MY CHANGES AAAAAAAA

austere talon
#

oh for the flatpak

#

yeah soon

solemn spoke
#

(yes i have anxiety for my prs to be merged)

muted mural
#

Fu

#

I'm lazy

austere talon
#

just steal from juby bleh

muted mural
#

Lazy

golden sand
muted mural
#

Pr

golden sand
charred monolithBOT
austere talon
#

just wait for merge soon

austere talon
# muted mural Lazy

it shouldn't be hard cause we already export all Modal Components from utils/modals

#

for parsing codeblock it's just Parser.parse(String) from commons

brave geyser
#

Fish will explod

austere talon
#

I mean i can also help with modal later

#

but it shouldn't take longer than 5 minutes

muted mural
#

Lazy

muted mural
golden sand
quick ibex
crude hearth
#

@austere talon @austere talon

#

YOU KNOW WHAT I AM GONNA SAY

charred monolithBOT
austere talon
spark cove
#

zsxddcfghjkl;'

austere talon
#

yes

charred monolithBOT
austere talon
#

NO

crude hearth
#

Tharki will pr soon

umbral hedge
#

this plugin should list MessagePopoverAPI as dependency

#

this plugin should list MessagePopoverAPI as dependency

charred monolithBOT
obsidian flame
#

the quickMention plugin could also use this api right?

muted mural
#

I did required: true @austere talon in the api plugin

austere talon
#

dont

muted mural
#

quick mention could

muted mural
austere talon
#

just add to dependencies of the plugins using it

muted mural
#

Notices did that

#

Ok but

austere talon
#

yeah because notices are used by Vencord itself

#

thats why it's required

muted mural
#

Ok

#

I'm supposed popovers came after accessorie

austere talon
#

the popover api isn't required unless a plugin actually uses it so should be made dependency instead!!

#

@spark cove testing shiki rn

#

can we maybe add catppuccin to the default themes?

#

awesome theme

#

any reason you made this stick to the markers?

#

are values inbetween not supported?

muted mural
#

Because he wants to torture people like discord slowmode does

charred monolithBOT
umbral hedge
#

RCE

muted mural
#

Dw

austere talon
golden gulch
#

that was vencord itself as soon as it got an auto updater trolley

solemn spoke
#

@austere talon ven pwwease check mah new pushes ๐Ÿ‘‰๐Ÿ‘ˆ

muted mural
#

RCE plugin - execute random code on another vencord person's client

#

UGEHGWUGHEWE THIS NEW FONT SUCKS WTF

#

wgeFEWH

#

FUCK

austere talon
muted mural
brave geyser
muted mural
#

3

#

2

#

1

#

pushed

#

some stuff

#

on copy raw

#

@austere talon ^^
also rce I still wanted to color other things

rigid venture
#

color them

spark cove
#

Bet

#

Also what code did

#

Did you use

#

Tsesr

austere talon
#

wha

#

just see what timestamp I commented that at to figure out what the latest message was

#

it was consistent crashing

#

One dark theme

#

other settings unchanged

#

I can debug it for you if you can't reproduce it, but tomorrow not now, I'm gonna sleep

#

armcord btw

spark cove
#

ye ur good

#

ill debug, fix, add error boundary, and theme

spark cove
#

ye not intended

austere talon
#

nah it means you can only select the markers and not area between

austere talon
spark cove
#

im soakng my finger in acetone rn

#

lemme setup armcord on laptop

austere talon
#

oh wait is it armcord problem

spark cove
#

idk haavenrt tested

austere talon
#

hmm im not sure if I have the very latest version that had ur csp change

#

maybe it's that

#

that it can't load worker?

spark cove
#

uh

austere talon
#

but that doesn't make any sense, why would there be null tokens, so doubt

spark cove
#

it would stop at init

austere talon
#

yeah that's what I thought

spark cove
#

and theme would be null

#

ugh these acrylics are pissing me off

austere talon
#

lol what

spark cove
#

my nails

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors
Failed to load resource: the server responded with a status of 404 () ```
spark cove
#

404

austere talon
#

arrpc

spark cove
#

@austere talon ah i wasnt destructuring useAwaiter properly

#

was
tokens = [tokens: null, error: null, pending: false]
should have been
[tokens] = [tokens: null, error: null, pending: false]

#

i really wanna find out why typescript didnt catch that

austere talon
#

oh lol

#

tokens is supposed to be null or an array?

#

if so, both are valid values for it

spark cove
#

well

#

null or a Token[][]

#

and null is not a Token[]

#

neither is false

hot pecan
muted mural
#

Yes

charred monolithBOT
lament nimbus
#

is it some random's token or is it ven's token that you got

spark cove
#

vsix support would be cringe unless discord has some sort of zip file reader library already

lament nimbus
#

in b4 fflate simping

charred monolithBOT
quaint sapphire
#

It is used for the gateway websocket

charred monolithBOT
rare shale
austere talon
#

Once again stupid Mozilla not having a cool api

austere talon
#

it's mainly that there's basically no point in doing that since the use of userplugins is extremly niche and not really comfortable rn. I want to remove it eventually in favour of basic plugin support without having to build from source

rare shale
#

oh oki

#

ty

hot pecan
#

i wanted to that as well

#

by introducing async loading of plugins

#

so you can load them from localstorage

solemn spoke
#

@austere talon meow what do you think of the changes on my pr

placid wave
#

imo indexeddb would be way better for this

austere talon
#

async loading
localStorage
wha?

#

localStorage is synchronous

spark cove
#

unfortunately

quaint sapphire
#

Well darn

#

I just saw that it has inflate and deflate methods

spark cove
#

zip is an archive format + compression

#

zlib is just compression

austere talon
#

you can bundle zip in like ~8kb bundle size but no need just don't load extensions

#

we already bundle a zip lib but it's in main

#

you could use ipc to unzip stuff if you really wanted

#

but eh no need imo

spark cove
#

i could actually

#

yea nah

#

not right now at least trol

austere talon
#

it's really nice

spark cove
#

search themes by vscode extension when

#

nice fflate

spark cove
#

also last night debugging that shit was so hard

#

the source maps actually made it harder

#

devtools was breaking hard

#

anyways i pushed the stuff

austere talon
spark cove
#

usually at a breakpoint

#

u would hover over a var in the closure

#

and it would show

hot pecan
austere talon
#

yes

hot pecan
#

well that makes that user plugins installing trivial

spark cove
#

nothing would show except for the innermost block vars

#

same with the vars panel on the right

hot pecan
#

i guess ill do a pr for that

spark cove
#

but non source mapped debugger was working

austere talon
#

localStorage = synchronous, ~4mb limit (or lower)
indexeddb = asynchronous, infinite limit but at 50mb the user gets a Popup "do you want to allow example.com to write large data" or something like that and if they choose no that's where it ends

hot pecan
#

oh yeah i meant indexeddb

austere talon
#

I put a 4gb blob in indexeddb once to test and it works

#

lmao

#

it just explodes the discord folder's size

spark cove
#

like the cache doesnt already do that enough!!!

hot pecan
#

i dont do a lot of javascript, im usually hired for backend qa or devops

austere talon
#

indexeddb is absolute pain to work with

#

this makes it nice

spark cove
#

true it has some pitfalls i think though

hot pecan
#

ill be fine with indexeddb, i think

spark cove
#

none really apply if ur using it as a keyval tho

austere talon
#

when are we (the js community as a whole) gonna stop supporting ancient browsers

spark cove
#

now

#

sorry

#

not now

#

i think i want to use indexdb in the next plugin

#

and take advantage of structured data

#

if i make a util it would be funny

austere talon
#

there's a few plugins already using idb

spark cove
#

would i be namespacing the keys

#

or do u use custom stores

austere talon
#

namespacing

#

custom stores would be better honestly (but also maybe not worth it because usually a plugin will only write a single row)

#

Well it's just idb-keyval which has support for custom stores on all methods

spark cove
austere talon
#

what are u gonna do blobcatfearful

spark cove
#

but honestly it could just not

spark cove
#

a cache for spotify tracks albums etc

#

no need for a row per entity

austere talon
#

oh you wanna do custom embeds

spark cove
#

can just periodically + on stop write to buffer row

#

yea

austere talon
#

why do u even wanna cache those, shouldn't chromium by default cache most of it?

#

assuming Spotify sets the right cache headers which I assume they do

spark cove
#

i dont think they do :p

#

i can check

austere talon
#

bad example cause this one has no cache but you get the point xd

spark cove
#

ye

austere talon
#

oh maye i shouldnt share device id

spark cove
#

i think device id is just

austere talon
#

7200seconds

spark cove
#

the device id

austere talon
#

2 hours

spark cove
#

2 hours is ok i guess

austere talon
#

caching is hard because have fun with cache invalidation xd

spark cove
#

i was

#

i was gonna have fun

#

but now its simple

#

simple is good though so lets go

#

still need to make sure im bucketing requests

#

praise lodash debounce

#

actually theres a better one for that

austere talon
#

lodash my hatred ๐Ÿ’”

#

i made my own debounce

#

cause we load before lodash is a thing

spark cove
#

no debounce is what i was thinking of

#

oo nice

#

i will use venbounce

austere talon
#

inb4 discord also bundles lodash in node

spark cove
#

check those node_modules u might be surprised

austere talon
#

it was originally in misc but misc has react stuff and for that it imports react from webpack commons and webpack commons has side effects (calling a lot of finds())

#

so esbuild was bundling like the whole webpack code into the main bundle xd

#

oopsie

spark cove
#

lolololol

austere talon
#

did u fix shiki pr now?

spark cove
#

no lodash

#

sad

#

also yes

austere talon
#

how did that crash even slip past you

#

only happens under certain circumstances?

spark cove
#

plaintext

#

what

#

ignore that message i didnt send that

#

anyways it was because i didnt test bleh

#

and i forgot to write that i was waiting to test

#

but u did it for me that was so cool

#

why does discord's node_modules include tslib

austere talon
spark cove
#

..>

austere talon
#

it's like shared ts runtime right

#

i think the purpose is so that if there's multiple packages use it it isn't duplicated

spark cove
#

oh yea it has helper functions

#

for ecmascript stuff

#

it seems

austere talon
#

yeah it's to avoid having the same typescript helpers in every module

#

swc has the same

spark cove
#

yea that makes sense

austere talon
#
spark cove
#

its just

#

so funny to see all these

#

es5 targeting node packages

#

in a node 16 electron app

austere talon
#

vencord has a bunch of those helpers too

austere talon
#

their browser bundle is even worse

spark cove
#

we will never surpass the cjs/esm ones

austere talon
#

uses es6 features
polyfills lots of es6 features with bloated worse performing polyfills

#

I LOVE REGENERATORRUNTIME

#

this is my favourite module

spark cove
#

i want to write

#

something with acornjs

austere talon
spark cove
#

that produces discord bundles

umbral hedge
#

you love how they actually use async/await in some places

spark cove
#

with no polyfills

austere talon
#

do it

spark cove
#

i will try one day i found the part of swc that generates them so i think generating signatures will be easy

austere talon
#

honestly

#

in my modding time i have found so much deranged code in discords bundle

#

and it is so terrible

#

it runs an interval that checks for devtools stuff every 500ms

spark cove
#

oh my god

hot pecan
#

is that the one that uses screensize

austere talon
#

yes

#

it calculates with the width and checks globals

spark cove
#

me using detatched devtools

austere talon
#

yes lmao

#

same

spark cove
#

hold up!

austere talon
#

discord when they worsen everyone's performance by checking if devtools are open every 500ms just to spam some stupid banner

umbral hedge
#

i love

crude hearth
#

he has 1.1k repos

#

and most of them have at least 500 stars

maiden elk
crude hearth
#

(I only looked first pages)

austere talon
crude hearth
#

oh great

#

he has tons of stupit packages

austere talon
#

yes

spark cove
#

i love when my dns dies

hot pecan
#

thats just standard javascript, making a whole ass package for one function

spark cove
#

but i still get gateway events

austere talon
#

he has three million npm packages and all of them depend on 10 of his other packages

maiden elk
#

the npmbro

austere talon
#

so you install camelcase and get 40 packages you didnt ask for

crude hearth
#

this guy is insane

austere talon
#

he's the devilbro of npm

crude hearth
#

he is one of the reasons npm sucks

maiden elk
#

the npmbro