#๐Ÿช…-progaming

1 messages ยท Page 13 of 1

royal nymph
#

imagine how cool (and useless) that would be

cerulean plover
#

where as with a bot you can listen to events

frosty obsidian
#

Your mouse and its the same but it does the DVD screensaver thing when you're not using it so it's not

Quoting ashlee ๐Ÿ”ธ (@ashlee3dee)

@gvy_dvpont could you make your mouse do the DVD screensaver when it is idle? that would be so cool

โ–ถ Play video
fallow jasper
#

wdym

#

firstly, i dont need an event from discord if i just emit event myself when any change is made

cerulean plover
#

oh shit yes you dont need to do that

fallow jasper
#

secondly I would only need to update like one or two inodes

cerulean plover
#

i was thinking bot mentality

fleet cedar
runic sundial
meager turret
#

seems doable, how i would make it writes would be insanely slow tho

#

maybe it would be better if instead of using attachments, each message is a block๐Ÿ˜ญ that sounds insanely cursed tho

#

and a lot more work

#

nah that wouldnt be better, maybe only for small files

#

infinite file size tho

lavish frigate
meager turret
#

files on a filesystem are also stored in small chunks

#

i think 512 bytes is most common? im really not sure

#

a discord message can store way more than that tho!!

#

i wonder if theres some rust crate that already does all the work on top of your own inode abstraction for me

balmy lintel
meager turret
#

maybe this idea doesnt work at all but I'd like to see if I can just make a discord channel into a block device

#

im guessing a block device probably does expect no holes in the block numbers tho

meager turret
lavish frigate
#

Watch out for discord sanitisation, not that a specific sequence of bytes gets converted into an empty character at the beginning/end and gets nuked by discord

meager turret
#

right, for safety I can encode it using some set of characters

lavish frigate
#

Base64

#

:3

fleet cedar
#

Emojis

meager turret
#

i was thinking some kind of base256

lavish frigate
meager turret
meager turret
#

allows for 2048b blocks too ig?

#

nvm max msg size is 2000

#

not 2048

balmy lintel
lavish frigate
fleet cedar
#

The optimal emoji set for data transfer is

#

๐Ÿ•๐Ÿ•‘๐Ÿ•’๐Ÿ•“๐Ÿ•”๐Ÿ••๐Ÿ•–๐Ÿ•—๐Ÿ•˜๐Ÿ•™๐Ÿ•š๐Ÿ•›
๐Ÿ•œ๐Ÿ•๐Ÿ•ž๐Ÿ•Ÿ๐Ÿ• ๐Ÿ•ก๐Ÿ•ข๐Ÿ•ฃ๐Ÿ•ค๐Ÿ•ฅ๐Ÿ•ฆ๐Ÿ•ง

#

You can get like log2(24) bits of data per I can't be assed to count the bytes

tribal jungle
#

I just realized that there is an "x" missing in the documentation

#

there should be at least one index.tsx

balmy lintel
#

known

#

theres a pr which fixes this

hardy chasm
#

Is there a place to talk about Linux here?

ionic lake
#

you can generally talk about Linux

#

no need for a dedicated channel

fleet cedar
#

Just found out that python's evaluation order is fucked ```py
def foo(a: print(1) = print(2)) -> print(3): pass

royal nymph
#

why can you use an expression as a type

#

๐Ÿ˜Ÿ

#

/run

def foo(a: print(1) = print(2)) -> print(3): pass

foo()
rugged berryBOT
#

Here is your py(3.10.0) output @royal nymph

2
1
3
royal nymph
#

๐Ÿ˜ญ

#

I also love this

cerulean plover
#

you dont even need to call it

fleet cedar
#

Because in ages past, annotations were more general than just types

#

So it's a leftover from that time

cerulean plover
#

/run

def foo(a: print(1) = print(2)) -> print(3): pass
rugged berryBOT
#

Here is your py(3.10.0) output @cerulean plover

2
1
3
royal nymph
#

/run

def foo(a = []):
    a.append(1)
    return a

print(foo())
print(foo())
rugged berryBOT
#

Here is your py(3.10.0) output @royal nymph

[1]
[1, 1]
royal nymph
cerulean plover
#

i hate that

royal nymph
#

whoever thought that was a good idea

cerulean plover
#

you'd expect that'd be a default argument right

#

WRONG

fleet cedar
#

It's a default argument alright

#

Just evaluated way too early

cerulean plover
#

Yop

#

Also it only works once?

#

And it isnt really an argument?

royal nymph
#

it is a default argument and works fine

fleet cedar
#

It's the default for that argument

royal nymph
#

but it uses the same default argument for every function invocation

cerulean plover
#

then why tf does it get evaluated early

royal nymph
#

instead of making a new one every time

cerulean plover
#

ohhhhhh

#

that makes sense

royal nymph
#

no it doesn't ๐Ÿ˜ญ

cerulean plover
#

thanks for teaching me another reason to hate python

fleet cedar
#

It's py default = print(4) def foo(arg): if arg is unset: arg = default rather than ```py
def foo(arg):
if arg is unset:
arg = print(4)

cerulean plover
fleet cedar
#

For... some probably bad reason?

royal nymph
#

the worst part is that there's probably a sick bastard out there who uses that behaviour deliberately

cerulean plover
tribal jungle
#

I am very new to this but if I wanted a function to be runned whenever I would block someone, how can I do that? And how can I learn how to know to do similar things in the future?

hardy chasm
#

/run

local text = {"I ", "use ", "lua", true}
local num = 1

for i, v in text do
    if i ~= 4 then
    print(v)
    num = num + 1
    end
end
rugged berryBOT
#

@hardy chasm I only received lua(5.4.4) error output

lua: file0.code:4: attempt to call a table value (for iterator 'for iterator')
stack traceback:
	file0.code:4: in main chunk
	[C]: in ?
hardy chasm
#

Aww come on.

ionic lake
#

could listen for user block event dispatch then run your thing

hardy chasm
#

Vesktop is cool.

#

Just learned about it.

fallow jasper
lavish frigate
#

read the convo

#

thats not the point

fallow jasper
#

ah sorry

fallow jasper
meager turret
#

feels like cheating otherwise

old haven
#

/run ```lua
print("balls")

rugged berryBOT
#

Here is your lua(5.4.4) output @old haven

balls
old haven
#

nice

meager turret
#

it will also be easier to make a block device out of messages, it wouldnt make sense to use attachments for that (more cumbersome read/write, no edits, block sizes are fixed and having very big blocks has downsides) which supports any fs impl on top

#

discord may also be less of a fan of me abusing their attachments as file storage, it sounds to me like its a lot easier to spot that than plain messages

#

whats a bots max attachment size anyway? if its only 8mb its not that much better than messages

#

not to forget, attachments would also require an extra http request to read i think. network calls would def be a bottleneck here

#

so that about concludes my reasoning

fallow jasper
meager turret
#

i wouldnt be using base64

lavish frigate
#

/run

fn main() {
  println!("die")
}
rugged berryBOT
#

Here is your rust(1.68.2) output @lavish frigate

die
fallow jasper
meager turret
#

feel free to make it using attachments

tribal jungle
lavish frigate
ionic lake
#

start using Flux dispatcher yes and then do said action which in your case is blocking a user

#

there should be your event in the console which will be appropriately named

pearl stagBOT
royal nymph
#

insane order

ornate quiver
#

that's funny

royal nymph
#

I think it's because brotli is optimised for Javascript and common words

#

use... strict
random

#

PX
px

#

I love how that package is ultra micro optimising which immediately gets ruined by the insane bloat that is your average web framework

#

I wish more packages did good optimisations

#

maybe not to this extent where you reorder the alphabet for a few bytes saving but at least making sure u don't use 5 million dependencies husk

autumn sigil
#

hey use however many deps you want, as long as it doesnt end up on my computer trolley

jade stone
#

are there any good js/ts formatters

royal nymph
#

direct answer: no
more useful answer: no but you can use the vscode formatter or prettier they're both decent

autumn sigil
#

eslint fix >> prettier

jade stone
autumn sigil
#

wasnt saying they were good

royal nymph
#

v8 is very fast

#

you can write very fast js

autumn sigil
#

long as its not megamorphic

ionic lake
ionic lake
jade stone
#

just need a way to run it on arbitrary

ionic lake
#

awesome

#

arbitrary?

jade stone
#

oops, tyop

#

arbitrary files

ionic lake
#

like which ones in particular

jade stone
ionic lake
#

oh lol I don't think that is possible

jade stone
#

with enough bash, you can do a lot

ionic lake
#

not sure the new flatconfig even works globally

#

okay sure yeah that can work but any file, as in what file?

jade stone
#

i do a bit of that, and eslint is just nice to have

ionic lake
#

oh I thought you were talking outside js

jade stone
#

no

ionic lake
#

hmm

#

I would've just used biome tbh but I think eslint global installs work still

#

yeah this is not very friendly

#

try cooking something with bash though, should be easy!

lost pawn
#

why am I getting this error when using useState?

#

fixed it

jade stone
#

@ionic lake got something working

royal nymph
#

fire formatting

jade stone
serene elk
#

it's not about eslint

#

ยฏ\_(ใƒ„)_/ยฏ

#

at the end of the day you choose to write like that

royal nymph
#

yeah even if I don't have any ide support I still format my code decently

#

might have inconsistent indent sometimes but never as bad as that code xd

jade stone
#

the file got deleted on accident and this was all i had left

royal nymph
#

idk how it's not natural instinct to format ur code in a sane way

royal nymph
#

fear

ornate quiver
ionic lake
#

I just configured biome in helix and then let it run everywhere

#

works wonderful

lucid trail
#

literally a trojan

#

yes

spring pilot
#

Ofc it is

delicate pewter
#

i love the nternet

stable garnet
#

If you think about it, interned and internet are only one letter off

crimson cave
#

vban 7 @woven wasp malware/extremely dumb

elder yarrowBOT
calm wigeon
#

truly a skill issue

austere idol
#

guess what this code does:

with open("[answer].json", "w") as file:
    json.dump(beconf, file)

with open("[answer].[answer]", "w") as file:
    file.write("\n".join([f'{k}="{v}"' for k, v in conf["env"].items()]))

with open("[answer].[answer]", "w") as file:
    file.write("\n".join([f"{k}={v}" for k, v in conf["env"].items()]))
dusty moth
#

assuming vanilla python, and globals beconf and conf: dict[string, dict]:

  • write beconf to [answer].json
  • write conf's env key to [answer].[answer] in the format key="value"
  • do that again but key=value
austere idol
#

[answer].[answer] is a placeholder name for the file

#

the actual names are build_config.json, build_config.env and build_config.mk

#

beconf and conf are the same variable, i forgot to change all names in result snippet

#

any suggestions to make those oneliners more readable?

dusty moth
livid oasis
lavish frigate
fleet cedar
#

Python execute stuff left to right challenge (impossible)

royal nymph
# austere idol ~~any suggestions to make those oneliners more readable?~~
def format_object(obj):
    return [f'{k}="{v}"' for k, v in obj.items()]

with open("[answer].json", "w") as file:
    json.dump(beconf, file)

with open("[answer].[answer]", "w") as file:
    file.write("\n".join(format_object(conf["env"]))

with open("[answer].[answer]", "w") as file:
    file.write("\n".join(format_object(conf["env"]))
austere idol
austere idol
lavish frigate
# royal nymph ```python def format_object(obj): return [f'{k}="{v}"' for k, v in obj.items...

the with _ as _ syntax is extremely ugly i propose

def format_object(obj):
    return [f'{k}="{v}"' for k, v in obj.items()]

answerJsonHandle = open("[answer].json", "w")
answerAnswerHandle = open("[answer].[answer]", "w")

json.dump(beconf, answerJsonHandle)
answerAnswerHandle.write("\n".join(format_object(conf["env"]))
answerAnswerHandle.write("\n".join(format_object(conf["env"]))
fleet cedar
#

And when do you intend to close those

lavish frigate
#

NEVER

#

python isnt meant to do that

austere idol
#

it's database code did not closed the databases until i did some shady gc-like manager shit

#

then i realised that that shit sucks and replaced it with bunch of withs

fleet cedar
#
(dir/"[answer].json").write_text(json.dumps(beconf))
(dir/"[answer].[answer]").write_text("\n".join([f'{k}="{v}"' for k, v in conf["env"].items()]))
(dir/"[answer].[answer]").write_text("\n".join([f"{k}={v}" for k, v in conf["env"].items()]))
lavish frigate
#

what the fuck

fleet cedar
#

Why do you hate pathlib

lavish frigate
#

just when i thought python could not get any uglier

austere idol
#

i did not have one

lavish frigate
#

perl is irrelevant because whenever i search for just "perl" i get images of actual pearls

fleet cedar
#

Python is a great language for prototyping and throwaways, but anything above maybe 100 lines is better off in any other language (except c)

lavish frigate
#

In rust mainly

proud echo
#

gotta wait for react 20 first ๐Ÿ˜”

austere idol
lavish frigate
#

it just is

balmy lintel
lost pawn
#

does anyone have a simple way of suppressing this error?

hardy chasm
#

What is the best ui for python? I currently use tkinter. (That works on linux mint)

fleet cedar
#

Gtk works pretty well

#

And unlike tk isn't 90s ugly

hardy chasm
#

Ok

royal nymph
lost pawn
#

so I'll just leave it as-is

marble laurel
#

/run 2 + 4

rugged berryBOT
lavish frigate
balmy lintel
royal nymph
#

he's kinda right though

#

if your program doesn't experience any issues it doesn't matter

fleet cedar
#

What if there are other programs running on the computer

#

They might want some of that sweet, juicy ram too

magic shale
#

Itโ€™s like having a gas leak and living with it by not turning anything on

#

Just donโ€™t run other apps

jade stone
tribal jungle
#

Is there a specific discord relationship status for users that you have sent frienship requests to but they have not accepted?

green gulch
#

@void leaf you fr or joking

void leaf
green gulch
#

Its just the sound effects base64 encoded so I didnt have to have separate MP3 files blobcatcozy

u can check the base64

void leaf
green gulch
#

I did put it in a modmail as well, just thought I could share it with that person, my bad.

New to making plugins so thanks for the feedback

#

I shall make them separate files

#

k fixed

void leaf
green gulch
#

appreciate

lavish frigate
final night
#

$('.captcha').innerText.trim()

magic shale
#

Just do it on a canvas at least

lavish frigate
fleet cedar
#

Please no

royal nymph
stoic helm
#

rate my ui fear

umbral mirage
stoic helm
#

lmao

#

heres what it is

umbral mirage
#

you won't see ui this original anywhere online

fleet cedar
#

Needs more rounded corners

stoic helm
#

copied and pasted from the vrchat server

#

i made an osc app for avatar toggle presets!
it currently looks horrible, as i focus on functionality before beauty, but it is fully working!

a screenshot of the (horrible) ui is at https://files.catbox.moe/mob55w.png, as i dont have image perms

it runs through oscquery so you should have no issues running it alongside other osc apps!

i will setup exe builds of it soon, but for now you have to run it through source

https://github.com/ImLvna/vrc-avatar-presets

supple whale
#

god i dont remember what it was called, it simply forces styling on all html elements and tagss, making them into component

#

without any classes

#

this

balmy lintel
#

why would you do that at all

royal nymph
#

"StringWithAutoComplete"

stoic helm
#

what does string & {} even do?

royal nymph
#

hack

stoic helm
#

allow you to index characters?

royal nymph
#
type Color = "blue" | string; // string
#

ts merges types

balmy lintel
royal nymph
#

blue is a subset of string so it gets removed and only leaves string

#

which breaks autocomplete

#

string & {} combines string with an empty object which is still a string but blue is no longer a subset of

#

so it won't get erased and you have both

#

that way you get autocomplete for "blue" but can still pass any string

stoic helm
#

ohhh

balmy lintel
#

weird behaviour in my opinion

royal nymph
#

vencord uses it in some places, it's pretty useful

fleet cedar
#

Why not "blue" | StringWithAutoComplete then

royal nymph
pearl stagBOT
royal nymph
#

it gives you auto complete for emoji gif and sticker but also allows passing other stuff

balmy lintel
#

interesting

lavish frigate
hearty ferry
#

Would anyone happen to know how the discord client knows what version it is? e.g API endpoint

#

(writing an auto updater for my ubuntu machine cuz i hate manually doing it)

hearty ferry
#

i see i see

royal nymph
umbral mirage
#

are there guides that explain how patches in plugins work?

fleet cedar
#

They're just regex

umbral mirage
#

yes but why this

fleet cedar
#

Because it found 14657 modules matching your find

lavish frigate
umbral mirage
fleet cedar
#

Unless you explicitly opt in to multiple matches, yes

umbral mirage
#

oh i thought the find is a css selector

fleet cedar
#

Css selectors are for matching html, not js

umbral mirage
#

are patches only for js

royal nymph
#

yes

fleet cedar
#

What else is there to patch

umbral mirage
#

then i'll just write normal js i guess

royal nymph
#

no

#

don't

fleet cedar
#

Patching css would theoretically be possible I guess, but not particularly useful

#

If "normal js" means mutation listeners and dom manip, don't

umbral mirage
#

that is indeed what i meant

royal nymph
#

well you can do what you want, no one is gonna stop you

but doing that sucks in many ways and you have a 0% chance of having any code like that accepted

umbral mirage
#

oh im not trying to write an official plugin

fleet cedar
#

You'll have bad performance and very limited access to data

umbral mirage
#

right now i want to test something and if i get that working i'll make some plugin for myself

umbral mirage
lavish frigate
#

catching message events via flux dispatcher then editing contents

#

no patching required

#

neither is dom manip

fleet cedar
lavish frigate
#

โ˜น๏ธ

umbral mirage
#

okay i didn't give a good example

#

the thing i actually want to do is remove emojis from all channel names

#

channels aren't really created that often

fleet cedar
#

Change the channel name render function

umbral mirage
#

so for that i do use patches

fleet cedar
#

Patches are how you modify functions, yes

umbral mirage
#

im guessing there's not really a place which details all the functions i can use is there

fleet cedar
#

It's regex

#

Plus \i and $self

umbral mirage
#

that i need to modify

#

and also how to exactly modify it correctly

fleet cedar
#

The function name is probably w or gk

umbral mirage
#

how am i supposed to know that in the future

fleet cedar
#

By matching the function's shape, not its name

umbral mirage
#

but where am i gonna see the shape

fleet cedar
#

In the code

umbral mirage
#

what should i be searching in dev tools

icy vigil
#

is there a way via console to disable all vencord plugins at once? or do i have to go one by one?

final night
icy vigil
final night
#

ah

icy vigil
#

ya

#

i wanna rework and fix sound bord logger yk

#

cus its really fucked atm

umbral mirage
icy vigil
umbral mirage
#

i only have these two

royal nymph
#

but i wouldn't even do that

#

just open settings folder and rename settings.json to something else

#

once you're done rename it back

icy vigil
#

ya that worked grate tnx

vagrant flame
icy vigil
icy vigil
#

do yall see somthing bad with my imports? last time i worked on this plugin was like 7 months ago and now it shows like this

#

other plugins look fine just this 1

vagrant flame
icy vigil
vagrant flame
#

who coded it

icy vigil
vagrant flame
#

is there direct message on github

royal nymph
vagrant flame
#

what

umbral mirage
#

even when looking at this example, i can't find what they're talking about using ctrl shift f

vagrant flame
lavish frigate
#

its not actually in the app

umbral mirage
lavish frigate
#

isnt that from a couple of months ago

#

told you its very old

umbral mirage
#

oh i can't even find that plugin

lavish frigate
#

yep

frosty obsidian
#

v+ no programming @royal nymph

lavish frigate
#

vwhybanne vending.machine

elder yarrowBOT
green gulch
#

Not sure if it would get accepted

#

And I can't just "put it in vencord" it has to be a PR

#

Do that

buoyant trellis
#

they also had rce in wifi driver last month lol

icy vigil
#

is there a list for all the discord props that i can find with findbyprops and findbypropslazy?

long stream
#

Like this:

#
const props = [
  "prop1",
  "prop2",
  "prop3
] as const

type Prop = typeof props[number] of props[number] | (string & {})
#

You can type in any props

#

But most IDEโ€™s provide autocomplete for one of the props in the list

long stream
final night
viscid grove
#

Is there a way to get something similar to notepad++'s change history on vscode? (on local files without git)

cerulean plover
green gulch
#

i want peoples thoughts about this: a plugin that notifies you in-app when a youtuber you choose uploads a video

#

might be impractical but just an idea ๐Ÿคทโ€โ™‚๏ธ

royal nymph
#

stop making discord os

#

why in the world would that be inside discord

#

just have it in your browser or use an RSS reader app

cerulean plover
#

couldnt you export youtube subscriptions to RSS at one point

green gulch
#

nah man youtube notifications in discord

green gulch
#

bookmarklet

viscid grove
green gulch
#

silly idea ik

viscid grove
#

Is there a way to make this copy without having to press the confirmation button?
right now, it won't actually copy until i click that

Solved by adding await
(or if there's any way to improve it ig)
formatted version of the bookmarklet:

javascript: if (window.location.href.startsWith('https://regex101.com'))
  ((
    url = 'https://regex101.com/?regex=' +
      ['regular expression', 'test string']
        .map((selector) =>
          encodeURIComponent(
            Array.from(document.querySelectorAll(`[aria-label="insert your ${selector} here"]>.cm-line:not(:has(>.cm-placeholder))`))
              .reduce((acc, val) => acc + val.innerText, '')
              .replaceAll('โ†ต\n', '\n')
          )
        ).join('&testString=')
  ) => {
    try {
      navigator.clipboard.writeText(url);
      window.location.href = url;
    } catch (e) {
      console.error('Error copying or going to window location: ', e);
    }
  })();
serene elk
#

that's caused by window.location.href = url;

#

unsure if you can prevent that

viscid grove
viscid grove
#

oh
that works

#

ty

vagrant flame
#

how long until pull requests get merged

frosty obsidian
#

pay me a million dollars and ill merge

#

(just wait for someone to review)

vagrant flame
frosty obsidian
#

enticing offer

vagrant flame
#

but a really big cookie

frosty obsidian
#

intriguing

vagrant flame
#

intriguing enough to merge?

frosty obsidian
#

you've been misled

#

i can't merge

vagrant flame
#

๐Ÿ˜ฎ

ornate quiver
# vagrant flame how long until pull requests get merged

take the amount of days it's been since the last 6-planet alignment event, add the amount of days its been since your last birthday, multiply by ฯ†, and then divide by the amount of currently open prs there are
and thats how many days you have to wait until your pr gets merged

vagrant flame
#

uhhhh

#

thats alot

#

but its not my pr just a cool plugin

#

one of them has a green checkmark next to it, does that mean its merged?

frosty obsidian
#

the check just means it was able to build without error

#

(well really it just means it can be merged, which is a few different requirements)

vagrant flame
#

how long realistically do you think it will take then?

frosty obsidian
#

depends

#

high demand plugins that aren't too big are more likely to get reviewed earlier

#

but nothing is guaranteed

vagrant flame
#

both of those look really small

#

would you say like 2 days maybe

frosty obsidian
#

can't guarantee anything

vagrant flame
#

alright

#

who can merge? is it one person or multiple

frosty obsidian
#

a few people

#

but bothering them will make them less likely to look at the pr

vagrant flame
#

oh no that wasnt my goal i was just curious how many people can actually do it

#

im not going to bother anyone about it

frosty obsidian
#

its 4 i think

viscid grove
#

Maybe it was deleted because it still needs git installed, but i meant for just random files not in a project with git setup, or on git ignored files like userplugins

summer mulch
#

does anyone know why firefox slows to a halt when viewing a websockets messages? (this doesnt happen in chromium)
tested using brave + librewolf, latest versions; brave in a private window, librewolf on a clean install

autumn sigil
#

lollll

summer mulch
#

like the browser itself is fine

#

its just having a hard time sending and receiving messages

lost pawn
#

does anyone know how discord attaches a ref to the component inside tooltips?

#

or at least a simmilar way

summer mulch
lost pawn
#

yes

summer mulch
lost pawn
#

so

#

from what I can tell at least

#

it's using reactdom to get the dom node

rose otter
#

what does the \i identifier do? is this documented?

fleet cedar
#

It's a vencord special

rose otter
#

mhm

fleet cedar
#

I think it's something like \b[\w$_]+\b

rose otter
#

hm ngl im really bad at regex xD i have no idea what that does at initial glance

#

hm looks like it just matches every word ๐Ÿค”

fleet cedar
#

It matches a javascript identifier

rose otter
#

i get how it works now, ty!

#

could you guess who i am? xD

fleet cedar
#

I would guess you are @rose otter

rose otter
#

๐Ÿ’€

#

turn off mask url paste

fleet cedar
umbral mirage
#

or just a really weird coincidence

rose otter
mild yoke
#

thoughts on the new theme?

#

I made the top bit frosted, then I switched the rest to pretty much atom one dark

still jolt
#

does the missed phone call come with the theme?

mild yoke
#

bruhhh

fleet cedar
#

You could totally make a theme that does that

#

Assuming you know exactly how wide the clock is and shit

royal nymph
mild yoke
#

Yeah I'm not sure about it

#

It has a sorta cool effect, but idk

#

it's cool seeing the content become clear, but I think I'll make it configurable

green gulch
#

guys im gonna make a password manager plugin (real)

summer mulch
#

it doesnt look like regular discord

mild yoke
#

it's a custom client

summer mulch
#

ooh sick

mild yoke
#

just been trying to get the theme to a good spot recently

summer mulch
#

what if you made the blurry area more blurred and darkened a bit

mild yoke
#

that's not a bad idea

unkempt lotus
#

guys i need to someone told how to make a wonderful client like vencord?

#

what i need to learn also

quiet raft
#

lmao

lavish frigate
visual shellBOT
#

<:i:1263592450136473684> etc. ษ›tหˆsษ›tษ™rษ™

adverb

  1. used at the end of a list to indicate that further, similar items are included.
  • protect seedling from damage caused by feet, lawnmowers, pets, etc.
unkempt lotus
#

do mean what next

#

api and backend should be learned

#

?

lavish frigate
#

i guess

#

its way too much to list everything

#

all the things ive listed are gonna take you a couple years to master

unkempt lotus
#

ahhaa

#

i mean if i learn backend should i choose a specific thnig

#

like node.js

#

should i learn node.js specific

lavish frigate
#

node.js isnt a backend its a runtime

unkempt lotus
#

oh

lavish frigate
#

its a way to run js on your computer

#

it can be used to make backends

#

but it is not a backend

unkempt lotus
#

oh so it let js run on server

lavish frigate
#

yes

unkempt lotus
#

okkeyy

formal belfry
#

I was able to get vencord working on my proxy by just doing this

const { stack } = new Error();
if (!(stack?.includes("http")) || Array.isArray(v)) {
    return;
}

seems to not catch react devtools either, would you like me to pull request this?
works for noTrack also

serene elk
#

check if my branch works

formal belfry
#

alr

serene elk
#

both the webpack stuff and no track

formal belfry
#

but that could just be a quirk, seems to still effectively disable sentry tracking

serene elk
#

hmm

#

what could be failing here

#

assetPath?

formal belfry
#

couldn't you do return console.log("message") to see which exact step is failing

#

It could definitely be assetPath

serene elk
#

put a breakpoint and test for me

#

because you are the one that has the proxy lol

#

weird cuz you said no track works

#

and it has this too, which is even worse

formal belfry
serene elk
#

what's the stack

formal belfry
#
Error
    at Function.set (VencordWeb:37:17442)
    at http://localhost:3000/service/hvtrs8%2F-dksaopd%2Ccmm-aqsgtq%2Fqeltpy%2C348%60fc335177561%60bcc2.hs:453:38098
    at http://localhost:3000/service/hvtrs8%2F-dksaopd%2Ccmm-aqsgtq%2Fqeltpy%2C348%60fc335177561%60bcc2.hs:453:38637

It's because of the weird URL encoding no doubt

serene elk
#

oh

formal belfry
#

let me try setting it to plain and see if that works

serene elk
#

it encodes the js too

#

I will fix it one second

#

@formal belfry git pull and try now

formal belfry
serene elk
#

huh

#

it should

formal belfry
#

let me check if responseText matching is messing things up

#

I don't think so since it doesn't even look like it's getting there, but the proxy does some weird wrapping to make JS rewriting actually feasible

#

well nevermind, it's failing here apparently

serene elk
#

are you sure

#

that function executes two times so keep in mind that

#

one for the main webpack, which it should return and not do anything

#

and one for sentry, which it should continue and throw the error

formal belfry
#

supposedly it's failing both times

#

oh wait nevermind

#

stack matching fails once, and then response text matching fails

#

maybe changing window.DiscordSentry= to DiscordSentry= will work?

serene elk
#

does sending a XMLHttpRequest to the proxied url not work

serene elk
#

so where is the issue

formal belfry
#

UV rewrites calls to window with __uv$wrap(window) iirc

serene elk
#

๐Ÿ˜ญ omg

formal belfry
serene elk
#

does .DiscordSentry=

work?

formal belfry
#

We are working on a way better implementation atm

formal belfry
serene elk
#

also your vencord is hella outdated lol

formal belfry
#

WTF lol
something in the proxy is failing

formal belfry
serene elk
#

yes look at all the broken patches

#

none of those are broken currently

formal belfry
#

this is from git pull on your branch
could just be the proxy breaking things, not sure

serene elk
#

well my branch is up to date

#

none are broken on it either

#

either way I suppose your proxy makes it __uv$wrap(window).DiscordSentry=

#

right?

formal belfry
#

Oh boy

serene elk
#

oh wait

#

maybe your vencord is not oudated

#

but the proxy is messing up regex patching

formal belfry
#

That could be it also

serene elk
#

definitely

formal belfry
#

Something is definitely fucked with UV and XHR requests, currently checking it out with the maintainer

serene elk
#

this patch has not been changed for 22 months

#

uhh could it be adding newlines?

#

do something for me

formal belfry
#

It's effectively trying to fetch http://localhost:3000/service/http://localhost:3000/service/ https://discord.com/assets/sentry.368bfa315375541bbac0.js

serene elk
#

Vencord.Webpack.wreq.m[502920].toString()

#

send me the result

formal belfry
formal belfry
#

beeg function

formal belfry
serene elk
#

it would be kinda strange if it did ngl

#

oh god

#

nooooo why

#

I'm gonna cry

formal belfry
#

JS rewriting is incredibly difficult and tends to break a ton of stuff

serene elk
#

okay let me just understand right now

#

what is the current issue

#

a vencord one or a proxy one

formal belfry
#

Right now it's a proxy one seemingly

serene elk
#

I can change the condition to this

#

without any issues

formal belfry
# serene elk

The problem is with the proxy's impl of XMLHttpRequest

serene elk
#

ah

#

I see

formal belfry
#

is there a chance it can be a fetch() instead?

#

or does it have to be XMLHttpRequest

serene elk
#

it has to be XMLHttpRequest

#

abusing the fact it can be done synchronous

formal belfry
#

ah true

serene elk
#

okay however I wonder what's the issue here

#

Vencord.Webpack.wreq.m[935347].toString()
send it too

formal belfry
#

I'm honestly not sure what the issue is, it looks like _loadingText should be findable

serene elk
#

xd

formal belfry
serene elk
#

I'm not sure why it's wrapping that however

formal belfry
#

Oh yeah, if you're wondering what __uv.$wrap does, apparently it's supposed to just prevent location and eval from escaping UV's "sandbox"

#
    __uv.$wrap = function (name) {
        if (name === 'location') return __uv.methods.location;
        if (name === 'eval') return __uv.methods.eval;
        return name;
    };

literally just does this ;-;

serene elk
#

o().random(e.length - 1)

#

why is it wrapping that

formal belfry
#

I have no idea ๐Ÿ˜ญ

serene elk
formal belfry
#

I assume UV just tries to wrap as much stuff as possible, currently bribing the only person who wants to touch the codebase to make it hopefully less bad

serene elk
#

however yeah the maintainer of uv is gonna have to fix XMLHttpRequest

#

technically it's not needed but having it makes 100% sure that we are not erroring the wrong thing

green gulch
#

github

formal belfry
#

did github die or are they rate limiting me?

serene elk
#

lmao

green gulch
#

erm they died

formal belfry
serene elk
#

it's completely dead

autumn sigil
#

shoddy

green gulch
#

wild

autumn sigil
#

why is ghstatus lying to us

formal belfry
autumn sigil
#

cant wait for the article to come out

serene elk
#

someone is getting fired

formal belfry
#

Technically returning a 500 is operating KEKW

green gulch
#

somebody tripped over a cable

#

does any of this work

serene elk
#

git operations is down

#

copilot too

green gulch
#

funny

summer mulch
green gulch
#

yes

#

itโ€™s good now tho

lone gust
#

does anyone know how to do subcommands via commandsapi? :3

jade stone
lone gust
#

mb

#

ty

#

wait how do i get perms to talk there?

green gulch
#

been waiting a couple days for access to it

jade stone
fleet cedar
#

Be a modmail

still jolt
#

Be a mod, deliver mail โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹

green gulch
#

mail the mods to poland

fleet cedar
#

Are the mods male?

still jolt
frosty obsidian
#

juby is in poland

still jolt
#

the who โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹

frosty obsidian
#

aliu creator

still jolt
#

scary

#

already met someone from vencord irl, maybe would be fun to meet someone locally from poland though

fleet cedar
#

What do you mean irl

#

Vencord folks do not exist irl

still jolt
#

uhh..... โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹

#

who did I meetโ€ฆ

royal nymph
fleet cedar
#

Did they have skin

still jolt
# royal nymph skinwalker

OH GOD I HOPE NOT โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹

viscid grove
formal belfry
#

idk how to program

frosty obsidian
#

cool man?

#

why are you even here???

mellow phoenix
cerulean plover
jade stone
#

horror

if (data.data) {
data.data = `//WebpackModule${data.moduleNumber}\n${data.find ? `//OPEN FULL MODULE: ${data.moduleNumber}`: ""}//EXTRACED WEPBACK MODULE ${data.moduleNumber}\n 0,\n${data.data}`
}
serene elk
#

I've never met anyone irl that uses Vencord

jade stone
#

neither have i, and i hope it stays that way blobcatcozy

serene elk
#

I still wonder what would be the reaction of someone who uses it to realize who I am

serene elk
#

๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ noooo

#

anything but that

#

one of my friends already complains all the time his vencord uninjected

#

and I just say to him: skill issue

#

my vencord never uninjects

jade stone
#

i somehow manage to never be able to inject on windows, but ive never had any issues with linux

serene elk
#

i have no issues and it also never uninjects

#

even though I use both canary and stable

#

then he uses stable and uninjects all the time

#

like wtf

jade stone
serene elk
#

yes

jade stone
#

wouldnt that make it so it uninjects less

serene elk
#

but it hooks into discord the same way

jade stone
#

oh, im stupid, nvm

formal belfry
#

how to go about making a modal? needs a text input and a number/date input, if possible

fleet cedar
#

Check like, any plugin that makes a modal

viscid grove
#

and the timestamp picker has a date/time input

umbral mirage
#

"The find value is a unique string to find the module you need to patch"
what really is a module though?

fleet cedar
#

A javascript file, as represented inside webpack

#

Also some non-js files, but mostly js

umbral mirage
#

im trying to find the place where channel names are rendered

#

i've been able to find... something

#

not sure really if it's what im looking for though

#

i found this

#

which might be useful for me

royal nymph
#

Wdback

royal nymph
umbral mirage
#

cool idea

#

although i still could not get this to work for myself

green gulch
#

So how can I add autofill options to comands with CommandAPI

green gulch
#

And my modmails been open for a week

#

ยฏ_(ใƒ„)_/ยฏ

lavish frigate
#

/run

fun main() {
  val x = 1.plus(2)
  println(x)
}
rugged berryBOT
#

Here is your kotlin(1.8.20) output @lavish frigate

3
lavish frigate
#

WHAT

fleet cedar
#

Kotlin is such a liar

#

Kotlin is not fun at all

#

Aside from that I'm not seeing anything WHATworthy

royal nymph
serene elk
#

those methods are actually good

#

if one number is nullable you can use optional chaining with it (or whatever it's called)

#

and just have a fallback after all the expression with ?: 10

frosty obsidian
#

its bc you can override the behavior of operators

granite geyser
#

/run

fun main() {
  val x = 1 + 2
  println(x)
}
rugged berryBOT
#

Here is your kotlin(1.8.20) output @granite geyser

3
granite geyser
#

why is there both .plus and +

frosty obsidian
#

/run

operator fun Int.plus(other: Int) = 69

fun main() = println(1 + 1)
rugged berryBOT
#

@frosty obsidian I received kt(1.8.20) compile errors

file0.code.kt:1:18: warning: extension is shadowed by a member: public final operator fun plus(other: Int): Int
operator fun Int.plus(other: Int) = 69
                 ^
file0.code.kt:1:23: warning: parameter 'other' is never used
operator fun Int.plus(other: Int) = 69
                      ^
2
frosty obsidian
#

guh

#

/run

operator fun Int.plus(other: Char) = 69

fun main() = println(1 + '1')
rugged berryBOT
#

@frosty obsidian I received kt(1.8.20) compile errors

file0.code.kt:1:23: warning: parameter 'other' is never used
operator fun Int.plus(other: Char) = 69
                      ^
69
granite geyser
#

,epw

#

meow

#

@frosty obsidian can i ratelimit you

frosty obsidian
granite geyser
#

/run

fun main() {
  val x = 1 .plus(2)
  println(x)
}
rugged berryBOT
#

Here is your kotlin(1.8.20) output @granite geyser

3
granite geyser
#

hm

frosty obsidian
granite geyser
#

/run

operator fun Int.plus(other: Char) = "meow"

fun main() = println(1 + '1')
rugged berryBOT
#

@granite geyser I received kt(1.8.20) compile errors

file0.code.kt:1:23: warning: parameter 'other' is never used
operator fun Int.plus(other: Char) = "meow"
                      ^
meow
granite geyser
#

yay!!

#

/run

operator fun Int.plus(other: Char) = other + 1

fun main() = println(1 + '1')
rugged berryBOT
#

Here is your kt(1.8.20) output @granite geyser

2
granite geyser
#

/run

operator fun Int.plus(other: Char) = other * x

fun main() = println(1 + '1')
frosty obsidian
#

its actually very useful when you're dealing with a class thats just wrapping some underlying data type

rugged berryBOT
#

@granite geyser I received kt(1.8.20) compile errors

file0.code.kt:1:44: error: unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public inline operator fun BigDecimal.times(other: BigDecimal): BigDecimal defined in kotlin
public inline operator fun BigInteger.times(other: BigInteger): BigInteger defined in kotlin
operator fun Int.plus(other: Char) = other * x
                                           ^
file0.code.kt:1:46: error: unresolved reference: x
operator fun Int.plus(other: Char) = other * x
                                             ^
file0.code.kt:1:44: error: unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public inline operator fun BigDecimal.times(other: BigDecimal): BigDecimal defined in kotlin
public inline operator fun BigInteger.times(other: BigInteger): BigInteger defined in kotlin
operator fun Int.plus(other: Char) = other * x
                                           ^
file0.code.kt:1:46: error: unresolved reference: x
operator fun Int.plus(other: Char) = other * x
                                             ^
granite geyser
#

/run

operator fun Int.plus(other: Char) = other * 2

fun main() = println(1 + '1')
rugged berryBOT
#

@granite geyser I received kt(1.8.20) compile errors

file0.code.kt:1:44: error: unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public inline operator fun BigDecimal.times(other: BigDecimal): BigDecimal defined in kotlin
public inline operator fun BigInteger.times(other: BigInteger): BigInteger defined in kotlin
operator fun Int.plus(other: Char) = other * 2
                                           ^

file0.code.kt:1:44: error: unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public inline operator fun BigDecimal.times(other: BigDecimal): BigDecimal defined in kotlin
public inline operator fun BigInteger.times(other: BigInteger): BigInteger defined in kotlin
operator fun Int.plus(other: Char) = other * 2
                                           ^

frosty obsidian
#

Char is not a number

#

can't multiply it

granite geyser
#

/run

operator fun Int.plus(other: Char) = other.toInt() * 2

fun main() = println(1 + '1')
rugged berryBOT
#

@granite geyser I received kt(1.8.20) compile errors

file0.code.kt:1:44: warning: 'toInt(): Int' is deprecated. Conversion of Char to Number is deprecated. Use Char.code property instead.
operator fun Int.plus(other: Char) = other.toInt() * 2
                                           ^
98
frosty obsidian
#

other.code

granite geyser
#

yum

frosty obsidian
#

char is just a character

#

one that would be in a string

granite geyser
#

@frosty obsidian you will make a calculator in kotlin that adds a random number to the result so its always off

frosty obsidian
#

nop

granite geyser
#

and then publish it to google play

frosty obsidian
#
inline operator fun plus(capabilities: Capabilities): Capabilities = Capabilities(bitmask or capabilities.bitmask)
royal nymph
fleet cedar
#
  • is syntax sugar for .plus
#

Which is pretty based tbh

frosty obsidian
#

weird its almost like i said both of those things

#

must be deja vu

lone gust
#

LMAO

quick crow
#

@formal belfry gonna follow up here, do you think there's any reason it's not animating rn?

.CenterModal
{
  height: calc-size(auto);
  transition: all 0.3s ease-in-out;
}
<div className="CenterModal">
  {ScrollSections[scroll]}
</div>
const ScrollSections = 
[
  <>
    <h1>Hey!</h1>
    <h2>
      I'm Samwich, but you can call me Sam (if you want).
      I like programming, gaming, and open source software.       If you find me in any communities, say hi!!
    </h2>
  </>,
  (more of these)
]
quick crow
#

Yeah it's really weird

quick crow
#

Yeah after a lot of research i can confidently say i have absolutely no fucking idea

deep mulch
#

i feel hopeless

#

i have been trying to get cross compilation for my c++ code

#

for oiver a month

#

i have tried cmake

#

meson

#

zig

#

xmake

#

i cant figure it out and literally no one else knows

#

jasndasbgfhbwefwef

#

i love not being able to develop anything cool

#

got a barely working youtube app

#

i just wanna make something that actually works

#

and i just cant

#

its like

#

ive got some innate inability to comprehend this stuff

#

no matter how hard i try or how much time i put in to this

knotty copper
#

gl man

#

๐Ÿ™

jade stone
#

does anyone here have experince with writing vscode extensions

#

i need help with how the formatter api works.
for the life of me, i cant figure it out

royal nymph
#

don't ask to ask

royal nymph
#

sorry if I deleted too much

#

idk if u said anything of relevance sadan

deep mulch
#

@royal nymph what if you made vprune have funny feature where you reply to message to prune to and you wont have to enter number

royal nymph
#

I actually thought of a similar thing

deep mulch
#

doo

royal nymph
#

you will not break rule 5.1

royal nymph
lone gust
jade stone
deep mulch
#

`yes

lone gust
#

it would only delete up to 14d

#

no matter what

ornate quiver
lone gust
#

@lavish frigate ik my pfp is discord on github (forgot to change will do) but there cant be that many other themasterkittys can there ๐Ÿ˜ญ

deep mulch
#

guh question

#

mpv-android they have each shared library seperate

#

and im wondering

#

if theres a reason one might do this instead of compiling everything to a single library

runic sundial
#

Less memory usage idk

deep mulch
#

ithink on jvm side i wouldnt be able to do that

#

having them seperate

#

unless i implement additional loader logic to load all of them

#

i think thats right

runic sundial
#

Mh

#

The linking itself is weird.

#

Like the process of linking doesn't require the lib to use jni

#

For example, I can load an opengl.dll with tracing hooks using the same thing

#

Then something else that needs opengl will use that opengl

deep mulch
#

funny

#

i think it might be working how i want it

#

the output files are all over the place

#

its making libmpv.so and all the other libraries

#

subprojects/libass/meson.build:220:8: ERROR: Problem encountered: Either DirectWrite (on Windows), CoreText (on OSX), or Fontconfig (Linux, other) is required. If you really want to compile without a system font provider, set -Drequire-system-font-provider=false

runic sundial
#

Lib ass

deep mulch
#

yes

#

i have no idea how to compile for android

#

maybe i got it to work now

runic sundial
#

No way

#

Howie

deep mulch
#

not sure

#

im trying to figure out this fontconfig

runic sundial
#

Maybe it doesn't matter

deep mulch
#

its just ignoring it

#

guhhhh

#

or not i guess

green gulch
#

@lone gust Yo, I can show you here give me a sec

green gulch
#
    anonymiseByDefaultExts: {
        description: "File extensions to anonymise names by default (comma separated list)",
        type: OptionType.STRING,
        default: "",
        isValid: (value: string) => {
            if (!value.trim()) return true;
            const extList = value.split(',').map(ext => ext.trim());
            const invalidExt = extList.find(ext => !/^[a-zA-Z0-9]+$/.test(ext));
            if (invalidExt) return `Invalid extension: ${invalidExt}. Use only letters and numbers.`;
            return true;
        }
    },
#

Kinda like that

lone gust
#

k thx

green gulch
#

might need to tweak it a bit

lone gust
#

probs not

#

maybe the wording tho

green gulch
#

no problem

#

ye

lone gust
#

@green gulch what would the regex be to allow a period in front of that btw

#

nvm found it

green gulch
#

o yea my bad

!/^\.?[a-zA-Z0-9]+$/
lone gust
#

thx

#

whats the !/ do

green gulch
#

oh thats not the regex

lone gust
#

ik

green gulch
#

copied that by mistake

lone gust
#

what does it do tho

green gulch
#

condition

#

const invalidExt = extList.find(ext => !/^[a-zA-Z0-9]+$/.test(ext));

lone gust
#

yeah

green gulch
#

NOT operator

lone gust
#

ohhhhh

#

oop

#

i dum

green gulch
#

so it checks if it doesnt match that regex

lone gust
#

yeah

#

ik what not is ๐Ÿ˜ญ

green gulch
#

yes

#

good

lone gust
#

i just didnt realize

green gulch
#

lmao

lone gust
#

cool thx

green gulch
#

no problem

lone gust
#

it doesnt show up in tab complete but the isValid part is correct right

#

or r u not sure

green gulch
#

ye im testing it now

#

works for me

lone gust
#

k

#

cool

#

tysm

green gulch
autumn sigil
#

commaa?

dusty moth
#

(main.rs,v)

autumn sigil
#

comma/ta

#

not aa

fleet cedar
#

Linguists love commata, but real humans say commas

lavish frigate
#

I got booโ€˜d out of DMs you guys probably agree with me that this would be cool syntax right? ๐Ÿฅบ

$assignee = $object->getAssignee();
$author = $object->getAuthor();
$withUser = with ($assignee, $author);

if ($withUser) {
  $withUser->setObserver([...$withUser->getObserver(), $object]);
  $withUser->save();
}
fleet cedar
#

Perhaps? Depends on wtf that means

lavish frigate
#

it evaluates every single expression containing "withUser" for every single variable inside its definition, replacing withUser with the actual variable

#

less powerful but less ugly for loop

green gulch
lavish frigate
# lavish frigate less powerful but less ugly for loop

โ€žWhy not just write a for loop thenโ€œ a for loop is too complicated for running just a single if statement basically and would definitely be something that shows up in code review ๐Ÿ˜ญ
โ€žthen why not just write both if statements out??โ€œ Iโ€™m too lazy.

royal nymph
#

or whaaa

lone gust
#

oh god

royal nymph
#

never cook again..

lavish frigate
lone gust
lavish frigate
#

I just used php cuz I was writing that exact code when I thought of it

royal nymph
#

why not just

$assignee = $object->getAssignee();
$author = $object->getAuthor();
$stuffs = array($assignee, $author);

foreach ($stuffs as $stuff) {
  if ($stuff) {
    $stuff->setObserver([...$stuff->getObserver(), $object]);
    $stuff->save();
  }
}
#

๐Ÿ˜ญ

lavish frigate
lone gust
#

kk

royal nymph
#

php is malware unfortunately...

lavish frigate
lavish frigate
lone gust
#

kk

#

i will delete it

lavish frigate
royal nymph
#

ur supervisor is a dumb idiot

lone gust
#

most are

lavish frigate
royal nymph
#

well idk php

#

i literally googled php array

lavish frigate
royal nymph
#

not my fault u chose the worst language imaginable for the example

lavish frigate
royal nymph
#

NO

#

ITS WORSE

#

how would u even implement that efficiently

#

it would still just use an array under the hood

lavish frigate
#

We are in php

royal nymph
#

the point is just use an array ๐Ÿ˜ญ

lavish frigate
#

We donโ€™t need efficiency

royal nymph
#

all ways lead to array

lone gust
#
function statsSort(stats) {
    const count = { };
    stats.forEach(stat => {
        if (!Object.keys(count).includes(stat.name)) count[stat.name] = 0;
        count[stat.name]++;
    });
    return Object.entries(count).sort(([, a], [, b]) => b - a);
}

just put this here to make you guys feel better abt yourselves
this is how i sort my stats for my dc bot when checking them

#

where tf did syntax highlighting go

royal nymph
#

why not just

foreach ([$object->getAssignee(), $object->getAuthor()] as $thing) {
  if ($thing) {
    $thing->setObserver([...$thing->getObserver(), $object]);
    $thing->save();
  }
}
#

so good

lavish frigate
#

I will switch to rust then if php is badโ€ฆ

royal nymph
#

!Object.keys(count).includes(stat.name)

#

die