#🪅-progaming
1 messages · Page 24 of 1
yw
perls your rust
wtf
I think you might be looking for the paste crate
Or a build.rs, if necessary
Or bitflags crate
that's a thing?
Generate types for C-style flags with ergonomic APIs.
Nice
That code won't even compile, with_$_ needs to take mut self
i relaized that and fixed it (and made is_$_ -> bool)
${\(uc)} interpolates $_ converted to uppercase
the ()s are unneccessary I learned
What would you do if you wanted to splice some other variable uppercasely?
if foreach (admin) then "$_ ${\uc}" would be "admin ADMIN"
${\(uc $a)}
$_ is just the default variable
"The default variable" is such a funny concept
yeah
but usually if you omit the arguments it'll print there
e.g. print; prints $_ to stdout
except for die; which uses $@ instead
but *@ = *!; in my code so it'll also accept changes to $!
Do you realize how silly that sounds
not really
oh also by default $_ receives the value of for loops
and sed notation operates on $_ unless you prefix it with $a =~
and if I did e.g. perl while (<>) { chomp; print; } it'd join all lines of stdin to stdout
why js is so racist to local files, i cant even find a way to get my local json w/o getting errors 😭
require()?
assuming node
oh you're using browser
ye
do you want to get a json file stored with the code or a json file stored on the user's device
no i want local json file with some constant info on web itself
just values so i dont need to search through code to edit them
you can import files that are stored on the same origin if you're using esm
or use a bundler
thank you!!!
yw
google is so silent about that
also if that doesn't work await fetch("./foo.json").then(r => r.json())
all of it wants me to buy server 😭
fetch also doesnt work
it tells me to buy a server too
are you using a file://?
no...
what url
same directory
screenshot error
when using file:// urls each file is considered its own origin
you are using a file://
no im not
prove it
fetch("./values.json")
oh
same error
wdym
screenshot the error
like are you clicking on the html file
its not on english
its alr oppened
i just reload page
you can’t do that iirc
that means you are using a file://
you will python3 -m http.server
you need to start a local server
^^^^
do that and then go to http://127.0.0.1:8080/index.html or whatever
oh is that the default
yeah yeah i meant like in general
3000 is node iirc
is your js file transpiled by webpack, babel, or rollup?
rate my generated code
what 😭
because if yes you can add a plugin that allows you to import json and automatically embeds it into your js file when transpiling
it is just generic js file, no imports or anything
okok
isn't that assert { type: "json" } in esm
i don’t remember
@timber root the easiest way i would do it is just
someProject~# python3 -m http.server 8080
import(“./a.json”).then(console.log).catch(console.error)
assuming you’re in the someProject directory:
someProject
L index.js
L index.html # imports that js
L a.json
you should be able to visit http://127.0.0.1:8080/index.html and your json file should work
let me try
is #![no_std] websockets possible
i guess im stupid but its still not working
cargo b
0 errors, 0.10 s
cargo b --all-features
38 errors
what?
Something panicked inside its Drop impl, when that was called while unwinding from the first panic
this isnt rust

no prefix implies that
(i have no context here, assuminig they're fetching in a browser)
they are
forgot about that in browser
been bitten by forgetting ./ so I always include
lol
can you have a secret cow?
add cow to .env
no like a secret box that is a cow
oh no its some rust shit again 😭
actually it'd probably be better to put the secret box in the cow rather than the cow in the secret box
TIL rust has contracts
?
nvm apparently that isnt real syntax
yall
is this a sane way to ensure that tests written in the language itself are safe and correct
the way i test various modules is by using assert
so i think that testing assert should be done first to make sure assert works
but is there any other invariants that should hold true?
if i do it wont be like tha
t
i32 a = 5;
string foo = "\{a}";
``` would be the same as
```rs
i32 a = 5;
string foo = "{}".format(a);
you get used to it
more readable
hop off \
but yeah whatever u call putting a variable right inside a string with brackets is way more readable than .format()
i use \() for interpolation and '' for syntax tree quoting
also shit like let \("a" + "b") = 2;is completely sane
you will suffer
no i like \ because its very explicit that its an interpolation
you will never need to escape it
because youre never gonna write need to write \( in your strings ever
bold assumption
falseeee
i write \( in my strings all the time
dw it's not an arbitrary splice
e.g. let \("Hello, world!") = 2; will make a variable named Hello, world!
$ is more standard honestly
horror
only crapple uses \(
yop
thats why rosie loves it
i would never think to use the escape character
\ for escaping stuff
also splices are compile-time evaluated unless they depend on a var
apple loves being different
i would accept $ or %
CMD / BATCH
perl uses both, and @
wing loves %APPDATA%
nothing longer than a single command i don't want to memorize
i have an idea
i32 a = 5;
string foo = ""`Hello with fmt: $$$_-_INTERPOLATION_=_START_-_{a}_-_INTERPOLATION_=_END_-_$$$ and more after `"";
@deep mulch what do you think
delete
its great
nop
im implementing into elle rn
so how bad of an idea is this
initially all users will be None
when a user connects, a write lock is taken against the slot, then the inner option is replaced with a fresh ConnectionState (killing the old one if necessary)
and a reference to it is kept, allowing the clients' threads to handle incoming packets (as the ConnectionState stores e.g. room info) as well as letting them take the outgoing packet mutex
when a user overwrites an older connection ("killing the old one if necessary"), it sends a Disconnect packet and shuts down the socket
hi, whats your user thing
oh, its just an Arc<RwLock<Option<Arc<ConnectionState>>>>>>>>>>>>>>
oh wait a second
i need more indirection
disconnecting would require me to somehow move out of the Option
but the only way to do that would be to keep the RwLock's writer the entire time
i should've talked to a rubber duck first
only >>>>>
and you excluded the EnumMap
so to disconnect a user I need to somehow move out of the option, meaning I must have a way to take the write lock
however I don't want to accidentally take another connection's write lock
(the only way to disconnect a user as of now is to drop their ConnectionState)
Consider dashmap
can somebody here help me understand what does resolve parameter on loadClass mean?
or how does it affect class loading?
(in java)
Isn't that whether to run static initializers
well the docs say that if that flag is true, the class will be linked
Otherwise it'll be run when you actually do anything with the class, like accessing a static field/method or instantiating it
Afaik yes
k ty
protected final void resolveClass(Class<?> c)
Links the specified class. This (misleadingly named) method may be used by a class loader to link a class. If the class c has already been linked, then this method simply returns. Otherwise, the class is linked as described in the "Execution" chapter of The Java™ Language Specification.
whos supposed to understand this shit though
Linking is the process of taking a binary form of a class or interface type and combining it into the run-time state of the Java Virtual Machine, so that it can be executed. A class or interface type is always loaded before it is linked.
Three different activities are involved in linking: verification, preparation, and resolution of symbolic references.
The precise semantics of linking are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 8 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
This specification allows an implementation flexibility as to when linking activities (and, because of recursion, loading) take place, provided that the semantics of the Java programming language are respected, that a class or interface is completely verified and prepared before it is initialized, and that errors detected during linkage are thrown at a point in the program where some action is taken by the program that might require linkage to the class or interface involved in the error.
For example, an implementation may choose to resolve each symbolic reference in a class or interface individually, only when it is used (lazy or late resolution), or to resolve them all at once while the class is being verified (static resolution). This means that the resolution process may continue, in some implementations, after a class or interface has been initialized.
Because linking involves the allocation of new data structures, it may fail with an OutOfMemoryError.
tldr just what kyuu said
it initialises the class
runs static blocks
and resolves & loads dependencies of that class recursively
apparently resolveClass is a NOOP tho lol
noop?
ClassLoader.java: Lines 1216-1220
protected final void resolveClass(Class<?> c) {
if (c == null) {
throw new NullPointerException();
}
}
cursed
would expect AppClassLoader to be used
cant believe im installing jdk just for testing
erm but why dont you use it as a docker container 🤓
jdk 23 added markdown support to javadocs 
it is if you compile first
yeah its some tools trickery
java is pretty cursed and i dont like how they hide half of the shit behind internals
so you gotta do some weird ass reflection
but AppClassLoader doesnt override that method
it extends BuiltinClassLoader
which also doesn't override
XD
i totally didnt see that
it makes sense tbf
if you run a java file directly without compile it has to so some weird trickery
hence the memory class loader
anyway since you can run plain text source java files with just JRE, JDK is redundant 
real java devs dont need jdk
i would expect to java Test.java = javac -d /tmp/awdhj Test.java && java /tmp/awdhj/Test
that would be easier tbf XD
but it seems like its not that easy lol
really?
yes
i didnt have JDK until i installed it here

id say though, that this is counting as an operation with the class therefore, the static initializers will be ran
vee has fallen
Why would that count as an operation?
It does nothing with the class, just checks if the class object is nonnull
then explain why does that method do nothing?
Dunno, probably legacy shit
fwiw it was a native method in java7
https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/lang/ClassLoader.java#L1009-L1013
ClassLoader.java: Lines 1009-1013
protected final void resolveClass(Class<?> c) {
resolveClass0(c);
}
private native void resolveClass0(Class c);
smh
ClassLoader.c: Lines 228-238
JNIEXPORT void JNICALL
Java_java_lang_ClassLoader_resolveClass0(JNIEnv *env, jobject this,
jclass cls)
{
if (cls == NULL) {
JNU_ThrowNullPointerException(env, 0);
return;
}
JVM_ResolveClass(env, cls);
}
i can't find implementation of JVM_ResolveClass lol
ya
Elle coreutils when
elleos soon
rewrite elle in assembly
Elle game engine that's not raylib
it’ll just end up being an sdl wrapper lol
Vulkan wrapper
ElleGL
i'm bored and feel like making a package manager
...said no one ever
pnpm devs in question
looks nice I like it
can always add -this-is-dangerous
also since when are you green
since today
is there a reason typescript errors if you return a non-void type in a void function
doesnt void normally mean it doesnt matter what something returns
yep, but it's usually a mistake to intentionally return something
I've been trying to understand how watchdis.tv and premid.app were able to use different types of activities (i.e. watching/listening to, etc.) of rich presence even though rich presence wasn't allowed to do so
and apparently they are or were using this endpoint /users/@me/headless-sessions
I'm very curious where this was discovered from
cuz this undocumented and I couldn't really find any info about that
only from digging inside the extension src code
im pretty sure you can just send whatever activity type you want over the gateway
yo
quick question
is there a community-made plugin which creates a pin before you enter discord
like to prevent someone from looking at your messages while you're away from your computer?
yeah
I jst found password protect
but was wondering is there a way to do that for everything
if you use windows, you could just press win+l to lock your computer and make anyone have to put in your pin/password before seeing stuff on your computer
on mac unfortunately 😢
does ctrl + cmd + Q work?
what does the ```js
A = n(2466)
do in discords minified thing
ive basically been trying to create a patch where the defualt poll duration is one hour
but ive never realised how nice having well named variables were
im still very new to this whole thing but these are the patches i have ebeen able to come up with (only the first one works, the others have no effect for some odd reason)
the one patch that works just makes the box look like this (it gets set to 1 day again when i click post)
discord's code does not contain unnecessary whitespace
that's devtools' pretty print adding it
next they should make good varialbe names
it's minified
id just rathe read structured code than all of it on one line
great alr
ill go scroll thru this for a while longer
and see whats wrong
yeah you can still use pretty print but you just have to not put any whitespace in your match that isn't required by js syntax
also instead of the variable names a and n you should use \i and capture groups since those names change every discord update
wait so how does that work
\i is a special regex escape in vencord patches that matches identifiers (variable names, function names, etc)
does it just do 1 character?
instead of /selectedDuration:B/ you should do /selectedDuration:\i/
aah thanks
yeah but those extensions (at least least the first one) work via just discord oauth
that n function is just importing a webpack module by ID
if you look at Vencord.Webpack.wreq you will see it's that function
match: /let\s?\{\s?selectedDuration:\i,\s?onSelect:\i\s?\}\s?=\s?\i/,
replace: "let {selectedDuration: a, onSelect: n} = e; a = 3600"
ok so ive done the patch with a bunch of optional spaces and also set a to 3600, this now crashes saying r.useRef isnt a function (spesifically referring to one where A (which is used in the method to determine the original default) = r.useRef(null))
am i even patching the right file here?
im actually so confused
remember to actually use the captured identifiers
parenthesize the \is you match and refer to them (1-indexed) with e.g. $1 in the replacement
like that?
looks checks notes good
they're ?, they shouldn't affect anything?
also why not let { onSelect: $2 } = $3, $1 = 3600
which replace might work better then seeing as I still get the r.useRef is not a func error
instead of patching the destructure, try to patch to where the function is called and that variable is set
and that duration is quite above the limit
i just assumed it was in seconds
cuz i cant just hold control and click for it to take me to the original function
but you have a search, use it
yes you can
set a breakpoint
once it triggers you can see every value and jump to definition of functions
how do i get rid of burning out from coding so quickly duh
i cant even focus on a project for mor than 1 day
not illegal if no one notices 
OH MY GOD THANK YOU IVE NEVER FELT DUMBER
THAT WAS THE RIGHT PATCH
its visually right now
now make it support custom values 
is it just a $self.settings or sum?
$self.settings.store.setting
ah thanks
remove the B use \i
yop
can someone help me? im trying to use swayfx to set a wallpaper, but after reloading i still see the gray one
if i try it directly i get:
the * must be escaped or quoted
well anyways using "*" would make it execute the command
otherwise it expands to all files in your current directory
swayfx
read -p "Wallpaper path: " && swaymsg -s $SWAYSOCK output DP-3 bg "$REPLY" fill
DP-3 replace with my monitor i suppose
Oh yeah thanks
ah yes FUCKING_GOOD_WALLPAPER.webp

yeah they are interesting, but i easily loose the motivation
im looking for something that i could showcase on my cv though rn
something which interviewers might find valuable/interesting
like yes, rest api is cool and all, but everyone does that
(it should be something in TS or Java/Kotlin)
ive done it by trying to do lower level stuff
so understanding how everything comes together
yea but i dont really know what to code you know
well it has to be sum that intrests you so i cant really tell you
make a programming language
it shows you have the ability to work on a larger-scale project, that you know how modern programming languages work on a deep level, and that you understand how to use the language you used to make your own language to its fullest extent
understand how to use the language you used
what if it's written in itself?
see rustc, javac, g++, etc
there’s surely still a bootstrap compiler written in another language
javac 
rust's was ocaml 🥰
i wonder how an OOP compiler would look
class AddExpr extends BinOpExpr
class BinOpExpr extends Expr
class Expr extends BaseExpr
class BaseExpr extends TokenStream
class TokenStream extends Token
horror
traits are literally the definition of composition
like they are literally just composition as a language feature
and i’m all for it
i love it
Enums bro
i mean interfaces are pretty much the same thing
which isn't that bad
Does anyone know how to use serviceloader here
Somewhat
I'm looking for a way to scan for classes implementing certain interface on runtime
I could use BufferedReader and Class.forname, but i dont think its that effective
You can scan every class, yeah (that's what minecraft mod loaders did ages ago, or at least all classes starting with mod_)
But that's not a particularly great way to do it
ServiceLoader requires implementations to explicitly list their classes in META-INF/services/fully.qualified.ClassNane
yep
Or in module-info.java but I never got that one to work
yeah i did
but its still pain in ass
I kinda want to do this step automatically, so you dont have to write the class reference anywhere, you only implement an if and it will be automatically picked up
You could have something in the gradle scan for classes and generate the meta-inf
hmm yes plugin, already got that idea
is there any way to change the way the instantiation of the implementation classes work?
like which constructor to pikc?
Huh, serviceloader gives instances, not classes
yes
I don't think so, sadly
well thats a pity though
You can of course have the plugins have a method with arguments that gives the real implementation
But that's boilerplate
alright somebody just recommended me: https://github.com/classgraph/classgraph
i guess ill go with some weird ass reflection
not having features is not the best feature for everyone
(e.g. inheritence)
does anyone know how can i get mpd working with spotify?
his eyeballs twitching like that gets me 😢

Java is lovely
this is why i love java
john java
that is one of my disliked things about java with its primitive and boxed types
how does this even work
aren’t primitives supposed to be instances of the primitive’s class
and isn’t int.class Integer?????
isInstance takes an Object, so the 1 is autoboxed
No, int.class and Integer.class are different things
…….
java if generics accepted primite types:
i would imagine java is a pain to actually use
Oh, it is
i haven’t used it but i know how to program with oop so i just need to know the syntax
but from what i’ve heard it’s so bad
i’ve taken a big break from programming to focus on other things lol
i’ve decided i’m not gonna take CS or maths at university so
i’m gonna take fashion and design my own gothic lolita dresses
ive decided i need to take break from life to focus on coding
i was too much living
i was compltely fine, then i changed my life a bit to "start living more" and became suicidal lol
back to the old days we go
compared to C++ it's good but other modern languages it isn't so good
can I work on Elle while youre gone
i doubt i’ll be coming back to the extent of working on elle lol
i’m having a full on personality crisis
it's alright
holy shit its asuka
not the best not the worst, just average
every language was designed in some way, you cant just say that java is bad because its verbose -> java's point was to be verbose
anyone know how to target the "is typing" message? its very specific but i wanna see if it can be moved to the bottom right of the screen through CSS
javas point was to be multiplatform
the verbosity was just a design decision
yes but it was still intentional
Not every point was carefully thought out, some were just what was popular in that era
and people can dislike an attribute of a language
enough people were frustrated with the verbosity of java that we got kotlin
where it wants me to put ";"?????
In what language? Js?
yes
After the int probably
yeah noticed this a bit too late too
haha
yes i'm fine
int → let
(i got it already)
that doesn't let you implicitly convert ? extends Class<?> to Class<?>
is there a saner way to match a field that may or may not exist?
If you have an enum variant with multiple fields, consider extracting it to a struct
does clap support that?
Probably?
I have this and which is meant to only display "uptime" once but when i run the code it displays it twice
And i specify it to be blue
But i get both red and blue
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC [1;2m[4;2m[0m[0m[4;2m[1;2m.buzzzzy[0m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mVersion: [0m[0m1.10.5 ~ 88e8fa7e - Oct 29, 2024[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mClient: [0m[0mStable ~ Desktop v0.0.323[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mBuild Number: [0m[0m339221 ~ Hash: 3687267[0m[2;34m[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC[0m [2;34m[0m[2;34mPlatform: [0m[0mmacOS (MacIntel)[0m[2;34m[0m
[2;35m[0m[2;35mUptime: [0m[0m[34mUptime[0m: 334s[0m[2;35m[0m
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m
Striped down venfast for those that are in servers that ban all mentions of mod clients
Probably there's something that prints ${red}Uptime:${reset} ${uptime} somewhere else
The only thing i have referancing to red in the script is this which is for (2nd pic), it has nth to do with text color
The colors are irrelevant
I don't have any other mention of this in the code
Do you want the full thing?
Try changing the ${blue}Uptime to HELLO WORLD or something
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC [1;2m[4;2m[0m[0m[4;2m[1;2m.buzzzzy[0m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mVersion: [0m[0m1.10.5 ~ 88e8fa7e - Oct 29, 2024[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mClient: [0m[0mStable ~ Desktop v0.0.323[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mBuild Number: [0m[0m339221 ~ Hash: 3687267[0m[2;34m[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC[0m [2;34m[0m[2;34mPlatform: [0m[0mmacOS (MacIntel)[0m[2;34m[0m
[2;35m[0m[2;35mUptime: [0m[0mHELLO WORLD[0m: 9s[0m[2;35m[0m
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m
So uptime is predefined?
But i don't know where, this code isn't fully mine
Uptime is clearly somewhere in your code
These are the only 3 mentions of it in the code
I don't understand where it can get defined
Other than
Maybe it uppercases the object keys
Try changing the uptime: to something else and see where it crashes
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC [1;2m[4;2m[0m[0m[4;2m[1;2m.buzzzzy[0m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mVersion: [0m[0m1.10.5 ~ 88e8fa7e - Oct 29, 2024[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mClient: [0m[0mStable ~ Desktop v0.0.323[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mBuild Number: [0m[0m339221 ~ Hash: 3687267[0m[2;34m[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC[0m [2;34m[0m[2;34mPlatform: [0m[0mmacOS (MacIntel)[0m[2;34m[0m
[2;35m[0m[2;35mNONO: [0m[0mHELLO WORLD[0m: 9s[0m[2;35m[0m
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m
O
I see what's the issue
Lemme try smth
Good idea, i shouldve thought differently
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC [1;2m[4;2m[0m[0m[4;2m[1;2m.buzzzzy[0m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mVersion: [0m[0m1.10.5 ~ 88e8fa7e - Oct 29, 2024[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mClient: [0m[0mStable ~ Desktop v0.0.323[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mBuild Number: [0m[0m339221 ~ Hash: 3687267[0m[2;34m[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC[0m [2;34m[0m[2;34mPlatform: [0m[0mmacOS (MacIntel)[0m[2;34m[0m
[2;35m[0m[2;35mNONO: [0m[0m[34m[0m: 9s[0m[2;35m[0m
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m
Nvrm
Can i make the object key not present, make it non existent. Bcs it seems that whatever is between blue and reset also appears
You can change the code to do whatever you want
I changed
str += ${" ".repeat(25)}[2;35m[0m[2;35m${t(line[0])}: [0m[0m${line[1]}[0m[2;35m[0m\n;
to
str += [2;34m[0m[2;34m${t(line[0])}: [0m[0m${line[1]}[0m[2;34m[0m\n;
And it worked
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC [1;2m[4;2m[0m[0m[4;2m[1;2m.buzzzzy[0m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mVersion: [0m[0m1.10.5 ~ 88e8fa7e - Oct 29, 2024[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mClient: [0m[0mStable ~ Desktop v0.0.323[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mBuild Number: [0m[0m339221 ~ Hash: 3687267[0m[2;34m[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC[0m [2;34m[0m[2;34mPlatform: [0m[0mmacOS (MacIntel)[0m[2;34m[0m
[34mUptime[0m: 80s
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC [1;2m[4;2m[0m[0m[4;2m[1;2m.buzzzzy[0m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mVersion: [0m[0m1.10.5 ~ 88e8fa7e - Oct 29, 2024[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mClient: [0m[0mStable ~ Desktop v0.0.323[0m[2;34m[0m
[34mD[0m [34mD[0m CC [2;34m[0m[2;34mBuild Number: [0m[0m339221 ~ Hash: 3687267[0m[2;34m[0m
[34mD[0m[34mD[0m[34mD[0m[34mD[0m CCCCCCC[0m [2;34m[0m[2;34mPlatform: [0m[0mmacOS (MacIntel)[0m[2;34m[0m
[34mUptime[0m: 83s
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m
Honestly fire
Thank you, i do appreciate it
Action::Pull {
target,
avatar_id,
out,
cem,
pack_root,
#[cfg(feature = "unpack")]
hidden,
} => { ... }
that should work
whoever is familiar with tw/css in general, i want to make fancy shaking(rotating) animation on hover, but it stops when its done and then continues, is there a way to do it seamless?
If you don't want it to repeat, why did you set it infinite
i want it to repeat! but it stops at 100%, pauses for like 0.5s and then continues
ease-in-out makes it slower at the start and end
removing easeinout doesnt change anything
well the problem is
Set it to linear if you want it linear
that you're going from 0deg (100%) -> 0deg (0%) -> 15deg (25%)
make your last keyframe -15deg and only use 3 keyframes
If 100% is not the same as 0%, you'll get ugly jumps when it loops
Unless you have animation-direction: alternate it jumps straight from 100% to 0%
You could set it to from: -15deg, to: 15deg with direction: alternate, yes
That'd do about the same as your current one I think
Possibly with an animation-delay if you want it to start in the middle
keyframes: {
shake: {
'0%': { transform: 'rotate(0deg)' },
'25%': { transform: 'rotate(15deg)' },
'75%': { transform: 'rotate(-15deg)' },
}
},
animation: {
shake: 'shake 2s linear both infinite',
},
like this huh?
That will likely look uneven af
That'd loop like this I think
so how would you solve it?
@keyframes shake {
from { transform: rotate(-15deg); }
to { transform: rotate(15deg); }
}
.shaking {
animation: shake 1s linear infinite alternate;
}
i mean it works, but because i set it on hover it kinda does some weird shit because it moves to the -15deg
You can add an animation-delay: -0.5s
Or you can just do ```css
@keyframes shake {
0% { transform: rotate(0deg); }
25% { transform: rotate(-15deg); }
50% { transform: rotate(0deg); }
75% { transform: rotate(15deg); }
100% { transform: rotate(0deg); }
}
interesting
babe wake up, new tsoding video just dropped
ok, im trying to make a plugin that shows images from my CDN with a command, but i want the command to show the images and gifs from my CDN like /gif would, how can i achieve this?
Is it possible to set a reaction to a message using its ID in the Vencord API?
this find should still work
similar to how the /tenor command works?, I don't really understand your goal as slash commands dont have the ability to preview images and such
thanks, I'll try
what?
Do you have some sketchy derive on that?
does anyone know if i can anyhow access this?
WEBSTORM

oh wait
it's kotlin
it was looking a lot like chrome devtools api LMAO
the this$0?
it ended up being macro shenanigans yes
Patches.java: Line 215
var actions = ((WidgetChatListActions$onViewCreated$2) MoreEmojisViewHolder.access$getAdapter$p(_this).getOnClickMoreEmojis()).this$0;
i'm committing more programming sins
no way this is valid java code lol
i see
inner class
tip: cargo hack check --feature-powerset &| grep 'generated' | grep --only-matching -P '\d+' | paste -sd+ | script -qO /dev/null -c python3 | grep --only-matching -P '\d+' | tail -1 to get the total number of warnings for all of your crate's feature combinations
oh
someone already answered
if it's public then it's just straightforward but if it's private then horror
it's usually (always?) public
if it's private you calculate the pointer offset and use Unsafe right?
no
reflection exists
husk
what's reflection
ye but didnt want to fuck with that lol
like if trying to access private field on parent class from inner class
programatically getting members and can bypass access control
mm
oh that seems cool
class Foo {
private String flag = "djsajkdsikdspokdoskp";
}
// some other class
var flagField = Foo.class.getDeclaredField("flag");
flagField.setAccessible(true); // if you're on JVM, the SecurityManager might disallow this, usually if the class comes from jvm internals
var flag = flagField.get(new Foo());
just get it with refleciton XD
i guess so
hmm technically could minecraft fabric be wrapped around aliucord
iirc people have got it working with non-minecraft java games before
i think quilt is more for that use case though
oh you mean floader
that actually sounds really cool
mixins in android apps
what a great invention
Aliucord is just a shit ton of reflection
is that yours?
yes exactly
eventually someone will get minecraft running in it
then you can just load mods as plugins
multiple people
its not about fucking minecraft bruh 😭
floader is made to be compatible with anything
a good portion
would there be any reason to try to implement that if bunny already exists
unsure
but bunny has been highly unstable from my experience
this is the third time it's cleared my plugin list this month
and i can't exactly ask for support
zeet is scared of react native
ypp
me

react native discord always feel sluggish
Joober, me, rusher, zooter, xintooo, 6pakker and wingwong
the only problems with aliucord i've had is slow launch (prob messagelogger, but i'm working on a cross-platform messagelogger that's faster) and no backports (which I'll work on next)
okay this might be a stupid question, but why java at all if discord phone app is built in react native
cross platform how
whar
you self-host the database and then all of your clients use it as the deleted message store
aliu is for the version before react native
back when it was a native app
yop
126.21 at least a year maybe two
what are you making
intellij plugin
like a bytecode viewer
i made something similiar in past in javafx but dropped it
atleast its not memory leak finally
I steal your most precious memories
sure, you wont find anything besides pain though
for real, i must get an intership at jetbrains when i will be at uni
@shadow vigil is it just me or is slider feedback really bad on 120hz
wrong channel oops
wrong channel.... banned.
Goodbye Rosie tosie
why doesn't vencord export react's context hooks along with the other ones?
@deep mulch zootie tootie
hi
@deep mulch zing zong
@nimble bone guhhhh
yea, just like /tenor and /gif, but instead of it linking to tenor, it links to my CDN
anyone selfhosting supabase here? how do i access auth settings? going to /settings/auth will redirect me to home
Why cowsay
is there any starter guide for how to dev for vencord?
when i look at the regex shit i shiver
pins in #🧩-plugin-development
Code
Hard to argue against that
javascript with types
i loev extension
so yeah this type is inhabited
the recursive cases are Extension → { extension: Extension } → Extension and Extension[] → Extension
but the latter is also the base case, as ∀T. [T] due to empty arrays
therefore [], { extension: [] }, and [[], { extension: { extension: [[], [[]], { extension: [] }] } }] are valid extensions
Congratulations you have invented set theory
@jade stone hi
:D
I don't think it's that big to go in the main dev channels but how do i patch stuff
patch where
and what
it kinda depends what you want to patch though
normal files, binary files???
For example in blurnsfw, how do you even come around to patching
How do you find the things that you wanna maniplulate
browse dom idk
well learn html and javascript before >_>
devtools sources
for classes, it is
but in typescript interfaces implicitly inherit {} iirc
well, they don't really inherit at all
the extends clause just adds a & bound
thats the thing, {} is an object
not in typescript
the type {} and value {} are different
interfaces only exist at type-level
yes, but once you add props, doesnt it extend object
also
interface a {}
is anothing not null or undef
and everything extends object
so its the same thing
except e.g. 2
i'll send a ts playground when I get home
@dusty moth it seems that you're just wrong
object vs. Object
TypeScript has another type called Object with the letter O in uppercase. It’s important to understand the differences between them.The object type represents all non-primitive values while the Object type describes the functionality of all objects.
For example, the Object type has the toString() and valueOf() methods that can be accessible by any object.
ah yes i am
The empty type {}
TypeScript has another type called empty type denoted by{}, which is quite similar to the object type.The empty type
{}describes an object that has no property on its own. If you try to access a property on such an object, TypeScript will issue a compile-time error:
was thinking about value-level extends
yes Object ≠ {}
nope
{} doesn't have toString or valueOf
as a type, object with a lowercase o does not equal {}
again, plain wrong
from lib.es5
{} ≠ Object — your quote explicitly states that it has no properties
most typescript thing ive ever seen
name a value, not a type that can be assigned to Object and not to Type or vice-versa
not to Type?
or type
something that satisfies the type Object but not the type {} or the value {}
object is non-primitive
Object and {} as types are equal
wait no
the thingies are backwarx
backward*
rip my reception
2 satisfies {} and Object but not object
Object.create(null) satisfies {} but not Object
well, it should — if not, it's a typescript bug
Object.create(null) satisfies {} but not Object
well, it should — if not, it's a typescript bug
intended iirc
u good?
learned how to use multiprocessing
managed to close it properly instead of hard killing
Open shortcut menu on vencord with ctrl+/ and then paste this into console:
(async()=>{
// Change this array
// 0 is a low pitch eletric guitar like sound
// 1 is a high pitch eletric guitar like sound
// 2 is a different high pitch eletric guitar like sound
// 3 is a different low pitch eletric guitar like sound
let music = [
50, 0, // Time, arrow id
50, 1,
50, 2,
50, 3,
50, 0,
50, 0,
50, 0,
50, 0,
50, 0,
50, 0,
50, 0,
];
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
let arrows = document.querySelector(".ddrArrows_ad95dc").children
console.log(arrows)
for(let i = 0;i<music.length;i++){
console.log(i, music[i], music[i+1])
await sleep(music[i])
if(music[i+1]!=-1)arrows[music[i+1]].click()
i++
}
})()
it plays yee ol' music
i was too lazy to make a music editor tho
hey guys, if i have usestate in react:
const [bullets, setBullets] = useState(5);
whenever i setBullets bullets - 1, the code seems to be ran twice, why is that?
in production, this doesnt seem to be happening though
its in a dom listener if it helps anyhow
are you using strictmode
its being set like this:
setBullets((prevBullets) => {
if (prevBullets > 0) {
// Do things
return prevBullets - 1;
}
})
i mean i dont think it should cause problems but you said it doesnt happen in production
where is that being ran
in dom event listener
do you mean document.addEventListener or <button onclick=... /> ?
strictmode runs effects twice
so your listener is being added twice
youll need to clean it up properly
i wonder if this is enough or do i need to reference the exact function?
i think you need to match the function
removeEventListener'ing with a different function object is no good
ty guys
ie.
function handleClick() {
console.log("asd")
}
// add listener
document.addEventListener("click", handleClick);
// cleanup
document.removeEventListener("click", handleClick);
yes yes
if it is annoying then you're using react wrong
strict mode deliberately runs everything twice in development mode to make sure your code is correct
if you're handling state incorrectly or not properly cleaning up, it will cause weird behaviour
Which is exactly the point of strict mode
you can have multiple listeners for the same event
you must not only match the function behaviour wise but also reference wise
() => {} !== () => {}
you must use the exact reference you used when registering the listener
@frosty obsidian you
im kind of thinking of adding gui to my logcat program
but
idk if i should keep tui or drop it
do whichever you like more
welp it was for the most part useless for actual help, but got there in the end https://github.com/Vendicated/Vencord/pull/2994
nop
Hey! I hang out a lot on a public League of Legends server, and I usually block people who are annoying, etc. The issue I’m running into is that once someone is blocked, I can’t tell they’re blocked when they’re in other voice channels. I always mute them as well, so I can see the muted symbol next to them before joining a voice channel.
I've noticed that when I search for people to block (in the top right), I can’t right-click to "mute" them, only to block them. In chat, too (screenshot attached), I can block but not mute.
I’d love to try coding a "plugin" or something to handle this, but I’m not sure how to get started. I also noticed that #🧩-plugin-development isn’t accessible, and I don’t have permission to post there - is that intentional?
Would anyone be able to help me get started? :)
about last question: #📖-info
Thanks
im pretty sure discord shows you a popup about a blocked person being in the same voice channel and mutes them automatically?
Eh i didnt seem to notice that.
What I noticed is that I can right-click a user (blocked or not) on the member list on the right, and mute them
But not when I search for a user using id or message.
Makes the message context menu in message search results have all options you'd expect
Vee, Syncxv
i assume that's what you mean?
no I have that plugin.
Here this is what I mean:
I can search you in the serverlist on the right: and mute you
but when I search for you in the search menu
I dont get the option to mute you
thats what I am trying to achieve but i have no clue abt vencord plugin dev haha
if you have some knowledge of typescript & react, check the channel pins of #🧩-plugin-development, lots of helpful stuff there
sorry was muted, what i meant is that it would be incorrect to disable strict mode
if you're handling state incorrectly or not properly cleaning up, it will cause weird behaviour
atleast good to know lol
anyways, recently, the original developer of FF has passed away - https://blog.jetbrains.com/idea/2024/11/in-memory-of-stiver/
I thought u meant Firefox
today marks the day i move all my program's functions into separate files to unclutter the main
coding adventures, episode 3: the autism strikes back
https://github.com/JetBrains/kotlin/releases/tag/v2.1.0-RC @frosty obsidian
tldr pls
bub fixes
no one cares
I do
if i have typescript file with
'use client'
why cant i use localStorage?
can i only use localStorage in components?
i dont understand ruby, im trying to set up rails but literally nothing is working lmfao
That's ok, ruby is not for mortal minds to understand
@deep mulch turns out the tidal api "bug" i experienced was actually caused by me being stupid and not remember-ing the oauth url
I know
🙏 it works now, just had to uninstall linux


god i hate windows
it worked fine on linux
it was FINE
i pressed button and it did t hing
but now list proxies wont share with child processes graaaah i just want to multiproc in peace
why's your screen so dirty 😭
occassionally
ahhh i added an extrra s
ahhhhhh
i added an extrea r
ahhhhh i added an e
(i did notice that e, but not fixing it was funny)]
fuck
lmfaoo medium / dev.to writers picked up on some very early js proposal that is already superseded and has never been implemented in js, and wrote articles like it's a real language feature
ai or just dumb I can't tell
is there any1 familiar with how docker clients talk with the docker socket?
What was it superseded by?
from what ive seen, docker seems to expose some rest api but im not sure
try expressions
well
it's not even an official proposal
personal repo
this is too Go
shorter is not better
nah smth like this is good
i dont like the syntax tho
const [data, error] = try await fs.readFile("file.json");
better
or just try catch expression
const data = try {
await fs.readFile("file.json");
} catch (e) {
// do smth;
}
expression statements are neat
thank you
excuse my bad js skills, but why cant we just use await fs.readFile("file.json").catch(e => {})
- that only works for promises
- it makes it impossible to tell whether it was error or success state since both are stored in the same variable
await Promise.resolve(foo).then(v => [,v], e => [e,,])
Yeah but
oh wait no that doesn't work
await Promise.resolve(null).then(async () => [,foo]).catch(e => [e,,])
thats fucking awful
yes
i mean nodejs proved why this is fucking hell
cb(err, data)
god i have ptsd when i see that
this is great tho
i'd love this
All languages need to have statements-are-expressions
idk it feels like hell for switch statements ngl
i love it for switch
but js switch isnt made for that
i fucking hate switch statements
the amt of extra syntax, boilerplate and edge handling
EEEEEEEEEEEEEEEEEEEEEE
Me too
that's mainly cause js switch sucks ass
Java's switch statements (with ->) are slightly saner
They're a pain to decompile since there's no infallible way to find the end
let thing = match foo {
1 => "one",
2 => "two",
3 => "three",
}
this is rust switch
soooo good
yeah and if you want fallthrough just goto
it's the same thing
switch statements are meant to have fall-tru