#ot1-perplexing-regexing
1 messages ¡ Page 170 of 1
xD
emii be like "programming done me go play:3"
dude I am working from 9 am
I am also learning excel too
and making projects
cool
cool
honkai star rail
it's her dragon
how come no one from genshin got themes
honkai also got some anime collab
I willing to make a Linux app in python for the freshmen who came into linux
in python
Anyone how is willing to contribute, DM me
I'm just wondering, does this server have an official position on using AI personally for helping with coding? not talking about vibe coding, but more something to assist you, and answer questions. getting back into coding after stopping for 5 or so years and I want to get up to speed quickly
I don't think there's an "official position", but most people's advice would probably be never trust, always verify, use tools responsibly. If you think you can do that, go nuts IMO.
I don't think we have an "official" position
but a common sentiment among experienced folks here (which I agree with) is that it's better to not use it if the goal is learning, since using it to provide you code or debug your code, even if it's "just" pointing out the problem, robs you of opportunities to exercise that thinking on your own and learn.
and if you have questions, you'll get much more accurate answers asking humans (here) than AI.
yeah, it definitely comes down to the way in which you're using it. theres a fine line between having it explain a library or principles to you vs having it do thinking/work you would've otherwise had to do in building something
and for me personally, I want to rebuild a strong foundation, but at the same time it looks like these tools could potentially make me much more efficient
I guess one litmus test you could use is, are you planning to use AI to bridge gaps in your knowledge, or to jump chasms? The latter is hard to do safely.
thats a good way to look at it
Apart from the fact that it can be hard to evaluate, yeah đ
it definitely requires honesty with yourself lol
I pretty much stopped using AI besides for tab auto complete. It wasn't making me smarter and the time savings were debatable
Try new new app : clue
why do you define some functions in the loop and others outside of it
no
just try it
Alot of wording for a 50 lines app...
i propose a new measure of code quality
docs to code ratio
@rough sapphire
>>> len(clue_code)
1999
>>> len(clue_docs)
2009
>>> len(clue_docs) / len(clue_code)
1.0050025012506254
You: â Passed
seriously though i dont think anyone's gonna "just try" a script that connects to some random API
like i didnt know about cheat.sh until 5 mins ago when i saw your repo
What about the 10 line function that needs three pages of docs or the 1500 lines of models for an API spec that have autogenerated schemas so nothing is hand written?
https://github.com/omartech104/clue/blob/main/main.py#L14-L16
this seems like the only thing that prevents the program from running on windows?
main.py lines 14 to 16
if pltform == "win32":
running = False
print("This program only runs on Linux")```
based
Not mine
FedEx and UPS
arbitrary platform restriction in linux's favor
i love how the clear console command handles windows even though the program doesn't
W
A great tip
Yes
I see nothing wrong with the suggested code structure
this seems fine
i mean the API_VERSION part is good
but the endpoints object is redundant
i see no advantage
once you have a large enough number of endpoints, having them all in one place is better for reference
with the latter, you get editor support. no possibilities of typos. if you want to change an endpoint, you don't have to rewrite all the calls
ok i see
you can of course go even further and abstract out the api.method functions
that is one way to do it
the purpose of this app is for the newcomers to linux
there's a man command
it shows docs for whatever command has one (practically all of the frequently-used ones)
in my opinion, clue is better
Relax, BRO, Relax
can u just try the app
without making fun of me for God's sake
Hello Viv the vive coded coder
Ah i think i can understand what technique it uses for the coloring
new account?
wanna see if ur right?
nice
i honestly have no clue
Wait imma think more first
@ripe birch
@scientific.method
@fathom musk
And other 2 not in this server lol
Gosh im such a uhhhh degenerate for having this many accounts
relatable
i had like 5 previous online personas before having to stick to interrrp because it's attached to too many things
||first i used pillow to make a thumbnail, then saved the image and switched to ski to get the individual pixels in a np array, switched those to hsv, then used the hue to chose between the 6 different hues in a terminal (8 counting black and white), the saturation to switch between the more or less saturated versions or just straight up black, and then finally i used the value to switch between different opacity unicode block characters, all of which had a white backgroundç||
Oh, its different than what i guessed
rlly?
what did u guess?
i also || tried making it work with higher values by having a decimal exponential to the value that had a range between 0-1 but for some reason didnt wanna work||
My guess was quite wrong tho
I guessed that some spots were not colored at all but some had lots of dots and some had a solid block of color
So depending on how dark a color is, the more dots it will have
This explained why the black/grey were solid color blocks instead of dots but i also spotted some green blocks which are solid instead of dots so there goes that theory
https://youtu.be/gg40RWiaHRY?si=g3UFbVzRxqLUFfUF
Btw, this vid is very nice
To try everything Brilliant has to offer for free for a full 30 days, visit https://brilliant.org/Acerola/ youâll also get 20% off an annual premium subscription! #ad
ASCII art has been a staple of the internet since its inception -- but today I'm wondering if we could make a shader that turns games into ASCII art, and if we can, would it eve...
i got a couple mins b4 class
but ye at least u guessed better than my cs teach who thought itd be best to use rgb values
so i was watching the video and figured out with my current system it'd involve a bunch of data loss
cuz id have to switch out the block characters with the line characters
and therfore lose the current method of determining value
and i cant be arsed to redo rhe whole thing
i spose the next thing to do is render video
java you quit java?
java will remember this forever...
đ
oh java.. oh java.. thou gave rise to a traitor amongst thou'
*gavest
also "amongst thou" is incoherent, "amongst" expects a group but thou is singular
Should "amongst thou" be replaced with "Amongst ye" instead?
I haven't read any Shakespeare for 30 years, but I like that. It sounds piratey.
i wanted 100 wpm
Don't increase your burst speed; having a consistent pace helps improve wpm for me

Amongst thee actually
I hate how they just pick random words instead of somewhat coherent sentences
it now renders video
thereâs a mode that picks from famous quotes
Some would definitely say "amongst thee". And it sounds right to me (here in Yorkshire FWIW). But those tables listed "thee" as a singular.
Ah, thankythee.
could someone help me here? https://discord.com/channels/267624335836053506/1418619499938316368
@viral parrot bro
incredible researhc
of course it's japanese authors on soy sauce
also yes, the issue is the sodium
yeah its just fuck ton of sodium
too much of it starts fucking with your brain function
LOOK THIS IS AN IMPORTANT ISSUE FOR THEM /j
admittedly i totally would OD on soy sauce while eating sushi
what's the ld50 of buldak instant ramen
6g/100ml
A 40âyearâold woman presented to the emergency department with seizures and remarkable hypernatremia with a serum sodium concentration of 183 mEq/L. The initial brain computed tomography scan showed brain shrinkage, which could occur during the acute phase of hypernatremia. We reduced her serum sodium level rapidly, rather than at the recommended slow rate. On day 3, the patientâs brain computed tomography scan showed widespread lowâdensity areas and edema. The patient died 8 days after admission.
WAIIT THIS IS A REAL CASE
i thought it was on like rats or smth
but hey, 10.5g of protein and 60kcals
japanese people fr be ODing on soy sauce
tren is still better tho
you should watch ChubbyEmu
no
oh dear you havent seen southeast asians
i think i can see myself
oh wait no im turning invisible
welp cya
ld50 is 3000mg/kg body weight... which is like 150g for a 50kg person, which is like 100 spoon of soy sauce (back of the paper calculation)
the quote that estrogen posted sounds like a chubbyemu vid
soy sauce is used in pretty much every east/southeast asian country isn't it
although i do think their soy sauces differ somewhat
they do?
yeah
some have alcohol even kek
there are nuances to soy sauces
One of my fave and most trusted recipe creators gets super specific when saying what kind you need
they can differ regionally, based on country/cuisine, or in their seasonings and whatnot
uncle wang gang
ifykyk
bad soy sauce (maggi)
Everything on recipetineats is amazing, Nagi is GOAT
okay dark soy sauce can barely be considered soy sauce
it literally has soy sauce in the name
thats why i said barely
It's literally very solidly soy sauce though
Like no one is calling dark soy sauce barely soy sauce
It's just soy sauce
i once accidentally put dark soy sauce instead of soy sauce
this guy has the absolute most sweaty techniques i've seen
yeah, there are different types of soy sauce. Just because they're different from each other doesn't make it not soy sauce
The point is that there are different kinds of soy sauce
i get 2 mi goreng indomies and use both packs along with a bit of added soy sauce
What kinda "no true scotsman" argument is this even?
there are different types of soy sauce i juts barely consider dark soy sauce a different type of soy sauce :)
Maggi isn't even close to soy sauce imo, despite the ingredients being similar - it tastes like lovage
indonesian soy sauce is pretty sweet isn't it
then i fry 2 eggs and sprinkle the yellow liquid with salt
yeah, the halal ones re the sweet ones
i see
put the soy sauce into the yellow liquid
chinese arent halal, because they contain alcohol, which is why they taste bitter
i tried to, tastes bad, also it's the yolk, i forget its name a lot kek
i mean like japanese soy sauce and what you get from like
a chinese restaurant
is different
but like slightly different
p*nda e*press
sorry i dont speak american
we dont even have that where im at rn
Pandas would never actually make or deliver food
explain kung fu panda then
ez the crane makes the food
bruh
i love seafood
mainly because im in northern morocco
we get a shit ton of seafood here
They are scrumptious đ¤¤
same vibes
furry transfem kek
mfs when fourier transform
fr
WAIT A SECOND I KNOW ONE OF THE POEPLE IN THAT THREAD FORM A DISCORD SERVER
?????????? who?
pokemon players are furries
not teling you
true
oke
Letâs talk about grammar.
How would you correctly use âGod forbidâ in a sentence?
For example:
âGod forbid, no murders in my community this year.â
Wouldnât that be a double negative?
Should it be written as:
âGod forbid a murder in my community this year.â ?
"God forbid we have less spam"
Bro might actually just be the bay harbor butcher
It's usually a vent
So you want god to forbid less spam. Meaning you wish for more spam?
Yeah these days it is usually used sarcastically
You use it to mean the opposite of that you want
it is not the proper usage but it is common and people will know what you mean & it has a humorous tone
pd.read_pickle(dill)
pd.cut(carrots, julienne)
pd.melt(cheese)
English is a language with more exceptions than rules
Don't look for sense it it
||Linguists, don't @ me)||
Chemistry type shit
its sarcastic in that sentence
Ah
For your original question the second one is technically correct but sounds weird
you usually use "God forbid" with a declaration instead of an imperative where you tell God to forbid something. so "God forbid there's a ... this year".
Ahh this makes more sense
These examples seem strange to me because I rarely hear "God forbid" as a standalone sentence. It's usually parenthetical, like, "Nobody likes to pay for insurance, but if (God forbid) some bozo t-bones you in an intersection, you'll be glad to have it!"
it's a thing people say almost superstitiously, like some people knock on wood when talking about a bad thing that might happen
God forbid a man tries to use a phrase sarcastically
I guess I've seen the sarcastic version standalone? it's probably regional
I think it's basically saying that you'd like to do something
but you're facing obstacles put forward by other people
or at least that's how I've seen it used
"obstacles" could be anything, anyone trying to prevent you from doing [thing]
or could be the universe, you wear a nice suit and then stumble and fall on a puddle
god forbid i try to look good
this is sarcasm, not the superstitious use I mentioned earlier
idk why but irl i feel ashamed to talk to rich people unless theyre family because duh
how do you know if people you're talking to are rich?
it's apparent; most rich people where I live display it
it being their wealth
Does that mean that rich people who don't display their wealth don't exist because you don't see them?
they exist, because their parents pick them up in nice card; there's not a single rich family/community that cheaps out where I live
and it's always some real estate investor or some shark
so you do see them flaunting it then?
yes
how would you recognize them if they don't flaunt it?
their personal items, like phones
or ipads and whatever
what phones would they use?
latest (any brand that they want)
if they don't like to flaunt it, why would they care about always having the latest and greatest phone?
social constructs ig
aren't wealthy people beyond social constructs of the poors?
not everywhere
Sure, there are nouveau riche and people trying to make up for shortcomings.
But these aren't the people who don't care about flaunting it in the first place. So why would they care about abiding by the poors' social constructs?
dont ask me ask them
i was once almost one of them
I mean, you said you can detect rich people because it's apparent. I am trying to understand how it works when they don't make it apparent
and all the examples provided were examples of people flaunting their wealth
iirc flaunting is making something apparent right?
i'm not a native speaker
yeah something like that
outside they make it apparent, i got a scholarship at a private school for compsci and all i feel is shame ngl
people getting picked up in porsches, limos, etc
i'm an intern at the school meaning im at a dorm
why do you care?
i used not to, but it's become something that gets to me
if anything, you should feel pride of reaching the level where you can mingle with high worth people
i wish lol
im the only one in a dorm
my class calls me intern but i just shrug
it's about you, not them
does intern mean you work for them?
nope, it comes from the french word "internat"
at least in this context
basically "dorm kid"
I see
yeah i guess
is this a university?
nope, high school
you have comp sci specialization at the HS level?
yep, tho not fully, about 2h/week
you can always reply to them how it's awesome you can wake up so late and do not have to commute, or how they still live with mommy and daddy...
true, but keep in mind that everyone folds under monetary influence, even the staff
so i cant really do anything other than wake up, cook, shower, go to my classes and go to my dorm
like what?
but hey, i get 500Mbps fiber optic here
principal, teachers, even the fuckin janitors kek
what about them?
but janitors' folds are acceptable, they don't get paid as much
they fold under monetary influence, so if i talk shit about one of the rich kids to their faces, they'll just cry about it and ruin my scholarship
how would that happen? Do you live in an authoritarian state?
I guess they'd get kicked out of the school
im not part of trump's experimental server (the USA), im in morocco
yep
also corruption is wild here
you can kill multiple people with your car or a machete and get away with it if you bribe the cops
guns arent allowed here, only cops get to have 9mm pistols
well, if you live in an authoritarian state, then sure
im in a corrupt country
unlucky
hmmm
I think I had more hours of CS a week than that in my HS, and it wasn't a specialized one or anything
all countries are corrupt
we don't get as much time
thanks passive static voice message
?
they said Morocco
any of y'all use haskell
I'm trying to learn it lol
any suggestions on a good resource to start r with
me either unfortunately
thank you!
Hello,
WHY?
Wait -- That's the complete opposite end of the spectrum
Are you just learning?
good luck
aren't u gonna ask for what
I was reading the chat this morning
dang
nvm
thx
im a little nervous since idk what is gon be in the interview
and idk how to prepare for it
opposite of what?
Haskell is all strict, R is all dynamic
Hey @crystal spruce are you using nvim on windows or are you using linux
neither
no can do
woah why not
i mean theres no coordiantes elsewise its good if it can plot non elementary functions
the script?
uh it's rust
what does that mean
atm it only takes in y=??? or x=??? functions
i have no idea how i'm gonna do more complex ones
just 2d? oh then i can see how my projectiles go
the code is bad but it works
in hindsight i should've done this in python so i could use eval
that is pretty nice
thanks lol
oh there is evalexpr
marching squares or sthn
Write a macro
I didn't read through the code đ
i love this
when can i spray it with chlorine gas
c is hard or ez
ez if youre familiar with the syntax, preincluded libs dont take a lot of time
oh ok thx
im never going on 4chan bro đ¤Ś
it can draw (thick) hyperbola now
@foggy wagon kinda of like this so the game will be on one side or an app and u do changes on left
tl;dr u want to make a mini game engine with live code change feature ? 
okie
hell nah
nooo like im saying lets say im building an app or a game and like i wanna keep it running or it should be on on side and i make changes thro code ykwim
lol
popsickle
yumm
fedora KDE users... for some reason the scroll via touchpad in just discord is wildly fast. Is there any way to adjust this?
I'm not sure (I only use Discord in the browser), but I would try forcing it to render using Wayland
see https://wiki.archlinux.org/title/Discord#Native_Wayland_rendering
you use linux.......
and I think it is a setting in the settings(system) to change scroll speed
Hi đ trying to raise awareness for PyBay. https://pybay.org/
10th Annual Python developer conference - longest running on the US West Coast. Join us in San Francisco!
9gag still exists?!
Man nobody who was cool ever went on that site
That was the site for losers even during its heyday.
TIL that's how heyday is spelled
hay day is a game
"The blue wire goes to..."
checks labels
"...blue, and the purple wire goes to..."
checks labels
"purple. I see"
Those rooms are currently named with their wall colours. And it was also accidental that they were put in there in that order so it matched when I decided to make cables into a rainbow :3
oh I see
I missed the next message
you could color code radio networks by broadcasting them over visible spectrum...
The labels are "up(stairs)", name of sib (that's why I censored it), "heat pump" (meaning just basement, but cable exits just by the heat pump and was originally connected directly), "kitchen", and then those two rooms.
This panel is in our main bedroom, so we just connect directly to switch there if needed
Upstairs labels are not that clear as before we renovated downstairs, we just had two cables with silver and gold sharpie (and later grey and yellow sleeve) to mark which is which... So two labels are "silver" and "gold", lol. (Both run downstairs, but one is currently connected inside the wall)
I'm home and this is NOT my cat XD
(We had a cat move into our barn. Then she showed us 2 kittens. One disappeared at some point... It's now 3 months later. This is the kitten who's still here. And who decided to try to hang out with our cats.
Today I was joking he got replaced bc he was never this cuddly!)
The cat has adopted you
Yeah. His mommy was easier to dissuade from coming to us, but she's cuddly to everyone who can offer food.
But she managed to understand how to get down our kitty ladder. (We have a wooden construction to allow our cats to come and go onto our 1st floor balcony. Previous summers, we'd just leave the balcony open.)
This kitty can go up, but can't go down, so we had to let him in via balcony and let him out downstairs. XD
So far he was kinda reserved, fleeing from humans unless you cornered him or caught him when he was eating... So this behaviour today is really weird.
The audacity of cats smh
If i walk in some random's house and sit down and chill on the couch with them i get yelled at and escorted away by police
Well, they first let us get familiar with them in the barn, it's not like they just decided to get into our home instantly
"and when I do it, it's wrong"
-Gary Brannan, circa I don't remember
The bounciest man on the internet!
that's Gray, not Brannan đ
also good to know I'm in good company with techdif readers
I need to make some website with transcribed episodes where I can look up techdif quotes when I want to refer to them
techdifomicon
techdifnomicon?
I have acquired subtitles
wonderful
nice! used the youtube api I assume?
for legal reasons I will say yes
good enough, techdifdump done
https://algmyr.se/techdifonomicon/
only like 7MB of stuff
Matt's a legend
can you turn this into an SSG?
so that people can make their own transcripts for whatever channel they like
the logic involved is quite easy, if you manage to get video metadata and the subtitle files, generating something like this is pretty trivial
like, my python code is ~100 lines
yeah but you already did it
and includes a quick and dirty srt parser
maybe I can use the SRT parser I wrote a few months ago
the only info needed to generate this stuff is an srt file (+ the video title and video id)
here is the python code, minus some text content I replaced
https://paste.pythondiscord.com/QMMQ
bring your own data, adapt what you need
(the only other stuff left out is my stylesheet and an 8-line makefile that would do the data gathering)
bonus content
fops
It's not a gato nor a perro; it's a Pato!
They look like a cat wolf
So if you combine a dog and a cat, you get a duck?
Spanish logic.
You get a cog, obviously
Different languages have different views on grotesque unethical genetic experimentation, it seems.
dat cog
cag dot
coat dod
Hey Dementati! It's been ages since I've seen you on, how have you been?
Hey, I've been good, thanks
I got other stuff going on sometimes, but I pop in here now and again
@pseudo zephyr Washington DC has excellent public transit
i didnt know that đ
most people use it to get to work instead of private vehicles. I only drive my car once a week or so.
do you use the beltway?
the beltway is just a ring highway. I drive on it sometimes.
In re: a different Discord server where I'm helping out, is there a super-lightweight way to implement a #roles channel where users can 'react' / 'un-react' to things to opt into roles? Or is that always a whole persistent bot I need to host?
It's a friend's server and I want to be really careful about opting him into dependencies he doesn't understand.
you can use discord's builtin chennels and roles thingy
Having buttons in a channel requires a bot
You can add role buttons natively in id:customize
See https://support.discord.com/hc/en-us/articles/11074987197975-Community-Onboarding-FAQ
not necessarily reactions but it does give roles based on what you select
Oh, thanks; I didn't even know such a thing existed these days!
Thanks to you both.
Oh, dang, requires Community mode. Not sure if my buddy is going to be down for that.
Or is this saying that despite the name of the feature, it's now available to all servers?
The sentence about it isn't that wonderful.
community mode makes the server publicly discoverable
but not many people are gonna join since the discovery tool is dogshit
so inv links are your main way
@shadow jetty
fyi this is inside the windows terminal, fully in python
right, but render some video -- i need to see fps
aight sir
alr gimme a dollar
couldnt figure out video playback using sixels
the dollar is for the image which could be considered a frame
lol im making my own rules
tanks
now i have enough money to do something
How are you getting such crazy resolution?
Is this just a terminal with an insane amount of cells?
no, it's sixel
Sixel, short for "six pixels", is a bitmap graphics format supported by terminals and printers from DEC. It consists of a pattern six pixels high and one wide (in black and white), resulting in 64 possible patterns. Each possible pattern is assigned an ASCII character, making the sixels easy to transmit on 7-bit serial links.
Sixel was first int...
yeah I'm reading this and not quite sure I understand but very cool I guess
it just a way to transmit bitmaps with ansi
@rough sapphire as far the LKMP selection process goes, I think if you complete all the tasks successfully you have nothing to worry about, you'll get in
thanks mate. will let you know, if i have anything further more. thanks again
You know what is super weird? I promise this is about programming, and maybe even Python.
I am not trying to insult anybody, but the way most (Japan-based) Japanese devs I've worked with write code is.. Not that pretty?
Like.. crazy sometimes?
...and I have always struggled to reconcile this with how intentional my beloved Japanese peers are in all other parts of life?
Like, this is the culture that has two sites for their holiest shrines so they can tear them down and rebuild them every 20 years in parallel to ritually purify them?
I have no mental model for why their code isn't aiming at similar targets.
You wouldn't believe the Matz code in old Ruby etc.
(I love Matz and would jump in front of a bullet for him maybe, but no I wouldn't hire him)
have you seen japanese websites
The impression I have of Japanese people and technology is that they have this outdated retrofuturistic image of what technology is, and they are hopelessly behind on anything that doesn't fit into that image.
Like, they love humanoid robots, but efficient and easy ways to pay for stuff is not cool enough.
I imagine that this translates into training for tech jobs.
Blame gurren lagann for their mecha obsession
Bruh, their mecha obsession was born ages before gurren lagann
It exists due to their mecha obsession, it didn't cause it
The first gundam came out in 1979
Dang i thought gurren lagan was older than 2007
đ
Ok im blaming gundam youre right
Nothing that looks that good is that old
There were several popular mecha works that predated Gundam even, though
I dont like mechas, havent watched any
The first widespread manga seems to have been released in the 50s
Fun fact; the "missile swarm" trope from anime, where you fire a ton of small ones and they fly around etc, is called an "Itano Circus", because Itano invented it for Gundam and then it went huge in Macross/Robotech
Ultraman is 1966
That 1975 show seems to have been the first popular incarnation of the concept
This is actually the real OG though https://en.wikipedia.org/wiki/Ambassador_Magma
Ambassador Magma (ăă°ă大使, Maguma Taishi) is the title and protagonist of a manga and tokusatsu TV series created by Osamu Tezuka. The TV series, produced by P Productions, aired on Fuji TV from July 4, 1966, to June 26, 1967, lasting a total of 52 episodes. It is the first color tokusatsu TV series in Japan, beating Tsuburaya Production...
M A G U M A ~ T A I S H I
Slightly before Ultraman, and Osamu Tezuka is lord.
I believe they were supposed to be teenagers
i've never watched super sentai
and this is 1957 https://en.wikipedia.org/wiki/Super_Giant
Super Giant (ăšăźăăźă¸ăŁă¤ă˘ăłă, SĹŤpÄ Jaiantsu; literally translated as "Super Giants") is a Japanese superhero featured in a successful series of serial-like tokusatsu short feature films produced between 1957 and 1959 by Shintoho (the non-union branch of Toho). He is also known in Japan as Giant of Steel (éźéăŽĺˇ¨äşş, KĹtets...
but sentai looks more fun
Seems like the actual power rangers was an American franchise based on the sentai genre rather than a specific Japanese work, didn't know that
I grew up on Science Ninja Team Gatchaman
Science Ninja Team Gatchaman (ç§ĺŚĺżč éăŹăăăŁăăł, Kagaku Ninja-tai Gatchaman, lit. Science Ninja Squad Gatchaman), also simply titled as Gatchaman is a 1972 Japanese anime television series produced by Tatsunoko Production which aired on Fuji Television and its affiliates from October 1, 1972 to September 29, 1974 for 105 episodes...
It was gonna be today but just found out they delayed it đŠ
wdym? isn't power rangers just the american adaptation of super sentai
or is that more recent
I mean, "super sentai" is a genre, not a specific work
There isn't a Japanese original of the show the power rangers
There's just the genre
perhaps the original mighty morphin
but a lot of the power rangers are based on japanese Super Sentai seasons
Tokusatsu is the genre
No, you're right, Power Rangers is based on Super Sentai
Hi, sorry, I'm going for dinner now
Might be back later tonight
ight
me when i go to prove a lemma about some object for a part of the question, realize that the object involved was defined in a prior part of the question, scroll up to the prior part, and realize the prior part is literally the lemma i am proving
extremely based recursion
Anyone knows any API I can use to get animes (like MAL, but not being MAL, their API is just bad and incomplete)?
incomplete?
I don't think that any other anime sites have more data than it
most animes don't even have synopsis or their number of episodes... which is what I want from the api
got some examples?
(of animes they lack that info)
Naruto, one of the biggest mist popular anime, missing a synopsis?
are you sure you didn't just forget to specify it in the returns fields parameter?
Pretty sure ```py
MAL_API_FIELDS = [
"id",
"title",
"main_picture",
"start_date",
"end_date",
"synopsis",
"num_episodes",
"status",
"genres",
"media_type",
]
for Kimetsu GET https://api.myanimelist.net/v2/anime/38000 I get ```
{'id': 38000, 'title': 'Kimetsu no Yaiba', 'main_picture': {'medium': 'https://cdn.myanimelist.net/images/anime/1286/99889.webp', 'large': 'https://cdn.myanimelist.net/images/anime/1286/99889l.webp'}, 'start_date': '2019-04-06', 'end_date': '2019-09-28', 'synopsis': "Ever since the death of his father, [...manually removed for brevity...] [Written by MAL Rewrite]", 'num_episodes': 26}
wat
which ID did you search for?
that is just from ```py
import httpx
import os
client = httpx.Client(headers={"X-MAL-CLIENT-ID": os.environ["MAL_CLIENT_ID"]})
fields = [
"title",
"start_date",
"end_date",
"synopsis",
"num_episodes",
]
resp = client.get("https://api.myanimelist.net/v2/anime/38000", params={"fields": ",".join(fields)})
print(resp.json())
(idk why it included fields I didn't ask for but
)
Httpx is one of the libs for handling requests. Similar to requests lib
but when I use that route /anime/{id}, it always comes with num_episodes and synopsis as null
Show code?
That's not code, that's your file list
yes, but I dunno what to show, lol
My guess:
Did you pass the fields you had above somewhere when doing the request? Or directly parse to the models you showed?
If yes, it probably cut the other fields to only include those you listed
class MalService:
def search_anime(self, query: str, page: int = 1) -> MALPagedData:
env = get_env()
client_id = env.MAL_CLIENT_ID
params = {
"q": query,
"limit": MAL_API_LIMIT,
"fields": ','.join(MAL_API_FIELDS),
"offset": (page - 1) * MAL_API_LIMIT,
}
res = fetch(
MAL_API_URL,
headers={"X-MAL-CLIENT-ID": client_id},
params=params,
schema=MALPagedData,
)
if not isinstance(res, MALPagedData):
return res.json()
return res
def find_anime(self, id: int) -> MALNode:
env = get_env()
client_id = env.MAL_CLIENT_ID
params = {
"fields": ','.join(MAL_API_FIELDS),
}
res = fetch(
f"{MAL_API_URL}/{id}",
headers={"X-MAL-CLIENT-ID": client_id},
params=params,
schema=MALNode,
)
if not isinstance(res, MALNode):
return res.json()
return res
```yes, yes
the search one works, the find one doesn't
same fields and params
Yeah, you limited the fields via params, that's why the other stuff came as null/are later read as null
what are the MAL_API_FIELDS?
Don't give the fields
that's how requests works
Posted above
I do need the fields
Not all params are required
the default fields don't include the synopsis iirc
if I don't have it, I'll get jsut the default ones
Oh, so use the fields etrotta used in the example above
oh you were passing those?
hmm...
I'm also storing the other ones though
this is fetcher, before anyone asks ```py
import requests
from typing import Optional, Type, Dict
from pydantic import BaseModel
from fastapi import status
from app.exceptions.fetch import FetchException
def fetch[T : BaseModel](
url: str,
method: str = "GET",
headers: Optional[Dict[str, str]] = None,
schema: Optional[Type[T]] = None,
**kwargs
) -> requests.Response | T:
try:
response = requests.request(method, url, headers=headers, **kwargs)
data = response.json()
except requests.RequestException as exc:
raise FetchException() from exc
if response.status_code == status.HTTP_418_IM_A_TEAPOT:
raise FetchException(status.HTTP_418_IM_A_TEAPOT, "The given api was too silly.")
elif not response.ok:
raise FetchException(response.status_code, data)
if schema != None:
return schema.model_validate(data)
else:
return response
weird, seems to work for me
double check if your schema thingie isn't messing it up?
show the schema class
from pydantic import BaseModel
from typing import List, Optional
class MainPicture(BaseModel):
medium: str
large: str
class Genre(BaseModel):
id: int
name: str
class MALNode(BaseModel):
id: int
title: str
main_picture: Optional[MainPicture] = None
start_date: Optional[str] = None
end_date: Optional[str] = None
num_episodes: Optional[int] = None
synopsis: str
status: Optional[str] = None
genres: List[Genre] = []
media_type: Optional[str] = None
class MALPageInfo(BaseModel):
next: Optional[str] = None
class MALPageNode(BaseModel):
node: MALNode
class MALPagedData(BaseModel):
data: List[MALPageNode]
paging: MALPageInfo```optional everything
even the ones that doesn't make sense are optional here
yeah weird, does it really not gives you the synopsis if you server.find_anime(38000)?
you're usinghttps://api.myanimelist.net/v2/ for MAL_API_URL right?
MAL_API_URL = "https://api.myanimelist.net/v2/anime"
MAL_API_LIMIT = 9
MAL_API_FIELDS = [
"id",
"title",
"main_picture",
"start_date",
"end_date",
"synopsis",
"num_episodes",
"status",
"genres",
"media_type",
]
```yeap
show what exactly it responds?
38000
wait, sec, I changed some stuff and somehow I broke everything
synopsis
Field required [type=missing, input_value={'id': 38000, 'title': 'K...'}], 'media_type': 'tv'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing``` bc I removed the optional from synopsis (kinda important, so I'd rather just have an error rn)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/thonk/backend/.venv/lib/python3.12/site-packages/tortoise/models.py", line 735, in _set_kwargs
raise ValueError(f"{key} is non nullable field, but null was passed")
ValueError: num_episodes is non nullable field, but null was passed
```If I add that optional, then it just fails on the db
it's both fields
debug what was the exact request and response
they're fields in the response
{'id': 38000, 'title': 'Kimetsu no Yaiba', 'main_picture': {'medium': 'https://cdn.myanimelist.net/images/anime/1286/99889.webp', 'large': 'https://cdn.myanimelist.net/images/anime/1286/99889l.webp'}, 'start_date': '2019-04-06', 'end_date': '2019-09-28', 'status': 'finished_airing', 'genres': [{'id': 1, 'name': 'Action'}, {'id': 46, 'name': 'Award Winning'}, {'id': 13, 'name': 'Historical'}, {'id': 27, 'name': 'Shounen'}, {'id': 37, 'name': 'Supernatural'}], 'media_type': 'tv'}
```I just printed on the fetcher
In the search query animes?q=<name> or the direct anime/<id> query?
detailed route with id
yeah I really don't get why that wouldn't include the synopsis if you have it in the fields
e.g. running with VSCode's debugger, it errors and pauses here
using the Debug Console, I can print the request url (including params) and response
maybe triple check if you didn't make a typo somewhere? idk
I'm using fastapi though, dunno if there's any debug stuff with it
just create a new file, import the class and run it directly
?fields=id,title?
yes, that is intentionally excluding the synopsis from the fields to show the error
{
"id": 38000,
"title": "Kimetsu no Yaiba",
"main_picture": {
"medium": "https://cdn.myanimelist.net/images/anime/1286/99889.webp",
"large": "https://cdn.myanimelist.net/images/anime/1286/99889l.webp"
},
"start_date": "2019-04-06",
"end_date": "2019-09-28",
"num_episodes": 26,
"synopsis": "Ever since the death of his father, the burden of supporting the family has fallen upon Tanjirou Kamado's shoulders. Though living impoverished on a remote mountain, the Kamado family are able to enjoy a relatively peaceful and happy life. One day, Tanjirou decides to go down to the local village to make a little money selling charcoal. On his way back, night falls, forcing Tanjirou to take shelter in the house of a strange man, who warns him of the existence of flesh-eating demons that lurk in the woods at night.\n\nWhen he finally arrives back home the next day, he is met with a horrifying sightâhis whole family has been slaughtered. Worse still, the sole survivor is his sister Nezuko, who has been turned into a bloodthirsty demon. Consumed by rage and hatred, Tanjirou swears to avenge his family and stay by his only remaining sibling. Alongside the mysterious group calling themselves the Demon Slayer Corps, Tanjirou will do whatever it takes to slay the demons and protect the remnants of his beloved sister's humanity.\n\n[Written by MAL Rewrite]",
"status": "finished_airing",
"genres": [
{
"id": 1,
"name": "Action"
},
{
"id": 46,
"name": "Award Winning"
},
{
"id": 13,
"name": "Historical"
},
{
"id": 27,
"name": "Shounen"
},
{
"id": 37,
"name": "Supernatural"
}
],
"media_type": "tv"
},```This is from search (yes it's from swagger)
!e import urllib.parse ; print(urllib.parse.unquote("?fields=id%2Ctitle"))
:white_check_mark: Your 3.13 eval job has completed with return code 0.
?fields=id,title
oh, sorry, I misread your message
ok so it has synopsis and num_episodes there
you can show your client id, I can be trusted with it :d
jk, don't do that
tbh I'm not sure if it was actually secret whatsoever, they have the separate secret which you really shouldn't share, but the client id is public in oauth I think?
does the client ID include your MAL ID somehow? if not, I don't see how it could leak much
I'm too lazy to check that, but better be safe than nothing
Yeah
Client IDs get exposed all over the place
on an unrelated note
how am I supposed to implement searching from these anime sites?
MAL and Anilist both have this problem (although I think Anilist is a bit better?). But god.
All the API endpoints use anime IDs, how am I supposed to give the user a list of shows based on a string search?
Store a map of ID to name
that sounds like a hack
Surely the API sin't that crude, but idk anymore.
I gave up lol.
That was a 3-4 years ago.
All? The code discussed above used animes?q=<string> node first.
So if there's a search node like this, you'd search with string. And get id from that. And then get details you need from normal anime/<id> node
What do I tell my boss if I deleted their source code commited and pushed and deleted all their git history and backups?
by accident ofc
I'll take a look at it when I feel like working on something like this again
can you get severance pay after this?
i'd count on that
whats that?
name is self-explanatory i guess
well, is it same as my salary and how long is it?
depends on the company i guess
Amazon?
i don't know anything about it
I mean I only dleted source code for their Payment/checkout stuff
so nothing major
this is just a joke btw
I know
Huh. I had never noticed somehow that the OS/2 Warp source code got released on a BSD license.
I wonder if anybody has taken the ball and run with it.
Oh, never mind, this is a cleanroom rewrite as BSD, not useful to me.
Must be something spooky in the code:
have you guys read about the kepler telescope
it's really interesting how it detected about 700 new planets
I'm not sure if they are 100% sure if they are planets or not
but it detected by looking for light dimming when a planet went in front of a star it was orbiting
was watching a nova documentary on it
the documentary is on possible life on other planets
they also said they've found no organism on earth that can survive without liquid water
which is interesting đ¤
they said that the more frequently a planet transits (which kepler tells us) the hotter it will be, so they are looking for ones that orbit about as often as earth
Kepler owns
Did you see THIS though? https://www.sciencealert.com/giant-stars-with-black-holes-inside-them-may-have-been-detected-for-the-first-time
kepler-22b is one they found
Chris Cornell was so ahead of his time.
i haven't seen that
sorry for the bad quality
i think that's supposed to be the relative size of jupiter/saturn, kepler-22b, and earth
so they aren't actually stars but gaseous spheres?
I guess that's a good way to put it; like, a star-density accretion disk?
I'm on this fun server and interesting news like this comes across there pretty often.
oh that looks cool
It's called Asymptotes | Technological Singularity, not sure if it's community browsable actually..
I would hope so?
that's a funny server name
i think one thing that makes them a little unsure about kepler-22b is that it might not be wobbling
and I think the more it wobbles, the more likely it is to be solid?
i didn't know how they detect black holes, interesting
A Balmer break is a sharp change in the spectrum of an object in space occurring in the ultraviolet part of the spectrum, where shorter-wavelength light on one side of the line is much lower in intensity than the higher-wavelength light on the other side of the line.
i wonder if any of the kepler data is available to download 
Actually I ran into another fun space thing that it sounds like you might be interested in
An unexplained flood of antimatter was bombarding our planet, and scientists have finally identified the culprit.
To try out Brilliantâs online courses, head to http://brilliant.org/astrum for a 30-day free trial, and 20% off a premium annual subscription.
ââââââ
The search for the source of the cosmic particle shower hitting the...
Not to spoil the video, but the fascinating thing I learned here is that "what a pulsar looks like" to us is just the orientation of it relative to us.. like, whether we see it as an X-ray source, a gamma source, etc.
They turn out to spray different things at different angles
Usually run into an electron and get annihilated as far as I understand.
If anybody has ever told you that "size", "cardinality", "extent", "volume", and "probability" were different ideas, they lied or were misinformed.
Check out Measure Theory to know more. 
context is everything
Dang, don't just spoil the whole summary of Measure Theory for them!
i have come to the conclusion that everything is contextual
It depends.
EXACTLY
Man, sometimes you just know you are on the right Discord:
hi
i tab out for one second and my desmos fucking explodes
seems normal
Cool butterfly. This is one of those Rorschach things right?
dad?
I've noticed that on OpenRouter as well. I don't really understand why it's so popular. It may be an international thing?
nothing is random
which server is this?
Asymptotes | Technological Singularity, not sure if it's 'community' browsable or not.
Maybe it's super cheap and they are losing money on it? I haven't looked at the relative pricing at all.
its currently free on GitHub Copilot.
because its in preview
OK yeah so "loss leader" tricks
Yeah
I tend to use it to write code but then it does such a bad job that i end up rewriting the whole thing
git checkout HEAD -- file/it/modified
is a common command
Maybe you could have it do that for you automatically haha
This is kinda funny, re: LLMs.. This has been one of my test prompts since I guess like 2022, right?
and I just tried it with the latest ChatGPT:
...and ChatGPT is just garbage now haha
I meeeeean.... That's kinda fair? Unless a previous prompt suggested it should invent an answer it kinda makes sense for it to assume you were talking about a real repo
IMO it should ask for clarification rather than having even searched the web etc.
hi, I am using python for the first time and I am trying to make my own Jarvis from scratch, I have the Text to speech finished I need help into making his modle lable and brain
I guess if I add "from Terminator" to the prompt it would work better etc.
I mean it's being more and more optimized for actual work task, which in most cases a PR refers to a real pr
Yeah, I guess that's a big difference vs 2022
But actually, the "before it goes live" clearly describes a future event, so I feel like it's unambiguous still if it had read me carefully.
I didn't say "before it went live" etc.
Any suggestions for books/blogs/etc. if I want to learn LaTeX?
I've used LaTeX for a bit but it was mostly a patchwork of copying StackOverflow answers into the document. I feel like I'm lacking some fundamentals or a coherent mental model of what's going on
would it be a good idea to learn TeX first? Since, as I understood it, LaTeX is a collection of hacks on top of TeX
First thing that comes to mind is to NOT try to conquer setting up a good local version at first, but to just learn it online via https://www.overleaf.com/
As a software engineer already, you have some power moves you can use, by way of analogy..
I have successfully conquered installing latex in the past
what do you need latex for? I'm no expert, but I've found that I've gotten by very well after spending a couple minutes looking up the basic syntax and piecing the rest together as I use it.
namely installing the 3GB texlive package from the distro's package repository
One way to think of LaTeX commands (\command{argument}) is as function calls and of environments (\begin{environment}...\end{environment}) as scoped blocks of code. Your doc's preamble, where the packages and settings go, is like an import section in a program.
granted all I use it for is typesetting math in my school notes, as opposed to writing anything like an actual paper.
The latter is quite good.
Idk i just want to look into it
I used LaTeX somewhat successfully in the past, but only when I needed a lot of math formulas. I'm thinking that maybe I want it for typesetting books or long blog posts or something like that.
I haven't really used the former but I'll read it now.
I'm actually reading this right now
Porting your resume to LaTeX can be a "fun" way to grind out learning it.
I personally do mine in self-contained single-file html+css
But LaTeX is popular too
Oh snap, when does Astral cut me the check?
What platform is that?
How do you export to PDF?
Or do you submit your HTML file?
is for jobs
Print to PDF in Chrome
Not for me. Itâs for reaching out to amazing old colleagues Iâm not elsewhere connected to.
When did LinkedIn become Facebook?
When Facebook went bad, so long ago haha
I had my job title set to âPhilosopherâ until recently to avoid recruiter spam
LOL, I just pulled up my LinkedIn and I see KRRT replying to someone bitching about how bad AI code generation is, with an advertisement for AI code review
Oh?
wild shit
You should check out Typst
Oh yeah? New to me, thanks.
This is so good. Super crunchy but both dudes are incredibly smart.
Just finished setting up a self-hosted github runner and apparently it doesn't run jobs in parallel đŹ https://github.com/orgs/community/discussions/26769
It seems like I have to setup multiple runners in the same machine, and each runner will be assigned a job, what a waste
Really interesting scripting language built in
-# although it has some weird quirks like re-evaluating the scripts 5 times or until the document state settles
you good?
They're far better than if they were using vim
dude thats like 60 years
Let them cook
I'm thinking about writing a library for arbitrary length binary rationals
Does that answer your question
fair enough
I should stop getting distracted from my compiler tbh
also based
Game recognizes gamd
insane protein/weight ratio
i also really like the selenium
I tolerate tuna in sandwiches, but its kinda yucky by itself đ
do you add any seasoning? or do you eat it raw
raw meat is based
Seasoning doesn't make it not raw
I meant without seasoning
I ate a can of refried beans once just on its own
Actually the best steak I've ever had was raw; wagyu carppaccio at a yakiniku place in Tokyo.
I hope your pillows are cold throughout the whole night
(that's a good thing right? Cold pillows are nice)
Did you know that 1970-01-01 is not the original UNIX epoch date?
At first, it was 1971-01-01, and used 60ths-of-a-second instead of 1-second intervals, but they quickly realized that would overflow in less than 2.5 years, and UNIX v1 changed it to the current value we love.
Space Barbarian. Software Engineer. Feminist. Reader. I like languages for machines, humans, and others. The gods made Heavy Metal and it's never gonna die.
I have some mutuals on X that are impossible to replicate on the modern web, so I use both.
Still working on building up the BSky thing.
"Bill Koh Vitch"
very phonetic
I guess it's "Bohemian" or modern Czechia etc?
Oddly my genetics are from elsewhere but there was some re-marriage going on.
Genetically I'm basically the people that the Milesians found already living in Ireland in the mythic age haha
"Will Sun"?
(I'm just bored and making dumb jokes)

(though I was actually curious)
There's a great anime (Maison Ikkoku) where one of the characters has a name that can be pronounced in a few different ways, based on the characters it is written with..
...and every time he hands his business card to someone, he says "It's written XYZ, but pronounced ZYX", in some different way haha
Never the same way twice
This type of video is why YouTube is still a thing for me: https://www.youtube.com/watch?v=Q8WXvDLofL8
Go to my sponsor https://betterhelp.com/mattias for 10% off your first month of therapy
with BetterHelp and get matched with a therapist who will listen and help.
Buy the Hammer Klavier VST (the hammer piano) and play with it today! https://bit.ly/hammerklavier So cool donât forget to use the code ENGINEER15
Download the FREE 88E ...
This kid needs a real-time OS so badly in this video it's scary, see if you can count the number of times his Arduino's non-determinism bites him
Have you seen this channel?
https://www.youtube.com/watch?v=3KS02q0BUnY
Star Wars Theme / Imperial March (by John Williams) cover by The Floppotron 3.0, computer hardware orchestra.
Which song would you like to hear next? Write it in comments!
More details on how it works - http://silent.org.pl/home/2022/06/13/the-floppotron-3-0/
Patreon: https://www.patreon.com/floppotron
100% yes, and it's awesome.. it was kinda the coolest music hack I had seen before the above piano thing, which is utter madness and I'm amazed the streamer isn't dead
The floppotron doesn't risk bodily harm every time you work on it haha
It's fiiiiiiiine
Analogies to the dot-com bubble are totally unfounded, who even said that?
no damn clue but it aint mine 
looks like a cake
Here is how I explain the galilean transformation "I am just going to repeat it one more time. x' and x represent the same object just one is in the moving frame and the other is the stationary frame position? I apologize if I got it wrong"
For the Lorentz transformation the same logic applies as the Galilean transformation, just the object shrinks in size for the moving object compared to the stationary frame. And time gets longer for the moving frame vs stationary frame? Please ping on reply
Hereâs a clearer explanation.
Galilean Transformation
In Galilean relativity, space and time are absolute. If you have two frames:
- S (stationary frame)
- SⲠ(moving frame with constant velocity (v))
The position of the same object in the two frames relates as:
[
x' = x - vt
]
- (x): position in stationary frame
- (x'): position in moving frame
- (t): time, the same in both frames
Key point:
Both observers see the same object at the same time, but they assign it different coordinates because one frame is moving relative to the other. Space and time donât change between frames in Galilean transformation.
Lorentz Transformation
Special relativity changes the picture because the speed of light (c) is constant for all observers. Space and time mix together. The Lorentz transformation is:
[
x' = \gamma (x - vt), \quad t' = \gamma \left(t - \frac{vx}{c^2}\right)
]
where
[
\gamma = \frac{1}{\sqrt{1 - v^2/c^2}}
]
Differences from Galilean case:
- Time is not the same in both frames. Observers disagree about when events happen.
- Lengths along the direction of motion contract in the moving frame.
- Time intervals dilate for the moving clock.
Your Statement Adjusted
You were right that (x) and (xâ˛) describe the same object, just in different frames.
But for Lorentz transformation:
- Length contraction: A moving objectâs length (measured along the direction of motion) appears shorter to the stationary observer.
- Time dilation: A moving clock ticks slower as seen by the stationary observer.
So, the logic is similar in that both transformations relate two coordinate systems, but in Lorentz transformation, both space and time coordinates change in a coupled way due to relativity.
Would you like me to give a simple example with numbers, like a rod moving at high speed, to show how length contraction and time dilation appear?
Hopefully someone with more credentials answers you, but to me the intuition is just that the "t" that was the same in both frames in the Galilean model is now different for each frame.
Oh, and indeed there's a long writeup above.. but for me it's just "t is different for the two frames, and that changes everything"
Just give me a second to absorb the info
Also that writeup above looks like AI-generated to me
Which we don't love having people post here
At least in the context of Python answers
Isn't that basically what I said above just less detailed
The one thing about the Galilean transform and the Lorentz transform is how do I change from a stationary to a moving object?
I will use the Galilean transform because it is easier to manipulate the equation. x' = x - vt and x' represent the moving object position and speed/velocity and time. If I go x = x' + vt I changing x to the moving object and x' stationary object. Is this correct?
@high verge sorry to bother you but I have a new question
red bull can
til duck.ai exists
it was obvious looking at the link
haha đ
i didn't know if anyone would actually scan it
one nice thing about the circle to search thingy on pixel
I question the whole no data is stored but we still provide you all these LLMs free of cost, but I still use it for the convenience of it
lol
Where is this from?
The readahead code in the Linux kernel is nominally responsible for reading data that has not y [...]
Hi
Hi I new member
why isnt this an electroboom video
this is so gpt5
Speaking of slopware..
Testing nano-banana with recursive editing from simple prompts
"Show this scene one second in the future" https://t.co/UxVM3KTQhv
@viral parrot do you know whats the point of learning these?
what do you think the point is?
i dont get it. its just working with arrays and showing which kind of complexity takes how many steps
and apparently the ones with less steps are efficient
isn't it important to write efficient software?
this iiis part of analytics, where you the developer analyses your code
why it is important to know how your code runs?
yeah but is there any best complexity in this? i will just learn that and move on?
why learn all of them
for read and maintainability and scaling
well.. what do you think speed in the question above means?
if you could choose a complexity and make your code be that complexity it would be simple, lol
but it's not like that.
the complexity describes your program
Not every problem has a "best" ( O(1) ) solution, and in fact interesting problems rarely do.
so you learn it to be able to talk about the efficiency of your program more precisely
like solving it in how many steps. eg if a program takes 50 steps and that same program takes 10 steps, the 10 one is better
So sure you want O(1) all the time, but you can't get that in this universe.
So it's worth learning to understand what the best you can do IS.
ok
let me ask you a question
there are many tasks you need to perform as part of a program, and those tasks have different algorithms, different approaches. each of those has a different complexity.
how do you determine that? how do you quantify/describe those differences? that's what you learn complexity analysis for.
Aha, but what if your 10-step version takes 100x more RAM?
if you have 100 things, how long would it take to count each one of those thhiings?
for me as a human?
yes
probably 100 seconds
1 million seconds
that as the number of things to count increase, it also takes way too much time to count
I agree 1000% with what eivl is doing right now and will shut up.
so do you agree, if I double the amount of things, you double the amount of time?
yea
mm
what is a faster way to count these thiings?
as humans?
yes
this is all human language
big O is something we human thinks about
its not really accurate or actually real
its just a thought experiment
well we could lets say if theres 100 things i could count them as 10 in the first second. so 10 10 10 10 10 and so on and reach 100 so thats 10 seconds but 100 things
yes, you could sort the things first, and then count them in groups..
lets say every thing weigh 1 gram
would that info help you to make a faster solution?
no
what if you have a scale and weigh all the things at once?
yeah then probably
thhe scale will tell you they weigh 600kg
meaning it is 600 000 thiings
i get the answer right away
so that is the best way to solve this problem
you cant get any faster than the correct answer right away
agree?
yes
contant time we call this
and its the best
what is worse then what we did earlier?
yea

