#πͺ -progaming
1 messages Β· Page 113 of 1
yea
you wont be detecting vape's hit sync anyways
so might as well jsut go for the low hanging fruit
I mean vapes clicker & a lot more are still detected
noting how their randomisation works is quite basic
best way to avoid getting banned is to introduce click recording
with a good enough config? not really? kinda but its VERY hit/miss
its how a lot of old clickers did it cuz servers like elevate and similar had actual good anticheats
I mean vapes clicker isnt that configurable lol
minemen was doing
yea servers like mmc/elevate have those
maybe i should go few steps ahead and make kernel-level anticheat for minecraft
i made dma cheats for mc
π
my fav is banning with resourcepacks
I've done a lot of stuff with dma
why π
on each user join ask "do you have X resourcepack", if they reply with yes [automatically done when u have the resourcepack hash downloaded], you instaban for alint
whats the point of that
theres easier & better ways to detect alts
sure, but this was way more fun XD
I guess
mc resource packs work weirdly
i know on lunarclient they do atleast
server resourcepacks download to your pc, so if you get a unique resourcepack that's unique to people that cheated, then on each user join ask them "hey do you have this rp hash downloaded" they say yes, that means they got banned before and are alting
dude it took sooooooo long for people to catch on
sure, if u know it exists
almost no servers do this
afaik its unique to the one brazilian server i sold this to XD
this was for 1.8
when you switch alts on a lot of alt switchers, when you dwnld the rp from the server, it still uses the same uuid that you launched the game with
so it was quite novel for its days
so if you changed ur acc after u got banned, it'd send the banned uuid to the server on an unbanned acc when u dwnld the pack
but
the UUID is the resource pack hash
which is dumped on disconnect
or did the network protocol change
on later versions atleast, when u send a request to the server to get the resource pack
it sends your MC uuid
nvm i dont see
the resourcepack add packet is clientbound
not serverbound
the serverbound is the response of the status
so it hasnt changed
it must be something else, not resource pack related
god this page got LONG
also a LOT of cheats dont send the statistics packets when doing a lot of interactions
so tracking those is fun
shit like fake jumps, fake attacks, fake sprinting etc
how would you guys implement a self-updating exe
god i do not miss minecraft client and server modding
same, and as time goes on it seems to get harder and harder to do
rename and create
most filesystems can do this
- download update as program.exe.new
- delete program.exe.old if it already exists
- rename program.exe to program.exe.old
- rename program.exe.new to program.exe
- restart program
i know of one quite popular operating system that doesnt let applications rename themselves
wh
why
windows locks the file while its running, disallowing modifications (including rename)
spawn a child process from a different exe, kill the main program and then update?
oh shit, AI bubble is bursting rapidly this week
right, im thinking of just embedding a script into the exe that gets run to update
was more so asking in case there is a better way to do this
having a stub launcher that launches the latest numbered exe is an option
yea launcher is a good idea
i dont think so, its a cli tool so yeah just has a built in function to self-update
ill embed a script
yo culd u check dm plsss
yo culd u b pacient plsss
yee np
holy
if some1 ever shows me an UML diagriam
first thing i'm doing is kicking them in the nuts
then leaving the room and not coming back
oh i may be stupid
i would personally still classify a contractor as an employee for simplicity
would just be one type of employee
im real
you need to unbreak your dreams and leave that goddamn boulevard for it to work
I don't know but I love the vibe of the music.
safe load 
idk i asked chatgpt how to parse yaml
According to the documentation :
safe_load(stream) parses the given stream and returns a Python object constructed from for the first document in the stream. If there are no documents in the stream, it returns None. safe_load recognizes only standard YAML tags and cannot construct an arbitrary Python object.
Yes, schemaless yaml is broken, we all know that
That's just how browsers work
Iirc discord shows a transparent layer for trapping mouse events when scrolling, so even if the mouse position on page doesn't update it can hide the hover effects
but it works on firefox
haven't tested webkit
It still keeps the old color, it just updates when you stop scrolling
well yeah that part is fine
but with chromium it doesn't update until the next time the mouse is moved
how would this even work
The container listens for scroll events, and after a specific threshold it shows a div with position:absolute;inset:0;z-index:999; (or something like that) until you stop scrolling
Or just pointer-events:none on the children
time to steal discord code 

oh hey, i wonder what this class does

Lmao
this is the one that's used
It could be a lazy module that hasn't loaded yet maybe idk
i loaded lazy chunks 
Better performance for initial chunk indexing in dev companion when
in my worktree rn
i didn't know people actually used it π
Stealing ur worktree rn
Literally best feature
https://github.com/sadan4/VencordCompanion/tree/dev if you want to have funβ’
A vscode extension to test Vencord/Replugged patches & webpack finds right from the comfort of your IDE - GitHub - sadan4/VencordCompanion at dev
i'm also working on an explorer for flux events
oh it's almost instant now
i cache the indexing in a 2mb json file 
How does that feature work?
Love
Also can i specify the .modules location
haven't figured that part out yet (or worked this in a few weeks)
the functionality is in the code, but i haven't implemented a setting for it yet
i want to seperate this from the vscode extension so i can use it in other projects
(making discord code explorer web interface)
the whole module system is a clusterfuck tbh
that would be so epic
https://github.com/sadan4/VencordCompanion/blob/dev/src/modules/cache.ts for some of the worst code of all time
Just started coded for the first time on an actual python program. is it good?
Not finished btw
-# PS "Clear" does not work for some reason
dont build seperate functions for every digit
take params
I don't know what that is, I'm new to coding
you are learning from somewhere?
Thats fine, but i recommend reading pep8 and adding typehints, and maybe looking into using functools.partial like said above
No
learn about taking parameters in a function
then you don't repeat yourself by making functions for each digit, you make one function and then give it the digit you want
I just asked chat GPT I don't really understand
ππππ
how exactly do I use gateway logging to see what's being sent
enable verbose logs if you have gw logging enabled in developer settings
yea uh
I have these enabled, what is verbose logging tho?
where do I enable it I mean
been looking for it
oh thanks
oh uh also how do I copy a certain payload
like I'm trying to get the op 2 payload
to see what discord sends for identify
right click the object
the object specifically
Gayfemboy malware campaign
lmao
its all documented btw ;)
https://docs.discord.food/topics/gateway-events#identify
Gateway Events Gateway connections are WebSockets, meaning they're bidirectional and either side of the WebSocket can send events to the other. The following events are split up into two typ...
I know it's documented there
but I wanted to see the exact identify payload the client sends
thanks regardless ^^
you are scary
love
wyndows
windows cuz i cant stop winning
this feels cursed
export type OutgoingMessage = Base<Report | DiffModule | ExtractModule | ModuleList | RawId | I18nValue | VersionResponse>;
export type FullOutgoingMessage = OutgoingMessage & Nonce;
export type Base<T> = ({
ok: true;
} & T) | ({
ok: false;
data: null;
error: string;
} & Omit<T, "data">);
evil
how does typescript not infer this as a never return type
typescript!
mfw people struggling with this: https://x.com/dillon_mulroy/status/1959827658763591960
meanwhile me: https://x.com/ThaUnknown_/status/1960102465820410358
there's so much high quality fuckery in this one
AEBCD?
if it's not that then it's AECBD
i'm not that knowledgable on how the event loop works but i'd guess a, c, d, e, b
Is that even defined in the spec?
I thought the order of such things was implementation defined
this isn't c..
Promise.resolve() is not synchronous :^)
well the poll says i'm correct
wait do i not understand how twitter polls work
X D
yep
its all in the spec
but its so horrendously complex no1 actually knows it
i suspected Promise.resolve would return some kind of dummy promise tbh
it returns an actual promise
people dont understand microtasks, and promise chainign is turbo funky
because it actually does promise, microtask, promise
since the 2nd promise .then is only scheduled after the first microtask
doesnt make much sense
iirc promise.resolve unwraps promises so Promise<Promise<Promise<Type>>> becomes Promise<Type>
yep, which is not correct
because Promise<Promise<Type>> !== Promise<Type>
which is an unhinged statement
wdym yep, which is not correct
because Promise<Promise<Type>> takes 2 microtasks to resolve, and Promise<Type> only takes 1 microtask to resolve
which is why
Promise.resolve()
.then(() => {
console.log("Promise 1")
})
.then(() => {
console.log("Promise 2");
})
queueMicrotask(() => {
console.log("microtask")
})
resolves as Promise1, microtask, Promise2
JAVASCRIPT!
yes I've ran into this problem, yes i wasted MANY hours
and setTimeout(cb) without a number is even more crazy
i usually don't rely on obscure promise behaviours 
doesnt a 0 === undefined for setTimeout
https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout#delay
If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.
or was 0 === 4ms
hm i'd need to check
i remember this was a massive problem around chrome60
been working on designing syntax again 
do not let me cook
which is what tvOS is using
(I still haven't finished my parser)
and where i found that problem originally
wtf is the hex one
insane
just use 0x, 0o and 0b like a normal person
i took inspiration from asm
hop off
the idea with arrow function is for anonymous functions instead of needing to do func () { return 0 } you can just do func () -> 0
is that genius
but not allowed for non anonymous functions because then code will look like kotlin
yeah on chrome this is false
its 4ms
but there was a bug now fixed, where not defiend was treated as 1
instead of 4
which is also why the most popular process.nextTick polyfill nukes performance in browsers
because instead of being a microtask
aka microseconds
its 4ms...
so a few thousand times slower
:)))))
oh shit they changed it!
only for deeply nested timers it happens, damn my info outdated
see, when networked data comes in you dont have much of a choice
it comes when it wants π
why the ->
i had that in elle for a little bit
then i moved to just getting rid of it
func () 0
func (int x, int y) x + y
rendering spotify album covers in minecraft
without using spotify api
or lastfm api
or similar
how
its terrible like
i hate windows
basically
doing it through the windows media control api
which is like
HORROR
__x_ABI_CWindows_CMedia_CControl_CIGlobalSystemMediaTransportControlsSessionManagerStatics
π€
interesting
i wanted to do this in vencord but can i call c apis in js
@jade stone
do i look like a buntard
okay yes i do
they should cosnider making stuff shorter maybe
on nodejs side
idk how loading native .node modules works on discord desktop vs vesktop
have fun w/ that
@jade stone SALADDD π
hi
isnt that what vencord does as well 
patchWebpack.ts: Lines 103-108
const { stack } = new Error();
if (!stack?.includes("http") || stack.match(/at \d+? \(/) || !String(this).includes("exports:{}")) {
return;
}
const fileName = stack.match(/\/assets\/(.+?\.js)/)?.[1];
@nimble bone
kys
that's not very nice
wing has gotten mean and grumpy in his old age
@deep mulch publish typescript as esm so it can be tree-shaken
never
Yooo 
Ill check it out once I'm home
release release
Why are you passing this as an argument π
Wait is that just the type def for a method
why does the top one work but the bottom one doesn't
because you cant pass an object like that
consider:
children.push(React.createElement(Route, { key, path: route, element: <Component /> }));
ohh
you cannot pass state by just calling the function
other way rosie
is Route a lazy component
is children being passed to the Routes component? (im assuming this is a react router thing?)
yeah it's a patch that just injects extra stuff into the children array
and it's not that either bc when I push it like that 1st one it loads the page too
so it should work
and I know this is what jsx compiles to but I tried it anyway but it didn't work of course
im so confused on why the first one works
if Route has any hooks that will totally fucking fail
i wonder
if you pass () => <Route {...} /> would that work
just throwing shit at the wall to see what sticks
let me try
it doesn't crash anymore
but it doesn't register the page correctly
hmmmmmmm
just empty
hold on how do i register routes in my extensions
ummm this is what i do ```ts
const React = await lazyDefine(
() => modules.common.React,
r => typeof r.useContext === 'function' && typeof r.createElement === 'function'
);
const unpatch = patcher.after('useContext', React, (_, res: typeof azalea.navigation) => {
if (res && res.router && res.navigator) {
logger.info('Assigning azalea.navigation...');
azalea.navigation = res;
const routeItems = Object.values(items)
.filter(item => item.Route)
.map(item => new item.Route()) satisfies RouteItem[];
// Add each route to the routes if it hasn't been added already
for (const route of routeItems) {
if (!res.router.routes[0].children.find(x => x.path === route.path)) {
res.router.routes[0].children.push({
path: route.path,
element: (
// eslint-disable-next-line react/no-children-prop
React.createElement('div', {
style: {
background: 'var(--palette-light-grey)',
height: '100%',
overflowY: 'auto'
},
children: React.createElement(route.component)
})
),
hasErrorBoundary: false,
children: undefined,
id: `0-${res.router.routes[0].children.length}`
});
}
}
res.router._internalSetRoutes(res.router.routes);
logger.info('Successfully configured Azalea\'s Routes!');
unpatch();
}
});
it gets one
well
specifically this object
{
path: route.path,
element: (
// eslint-disable-next-line react/no-children-prop
React.createElement('div', {
style: {
background: 'var(--palette-light-grey)',
height: '100%',
overflowY: 'auto'
},
children: React.createElement(route.component)
})
),
hasErrorBoundary: false,
children: undefined,
id: `0-${res.router.routes[0].children.length}`
}
``` this
I will show u children array
this is with the thing that crashes
at 2 is a legit one and at 3 is an injected one
ok
youre creating Component not Route for the 3rd one btw
it's the same
arrow function this passthrough etc
but no way react router checks if it's the correct function right
π
hmm
I will try to find that
the l is bipolar dw about it
and im assuming thats a reference equality blehhhh
looks like https://www.npmjs.com/package/invariant
actually not specifically invariant because it would have different code I believe
maybe discord's own invariant for whatever reason
wait I think it's a react router thing
well it's some kind of invariant checking
it has this stuff
like
invariant(someCondition, "condition failed");
why wouldn't you use a library for this?
it's well designed and a common convention
bc it's a single function
yes
it's already an issue with context menu components
but there's a solution either way
here I am gonna write that function
I haven't thought about that for new api yet
type Condition = (() => boolean) | boolean;
function assert(condition: Condition, message: string) {
if (typeof condition === "function") {
assert(condition());
return;
}
if (condition) {
return;
}
throw new Error(message);
}
need whole library for this
dang
wtf
lol
this literally misses the entire point of the invariant module congrats
what?
how is it different
I guess
A way to provide descriptive errors in development but generic errors in production
wait til you found out that their bundler adds code to polyfill spread operator on every single module it's needed
the same functions

thousands of times
the world if discord stopped trying to support IE11 (they don't even succeed in that) and instead targeted modern javascript
at least they don't polyfill async await anymore
remember when they did that
why would they even want to do this if it runs in its own electron
how is their bundler config even so cooked
how do you manage to polyfill spread but not async await
I genuinely dont know
they're both es6
and it's insane how no dev notices it
we gotta message brandon
im tired of my app being so big!
gonna start working on discord then on day 1 I fix their bundler config and immediately quit again
why dont we actually try
u messaged him in the past regarding bundler config
meh
imagine if discord was sane and targeted something like ES2020
modern but still 5 years old so it has very good compatibility
ngl ill try messaging him
just a heads up about the bundler config
mention it's doing polyfil on spread operator while async is still used
it shouldnt be doing that polyfil
they will fix by polyfilling async again
LOOOL

honestly discord should just analyse what browsers users still use (almost no one even uses the browser version, most use the electron app) and I can guarantee you >99% of the users will be using a semi up to date browser that definitely supports ES2020
remember when they merged modules together @royal nymph
regenerator runtime
that was probably their smallest bundle size ever
also ven the copyright infringement will be gone soon from my repo
sorry it has been there for so long
I think I violated your license like 20 times
what repo
well technically it's two polyfills
https://github.com/extendify-mod/extendify this repo master branch
regenerator-runtime is a polyfill for generator functions
and then regenerator-transform transforms async functions to generators to regenerator runtime
it's basically a copy of vencord
sadantify
we need this to be continued
it's being actively worked on
switch branch
spicetify sucks and spotx got cooked by cef signature checking
yes
I agree with that
spicetify is so AHH
this person is just crazy tho
now I'm curious
I wanna analyse discord's code and see how recent of es spec you need to use discord
do they use regex lookaround
and do they use promise.finally
those two are es2018
spot x has binary patches?
probably patching cef
Spotify uses cef not electron
cef equivalent of electron main process is C++
so if you wanna have main process you need to write C++
that's probably what the binary patches are for
ven is right
but it looks like they patch the exe
π
true
I forgot about hermes
I would support IE11 tbh
discord hasn't worked on IE11 for years
and the only people still using Ie11 are random government infrastructure and retro kids
https://at.pcpartpicker.com/list/Nf2J3w thoughts?
Part List - AMD Ryzen 9 9950X3D, Radeon RX 9070 XT, HAVN HS420 ATX Mid Tower
seems like there's no upper price limit
on the psu/mobo/case, etc
not talking abt the specs
i mean like if i picked a terrible version of a part somewhere
I still would support IE11 for people who are using Windows 7/8.1 and aren't aware of browsers like Supermium
It wouldn't hurt me to do so
https://www.lttlabs.com/products/power-supplies/corsair-rm1000x-shift
PSU is passable, mobo is bad since its asrock
which was known to kill zen5 cpus
I have asrock should I be scared
i'd recommend browning ur pants right now
πππ
they'll probs refund u if it dies
but its annoying since its a week or two without a PC
In Taiwan I sat down with ASRock on the Friday afternoon and questioned their motherboard team about the Ryzen 9000 series CPUs dying on ASRock motherboards, and they said they have just fixed this issue coming in Computex, and are rolling out bios updates.... Though who is to blame?
Sponsor : VIP-SCDkey 30% Code : BFTYC
Windows 11 Pro (21$) : ...
itβs- itβs- itβs aβ¦ p- p- prebuilt π π
also i personally wouldnt go for a liquid cooler, i have a personal vendetta on them
air a good air cooler is way more than enough most of the time
passable or good? should i get a different one?
vandetta mentioned
im gonna do more research first whether liquid is good decision for 9950x
it wont fail you, and if you dont live in a great brittian-level electricity home
then you're fine
since
whats britain level
1980's wiring
nah i live in vienna
so 1960's wiring?
lemme check
anyways read the site i linked u for the psu review
but power outages happen never and ive never had any problems with inadequate power in austria
LTT is the only one that actually does competent PSU reviews
if they said its good, its good
ok
GPU is a GPU, market is fucked so do w/e u want, you're getting fucked either way
get what u can afford and run away as fast as possible
memroy good since 6k, i'd go for a CL28 if money was no object, but fuck cares
and ssd is an ssd for sure, you could probably snipe it for half price on amazon if you're patient
94
they have sales on M.2 SSDs quite often
and u can get them like 40% off if you're lucky
and get some 4TB
ssds are cheap af on amazon
I am not in america
how much more is cl28
do i wait for cyber monday
i dont care its your money XD
what country
understandable
i want the best amd gpu not a good value
i watched a review it seems like xfx mercury and sapphire nitro+ and one other are the best ones but maybe you know better
intel is best value for money by far
but not insanely powerful
because gpus arent expensive
nvidia and amd are simply milking people for all its worth
yum
this fixed it btw
thx @lyric latch @valid jetty
u are the best
doing this was never the problem
HORROR
yea it is
adjust the way you find, not patching it to not check
I just skipped the check!
I will do that if there are more instances of this
You don't skip the check, you delete the check
@stark timber find the Route component exported in webpack by spotify and then patch that to return your custom thing if a special prop is passed, then use that component instead
dont just delete the check π
just fix the find π
there are multiple ways of finding a component without the api wrapping it
well no because i assume the component passed into .push is a custom Route component
when react router expects their one
you are doing something wrong if you need to delete the check
yeah ^^^
it's just a wrapper component for lazy
AMD is the best in a lot hardware wise they just lack good software.
Is an important distinction
patcher.after(findByName("Route"), "Route", (props, res) => {
if (props.__extendify) return <LazyComponent />;
return res;
});
then when pushing your children <Route __extendify /> @stark timber @stark timber PLEASE
and then just use the official Route component
what is this
that has nothing to do with the issue, no offense
https://github.com/extendify-mod/extendify/blob/next/lib/api/page.tsx#L50 into
https://github.com/extendify-mod/extendify/blob/next/lib/components/spotify.ts#L87 into
https://github.com/extendify-mod/extendify/blob/next/lib/webpack/module.tsx#L199 and then into
https://github.com/extendify-mod/extendify/blob/next/lib/webpack/module.tsx#L126
i assume react router expects the children routes to be the ""official"" route component
so if you patch it to return something custom and then use that official component instead of passing a custom one, you can just pass the check instead of needing to bypass it
like, the Route component elia is passing is not the one exported by spotify i assume
This is why I will always use only Intel CPUs
I want virtualization and hypervisors to just work
nooooo why does it create promises
bc it's lazy
you are gonna put yourself into a place you really dont want to be
the 7900xtx is still faster than the 9070xt in most cases
do not use promises to webpack find things
i love monads but i dont want monads in my discord filter code pls
trust me you dont wanna have to deal with async
Why not
mildly painful
I can understand that with vencord
but this is a different system
it's webpack
yes
same thing
I like monads and I think it looks beautiful
webpack does not use async to require modules
that itself already makes it obvious you dont wanna use async either
how do you plan to use async inside functions that are not async
just dont use promises
use proxies with sync code
is this searching for a module that passes all 3 filters???
or is it returning 3 modules that each pass their respective filter in an array
level 1 proxy crook 
level 999 promise boss 
I havent looked a lot but if your api has no way of finding or waiting for things without wrapping or giving access to the plain value then it's flawed
the whole code execution is sync, adding asynchronous webpack finds makes no sense
I know lol
you are digging a hole you dont wanna be in
yeah that's better
but if you wanna make it work for functions too you need target to be a function
not an object
I don't understand proxy at all
yes sure, but with all ai features off AMD will still perform worse than nvidia
I have been working in an improved proxy wrapper for the new find api
I got it done already but haven't tested
https://github.com/extendify-mod/extendify/blob/next/src/examplePlugin.ts
btw nookies off topic but what do u think of this
you also need to redirect more of the proxy traps to the lazy found value
hmmm
seems verbose
but I cant say much because I dont have a better idea
Yeah.
I think you misspelled "sexy"
π
Oh wait
You said with ai features off?
Like game performance?
lol, no AMDs road house is compute
And what I was trying to imply
They make the fastest general purpose hardware in the world period
Nvidia is only worth⦠like 4 trillion rn because of tensor cores and the AI bubble
Wanna literally do anything fucking useful for society like weather patterns? AMD
Fastest super computers in the world? AMD
It was bad on earlier am4 but works basically flawlessly since ryzen 5000
They still push their hardware raid tho for some FUCKING reason
Any sane person would use ZFS or unraid
Some AMD users told me qemu-system-x86_64 -accel whpx doesn't work for them idk why
Hardware bug but fixed just update.
https://gitlab.com/qemu-project/qemu/-/issues/916
https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg05768.html
https://gitlab.com/victortoso/qemu/-/commit/fc3ccde9583b083e00ed45f930b8010ef8aaff93
Host environment Operating system: Red Hat Enterprise Linux release 8.6 Beta (Ootpa) OS/kernel version: 4.18.0-360.el8.x86_64 Architecture: x86_64...
yes
oh god
i have to worry about that now for native
Discord moment.
@hoary sluice
cfg!(not(target_os = "macos"))
that's what i told them (this isn't my screenshot)
soonβ’
u could help spot x devs maybe
was planning on it 
prepare for doing this in vencord soon ill apply at discord and rewrite the entire client in rust
so true
Metrolist on phone + spicetify on pc is op
revanced on phone + yt:m on pc is op
AND it doesnt break every month like spicetify!
Metrolist on phone is basically yt music with downloads and all m3
Its actually good
Works with ur google acc
ill look at it
Like im actually very happy with ir
spicetify just sucks
u can use spotx with blocked updates no issue
Spicetify never broke for me, but i never bother with updating spotify
Probably means "download yo shit"
i use spicetify too
though i can't tell whether it's spicetify or spotify but it's a memory leaking machine
i have to restart the app every few hours otherwise my whole system slows to a halt
Like discord then
yeah
3 of us!!!
do@jade stone
spot x death
they all contribute to yours instead

lc.wa 0xff to dec
I think Iβll be able to build extendify for web too
I donβt see a reason as to why I wouldnβt be able to
actually nvm
itβs possible if they expose module cache on web version
there are tricks to get the cache if it's not exposed
require.cache
What is this ?
they dont, but again, it's trivial to get it
with just monkey patching
hmmm
i think this looks nice
python 
Too many nested if statements
sowy
not sowy
Like the if extension == none should just return. The rest of the code shouldnβt be indented in a else
why do you need to do this
i didnt think about that
if this is for a eval command use jishaku
hm
I highly recommend this video https://youtu.be/CFRhGnuXG-4?si=R1lIajlUQWngnrDQ
I'm a Never Nester and you should too.
Access to code examples, discord, song names and more at https://www.patreon.com/codeaesthetic
Correction: At 2:20 the inversion should be "less than or equal", not "less than"
bwa
bwawa
mrrp
Bwaaaa
You should probably extract out the load and unload logic into their own functions
Good or not just giving my two cents 
:3
7900 xtx is faster on lower settings/without fsr/without frame gen
canβt reach that I think
consider giving your function a more descriptive name, like no one will have any idea wtf "manageExtension" means a year from now
i mean just use elif
though i guess extension == None is a sad path
Sad path?
No? My entire argument is we shouldnβt use it because it makes state hard to manage and required more line edits to change
i mean you could make it totally acceptable by doing that
having a whole pointless level of indentation because of using else: if: is the most glaring issue
return in the extension == None block
and unindent the entire else block (get rid of the else)
I already said that and linked a video with explication
i don't like the idea of never nesting
i prefer sometimes-not-nesting
but i guess that's not a very catchy title (everyone needs nesting sometimes)
iunno havenβt watched the video
Oh itβs bullshit about how to save them
Use enums.
Oh wait he advocated for not using them period?
I just skimmed the comments and they were talking about storing them
I thought to disk
Not using booleans is mentally ill
basically tldw: use date_at rather than has_happened, use enums rather than multiple bools to ensure they don't overlap
just keep things simple
I think if you derive PartialEq on the enum the return of the expression should be βtrueβ π
But since you are comparing against a status enum it might make more sense to use a match statement, but this depends on your use case π
No ππ
Some things are easy to represent as single bools and if we have complex state why use multiple bools
Theo3 posts the most clickbaity shit in the world and all the comments are just people complaining about it
according to theo most times you also want when something happened, not just whether it happened
which i guess is a fair point
i saw a video saying you should always do == true or something?
oh they said always use == false
Stop writing if (!x) β itβs not just a style nitpick, itβs bad software design. It's why I avoid the ! operator in conditions, why I prefer == false, and how this small readability choice connects to bigger design principles.
Weβll look at:
Boolean blindness and why generic booleans hurt maintainability
Modeling real domain states inst...
This is too shitty web dev minded. Very few times is this the case for me.
Why btw?
Because of multiple returns?
i realised in that case it was actually good because of sad path :(
Most of the time if we have a if statement itβs because we have a so called βsad pathβ or skip behavior if a condition is met
consider iterating a grid
for (int y = 0; y < height; ++y) {
for (int x = 0; x < width; ++x) {
}
}

ah yeah in this case you could abstract out the for loops into their own function
Compute_data()
Then
Compute_data_row()
But it depends on the complexity of the internal of the for loops for when one would do that
Modern languages like c++, rust, and golang have iterators or we can make our own to avoid the double for loops
Then this if the indented code becomes more complex
Else there is cases where it makes no sense to never nest.
i think that's a little unnecessary
If you had 20 lines in the inter for loop or more Iβd make it its own function
But like 3? No
oh right extract the thing in the loop
i'm a never extractor
premature extraction is the root of all evil
You should when it makes sense and you know what youβre doing.
I donβt agree with agile or βclean codeβ either.
ye
this is completely pointless imo
really i think there's a lot of stuff in programming that's like tomato/tomato
Depends
in a thing i have the whole loop is a function (yes this is tetris)
(i have taken my tetris implementation very seriously)
i should commision music ...
needs an ost
smartest copilot autocomplete
This is the type of stuff I've seen promptsitutes write
What's the point of this if you only ever use compute_data
If you used compute_data_row in other functions I'd understand but creating additional functions introduces complexity for understanding behavior
imo you only introduce a new function if any of these:
- the code you would extract is over 100loc
- there are two or more places where the code can be reasonably reused
- you're making a library and you want to give the user particular information without calling the whole function, for example a function to create a struct holding info that could otherwise be created inline in the primary function
yeah i violate it too
Compose is just much easier as a single bulky function
i only follow 1 if the part i'm extracting fits better into the code i'm writing as a seperate function, but it can be a pain if you have loads of local variables you now have to pass
it's like a puzzle
Yeah
I extract based on number of parameters, not length
Honestly even for #3 I often leave out some functions that'd be useful simply because it's not really intended as part of public API and there are ways to do the same thing in ways more readable for your code
that's also true
oh well yeah ofc
i'm talking like, you have some configuration that you wanna expose to the user that would otherwise be a struct literal in the primary function
I've gotten into the habit of using custom data classes for a lot of those use-cases where you need similar args
Especially if they could be expensive to compute
If I have 15 vars in scope and some sub-block only needs 3 of them, that would probably make sense as a separate function
real
I only do that if I need the same sub-block elsewhere
Indentation.
I donβt think one should be doing it unless the body of the loop is extremely long like Rosie said or it makes sense for the code structure.
Having extremely long functions that does hundreds of things can make ex control flow confusing.
Both are a heavy consideration I feel for me personally.
I think absolutes are dumb
I have a internal weight of βwhat does this code snippet do, require, how long it is, how complex it is?β before I extract
For example if you follow this logic absolutely you can end up with 13k loc functions which are a headache.
And a real thing in multiple Google code bases.
idk what hes on about i dont code
but someone in a group chat with the only programmer being him asked this
you put all the styles into a style tag, you continously edit the style tag to match the contents of the theme css file
i love raylib why is raylib the best engine
as someone with a good pc i prefer the unreal engine 5, i dont want those brokies with their bad computers playing my games
why aren't triple a games made with raylib
^
you dont think like a business man, will never get rich
its like with scammers and bad grammar, its a filter
people with good pcs = people with money = more likely to buy game and spend money on microtransactions
unreal engine 5 = performance hog = requires good pc = only people with money play = more money
if you make a big game with raylib itll perform worse than UE5 
It's better than most C codebases where I need to navigate through 20 or so function calls to find what's actually doing what the original function name suggests
13k LOC isn't that bad if it's for a good reason and has decent comments explaining sections where necessary
No. No comments
Arbitrary 2 letter variable names
Misleading function name
Barely any documentation
Youre just describing my experience with codebases with functions that are very split to other functions
And Iβm describing multiple source files in Google projects
you can do things without taking them to the extreme
That are 4-20k locs long functions
sometimes it's better not to create soapy clean code with single responsibilities for everything
I never argued for this.
I specifically said I hate agile and clean code
oh you did say
For example if you follow this logic absolutely
i hate code
nice thing with raylib is it feels way easier than an engine as a beginner...
creating basic games...
I've got multiple 20k LOCs in a bunch of codebases and it makes it so much easier to maintain
but honestly i can only see myself moving to sdl if i do something less silly
i find raylib easier than pygame is this weird...
surely it takes a pretty complex game for an fully blown engine to pay off
most engines are also not Free Software
only if it's your code

I really need to learn lwjgl at some point tbh, I can render stuff just fine but I can't think of a clean way to handle physics (especially joined bodies), animations and lighting/shadows
i never want 20k lines of code in a file let alone a function
low level graphics apis seem like pain
:(
writing a game in java is based though
Kotlin but yes
It could be worse
It could be vulkan
writing a game in java is the best troll
Java needs to be more usable imo
idk kotlin is bloated
It's not that bad tbh
Perf is generally the same
But it has a bunch of QOL stuff on top
i am against programming languages having useful features 
ok golang dev
ok rust dev
except c++ c++ is perfect
c++ is just barely more readable than rust
i do
for one project
i don't actually hate it i just troll people on the internet a lot
this is what all modern C++ and rust code looks like to me
- unreadable as hell
- :::::::::::
just write normal, readable and maintainable code smh
its just i think it's a language i'm more happy about other people writing than myself
c++ is definitely worse when abused
rust definitely has a more modern syntax
wait no
rust is worse
because it allows this https://github.com/michidk/rost
also a side note
a really funny thing I've noticed about rust devs
is that they all seem to love certain features
and then someone else points out that its unsafe behavior
completely defeating the purpose of rust
?
i think simple c++ code can be pleasing
the only good parts about C++ are the decent stdlib (especially compared to C), namespaces and inheritance imo
i change my opinions every 5 seconds
my favourite rust feature is leaking boxes, i love leaking boxes
my favorite thing about C++ is that i have 15 years of experience using it
everything else is a bit meh
c++11 was amazing though (relative to c++03)
and c++23 is very usable
an opinion i've maintained for a long time is programming magic is generally bad
like qt's signals and slots
This is poorly written cpp to be fair. Why is everything getting aliased.
i have no idea how they work...
C++? Decent stdlib?
Where?
std::string, std::vector and std::map solve 99% of my problems with C
see an important thing here is to define what is magic and what is abstraction
because for me, there's nothing better than abstraction
but most people confuse magic and abstraction
Sure I'll accept that it's better than C
Web dev moment.
yes, cope and stfu
the only good magic is whatever the hell it is that the compose compiler plugin does
i mean like stuff that looks like it shouldn't work
i do not give a single fuck how your File is implemented, what i care is reading metadata from the file
im a python dev. i need abstraction. give me abstraction. i want so much abstraction i just have to import 1 package and execute a function to make my app work.
i care about doing File.name or File.slice(0, 12)
and I could give less of a fuck whats under the file implementation
IE abstraction is bae
you'll love APL
you can do just about anything in like 3 chars
or even stuff like reflection i've felt a bit iffy about
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
β§/β³20
232792560```
see when something does shit without telling you its doing it, its not always that good, compilers are quite often a pain point for me, because of all the black magic they do
fuck, vite is dogshit because of how much black magic it does without telling you



