#🪅-progaming
1 messages · Page 16 of 1
Html/css + js probably
never
make things which you have almost no idea how to make very shittily and then remake them properly
i unironically do this sometimes
that's a mistake tbh
As much as I dislike some of those, they are all super popular
also they cover big concepts
java is unnecessary, js not so much
disagree
even if you hate it you should definitely learn the most popular language
that doesnt make it necessary!
it does. Java has engrained itself in such much critical stuff, whether we like it or not
you can learn OOP concepts with other languages, there are a ton of OOP languages because of java
while JS powers the entire web
hard to avoid something you use daily
critical stuff like..?
I mean technically JS isn't required for that, but sure, practically speaking it's likely. Java is important both because of the OOP stuff + what it's already integrated with
cassandra db
android
well sure but may i introduce you to react native
what every new app made by any large company is using now
which requires js
not java
mainly*
i have yet to find a single person use cassandra db, or i guess they might be ashamed for it
I hate this
A lot of companies actually explicitly use native because it feels nicer
the go to database i see everyone using now is postgres
postgres for big project, sqlite for small
"feels nicer" doesnt allow for easy cross platform compatibility
like with rn
thats what large companies value nowadays
Doesn't matter. If you are selling a major product, the development is often worth it.
look at electron
cross compat >>>>>>>>>>>> "feel nice"
not to a lot of companies, no
LMFAOOO
paükm fgopkASMFPWÜA
damn
what a bad opinion im sorry
ask any actual full time dev before spouting some shit
This is from a development team lead at Bank of America.
most of the "native" windows ui is webview
every single banking app ive used thus far was made using react native
sorry but java is losing its place
not only because of js and cross compat
This is true

but also because people are starting to move away from OOP
jetpack compose
not talking about kotlin! kotlin seems good yea
I was never a fan of kotlin. We should be fully solving the issue tbh. It's a bit like my issue with typescript.
Typescript is pretty cool but could have fully solved the problem when it just didn't
elaborate?
it couldn't because getting marketshare with huge changes is impossible
light developer-first changes gave it it's foothold
not once compiled
Sure. If more time was spent it could be it's own thing instead of running on top of JS, thus keeping a lot of issues with the JS runtime. I understand that it's an extreme technical challenge to "fix" JS, but what it could have done is used static typing to allow for compile-time optimizations.
the way TS implements its types is honestly probably in the best way it can
^^^
TS shouldnt be its own language
maybe you're looking for https://www.assemblyscript.org/ ?
A TypeScript-like language for WebAssembly
it wasnt made for that
That's exactly my issue with it. I wish it could have actually used the static types for compile-time performance.
but instead you lose any optimizations that could have existed the moment it turns into JS
well written javascript is incredibly performant
comp time pref on web is impossible when considering #🪅-progaming message
you want something using wasm
Well written compiled WASM code is even more performant
the problem i have with this rn is that TS is supposed to just improve JS and make it more safe by adding types, it shouldnt be its own language, it wasnt made to be, it wasnt thought it to be
if you want a language with good types that compiles directly to machine code use C++/Rust, whatever but TS is not the way !
assemblyscript does exactly what you want
wasm is effectively just a bytecode lang like java bytecode right?
also often time wasm performance is worse than raw js xd
really js can be very performant if you don't write shitcode
yes it was made to allow for other languages to compile to it, though its very underpowered right now
v8 is incredible
we should bring back java applets
...no? Unless you're writing shit code or using a language that has inefficient wasm compilation you're gonna get more performance
RUST applets
rust can compile into wasm
yah
i think wasm would be very cool if it could do all the staff js could but nop
we are stuck with optimising our complex calculations to get those .1microsecond optimisations
ngl yall need https://youtu.be/abbR-Ttd-cA
Enjoy the antics of rescued southern sea otters as they romp, tumble and wrestle live (7 a.m.-7 p.m. Pacific time) from the Monterey Bay Aquarium's Sea Otter Exhibit. Watch them participate in fun enrichment activities with artificial kelp, ice and other toys—it all helps keep them healthy and stimulated!
Feedings: 10:30AM, 1:30PM and 3:30PM PT...
that's my issue with WASM right now
it makes sense for PWAs, but can't integrate super well
yep thats everyones issue with wasm rn
also iirc webkit doesn't support WASMGC yet so iOS is a no go
isnt there a proper dom api planned for wasm
i did a comparison once
i wrote a super simple password brute force program in C and js, and then i improved the js implementation. basically just use string manipulation to generate random strings then compare them against the target password
i wrote the C one with string.h and the js one with js strings and methods like +
js performed like dooogshit compared to C
then I rewrote the js code with raw Uint8Arrays and used bytes instead of strings and the js code was only about 1.5x slower than the C one
planned
not implemented
unless it's something like Flutter that compiles to both JS and WASM, but that's a different thing
wasm only makes sense for cpu intensive stuff
for PWAs it can be super useful
there is
like video processing / decode and stuff
all js web performance issues are caused by shitcode, not the language
the reason is so you dont have to use js
yes
why roll your own video decoding 😭
sometimes it makes sense
Untrue. There's a really optimized renderer library I use that is just okay in JS, but runs so much faster in WASM.
fair, not a super great example
so your renderer engine has shit code congratulations
It... doesn't? It is quite optimized actually.
then it wouldn't run poolry in js ;)
what is the library then
a chronically C++/Rust developer is gonna write a lot more optimised code in C++/Rust than in js, they cant really use those "JS optimisations" to achieve fast speeds without spending a year or two mastering the language
ive always seen the point of WASM to be that youll be able to write performant code in the language you are most comfortable with
and i think WASM would make the web a lot more accessible for developers
its not just "performance and speed" wasm provides
also usability
Canvaskit
My usecase extends only to flutter, but there's been usages for react and such with similar issues
The WASM renderer is so much faster
you need to turn hardware acceleration off
and see how the web runs
trust me your app will run like 
you're bringing your own rendering engine and wondering why performance is subpar

it's almost like JS is not good for very cpu intensive work like rendering
use the web canvas api and you won't have any issues
why bring ur own canvas 😭
canvas isnt very good
Canvas is exactly that- canvas
web canvas api is like 20x slower than other solutions
fine if you do it right
canvas is very good
I have benchmarked and it SUCKS
not fine if you don't do it right
if you are rendering everything as canvas and your use-case is not a video game or a simulation in a browser then your app sucks
It makes a lot of sense for Flutter PWAs
not really
canvas can be very fast if you don't use it wrongly
Since you don't gotta worry about discrepancies per-platform
Why's that?
Then that is 
this is the same argument that got electron into every app that exists
im coding for fub?
fun?
make a web app and a native app
You didn't answer the question
im too SHIT to get a programming job ever
that's 2x the development effort, I don't have time
I can't support multiple platforms seperately
so? it's a valid argument and electron is very good
then I'm also sacrificing desktop performance.
what makes flutter better for pwas
make a web app and use electron ;)
accept you made a PWA 

electron is only useful if you made a good PWA already and want to make it 5% more native
or if you hate browser-native title bar
i dont see how flutter can be possibly better than a regular js ui framework on web
You can code it for all platforms natively- so you can still distribute a binary for mobile / desktop, while making it work in the web without much extra effort
its not
Now I have a slow desktop app and no mobile app
can you show me an example flutter app on web
this doesnt make it better it's just a cost cutting solution
also "natively" is a joke
react native is not native
flutter is not native
https://app.openbonfire.dev/ my own- slightly broken due to a change I pushed the other day dw about that
Full re-implementation of the Discord mobile app in Flutter for all platforms.
i'd rather have a good PWA than a fucking 100MiB+ mobile app
"slow desktop app"
skill issue
don't write shit slop and you won't have a slow desktop app
That is exactly what I'll have have. A slow desktop app, and no mobile app.
Sounds like a pretty bad idea to me
flutter feels cursed on the web
desktop apps hate this one simple trick! see how you can optimise your desktop app now!
if you open inspector on that site your web-dev soul will cry for mercy
Sure. I meant near-native performance but I didn't say that very well.
well i guess its passable but near-native perf is also a strech
There's some other good benchmarks
now tell me why your app needs to calculate the Gauss–Legendre
what the fuck is that benchmarking
It's a benchmark
benchmark of what
a benchmark that makes no sense
benchmark the actual use case
not fucking math calculations you never need to do in a normal app
js le bad because it can't calculate 300th fibonacci number
No, electron issue. I can tell exactly when an app is using electron literally just be resizing the window happens extremely slow.
this is a valid point actually
... who cares?
why do you need blazingly fast window resizes
I do. It feels like shit.
technically yea but how else are you gonna benchmark something
how often are you fucking resizing your window
run speedometer 3.0 on it?
useful benchmarks like time til first full paint
fps
etc
animation fluidity
here's some js framework benchmarks
thats an actually useful benchmark
Nothing is less fluid than your entire app janking every time you change the size of it. Sorry you disagree.
hm
i just compared electron resize to musicbee (winforms) resize and musicbee is worse
gtk is smooth
but you're not constantly resizing the window so it doesn't matter
it mostly depends on the app
you can have an app in any framework that can do resizing well or shit
Just downloaded musicbee, no issues here. Meanwhile both Discord and VSC will render as if the window size is still larger than it actually is, with less poll. Feels worse to me.
On the other hand, any flutter app I've tried, (such as appflowy), is fine, as well as .NET framework apps that I've both used and built.
That's the only sample I have for desktop that I tried this specifically
Even flutter debug has less jank than a "release" JS electron app 💀
On web, sure, I'll absolutely agree
and use SDL
It's completely fine on desktop
it feels really good
I encourage you to try appflowy
as it's a pretty well maintained flutter desktop app I recently tried, the performance actually feels quite nice
I do think JS can be quite nice, but performance certainly lacks in a lot of instances. It's a tradeoff. Do I think it's worth it? Usually no, but it depends.
true and factual
i tried flutter but it's meh i think
It's very nice for parity
i don't like the nested functions stuff
html / jsx feels way nicer even if it's essentially the same thing
of course you would
I've always thought that it was too loose, but I only spent a few months with it, nothing crazy
wdym loose?
Like you can do stuff that makes absolutely no sense in HTML but it will still attempt to render
well simply don't write invalid html xd
if you use a decent editor it will warn you anyway
and jsx is waaay stricter
That's like saying don't use typescript, simply don't use a null value
it doesn't take a lot to just not write invalid syntax
I've used JSX, but not a whole lot. It seems interesting but still loose in my experience.
but like i said ^
if you're writing raw html you're doing it wrong anyway
jsx is good but react kinda sucks
svelte / astro are where it's at
Yeah I mean I'm sure it might but flutter has a really good structure of enforcing stuff at a compiler level
Yeah svelte was super nice
svelte and astro are so much more light and faster than react
I used it for a hackathon a while back
like you have to handle per-platform cases a lot more than flutter
it def still needs a lot of work for desktop and web yeah
it's most mature for mobile right now
But yeah it seems to be the default for new android apps atm
because android tooling is a mess lol
I might look into it but I've been pretty full send on flutter recently since it's something that works really well for the stuff I make
ofc I'm not opposed to trying alternates
i haven't used compose much myself cause i stopped working on android xD but yeah i can imagine that because the entire android stdlib is java based
i hate android dev cause it's sooo fucking bloated
IDE taking 5gb ram, gradle taking 20 seconds to start, etc
😭
Android runs ontop of a Java virtual machine which runs on linux.
That is why java is used
I've always thought that was silly
android using jvm and stuff
although honestly the user experience feels about the same?
kotlin mpp solves this a lot of the time
but yes if you're planning to use platform specific apis its a bit of boilerplate unfortunately
I know a lot of stuff can be native
well it doesn't it uses ART
but ig you mean Java?
android is very old and there really was no better language at the time
java was THE shit back then
true and factual statement
also based cause you can mod apps easily
Yeah APK patching is nice
the alternative would have been C / C++ and let's be real no one wants to write apps in that
That's kind of how flutter works, but it doesn't really gain performance
I think minecraft pocket edition used c++ from what I heard.
so some apps used c++
I'd image
a lot of the heavy bits usually go down to native
that's what libdiscord n stuff is about
only games
btw did you see there's react native desktop xD
NO
please no
most games will use C++
I mean technically with expo
or even C# (still cpp via il2cpp)
I mean aspx
aspx has kinda been a thing for a while but it's not super great
my uni uses it
i wouldnt call C# "still cpp" because someone uses il2cpp
just like any compiled language isnt still assembly
@royal nymph this is open ended- flutter or react native for strictly cross platform apps?
C# isn't fully native usually.
From what i Heard it's compiled but still interepeted with a unique interpeter
I need to re-check my IT class notes though
depends on what you use
.NET
(microsoft java)
anything but RN
haram
we need to take back the "rn" abbreviation
some js too fun fact
lets make it stand for rust now, now
i think rust now is bad
rust is not just now
rust is yesterday
rust is tomorrow
rust is forever.
at least unity is not fully compiled native code
it runs through the unity interepeter
from what I heard
(at least not usually)
oh it was the I DECOMPILED a Sonic game... here's how - MattKC
(this is the video, it was not the class)
about 4 minutes in is when stuff starts
yeah the default is mono in unity unless they changed it recently
He says c# is higher level and "generally isn't compiled to machine code at all compiled to Common Interdimate level".
this is where I got it from
yeah its for the unity runtime so games can be made cross platform easily
Head to https://squarespace.com/mattkc to save 10% off your first purchase of a website or domain using code mattkc
▶Sonic Runners (2015) Decomp: https://github.com/itsmattkc/RunnersDecomp/
▶SUPPORT on Patreon to watch videos like this early: https://www.patreon.com/mattkc
▶FOLLOW on Twitter: https://twitter.com/itsmattkc
▶FOLLOW on Twitch: ht...
The .net framework is required to run software quite a lot tho
not rly its mostly for windows apps (because microsoft loves its own language, of course)
microsoft does have the uwp thing right?
Yep but like every single windows native ui/app framework kinda sucks Microsoft can’t get it right at all
is that one reason why people ignore mc bedrock edition?
sorry I mean bedrock edition
nope
react is just a javascript framework
discord uses electron to run javascript then uses react for its ui
electron is built on react tho right?
minecraft embeds an entire js runtime inside the game then runs react on it for ui
no
electron is a framework to build desktop apps, you can use any javascript framework with it
I see.
I don't really use javascript or know much so that's my bad
I mostly use python and I know some normal java
react is just a js library
electron is chromium bundled with extra surprises
I see
how do you learn how to code vencord plugins?
"chromium bundled with extra surprises" 😭
i mean you are not wrong
prepare for a bit of pain
(you're gonna be reading a lot of minified and bundled js)
not all of it yet i think
they are very slow with it
ofc they are....
(Auto-response invoked by @dusty moth)
I don't have access to plugin development how do I get access?
ok nvm I don't know at all close to the enough javascript for that
oo mc
wdym mc embeds
lc.dictionary embed
<:i:1263592450136473684> embed ɪmˈbɛd
verb
- fix (an object) firmly and deeply in a surrounding mass.
- he had an operation to remove a nail embedded in his chest
<:i:1263591098740113478>drive inhammer inram in
- attach (a journalist) to a military unit during a conflict.
- the CNN correspondent is now embedded with the US Navy aboard the USS Constellation
"put an entire js runtime inside of minecraft"
Kind of reminds me of the webdisplays java mod
yes but what are Minecraft embeds
or did someone come up with that idea
to embed is to put something inside another thing
its an actual action its a verb
not just fucking discord embeds ffs
(if they did I will stab)
tessie gonna ban fr
Might need to figure out how to run two instances of psql
without using docker.
(I don't like docker)
I mean it's decent software.
I just hate using it
the answer to your question is that minecraft embeds dont exist but embed is the action of putting something inside another thing, in this case the js runtime into minecraft
no
are you actually reading what im saying or just pretending to
- why?
- just use docker
File server stuff
you can super easily run a standalone postgres docker container and map its postgres port to the host and then connect to it from non docker
I don't want to make my main instance of psql backup too big
docker grows too big in resources sometimes and I don't really like managing docker
this is on a contabo vps
https://dev.to/titusnjuguna/how-to-set-up-multiple-postgresql-instances-on-a-single-server-15gg
There is this funky guide tho
are you planning to store the files inside your db?
if yes that's not a good idea
store them as separate files and store the filename in the db (or if you architect it well with using ids as filename you won't even need to store the name)
trol
oh hi blum
hai :3
its' way too big to not decompress and store in a database
so you are storing the files in your database? or what
you really shouldn't
dbs weren't meant for that
use a filesystem with compression support like btrfs and store them as plain files
or use cloud storage like r2 / backblaze / whatever if you don't wanna bring ur own storage
it'll be much better and keep your db clean
or gzip the files but it honestly might be cheaper to just get more storage than get a beefier cpu to run all the (de)compressions
the problem is that I don't really have the budget besides the one I allocated for my vps
hence this idea
smh
you have to suggest
an s3 cloud bucket
and then a vercel thing
like an aws lambda or whatever
like as the glue
and the you also need you ffmpegaaS
to process the files ofc
an s3 cloud bucket might occur extra costs which would be aganist what I would want
you can run the postmaster command and configure the data directory
and different ports etc ofc
pg 16 doesnt seem to have that command (15 does) but the postgres command may do the same, youll have to check
I am not trying to move the data values.
I am trying to have them run independent
yes, I am aware
postmaster is the binary used in the postgres process
postmaster is the PostgreSQL multiuser database server. In order for a client application to access a database it connects (over a network or locally) to a running postmaster. The postmaster then starts a separate server process ("postgres") to handle the connection. The postmaster also manages the communication among server processes.
It requires gpl and it seems to also cost extra if I wanted to use their page
is gpl a problem if you are just deploying it on a machine?
It says I would need to use the gpl license for the project
Which I don't want to do
It says I would need to
unless the libraries for it are all gpl as well
Anyway, I need to run two instances and I cannot do stuff rn unless I want to ssh via mobile
you can run two postmaster instances yes
i have done it before
i believe you just need to set a different socket path and different data dir
I am trying to get two seperate instances of postgresql so pg_dumpall doesn't get the files
running postmaster gives you a postgresql instance
And it will persist after reboot?
yes, if you specify the same data directory again
you first may need to run initdb or createdb or whatever the command is on your specified data location
It might be harder to use and one time configure
@frosty obsidian im trying to unify the LocalPdfState and RemotePdfState classes into one
so usage would be simpler
also changing up saver implementation
it will store a reference to the url/file
no
if you host minio, you indeed need to provide the source (of minio only) to anyone who interacts with it via network (that's AGPL btw not GPL)
but if you have another program where all it does is send request requests to minio to store data, that program doesn't have any license requirements
and if your minio instance is private and only used internally, you don't even need to disclose minio code
you need new cat pictures
Seems it would better to use psql and easier
Idk imoog Does it and it seems fine
I.e.
https://github.com/justanotherbyte/imoog
Le rust version.
I was going to do something similar.
I use his rust version for cdn stuff
And minio seems to require providing a copy of the binary regardless and I don't want that
set up an S3 bucket !
it doesn't
depending on your needs you may be able to use backblaze
I am looking to store more than 10 gb in le file server and then display stuff
It's probaly at 14 stuff rn
It may easily get up to 20 gb
Does s3 even keep file name and other stuff
I also need the crc and stuff to not have duplicates
And it needs easy backup
Where I can get one big heavy file and reload it fairly easy on another instance this is why I prefer psql for this
there are s3 equivalents you can self host (since it is very popular)
yes
Is s3 sql or nonsql?
I don't like nonsql
s3 buckets are not regular databases
its for file storage only
and its optimised for that
A free and safe host could be good.
I just don't want to pay extra than my vps cost rn
It would need to have read only via public means and some security for adding files
then youll have to self host
no host is gonna give you 20 gbs of storage for free permanently
Kind of my point and I feel most comfortable with psql
you can host both a database and a storage bucket on the same server
What do you not like about hosting the bytes in psql?
Do you have any articles with data and what they tried
?
https://stackoverflow.com/questions/8952/storing-a-file-in-a-database-as-opposed-to-the-file-system
https://softwareengineering.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database
Generally, how bad of a performance hit is storing a file in a database (specifically mssql) as opposed to the file system? I can't come up with a reason outside of application portability that I ...
yeah databases arent good at having giant amounts of data in single cells
That's stackoverflow which is a bit more opionated than what I wanted to look at
Slow down?
yep
remember, sql databases are optimised for storing a TON of smaller data snippets inside cells
Postgresql handles data pretty well
file storage is specifically optimised for files, they can compress them to save space, dont lock files (as opposed to databases which lock rows on access, making them very slow at serving the same file to multiple users at once), can implement caching for a speedup, sql databases have a max row size (so you literally cannot store large files), etc
but you very much seem like someone one cannot convince, use whatever you want
😵💫
What?
Pathlib works fine for that
I am not even using .read()
I'm just getting what the os returns back
you know you can just use shell commands right....
it doesnt' allow me to sort by type
anyone know how to dynamically load a jar from a url in java (urlclassloader is broken af so using something other than that)
yes it does
shell commands are very powerful
dont waste an hour writing a python script
search 5 minutes for a shell command
This is one directory
nvm
it just lists directory not invidual files
find "$(pwd)" -type f -printf '%s %p\n' | sort -nr | head -10 [15:13:11]
561815063 /home/jdjg/extra-content/other/ace attronetry concert.mp4
29102995 /home/jdjg/extra-content/Manuals/AnimalCrossing_NewHorizons_Starter_Guide_EN.pdf
27179832 /home/jdjg/extra-content/Manuals/Zelda_Tears_of_the_Kingdom_Mini_Guide_(English).pdf
20187592 /home/jdjg/extra-content/Album/2024/08/16/2024081615210800-DF3B4A41115FD7D06723242960C445E8.mp4
20187592 /home/jdjg/extra-content/Album/2024/08/15/2024081522264900-DF3B4A41115FD7D06723242960C445E8.mp4
20187592 /home/jdjg/extra-content/Album/2024/08/15/2024081521252800-DF3B4A41115FD7D06723242960C445E8.mp4
20187592 /home/jdjg/extra-content/Album/2024/08/12/2024081222195600-DF3B4A41115FD7D06723242960C445E8.mp4
20187592 /home/jdjg/extra-content/Album/2024/08/11/2024081122225900-DF3B4A41115FD7D06723242960C445E8.mp4
20187592 /home/jdjg/extra-content/Album/2024/07/21/2024072122530100-DF3B4A41115FD7D06723242960C445E8.mp4
20187592 /home/jdjg/extra-content/Album/2024/06/27/2024062715412700-DF3B4A41115FD7D06723242960C445E8.mp4
There
find "$(pwd)" -type f -printf '%s %p\n' | sort -nr | head -10 [15:12:59]
20187592 /home/jdjg/extra-content-other/debugging clips/2023063012380500-45998392CB216ABF034EB6F98E399A06.mp4
20187592 /home/jdjg/extra-content-other/debugging clips/2023063012324600-45998392CB216ABF034EB6F98E399A06.mp4
20187592 /home/jdjg/extra-content-other/debugging clips/2023063010354700-45998392CB216ABF034EB6F98E399A06.mp4
20187592 /home/jdjg/extra-content-other/debugging clips/2023062922495400-45998392CB216ABF034EB6F98E399A06.mp4
20187592 /home/jdjg/extra-content-other/debugging clips/2023062909591400-45998392CB216ABF034EB6F98E399A06.mp4
20187592 /home/jdjg/extra-content-other/debugging clips/2023060811304900-45998392CB216ABF034EB6F98E399A06.mp4
19925416 /home/jdjg/extra-content-other/debugging clips/2023063014295500-45998392CB216ABF034EB6F98E399A06.mp4
19925416 /home/jdjg/extra-content-other/debugging clips/2023063014234700-45998392CB216ABF034EB6F98E399A06.mp4
19925416 /home/jdjg/extra-content-other/debugging clips/2023063014001800-45998392CB216ABF034EB6F98E399A06.mp4
19925416 /home/jdjg/extra-content-other/debugging clips/2023063013513300-45998392CB216ABF034EB6F98E399A06.mp4
this seems like a horrible idea
20187592 to 20 MB
561815063 to 562 MB
only one file is 562 MB
its nessecary tho
why
have you considered not using java
not possible
they should change that
why is it not possible
bc i cant use something not java for something that is java
Because learning a new language can be really time consuming
using java is time consuming
am i wrong
yes
in what way
?
UrlClassLoader is what you want
yes but isnt it like buggy as shit
or at least when i used it it was
have you considered letting people use whatever they want and not being a nuisance about their choice

?
no
never
i will never consider that
thank you for asking
:3
when i was using it it was throwing a lot of errs and didnt really work
import pathlib
current_directory = pathlib.Path(__file__).parent
files = current_directory.rglob("*")
biggest_files = {}
for file in files:
if file.is_file():
if not biggest_files.get(file.suffix):
biggest_files[file.suffix] = []
biggest_files[file.suffix].append(file)
for file_type in biggest_files:
sorted_files = biggest_files[file_type]
sorted_files.sort(key=lambda path: path.stat().st_size)
print(f"{file_type} files")
for file in sorted_files[-3:]:
print(f"{file}: {file.stat().st_size} bytes")
print("\n")
not the best code but this works pretty well
because you prob havent written a single line of java ever and dont actually have a good reason to hate it
yea I have
public static void main(string[] args) or whatever
Thats just the main function your ide automatically generates
Fearful
java is pretty solid
yea been intentionally staying away + no use for a legacy lang, at least c has some fun to it 
20 mb is my largest file usually I think it would be fine except the 562 mb but that's just one
I tried c.
A little it's nice
Learnt very little rust.
Also nice
C is way more time consuming than java
skull
20 mb is not the large file you were concerned about
yea i know
but c is challenging
so its more fun
ofc im not gonna use it for any project nowadays 
c is definitely one of the more challenging languages out there
especially if you refrain from using any libraries
(what i did just to challenge myself)
i find challenging fun if im specifically craving for a challenge i.e. making something in C for practice
python is bad for the environment
i also used it to learn more about memory and memory optimisations
😭
im not wrong
Python has gotten way better and runs well
its still bad for the environment compared to a lot of other languages!
if you dont use rust or c you are a nazi as you are intentionally causing global warming i think
most languages have their usecases
I find python very useful if the thing I am making doesnt need to be very performant
it makes writing lot easier
python is good for prototyping
java is pretty solid and great on OOP
alongside C#
makes complicated applications easier to make
i think composition is better than inheritance
like games
Except vencord uses ts and js which you code in
idts
I don't think most people intentionally case damage
i make my vencord plugins in rust
rust to js cross compilations and stuff
my brain thought of javascript, typed java but did not autocomplete the script
Saying that x people who happen to do x on its own isn't really fair or accurate
You are over generalizing
And what if that's the only class they need to take and only one they can take?
it is fair and accurate because i have said it
That's an unfair and not well thought out joke
Your joke is built on the presume of bad intentions.
Most people don't look into the power draw of both.
Just because they don't doesn't mean it's true.
It's a bad joke because it uses bad practices of speech.
It doesn't have the irony to make it funny
im sorry but i literally said "nazi" thats sarcasm 😭 cant even make a joke anymore because of woke
I was doing a light critique of your joke.
Critiques are really old
flutter
have you heard of... rust?
*compiling Rust to Wasm
everyone knows Rust users always advocate for not using any language but their own
@frosty obsidian
i think ill make it have setting that uses templating
so you cna like
$timestamp: $message or however
and it fills in
its very easy to break
it also doesnt close the adb logcat processes it spawns for some reason
@frosty obsidian do you have any ideas I could add
filter by package name
okay
I was trying to add a search filter thing but
the logs keep pushing it off screen
have to investigate tomorrow
my code is so horror
I'm gonna add comments
minio is not aws, its aws s3 compatible
guys when you have an issue, always remember to put it on GH then do a PR if you can :w:
GooseMod/OpenAsar#179
OpenAsar settings under advanced unavailable on other languages than English
GooseMod/OpenAsar#191
Patch Settings Injection to work no matter the language
uhhh
I just want to edit a existing plugin and give it to a friend
thats not possible no?
it is
clone Vencord, edit the plugin, and compile an installer
i couldnt find where the pluin was
src/plugins/
that was a dumb af timeout
im using the
regular client
dont strike me down
i found a workaround tho thanks
what did you do
yes this server has dumbass automods
i dmed it to you
Minio's pricing also concerns me
also most files max are 30 mb
There just happens to be one that's 562 mb
you can't selfhost minio?
It requires gnu or gpl for using it
I assume postersql and most databases can handle 30 mb per file just fine
you can set bucket quotas
the software themselves is gpl..... if you want to add onto it (/make your own version of it) you will have to release the source code... if you are just using it you dont have to worry about anything....
Bucket quotas as in limits on what's stored?
size limits
such a long dwindled conversation about using postgres for object storage or not, but honestly I don't care, try it yourself and let us know how it went
I already use psql for someone's project.
It just needs me to make my own version for more fine control.
Their code us really fast though
Psql can handle files and That proved it
#![allow(warnings)], spicy
yes my ssh connection drops when I build without it
#![allow(errors)]
instant fix to all your code forever
isn't that just unsafe and transmute
ChatGPT is really the future.
I can respond to a lazy issue in a professional manner and get extra details out of the issuer.
w/o ChatGPT the issue would be bloated with me cursing at them.
If only there was a copilot integration for that 😔
Time to make Venhub, and add plugins for that
https://cdn.discordapp.com/emojis/731429343276040212.webp?size=48
so true
"fuck you go read the readme"
It is beyond that, they blatantly lie by checking the box that says "I've searched the issue tracker to no avail"
And guess what, most of the time it is a duplicate issue
Users are very skilled at reading comprehension
true I should do this for vencord
answer issues with ai
how do you make the ai know the relevant data though?
Haven't you already reviewed prs with ai sometimes
no..
do you just feed the readme and entire issue history?
in this case, no data was really needed for chatgpt to write a message
I just provided the context for the message
for lazy issues like that, chatgpt does not need deep context
(assuming what you want to do is probe for more information)
you could maybe make a command, e.g. !moreinfo
and have chatgpt reply to issues with that command, asking for more information depending on the issue's description and title
if its for detecting duplicates, then you could make chatgpt search the issue tracker for similar issues
dude, I once got a feature request for an existing feature, that was clearly listed on the README
how are people more incentivized to open an issue rather than look up if the thing they are asking for already exists?
🇷🇺
ah
yeah
tbh forbidding installing plugins is way too much
they first blocked installing their software
now it's even plugins wtf
hopefully I've got a working VPN and JetBrains don't care that much to determine that I mostly use their software from russian IPs and decide to ban me or anything else as Adobe does lol
Wtf lmao
try downloading plugins from the website
maybe they don't block there
doesn't work either
a VPN is the only solution
thankfully it works that way
and yeah I can't even update my already installed IDEs
damn
and I technically can't get the free student license here but in reality it's bypassed as easy as just choosing a different country lmfao
like I authorized with my github that has student benefits, chose Russia, it said I can't get it here, then just switched it to Kazakhstan and it went fine lol
well at least I don't have the gift nitro button in regular discord client :^)

ah the regulations aganist russia due to the russian urkanian war
That would explain things on your end
Region lock has been on consoles forever except on the stuff like the nintendo switch
it feels weird sites doing it like this too
the switch also has some minor amounts of region locking
if you do buy games digitally you need a nintendo account made in the region you want to buy from
I most buy physical games though
That's a lot of software.
I have a switch lite so I cannot mod it for custom apps and backing up my catridges
ah
i bought my switch a year after release
didnt even know i could mod it until like 4 years ago
HOLY FUCKING SHIT
i modded my switch 4 years ago
you have a launch switch?
how is it 2024
yes
I would need to modchip mine and I don't have the tools to open this or anyone who knows how to solder it and properly
this also released:
I had it pre-ordered months ago
god bless steam deck 🙏
I have steam deck on my eventual grab list
The ace attronetry investigations looks good
should i make a contest
ill give people like 15$ if you manage to optimize my code more than it already is
welcome to sanctions

companies must follow sanctions
does the extension have purchases maybe?
you can just enable Russia simulator experiment to achieve the same
xD
oh lmao neat
LOL nice grammar error
also that should be very easy to bypass if I got it right
I mean to make gift button appear again
and make shops work again
like afaik it's just a http request that gets sent on client lainch
nah it's fully client side
u can likely just force disable the experiment
try it
set it to not eligible
hm unsure what this is for then
ah it's for billing
though not sure what that'd mean
this is the only usage of this endpoint I could find in the sources tab
have u tried this
probably stripe or whatever they are using for payments blocks russian cards
switched to "Not eligible" and the gift button appeared
guh apparently pressed ctrl + r instead of ctrl + e
wanted to say thank you I can now access gift inventory and quests
not that I often use it but anyways
well yea I just use apple pay for that
though I'm gonna set it back to whatever it was because this gift button is too annoying lmfao
yeah stripe doesn't accept our cards anymore
@deep mulch do you love such simple IR generation
struct Foo<T, U> {
T a;
U b;
};
fn Foo::get_a<T, U>(Foo<T, U> self) {
return self.a;
}
fn main() {
Foo<string **, string **> foo = Foo { a = 0, b = 0 };
foo.get_a();
}
compiled into IR
type :ElleMeta = { l, l, w, l }
type :Foo.__elle_generic.__elle_pointer.__elle_pointer.__elle_pointer.12.__elle_pointer.__elle_pointer.__elle_pointer.12 = { l, l }
function l $Foo.get_a.__elle_generic.__elle_pointer.__elle_pointer.__elle_pointer.12.__elle_pointer.__elle_pointer.__elle_pointer.12(:Foo.__elle_generic.__elle_pointer.__elle_pointer.__elle_pointer.12.__elle_pointer.__elle_pointer.__elle_pointer.12 %self.10) {
@start
%.11 =l add %self.10, 0
%.12 =l loadl %.11
ret %.12
}
export function w $main() {
@start
%.6 =l alloc8 16
%.7 =l add %.6, 0
storel 0, %.7
%.8 =l add %.6, 8
storel 0, %.8
%foo.addr.9 =l alloc8 16
storel %.6, %foo.addr.9
%foo.5 =l loadl %foo.addr.9
%foo.5 =l loadl %foo.addr.9
%foo.5 =l loadl %foo.addr.9
%.13 =l call $Foo.get_a.__elle_generic.__elle_pointer.__elle_pointer.__elle_pointer.12.__elle_pointer.__elle_pointer.__elle_pointer.12(:Foo.__elle_generic.__elle_pointer.__elle_pointer.__elle_pointer.12.__elle_pointer.__elle_pointer.__elle_pointer.12 %foo.5)
ret 0
}
yes
well i made it use numbers instead out of spite
type :ElleMeta = { l, l, w, l }
type :Foo.0.1.1.1.14.1.1.1.14 = { l, l }
function l $Foo.get_a.0.1.1.1.14.1.1.1.14(:Foo.0.1.1.1.14.1.1.1.14 %self.10) {
@start
%.11 =l add %self.10, 0
%.12 =l loadl %.11
ret %.12
}
export function w $main() {
@start
%.6 =l alloc8 16
%.7 =l add %.6, 0
storel 0, %.7
%.8 =l add %.6, 8
storel 0, %.8
%foo.addr.9 =l alloc8 16
storel %.6, %foo.addr.9
%foo.5 =l loadl %foo.addr.9
%foo.5 =l loadl %foo.addr.9
%foo.5 =l loadl %foo.addr.9
%.13 =l call $Foo.get_a.0.1.1.1.14.1.1.1.14(:Foo.0.1.1.1.14.1.1.1.14 %foo.5)
ret 0
}
insane
can I like
on a forked repo
take a single commit from upstream and merge it to my fork
i would probaly not ask about that unless you could make a video on it and get extra revenue.
And make sure you budget for it too.
vscode rust nerds: what are good exstentions for programing in rust for VSC
@lavish frigate looking at you
only one you really need https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer
k
its official and has REALLY good language support
not the offical vsstuido one?
?
How much typescript and javascript would I need to know to make a vencord plugin?
Trying to get a suggestion of mine made
deprecated
a lot
im not sure what the answer to questions like this is
because what do you expect as an answer
my suggestion was something according to a full group chat list and i figured it would be easier to try to learn the bare minimum to get it complete so I can finally view all my group chats as I am in so many
I think I'm in 40 to 50 group chats
you cant really "learn the bare minimum" because you wont know to learn something until you need it, thats why i recommend just starting out and learning about it as you go
well, I tried learn some rust to make an application and that didn't go too well
well rust isnt extremely mature yet so making gui apps is a bit... meh..
I was trying to rewrite image manipulation code in it and it was hell
I had to ask my online friend and some rando to help me
rn rust is mostly used for cli apps or optimising/securing mission critical components in other software
I was going to have python bindings and run some pillow and wand code in rust instead
for perfomance reasons
ah
https://github.com/JDJG-Holding-Team/jdjg-image-manipulation
it was this dumb thing
i made a status bar specifically for windows in python but never really finished it because python is a pain so now im doing it again but in rust
Someone made a pull request for it but hasn't worked on it for a while cause they are busy
which so happens to be one function
In the future formatted with rustfmt possibly automatically?
cargo fmt
cargo fmt?
I just know it's a tool that can auto-format similar for python
I also have no idea how much perfomance gains this will get with my image manipulation functions compared to c bindings running asyncio.to_thread() and having multiple functions going through python rather than all being in rust for example
Basically I have no idea if it will be worth rewriting in rust, it might be a waste of time
cargo is rusts package manager, should be automatically installed with rust (if you use rustup, the default, of course)
cargo is also basically just an everything tool and its amazing
you shouldve used it actually if you have written any rust code before (cargo build/run)
it also provides formatting (fmt) and linting (clippy)
I have rust locally
Only problem with not being to write image manipulation code in rust i have no idea if it's worth it besides doing what I already in python
probably not if its really just one function
thats what im getting out of your code
I run multiple functions from image manipulation though
ah nvm i forgot you use bindings, i was only looking at the main function tbh
from io import BytesIO
import discord
from wand.image import Image as WImage
def invert2(image) -> discord.File:
wrapped_image = BytesIO(image)
with WImage(file=wrapped_image) as img:
img.iterator_first()
img.negate()
while img.iterator_next():
img.negate()
ext = "gif" if len(img.sequence) > 1 else "png"
img.format = ext
data = BytesIO(img.make_blob())
return discord.File(data, f"inverted.{ext}")
Like that, would probaly be pretty fast which it is
but a rust version would probaly run better especially with python bindings
but I have no actual data to disapprove or approve it
well i have never done image manipulation in rust before but you are probably correct in your assumption that rust is faster (lol)
if you really do wanna make it in rust i could maybe suggest the assyst2.0 source code? It also has a couple of image manipulation commands https://github.com/Jacherr/assyst2/tree/master
though the code seems very abstracted so good luck finding the correct functions lmao
I want to find someone who actually knows rust to work with me on my project thing
and I wouldn't mind if they got control over the rewrite's version of the code
wait what's cargo
rust has packages??
I literally explained it there 😭
Crates, yes
what do those do?
??
r u trolling
Definitely
no
i fucking linked to c
thought you had to
what crate should I use?
omfg I can use multiple
this is amazing
yes please
how do you type a destructured array
this is what i thought of, and tsserver doesnt like it
wdym
let a: [string, number, string] = ["", 1, ""]
[number, string, object]
you can also name them
let a: [name: string, age: number, address: string] = ["", 1, ""]
yup
what?
@jade stone this is the naming thing
for some reason, discord doesnt pass an array of files, but whatever that is
its not an Array object
can you convert it to an Array
using Array.from
soooo
but thats not whats its passed as
this is a function called from a patch
a patch request?
😭
a PATCH request?
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { Channel } from "discord-types/general";
type guh = [{ [k: number]: File, length: number }, Channel, any];
export default definePlugin({
name: "AutoMediaCompresser",
authors: [Devs.sadan],
description: "compresser",
patches: [
{
find: "Unexpected mismatch",
replacement: {
match: /(Unexpected.{0,100}if.{0,20}{)(.*?return)(})/,
replace: (_, before, body, after) => before + "if(!$self.attemptCompress(arguments)){" + body + after + "}"
}
}
],
attemptCompress([fileList, channel]: guh) {
console.log(fileList[0], channel);
return false;
}
});
could it be this maybe
was this, im stupid and didnt check the prototype
guh
weird
where does it even originate from
the type, or where this is called in the code
my breaking point didnt call 💔
where its called
file upload when over size limit
i have sky load forced incase that matters
and the acc im testing on has no nitro
probably lol
im just confident since its very optimized already
(from like a year ago)
code is this if anyone wanna try
use std::io::{stdout, BufWriter, Write};
fn main() {
let mut acc = 11719107999768421026u128;
let mut out = BufWriter::with_capacity(1000000, stdout().lock());
for i in 1.. {
for _ in 0..94usize.pow(i as u32) {
let mut buf = (acc - 9404222468949967490).to_le_bytes();
buf[i] = b'\n';
let _ = out.write_all(&buf[..=i]);
acc += 1 + ((!acc & 9259542123273814144) >> 7) * 162;
}
}
}```
this is quite cool https://youtu.be/zMRfCZo8eAc
From https://softwareyoucan.love Milan 2024
0:00 Intro
1:13 Talk
31:35 Q&A
Well they're not wrong
how do i make a plugin edit a message that the user clicks on with text which is inside the plugin itself
/run
x = [1, 2, 3, 4, 5]
print([i for i in x if i > 3])
Here is your py(3.10.0) output @snow grail
[4, 5]
mods do I get the job
i think i would hire you yeah
yea
where's my paycheck
vencord badge
/run
let x = [1, 2, 3, 4, 5]
console.log(x.filter(a=>a>3))
Here is your js(18.15.0) output @final night
[ 4, 5 ]
Im proud i did that on my phone keyboard
no
yes
/run rust
fn main() {
let mut x: Vec<i32> = vec![1, 2, 3, 4, 5];
let y: Vec<&i32> = x.iter().filter(|&&num| num > 3).collect();
println!("{:?}", y);
}
@magic ice I received rust(1.68.2) compile errors
warning: variable does not need to be mutable
--> file0.code:2:9
|
2 | let mut x: Vec<i32> = vec![1, 2, 3, 4, 5];
| ----^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: 1 warning emitted
[4, 5]
mb
/run rust
fn main() {
let x: Vec<i32> = vec![1, 2, 3, 4, 5];
let y: Vec<&i32> = x.iter().filter(|&&num| num > 3).collect();
println!("{:?}", y);
}
Here is your rust(1.68.2) output @magic ice
[4, 5]
why is that comic sans
why
thats my monospace font of choice
chat husk react this user
okay oomfie
i will never allocate you
/run ```haskell
{-# LANGUAGE NPlusKPatterns, LambdaCase, ViewPatterns #-}
x = 1: 2: 3: 4: 5: mempty
y = go x where
go = \case
(x+4):(go -> xs) -> x:xs
x:(go -> xs) -> xs
[] -> []
main = print y```
Here is your haskell(9.0.1) output @dusty moth
[2,3,4,5]
May need to make a pr to vencord so I can access stickerstore through utils
should I be using io_uring for only one FD
iirc waitForStore
what do you mean?
I found:
Vencord.Webpack.findStoreLazy("StickersStore")
but it doesn't allow me to do much
I don't have access to speak in plugin development
elaborate
I cannot access any internal methods
why not?
Proxy(Function) {length: 0, name: '', prototype: {…}, Symbol(vencord.lazy.cached): undefined, Symbol(vencord.lazy.get): ƒ}




