#๐ช -progaming
1 messages ยท Page 10 of 1
the space between int and i makes a difference
yes
you kinda need to have a token splitter
/run
fn main(){let i=5;println!("{i}")}
Here is your rust(1.68.2) output @glacial mirage
5
type-dependent parsing is a good way to have everyone stab you
rust is almost there but the let needs a space
ruby has = at the end of method names
i don't like the : type declaration because it allows you to emit it and allows people to do awful things
:3
make me use github search to work out what a function does then jump between several sites for documentation

worst case
you love
SomeReallyLongClassNameYouHaveToWriteTwiceAbstractFactoryGenerator x = new SomeReallyLongClassNameYouHaveToWriteTwiceAbstractFactoryGenerator(5);
or fun things rs fn main { foo = 2 println(foo: u8) // 2 println(foo: Rational) // 2/1 println(foo: Multiset(Unit)) // {() x2} }
what language is this
(```rs for highlighting only)
fir
not yet complete; still have some bugs to iron out
force of habit
shit that's a Rust variable declaration
ok now it's fir

Are the things after foo the typenames?
yeah
imo dreamberd solves this problem
const var i: Int = 5?
Why do you need to specify type names when you're calling the function?
where draeberd compiler
type ascriptions; coerces foo to a concrete type
i folloewd the dreamberd github rpeository before people were even youtubing about it
still not compielr
there's an interpreter: https://github.com/vivaansinghvi07/dreamberd-interpreter
Imma look up what that is ๐ญ๐ญ
the a: T pattern/expression/type returns a and requires it to be type T
Oh I think in c & c++ thats called casting
the 5 literal is an invocation of fromInteger(5: Integer)
Unless it's some sort of overload stuff that converts the variable via a weird function
in c it doesnt' require it
it assumes it
therefore foo has the type for(n: type) n if Integral(n)
trait Integral(n: type) {
fn fromInteger(x: Integer) โ x
fn toInteger(self: n) โ Integer
}```
In some cases things can be implicitly casted such as floats to integers and visa versa (also to and from void*)
Well not from
Idk
isn't that like operator int or something
haha template<typename T> operator T&
ints go into float automatically
but not the other way round
is #"
multiline string
"""#
cursed
huh
In c there's (typename)var in c++ there's 5 kinds of casts. static_cast, dynamic_cast, reinterpret_cast, and const_cast.
in c there's only (typename) var afaik
it introduces ClassName var(5) so they thought it would only be right to introduce int var(5) too i guess
Yeah because that's the same thing sort of
i guess it's like there's explicit int(float) somewhere lol
In assembly, there is no actual difference to int i = 5 vs int i(5)
At least what I've observed
i = mut(t = int)(5) 
Why would there be a cast for that?
Int doesn't have a constructor
it basically does
i mean the language abstracts that all away
True
you can do int()
or at least int{}
maybe not int()
/run
#include <iostream>
std::cout << int() << '\n';
Here is your c++(10.2.0) output @winged mantle
0
ok that does work
/run
std::cout << "e";
@brave gyro I received cpp(10.2.0) compile errors
file0.code.cpp: In function 'int main()':
file0.code.cpp:2:6: error: 'cout' is not a member of 'std'
2 | std::cout << "e";
| ^~~~
file0.code.cpp:1:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
+++ |+#include <iostream>
1 | int main() {
chmod: cannot access 'a.out': No such file or directory
/piston/packages/gcc/10.2.0/run: line 6: ./a.out: No such file or directory
Why does it not require main but it requires iostream lol
you can't do this
/run
#include <iostream>
struct Structure {
int age;
};
int main() {
Structure structure(26);
std::cout << structure.age << '\n';
}
@winged mantle I received c++(10.2.0) compile errors
file0.code.cpp: In function 'int main()':
file0.code.cpp:8:27: error: no matching function for call to 'Structure::Structure(int)'
8 | Structure structure(26);
| ^
file0.code.cpp:3:8: note: candidate: 'Structure::Structure()'
3 | struct Structure {
| ^~~~~~~~~
file0.code.cpp:3:8: note: candidate expects 0 arguments, 1 provided
file0.code.cpp:3:8: note: candidate: 'constexpr Structure::Structure(const Structure&)'
file0.code.cpp:3:8: note: no known conversion for argument 1 from 'int' to 'const Structure&'
file0.code.cpp:3:8: note: candidate: 'constexpr Structure::Structure(Structure&&)'
file0.code.cpp:3:8: note: no known conversion for argument 1 from 'int' to 'Structure&&'
chmod: cannot access 'a.out': No such file or directory
/piston/packages/gcc/10.2.0/run: line 6: ./a.out: No such file or directory
but you can do this
/run
/run
#include <iostream>
struct Structure {
int age;
};
int main() {
Structure structure{26};
std::cout << structure.age << '\n';
}
Here is your c++(10.2.0) output @winged mantle
26
Yeah but if the cpp team added your struct to the overloads of cout, it could
it's getting age
Too bad c++ doesn't have introspection
Age is an int so that works because that's one of the overloads of cout
that doesn't work
It overloads the bitshift left operator
press ctrl+z?
I'm on phone
ah
My point was that technically cout could print your struct if they overloaded it and internally printed the int
That's it
(Overloaded it) => Overloaded bitshift left operator with your struct
You could also make a wrapper for cout that does that. I once made a wrapper for cout that made it more like printf https://gist.github.com/lannoene/c3062acdbbd5ddfbc7de3661b161446d . Cout's syntax is kinda garbage imo
iirc you can like overload operator<< for structure or something like that
i think javascript strings length being wrong makes total sense now
they're encoded in utf-16, right? so length gives you the number of bytes / 2
okay that makes sense
the () calls a constructor, which doesn't work
but you should not be using string length as length in bytes for any reason
the {} does memcpy initialization so it's fine
it's correct for most stuff
java actually handles this worse
I'm using memcpy to refer to the type of initialization (data is being directly copied; no other shit is happening)
length returns the wrong thing, looping over it gives you multiple characters for ๐ too
yes
(and it is actually one unicode character)
because java is utf16 natively
hmm that reminds me, I need to handle strings
vchars ๐
โโ ๐ โ SLIGHTLY SMILING FACE
husk
this does [...string]
not useful
Here is your js(18.15.0) output @winged mantle
2
Sussy encodings making life harder
vchars ๐บ๐ธ
โโ ๐บ โ REGIONAL INDICATOR SYMBOL LETTER U
โ ๐ธ โ REGIONAL INDICATOR SYMBOL LETTER S
length is just reading a value
/run ```js
console.log("๐".length, [..."๐"].length)
iterator must do additional decoding
Here is your js(18.15.0) output @dusty moth
2 1
โบ is one
โบ๏ธ is two
oh wait
maybe not
discord handles this weirdl
maybe there's some kind of control character
it uses โบ and variation selector
โบ is just my keyboard's Compose :)
which makes destructure the same length
as it's not a surrogate pair but rather two different charws
emoji are so fucked
emoji โ ๐๏ธ :fire:
yeah tbh i was amazed you could make something to count them in under 100 lines of javascript
I'll probably make iteration (and length) give graphemes in fir
๐ญ๐ญ๐ญI didn't realize the initialization is different
unicode is black fucking magic
Proof I still have much to learn
with time you might end up writing time travel code by mistake
one thing i never use libraries for is getting a random value from an array

There are 47 other projects in the npm registry using is-even.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
i think if you're using this the way you write code is wrong
well idk
either it's wrong or it's just javascript

JS is just Like That\โข
Does the % operator work on floats in JS?
{} + [] evaulates differently in devtools and node repl
yes
i like typescript because you can write smoething somewhat typesafe (*cough *any) in a reasonable amount of time
typescript has dependent typing right?
is there typebython
Epic no random mod function you have to use like in c
there's mypy or something iirc
everything is a double
there are no ints
Really?
only doubles and integers
is there myby
https://github.com/mathialo/bython reference
is fir meant to be similar to dreamberd
what's dreamberd
it has const const
oh that's the uhh const const const a = 2 thing
in Fir all variables are const
the mut function creates a const pointer to mutable memory
e.g. a = do mut(2), then a.put(3)
(the do is important as it wouldn't know it's supposed to do something; without it it'd set a to the action of making mutable memory)
that's an integer, not an int
cant even json that shi
there's no smallint
why only have i(32) and i(64)? I'm going to fuck with i(37)
yeah, but they are doublefied when JS is operating on them
what's the point of floating point numbers tbh
? wdym
ohhhh
1500
that sucks wtf
coerce index to uvar โ index array โ coerce to number โ add 1 โ coerce to u(8) โ store into array
they're so evil
i love javascript javascript is so awesome
what's 0.1 + 0.2
not == 0.3
do you want the right answer or the ieee answer
but thats just ieee
Obviously 0.30000001
as a tribute to 0.1 + 0.2 I'm introducing floating-point error to my ints
now 1 + 2 == 34
the nes's cpu had no floating point support
Are floating point errors caused by inaccuracies in converting from base 10 to base 2 and back?
yes
K
like how โ is representable easily in base 3, but not in base 10
God floats are just weird
well more like ieee 754 to base 10
Yeah but I think both the mantissa and exponent are stored in base 2.... because bits.....
Those stinky bits
i have never bothered to learn ieee 754
just reinterpret cast and hope every platform uses it
isn't reinterpeting a float as an int explicitly UB?
Doubles I haven't looked at at all
i'm just gonna say implementation defined to make myself feel a little better
then again all code I write can trigger UB
i think ub is stuff you should never do
but assuming ieee is okay... as long as you check in the built setup that it's supported ig
nah i'd *argv
i'd assume *++argv is a valid pointer
ignored
Doesn't reinterpret cast only work on pointers?
its the user's fault for not reading the docs
iirc it's like Rust std::mem::transmute
Ah
i will troll them with a segmentation fault or memory corruption
SIGSEGV? time to rm -rf /*
are there any plugins which use ApplicationCommandOptionType.ATTACHMENT?
the ctrl+shift+f in question
tbf its prolly something to do with my vs settings (which i cant be bothered to fix) but i always get spammed with plugin errors from the custom dependencies when i open an editor but its fine when its opened alone
here's a fun question.
what can you supply to the arguments of this program to make it crash 
if (process.argv < 3) return;
console.log(`${JSON.parse(process.argv[2])}`)
oh wait
obvs just invalid json
if (process.argv < 3) return;
try {
console.log(`${JSON.parse(process.argv[2])}`)
} catch (error) {
if (!(error instanceof SyntaxError))
throw error;
}
i just found out this is crashable
or even this
if (process.argv < 3) return;
try {
var myCoolObject = JSON.parse(process.argv[2]);
} catch {
}
console.log(`My cool object: ${myCoolObject}`);
makes it more obvious
but it's also scary i never thought of this
everything is a lie
okay i'll just share because it would be useful if anyone could tell me how to prevent this

(google will not help)
scary
encodings are painful
it suddenly occured to me that my whole life i have been telling languages to parse something with utf-8 but that might cause bugs...
what if something wasn't saved with utf-8
i think it's best to bind object to null prototype
then you'll get an error with any input
Maybe some schema validation? allow only whitelisted keys
beautiful code
check if it has unsafe keys
const isMalware = object => ["toString", "valueOf", "__proto__"].some(k => Object.hasOwn(object, k))
idk if there are any other silly keys
it's non standard you shouldn't really do it
but in reality it's standard
you should use Object.getPrototypeOf and Object.setPrototypeOf
you love document.all
my code relies on the property specifically implemented to keep people from relying on it
how to test if document.all is actually supported
!!document.all?.toString

or even (document.all ?? 0) !== 0
is there ever ub in js?
sad ๐ข
if you trigger ub in v8, then yeah
all of this code honestly gives nearly no benifit to what im trying to acomplish it just makes what im doing "feature complete"
didnt ask about v8
what language
golang
is there a good guide somewhere on how to write systemd unit files
i have no clue, and havent found any good docs
i just look them up online
no docs just community made ones
you do know that it can be arbitrarily big, right?
it's not necessarily as fast as one might desire
unless you love python
I KNWO
oops my bad
didnt mean to caps
i know, ive been using js for years now
then you know number is just fine :3
i dont
i would use bigint for ints all the time.
but at no point do i ever need an int unless im indexing an array
Any reason?
statements dreamt up by the utterly deranged
is it just me who hates how ugly typing destructures is in typescript?
function foo({ bar }: { bar: string; }) {}
i wish there was some syntax like this:
function foo({ bar: string; }) {}
i know this clashes with renames, but 
it's especially ugly in react component that take like 10 props
you have no idea how often I unintentionally did that only to find out that that doesnt work
I usually just do this ```ts
interface Props {
a: string;
b: string;
}
function Foo({
a,
b
}: Props) {}
or ```ts
function Foo({
a,
b
}: {
a: string;
b: string;
}) {}
you should just make a props interface but yeah
if I have wayy too many props tbh I just don't deconstruct it anymore
seems like there could be the as keyword used there, e.g. ```ts
function foo({ bar as string }) {
}```
that shouldn't conflict with pure js; might make a PR if I randomly remember this
yeah don't think
you probably need to make an rfc and sent it in a letter to typescript hq
as doesnt make sense
youre not casting
helo
If anybody has any good ideas for it, I'm making a distro tailored for creatives and would like some input on desires and what would help to seperate my distro from the crowd
yeah that would be nice
Honestly not sure where to begin. Is there any way i can 'intercept' messages being sent from the message bar?
as in, get the event before the discord client would?
once again xy problem :p
I don't think so in this case; I'm trying to pass it up into the main app so that I can redirect it to another account
my current 'project' is like pluralkit but w/ real accounts instead of bot
if a user types a message that's supposed to be redirected elsewhere it'd be a bad idea to let discord process it
if u use vencord it's easy
I wish it would actually load here ;w;
nomatter how early i specify the preload it never seems to load properly
i've found the react code responsible but i have no idea how to hook it
actually, figured out it's much easier to just hook the sendMessage function instead of trying to hook the message bar directly
search for Vencord.Api.MessageEvents._handlePreSend with vencord installed and you'll see where to patch
thank you!
egh. Even with a completely unmodified web client anti spam seems to absolutely hate me and my client
I'm almost always getting captchaed or forced to reverify
electron right
yeah
you need to spoof user agent
i do
to what
chrome 126
send UA
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.3
are you actually on Windows?
yes
and what does navigator.userAgentData.brands[1].version say
either you misscopied or you forgot a 6 at the end
ah. that resolves 118
Yeah i thought it was weird too but thats what i originally observwd from chrome 126
might just be my mistske though
Do i need to spoof yhe userAgentData too?
Oh vesktop just uses a ua per platform and that's it?
no need to poke with userAgentData?
ah okay
Curious, does vesktop fix screen share support?
atleast for me any calls to getMediaEngine().getDesktopSources() would result in DOMException: Not supported
stupid question I could have just searched the repo, lmao
POV you use golang
this error still perplexes me. It's literally the first thing in the preload
is that in the browser?
No, it's a webPreferences.preload on a <webview> in electron 31
Yes; i have contextIsolation disabled for this testing
you need to attach Object.defineProperty(window, "Vencord", { get: () => Vencord }); to the end of the preload
or just use webframe.executeJavaScript
well, it's a start xD
no vencord menu but it has the version string
NEVERMIND i'm just blind
thank you!
that also means you can use vencord apis now
and check the build scripts for how to be able to import vencord modules using those types
https://github.com/Vencord/Vesktop/tree/main/scripts/build
(alternatively you could access via raw global but it's not recommended)
this looks fire https://haxeui.org/api/getting-started/welcome.html
anyone tried it? good experience? bad experience?
im kinda considering rewriting vencord installer with it

why does hardcoded regex vs regex in a variable change the output with String.matchAll
this gave me a headache for too long
i use this regex a lot, so i defined it at the top of my file
const emojiRegex = /<(a?:\w+):(\d+)>/g;
i have these lines in a function to test my regex beacuse it wasnt working
console.log("text", text);
console.log("matches", [...text.matchAll(emojiRegex)]);
it outputs
text "asd  to21lkasdj 
matches [
[
"",
":trolley",
"1188175804325175339"
]
]
but when i run this in the browser console
[...('"asd  to21lkasdj '.matchAll(/<(a?:\w+):(\d+)>/g))]
i get
[
[
"",
":blobcatcozy",
"1213739137941639168"
],
[
"",
":trolley",
"1188175804325175339"
]
]
If anyone knows why this is behaving the way it is, please let me know
Works fine even in termux
global regex is stateful
functions like .test() and .exec() change its state
Why does regex even need a state...
because you need it for looping
const re = /hi/g
const input = "hihihihihi";
let hiCount = 0;
while (re.test(input)) {
hiCount++;
}
Based on what vee is saying, you should be able to remove the g and since ur using matchAll anyways it should fix the issue(?)
I would expect an Infinite loop, but not 5 ๐ญ
no you need g for matchAll
Bruh
that's what you get if the regex is not global
if it's global you want to find all matches
does new RegExp take regex as an argument
so the regex keeps track of your position in the string
I know it takes strings
you can just reset the state
Oh, how
Js horror
why
it's js being good
it's being useful
Exactly
each time you run it it finds the next match
I don't use global regex
const re = /hi/g
const input = "hihihihihi";
const matches = [];
let match;
while (match = re.exec(input)) {
matches.push(match);
}
@jade stone does
ur missing out..,
this is how to find all matches in string
.matchAll is a very modern function that aims to replace that boilerplate
Wait, if i pass another string and then again previous one
Will the state change?
this will happen
/run ```js
const re = /h/g;
console.log(re.test("h"))
console.log(re.lastIndex)
console.log(re.test("h"))
console.log(re.test("h"))
re.lastIndex = 0;
console.log(re.test("h"))
re.lastIndex = 0;
console.log(re.test("h"))
re.lastIndex = 0;
console.log(re.test("h"))
Here is your js(18.15.0) output @royal nymph
true
1
false
true
true
true
true
Again, how
Ah
Last index
I've used that before
I should somehow not forget about this
You Will Forget
Already did
it should return a separate object but ig js is single threaded so it doesn't really matter
well that's what matchAll is
they already fixed it
cool
unfortunately javascript has to keep compat so old cursed stuff is there forever

the main issue you create with globals in javascript is memory leaks but i guess it's just a counter?
they're instance properties not globals
wait til you find out about RegExp.$1 - RegExp.$9
/run ```js
/(c)d/.test("abcdefg");
console.log(
RegExp.input,
RegExp.$1,
RegExp.rightContext
)
Here is your js(18.15.0) output @royal nymph
abcdefg c efg
if you make the regex global it's a memory leak then

oh wait
HORROR
that's a memory leak even if regex is not global then?
why is it filled with so many nulls
nulls is bad for portability
i wonder what a c json parser does with \u0000

@atomic brook 5*
annex b my beloved
@royal nymph do you know a more stupid way?
unsure if what I made even remotly makes sense if I start to think of it now
oddly the only hit was vencord itself
NVM okay that makes more sense, you were pointing me at a patch x3
The patch wasn't enabled unless MessageEventsApi was also enabled, and wasn't in my case
@ornate quiver happy https://codeberg.org/vee/bot/commit/99d55702158f0996359eb7cda29aa6c05eeee78e
love
progaming
/run
#include <stdio.h>
int main() {
printf("\033[0;31m");
puts("red");
}
Here is your c(10.2.0) output @brave gyro
[0;31mred
open source minky bot when (joke)
one backend dev runs the bot manually
netcat*
with tls powered by the Notebook library
*carrier pigeons โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
any of yall know how to deal with Java Mixins (minecraft modding specifically)
ok wait- dont ask to ask just ask
is it possible to- cancel a constructor, or make it exit early?
trying to just mix into the constructor and use ci.cancel() gives an error
i'm very tempted to say "hard when sober", but yes i have used sponge mixins
they get easier
what mod loader & verison are you using
will look into that
would be easier if it could find any sort of example on how to use it LMAO
WOO
huh
bogged has it's own rendering function?
do all mobs have their own rendering function? That seems weird
I thought they were just based on their json model
yes they do
they dont
oh wait
you need optifime for cem
or some other mod
they should add that to the game (cem)
also yes it is now in the Drowned's classes because for some reason the drowned and only the drowned decided its sleeves shouldnt follow its arms
it forgot to register the fucking mixin thats why
iirc you're not allowed to fuck with constructors in that way
yeah dw kode gave a solution
Vencord: v1.9.3 โข 256a85c9 (Dev) - 7 Jul 2024
Client: stable ~ Vesktop v1.5.2
Platform: Linux x86_64
โ ๏ธ Vencord DevBuild
โ ๏ธ Has UserPlugins
the hell are these devtools bro
webkit
okay tauri kinda fire
wait why does it need all of those env vars for X
i thought you were just gonna call a CLI to install it
and the installer GUI is just a wrapper
evil

reading docs helps
the horror
some dude gonna have non unicode filenames and complain
oh i should use APPIMAGE not ARGV0
what is that, electron vencord installer rewrite?
Tauri not electron
Why not gluon?
isn't gluon deprecated
cause its not production ready and never has been
please stop suggesting software you've never used before ๐ญ
Ok
when using optional(boolean(), true) in valibot for example, it's infered as boolean | undefined despite the fact that if it's not defined it will always just be set to true
nvm i might be doing something wrong
yeah i was using inferinput instead of inferoutput
std::shared_ptr is so cool
how the fuck do you check if there's a polkit agent running without a password prompt
pkcheck --process $$ --action-id org.freedesktop.packagekit.upgrade-system -u; echo $?
this works but it shows password prompt
how did i never know pkexec was a thing
arghh, the challenge of creating an object which updates its state using an event listener and not creating a memory leak
just need to have some timeout
personally the way i solved it is by just making a map
const handlers = new Map<string, Handler>();
eventEmitter.on("event", e => handlers.get(e.id)?.handle(e));
you cant have multiple handlers tho
well that assumes you have some id
ohhh
if you just want to call every handler always, you can use a Set instead of Map
technically you could even use a Map<string, WeakRef> / WeakSet and have js auto-gc the handler whenever there are no references left
but usually you have some clear destroy condition and you can just use that instead
Discord try to use correct element challenge (impossible)
<span role="link">
why not just use an <a> and add a single preventDefault() to onClick
iโd just have used a button
I guess hinting to browser to preload different content isn't desirable then?
browsers typically pre-fetch data for links on hover
but yeah a button would be a more sensible choice as well
iโd have never noticed that pre fetch on hover behaviour on discord when I had dev tools open
though I never paid attention to that
you need to implement custom preloader anyway
cause it's a fetch
you dont need custom preloader when browser implementation is enabled (it is by default)
I am pretty sure this is how browsers implement preloading into everything by default (pseudocode)
Link.Onhover = () =>{
HTML = Fetch(link.href)
Fetch(html.linkedShit) // <link>s and <img>s
// unsure if following actually happens
Run page js for limited time to fill dom (similar to how Google does before indexing)
}
// all http responses are cached during this process, so site load is not slowed by web requests when user actually clicks link.
// notability this still improves loads where the link has event.preventDefault (assuming caches made in above are applicable to `fetch`es made by website's click handler)
@vending.machine#0000
@royal nymph ping broke somehow, see above
- im fairly certain hover preload isn't a stock feature, you have to do it with js
- even if it is, it definitely can't fetch arbitrary json api like discord requires
it's definitely manually if anything lol
frameworks like nextjs allow pre-fetch/have it by default
but discord doesnโt, at least would never have noticed
and discord downloads all bundles on start iirc
no
i think discord just isn't structured in a way thats easy to prefetch
See "Speculative pre-connections" in https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_link-prefetching
Learn about the various reasons why Firefox makes automatic connections to the Internet and how you can stop it from doing so if you wish.
I guess I saw a disclaimer for that elsewhere and assumed it applied to all links
I guess not
they could def prefetch data
thus is explicit
you have to put <link rel="prefetch" href="stuff" /> in ur head
You are not looking at the correct section
I am looking at exactly the section you linked
I couldn't get a link to the exact section so I told you text to ctrl f
when the user hovers their mouse over thumbnails on the New Tab page or the user starts to search in the Search Bar, or in the search field on the Home or the New Tab page.
has nothing to do with links
I know. #๐ช -progaming message
Still more accessible and compatible to use an a instead of a button or span
how so
as long as you specify aria role (and apply link interactivity), it's equivalent in terms of accessibility
Is role eqiv to aria-role? Because they don't have an aria-role
Did they remember to add back ctrl+click, middle click, and ctrl+enter to open in new tab?
- If not, that is proof of compatibility point
- If so, they had to put effort into doing that which is still a loss from not using the right element for the job
Going to sleep, ping me when you reply so I can read in the morning
role is aria role
usually the object will be in a global variable
but i would find it misleading that new ConfigCache("blahblah", blahblah_schema) creates a permanent reference
is there another way to add reactions to messages yet or not
@frosty obsidian you use zed right? im trying to rebind some keys but i cant figure out how to do this
im basically trying to move all copilot autocompletion binds to shift tab
this is my current keymap
[
{
"context": "Editor",
"shift-tab": null
},
{
"context": "Editor && showing_completions",
"bindings": {
"enter": null,
"tab": null,
"shift-tab": "editor::ConfirmCompletion"
}
},
{
"context": "Editor && inline_completion && !showing_completions",
"bindings": {
"tab": null,
"shift-tab": "editor:AcceptInlineCOmpletion"
}
}
]
the enter and tab keybinds dont work anymore which is good, but i cant get shift tab to do anything
no i can't use zed
lmao
it doesn't like my gpu
its joever
radeon r7 200 series
its old but should technically work
i think its just a bug
bleh!
bc im not the only one with this problem
i think its a bug with amd gpus on windows
zed specific
oh youre on windows? my bad xd
thought you were on linux because you were building yourself
luckily zed has officially finished linux support so hopefully they can focus on windows now
you have to build for yourself if you're on windows

well not technically since msys2 has a package but that didn't work
hahaha i just noticed
hence why i built myself
try asking in the zed discord
oh vsc just uses minus to remove keybinds
lmao my dumbass forgot i wanted to actually bind it to shift enter and that works
Spotx does that
Apparently they spotx-bash for linux/mac
@royal nymph how long did it take for the vencord chrome extension to get accepted initially?
I've always wanted a spotify client mod with a similar patching/plugin system to vencord
Spicetify seems pretty weird
does anyone know how to set up nginx on an oracle cloud vps cause i can not get it to work for the life of me
it seems no requests are actually reaching the vps and i have set up the security list properly
Firewall/routing issue perhaps?
iptables should be set up properly, i dont think there is really any other firewall
nvm i just had to reload firewall-cmd ๐ญ
The default policy for input chain is a bit weird; it accepts packets, so if none of the rules within matches, it should still go through ๐ค
Besides, iptables is becoming deprecated in favour of nftables. Oh well
i love cdn.discordapp.com
๐ #๐ฅ-vencord-support-๐ฅ
(Auto-response invoked by @mellow phoenix)
I have to ask is that a theme or is your night light bleeding into screenshots
neat!
Where do i can ask questions related to plugin development?
I dont have permissions to send Messages
why does this regex have two matches
wdym
only 1
the lookbehind
because * means 0 or more
yeah .* catches the asdasd
and the lookbehind is empty cause thats what its supposed to be
changed it to .+ and hteres only one match 
oh
the lookbehind doesn't match
what are u trying to achieve
thats a good question, anyway
name.substring(0, name.lastIndexOf(".")) โค๏ธ
ty, didnt know lastIndexOf was a thing
it is
epic
that looks like he minecrafte fonte
because it is
oh HELL naw...
how does this even work
does the cert not also have codeburger.org as a valid name
*.com =/= com
this would work for www.codeburger.com but the cert needs to have codeburger.com as CN or in SAN
i regenerated my ssl cert with the root and it works now
Thanks!
domains are weird
iirc sub-subdomains dont match *.example.com and *.*.example.com is illegal
wait what
would a cert for *.sadan.zip match one.two.sadan.zip
dont quote me but no, only *.two.sadan.zip would
thats crazy
its funny that i tried this earlier, but i ran it with -d codeburger.org -d *.codeburger.org -d www.codeburger.org but it failed because i had * and www in it
and i was too dumb to remove the www at the time
I'd like to know if any certificates support a double wildcard like ..example.com? I've just been on the phone with my current SSL provider (register.com) and the girl there said they don't offer
I don't see why www and * would be disallowed but perhaps it's just trying to prevent you from issuing redundant sans accidentally
this is what you get for using nginx instead of caddy
How do I run this instead of nginx
=w=
step one is switching your shit search engine to something else
if i wanted a python script to be run every 49 minutes, how would i do that
cron
nope
Cron
chron will not work???
literally
chron works in intervals
@trail brook its intervals of 5 right
5 what
systemd .timer
you can but it'll only do it on the 49th minute of every hour
i want every 49
script.timer
[Timer]
OnUnitActiveSec=2940
im running openrc, ill look into alternatives
why do you need 49 minutes exactly ๐ญ
long story
41 minutes actually mb
if you don't care about precise timing / drift, you can make it a systemd service with restart delay
that's what i do with a program
vee i dont have systemd 
[Unit]
Description=Create Sponsor Graph
[Service]
Restart=always
RestartSec=3600s
ExecStart=node . -o /var/www/meow.vendicated.dev/sponsors.png
WorkingDirectory=%h/github-sponsor-graph
Environment="GITHUB_TOKEN=balls"
[Install]
WantedBy=default.targe

hop on
systemd so good
i SHOULD be able to just use openrc i think
or runit
this is quite funny cause it slowly drifts
the script takes about 4 seconds to complete so per hour it drifts by 4 seconds

Balls is the best token
is this just not possible on openrc?
horror
less efficient
gentoo systemd support is iffy iirc
Hop off gentoo
no
You're bound to be in the minority if you're using anything but systemd. Most popular distros (i.e. distros with generally the highest amounts of users) uses systemd by default. Less users for anything but systemd usually equates to less support, and less support has its own deficits
among gentoo users systemd is less common from what i understand
openrc is the default, youd have to change your profile and configs to use systemd
Im not using nix.
among linux users gentoo is less common from what i understand
so is nix
your point being
my point is i dunno how good the systemd init system on gentoo is
given the main entrypoint distros (mint, ubuntu, etc.) having large userbases and using systemd, systemd is much more common and therefore usually much more supported
i could switch it out with openrc
again
nothing to do with the convo
im talking about on MY system with MY os
not what most users use
you could write a C script or something
ok but why?
then wrap that in a runit service
i dont have runit yet
set an alarm for 49 minutes; minimal clock drift
what does systemd use?
openrc
is what i have rn
considering moving to runit
but my goal for rn is get it working under openrc
im considering just making a cronjob run a bash script at start-up that just loops every 41 minutes
its a python script so
shouldn't be that hard
and this computer will JUST be doing this
wait didn't linux have spawn at some point
an optimized C executable would minimize drift
my internet is crying
is there any way to do animation in js without using requestNextAnimationFrame or setTimout?
i know chrome doesn't update dom elements while the script is running but i'm just wondering if there are any hacks
is there a reason you cant use requestNextAnimationFrame
in javascript, is there a better way to get all captured groups from regex other than matchAll()
i dont think so
either non global regex + match
or re.exec(s)
What do you guys think about Cisco certifications
You can also get current time and calculate wait delay not to get time drift
ca nu help me w smt
there shouldn't be any drift if u use cron
can u help me make radio menu item pls
im struggling
i got 2 radio items and i want to make it only 1 at a time can be selected
Not enough messages saved for channel
if you show us your code then maybe we can help you
what's with that conditon in action
that also isn't enough code, ideally show the entire thing so understandably it's easier to look
I don't use react so I guess someone else will have to help you
could u [perchance vc so i can screenshgare
Nope, sorry ๐
react isnt the problem, its mainly the fact that it doesnt get udated after the conditon changes
liek in console everytime i click it it cahnges the boolean, but it never updates the button
yes it is
you're not understanding how react works
useState
gulp
changing a variable does nothing
you need to use react state
okayy thanks alot this helped
i did some stuff
bbut now another problem
when i select option 2 and leave the context menu, it resets back to opton 1
it doesnt help when you only post jsx, please post the entire function if at all
you probably want to persist it
e.g. in plugin settings
whenever i do that vencord does NOT work anymore
like it just breaks
^
always post code
bascially i wanna fix the radio buttons at line 117 128 155 and 165
wait that one crashes
and the error...?
this is my problem
i dont know how/where to store the settings
could I possibly make my own Store so I could have a shared state in 2 components added by 2 different regex patches?
yes
you can just extend Flux.Store
several plugins do
namely SpotifyControls and MemberCount
Hi, how do I use modules like node-vibrant in a plugin?
just install it normally, and we reccomend if you only use it for one plugin then lazyload it (require it in the plugin start function instead of importing it normally)
but as a warning, plugins that add dependencies generally wont be accepted to upstream vencord, and they make it more complex to install as a third party plugin
alright
how would i require it on plugin start?
use the require function?
let nodeVibrant: typeof import("node-vibrant");
export default definePlugin({
...
start() {
nodeVibrant = require("node-vibrant")
}
iirc thats how you should do it?
also questions like these should go in #๐งฉ-plugin-development
i dont have access
.
oh alright mb
for some reason i enabled it already but still dont have access to chat there
node-vibrant in renderer
requirein renderer

is it async import then? i thought esbuild handles require
you don't
why do you need it
discord has a function for extracting colour from images
@royal nymph Idk if you know it already but the Types for the Badge are wrong. It returns the UserProfile now
your vencord is severely outdated.
more than a month
I use the Typespackage
3rd Party Plugins
just develop them inside ur vencord folder
true lol
Woah, what function is that?
Iโd assume that there is one to get the accent colour of your pfp in case you donโt have a banner
You can set that manually but the default is based on profile picture afaik
how do i access that function?
did you find it
cant seem to
oh is that valibot
wreq.f.css has the best code I have ever seen
else if (/^(5(0(04|331|565|779|866|872|929)|4(5(31|35|4|97)|310|343|642|845)|9(193|45|579|650|716|820)|3(9(00|26|37)|162|289|512)|8(059|120|175)|2(190|2|432|443|657)|7(359|486|539|650|884|951)|1([36]95|37|714|868|966)|5183|5642)|4(0(021|390|854|897)|5((13|26|3)0|125|36|423|621|863)|4(1(3|53|9)|400|442|798|808)|9(131|277|64)|3(135|350|761|973)|8(017|54|707|748)|2(278|360|66|758)|74(35|6)|1(128|17|281|292|814|916)|6(3(17|69|98)|051|161|514|826))|9(0(060|07|220|688)|5(172|226|257|58|8|883|925)|4(005|064|335|354|548|566)|9(8(09|38|57)|293|452|617)|3(288|54|671|776|932)|2(33[39]|173)|7(07|573|66|803)|1(134|249|553|605|729)|6(043|075|278|44|888|894)|8137)|3(5(282|401|489|641|73)|4(049|063|191)|9(092|143|511|627)|3(397|574|78)|8(062|266|310|413|795)|7(194|483|564|880)|1((|8)11|835)|6(371|869|970)|0364|2991)|8(0(305|4|404|797|991)|5(552|668|885)|4(248|686|725)|9(6(35|50|75)|069|289|900)|3(0(32|51|79)|264|536|660|942)|2(158|4|560|634|740|935|961)|7(200|337|353|450|549|786|931)|6(5(3|41|90)|060|465)|102|1553|8358|8938)|2(0(10[12]|212|26|45|55)|5(070|38|402|421|593)|4(273|35|642|783)|9(39[36]|608)|3(401|502|638|657|746|831|982)|8(382|479|538)|2((48|87|94)2|173|6)|7(157|751|877|919|933)|1(013|026|112|305|395|863|897|971)|6155|634)|7(0(192|669|675|742)|5(018|116|280|409|613)|4(194|543|590|673|920)|9([59]21|058|3|598|764)|3(02|628|685|751)|8(7(04|12|86)|273|333)|2(32(|3)|8(5|72|91)|135|458|920)|7((06|48|87)5|578|721)|1(0|517|700)|6(233|49|761|815))|1(0(667|831|926|941)|5(086|168|915)|4(021|466|604|653|760)|9(06|538|615)|8((1|6|91)2|(32|36|41)7|259|531|634|879)|2(192|633|736|876)|7(16|349|396|463|712|945)|6(083|130|169|31|359|547|633|77)|1166|1495|3111|3878)|6(0(493|623|74|827)|5(109|652|95|982)|4(9(08|41|5)|648)|9(015|208|417|473)|3(10|636|757|8|972)|8(614|720|784)|7(422|580|753)|1((36|52|53)6|297)|6([49]62|063|43|75|915)|2104|284))$/.test(t)) {
what the hell, you gotta post a warning before dropping shit code
its discord code so it's ok
What the fuck is that??????????
what even is that checking for lmao??
discord is smoking
@royal nymph You will not be proud to hear my results so far in researching why that error occurs
it's rspack code*
mod.rs: Lines 116-118
include_str!("./css_loading_with_loading.js")
.replace("$CHUNK_LOADING_GLOBAL_EXPR$", &chunk_loading_global_expr)
.replace("CSS_MATCHER", &has_css_matcher.render("chunkId"))





