#ot1-perplexing-regexing
1 messages · Page 141 of 1
A term x² + 2bx can be factored into (x + b)² - b²
i.e. you can eliminate the linear term
that's all there is to it, other than some shuffling around
is there any bot which can generate codes
what codes?
Perhaps
Mostly just browser games, sometimes doom64 or minecraft or fortnite
I keep getting 35 fps on browser games it pissed me off
.latex $$6x^{2}-5x-4$$
I just draw a cross rotated 45 degrees lol
weird X
this x is actually less effort for me than that
squiggly thing going down right, lift pen up quickly before continuing down right
like a backwards α
but lifting the pen
squiggly forces you to actually get the stroke down all the way low, even when writing quickly
watc this
the bottom right ones are nightmares from physics
i did wrong 😡
ξ η ζ
idk
•
compose key 😎
handwriting....
I miss solving math on paper tbh
ur pen is ass
i can give u one
penmanship or pen?
give what
it's a cheap-ass pen at the office
xd
xe^2 + C 🙃
when they start adding fucking x's
then u need derivative and shit starts becoming hard
.latex $$\int_{\pi}^{\frac{\pi}{4}} e^2 , dx = e^2 \left[ x \right]_{\pi}^{\frac{\pi}{4}} = e^2 \left( \frac{\pi}{4} - \pi \right)$$
python
I wouldn't go for anything fancy then, a 3060 is fine.
or well, tbh are you sure it's an issue with your current apu

ok, I guess it's a bit hyperbolic
||get it? hyperbola )(||
cringe
integrating a constant is wild
almost as wild as integrating e^x
You think someone would do that, just integrate e^x?
i think only the x i write different
i used to write in squares
every letter every number a square
Times news square
yea italic writinf too
you may not like it, but this is what peak ux looks like
discord ux designers deserve a lead pipe to the balls
Im getting a crowbar on my birthday for this exact reason
Actually im getting the crowbar to pry peoples kneecaps off but close enough
It's confusing when b isn't an integer
I dislike dealing with surds and fractions
that's nice
oh you want to use completing the square to factor a polynomial
I guess that works
I don't want to.
It's just school enforced
Mandatory in the Australian curriculum
I guess you could also just find the zeroes and you're done
yeah but some questions in the assessment are like:
solve this by completing the square
solve this using the quadratic formula
solve this using some weird stuff that you didn't learn about at all in class
oh, "solve by this specific method" is lame
school is lame
it depends
the stuff in school that is just rote memorization sucks
thankfully most of math isn't that
at least at slightly higher levels
early math does kinda suck
Yeah, I'm doing early math
SO users debating if a couple more clock cycles is worth readibility lmao
phone camera screenshot
also commenting about readibility rip
Cope
I wonder what the context of this question is
if people are just arguing for the sake or arguing or if op mentioned something about it being a performance critical application where speed needs to take priority
Asking how to get the # of digits in an integer
Literally nothing else to it
"If we ran this on a shitatron 8000 from the 60s it wouldnt be backwards compatible and this addition operation costs 1 extra cycle"
lol
I'm sad to say that I agree with SO users
whats the alternative
figured it out
like it is quite trivial after you just write down the definitions
i see why he didn't put it in now
if H/N is abelian, then for any r,s in H, that means (rN)(sN) = (rs)N = (sr)N = (sN)(rN)
so rs = srn for some n in N and thus rsr^-1s^-1 = n in N
since every 3 cycle can be written as a commutator of 2 3 cycles as he demonstrated
every 3 cycle must also be in N
I guess looking at it this is just that H/N being abelian implies [H, H] ss N
huh wow
Guys is any PC expert willing to help me with a problem in my pc?
is this gallian’s text
serge lang's algebra
ah yeah fair
btw I didn't understand the explanation but I'll work on it later
i had it downloaded but never read group theory from this, only constructive algebra
.bm look at this later
@strange blade, please enable your DMs to receive the bookmark.
if u really want to be good at math start off with order theory
i don't really care
same i read new texts sporadically
trust issues
let me guess ur pfp
no the scams are possible consequence of ur pfp? since its a girl i assume
discord's spam inbox feature does quite well against those for me
mine doesn't
frieren ru prepping for imo
too stupid
fr
a certain pydis member here used to get inappropriate messages because of their name. changed it to a dude's name, and the messages went away 😔
was it a staff
If I'm going for anything, it'd be IOI
IMO's harder to get in
no it isnt
Australia's IOI team usually is pretty easy to get in
io interactive??
international olympiad for informatics
Tf is imo and ioi
@digital oracle
imo is international maths oly
Oh
ioi enrolls just algorithms but mathematics which is very not intuitive
if u read all volumes knuth text ull see what i mean
my head cpu didn't understand those sentences but trust me, Australia's team is not that hard
ioi here is reasonably tough since less seats for tc
Is it like something prestigious
Like a college or employer would care?
College probably
in imo nowdays ud see exponentially higher number of students resulting in more competition
But it's harder to get into the IMO team here than it is to get into the IOI team
probably
It's more realistic for me to aim for IOI than IMO
r u good at math

ah ok so i suppose the contrary, r u good with algorithms?

ah u need to study day night
wait i hope u adequate time to prepare for either of exam
yeah like 3 years
6 months is okay lol
what
awesome use them very structurally
i only got 6 months for ioitc
using the correct version of fir emojis does not justify nor excuse using the incorrect version subsequently
what if I feel soft today
lol
read a lot of theory, use wikipedia and make it a addiction. do problems learn from it afterwards things will be trivial; when it comes to solving problems and the idea think of it like pokémon, every theorem has a type advantage, you just gotta find the right one. the right theorem is just speedrunning theorems in my head until one doesn’t explode moreover half of intuition is just remembering which theorems caused you the most pain before at 3 am while u were trying to reminiscence it and sleep. 3 years is enormous amount of time.
I don't care that much about ioi/imo
welp
https://www.youtube.com/watch?v=2OfJYisHbkI why are like all the comments about osu
a song about me no mae no
Support me on Patreon! https://www.patreon.com/willstetson
LISTEN ON SPOTIFY!! https://open.spotify.com/album/3cHasRhDpMQJUaZFaLaueu?si=wmVQrDIEQHya8ol6AkerFg&dl_branch=1 ↓↓↓
Mapset by me: https://osu.ppy.sh/beatmapsets/859783/#osu/1797548
Mapset by Sotarks: https://osu.ppy.sh/s/842412
MP3 DOWNLOAD: https://www.dropb...
okay yeah no fair enough
hello
Java is still shit
elaborate
thank you
after being exposed to java radiation in my university, im starting to like it too
of course, as a syntax
not so much as a tooling
java tooling makes me want to peel my skin off
java language makes me want to commit toenail toothpick wall kick
Kerfus spotted
dlien
dog alien
dlien
hello!
Does anybody here upgrade their macbook pros every 3 years?
would it be worth purchasing the applecare+ for 3 years instead of annual if I do this upgrade every 3-4 yrs?
I don't
Apple care is kinda useless too
do you upgrade like every 6 yrs lets say?
think Im taking it because I plan on working outdoors, and could use it to replace the battery once it hits 80% health
nah not really
nice, thank you!
i remember working with a full stack dev who still rocks a 2017 mbp
@rough sapphire how do you typically study?
are there any classes in particular that you're having trouble with?
How
?
How do you study
Do you rewatch lectures, read your notes, go through a textbook, do exercises, etc
I'd imagine that would be on the top of the list of things to try to get better grades 🤨
What do you actually call studying
that's part of the issue, then.
it's not fun, sure, but if you want to improve your grades you're going to have to put work in
do you guys think grades matter that much?
Grades matter to get the foot in the door in your career. You can usually go from there.
I mean, it depends. in lots of places, it's part of what's considered when you're applying for university
and like, you probably don't want to be failing your classes regardless
at the very least putting in effort to maintain your grades develops work ethic
👍
The text says "don't mess around/don't act up", in slang... The original slang meaning (~2 decades at least) is actually more aggressive, "don't provoke me or else". I haven't seen it used in modern contexts, but i also don't mingle with crowd that uses this kind of slang
for physics, doing practice problems is pretty beneficial.
Schools are partly babysitting so your parents can do their day job, and partly the gauntlet that all kids have to run to prove to the world that they're tenacious and won't give up. If you can prove it in some other way, all the power to you, but a lot of people are just naturally going to take you less seriously if you flunked out of high school.
alright
That's quite a pessimistic take
I know. I have more, too!
I've mostly hated school until I got to prep levels (last step before getting into top engineering schools)
It's basically only there that we started having to think on our own
But here's the thing
You cannot think on your own if you have no basis at all
It was only when I realized that basically everything I've learned so far clicked into it's own place that I stopped ressenting school so much
That does depend on the school system I would say. If your school system does not encourage critical thinking and problem solving from an early age, then sure. My understanding is that historically schools were focused on rote learning, but now they're more focused on the process and deeper understanding. But I'm sure it depends on country and on the individual school.
I am not sure what the difference is
Critical thinking and problem solving does go along with getting used with the processes ..?
Don't get me wrong, many things can be done much better in education
However, I fail to see what the issue is with focusing on what you call the process and deeper understanding
I mean, it would normally vary by subject, but a typical example is how in math, if you don't show your work, getting the right answer may not give any credit at all. Or, to take a physics example, you've memorized the formulas for motion, but you can't explain for instance why driving twice as fast quadruples the distance it takes to stop.
Don't know if my examples make sense or not. Maybe we're also talking about different things.
I'll quote my math teacher for the first part:
"Okay, guys, let's be honest. None of you will remember how to do X or Y math problem in 10 years. In fact, I'd be surprised if you even remembered doing it at all.
However, what will stay with you is the process you repeated over and over to learn how to solve those problems. It's about how you've trained your brain to analyze your goal, consider the possible ways to achieve it, and select what, I hope, is the best path forward."
(heavily romantized and added explanations, it's been quite a while and I don't remember much anymore haha)
It's never been about the answer, we have calculators for that, we have wolframalpha, mathematica, and even gpt that can solve some surprisingly difficult problems
I'm sure it depends on country
So what's your country?
Because what you said aligns with what I heard about US schools - that US schools didn't evolve much from the industrialisation times, where they just needed to teach uniform basics and then have the students become simple workforce... But nowadays it's underfunding and the amount of "standardised testing" (and how the results decide the funding, so everyone wants to get good results) that keeps a lot of teachers just teaching students how to fill the tests (monotonely revising simple info, just the basics and in the most boring way possible), instead of actual critical thinking skills...
(Base — that is, non-vocational or specialized) — school doesn’t expect you to become anything specific or achieve anything significant in the fields you study. You’re just one number among many. What truly matters are the processes and ways of thinking you take away from it.
Norway, although I don't know how much that says. Most of what I know about the US system is stuff I've picked up by just hearing people talk about it 🙃
As for physics, if have to learn formulas without having any intuition on why it's that way, then it's just poor teaching
I'm a bit surprised that you ended up with that take on educations while being from Norway thought, and would be curious to hear more about your experience. Last time I checked, Norway was praised as one of the best educationnal systems of the whole world
That seems like a reasonable approach to teaching. Not "it's about using this formula in this way", but "how do you approach getting an answer in these various disciplines". I'd count that as teaching the kids to "think for themselves" tbh.
Which take? Not sure what you're referring to 🙂
Take as in, having a very low esteem of schools in general
Ah. You mean the cynicism 😛
Yes
Don't get me wrong. I think education is important. I just think the importance of the actual things you learn are overstated. You learn discipline, you learn tenacity, and you ideally learn how to learn. But from a societal point of view, I honestly believe that the main benefit you get from school in a practical sense is getting something universally understood to refer to.
in the U.S. schools very a lot county by county, so you really can't generalize
I believe there are studies showing that the diploma at the end is what really matters for your prospective opportunities later in life, compared to the hours you put in before that.
I've had a pretty good high school education with stellar teachers, but I also live in a very well off county (in the U.S., that is)
Can't disagree with that, but you cannot get a diploma if you didn't study for it I suppose
ipad 18 now has calculators for us mathematicians
That honestly depends too. I was a kid who breezed through school with barely any studying. Some kids just pick things up, others have to work harder for it. Life is unfair I suppose.
Same case here (until prep school), but I just feel like it depends on how you started as a kid
it's pretty common here for kids who didn't have to study in high school having a pretty rude awakening in uni
since they never really learned how to properly study
Haha, definitively lived through that
or just like, kids who were in advanced education in earlier grades having that rude awakening later in high school
gifted programs, for example
That is a fair point as well. Some are more disadvantaged than others. I grew up with relatively highly educated parents, one of which is specialized in children and the way they grow up and learn, so I probably was very lucky.
Went from 90+% avg to 15% avg for the first few weeks at prep school
Had to work my way back up over 2 years to 75%
Albeit, prep school grading compares you to the country's best students, so everything is a bit more spread out
100% is only for the one at the top
I think one of the only reasons I didn't have a rude awakening at uni is because I was scared of being one of the ones who had a rude awakening. I think I started putting in some more work around then. But not really as much as other people I've heard from, so it amazes me I did as well as I did looking back.
Computers. The degree was called "Computer Technology" which it was explained to me was basically "Computer Science but with less math".
There was a bunch of overlap.
you're tweaking if you had a rude awakening in high school
they be passing everyone nowadays
lmao, it wasn't uncommon here
I think the biggest one was ap econ last year
everyone took it since it had a reputation as an easy AP
but they switched out teachers, and the new guy was brutal
like half the class dropped out
he's a fantastic teacher, but from what I heard, the workload for that class was borderline insane
Not all CS degrees are the same.
My uni had to rename programme I took because after some changes in law, it couldn't have the same-named programme on several faculties, with different curriculum
wtf
True, so I don't know whether that uni's CS corresponds to any other place's CS. Just one of my many ignorances.
Just comparing names of programs within the same uni though.
I mean, before that change, my uni had 3 CS programmes, on 3 different faculties.
Only 2 actually mattered - because who tf studies CS on electrical engineering faculty? It was always maths&information science faculty vs electronics&information technology faculty.
The ee's CS/informatics got renamed to Applied CS/Informatics (Informatyka -> Informatyka Stosowana)
Electronics had CS first so they kept original name.
Maths got theirs renamed to "Informatyka i systemy informacyjne", "cs/informatics and information systems"
idek what that says lol
oh, thats very interesting 
how are these 3 different?
That's why I explained it. It could've been worse, considering the number of "memes" that are cute pic and some disturbing text (e.g. slurs, encouraging self-harm)
Different curriculum.
Idk the electrical, but electronics faculty dealt with some hardware and lower level stuff. Maths had basically a balance between what electronics had and very theoretical approach of non-engineering uni.
That's also how an older friend (who studied there) explained those to me when I was deciding on uni. XD University of Warsaw being the most theory, Electronics at Polytechnic (formally use "Warsaw University of Technology" name) was quite practical... And maths faculty was in the middle XD
https://youtu.be/jjxu614FG80?si he really did it huh
Imagine if TypeScript has a strong system, what would happen? But we might not need to imagine. Tools like tRPC, Zod, Typia, Hook Form, and Elysia are making this dream a reality and what will happen when we reach there?
Kongkeit Khunpanitchot (SaltyAom)
https://saltyaom.com/
https://x.com/SaltyAom
https://github.com/SaltyAom
0:00 | Introducti...
creator of elysia js lol
That bunny outfit is 🔥
he does this a lot on twitter, more talk about femboying round than actually programming
bro was drafted into the js factory and couldnt pursue his passion
also iirc hes actually a front end dev in his job, he did all this framework shit as a side gig
amazing
i actually havent watched past the 1st min, brain fried from js
if i see another js dev using a class, instantiating it, and only using it once to call 1 method instead of just using a function like a thing of the homo genus im going back to C++
W lookahead
i thought this was talking about regex for a second
the image is too noisy, so the compiler can't read the code due to insuffieicnt SNR
also forgot to set the evil bit
yap
your compiler dosent want you to cheat
vro probably has 5 phds and 3 nobel prizes
based beyond belief
The production of too many useful things results in too many useless people
😭😭
Kitty
Awhhhh
man when will google put gemini into https://translate.google.com/
ik it's just a few clicks + words away from gemini chat but still
Why do you need that?
translation
Translate + Gemini interesting but I can’t inagine a use case scenario
cause google translate by itself sucks
like llm translate isn't the best, but usually better than usual MTL
i'm surprised nobody big's tried to make a good latin translator yet
goodhart's law, though, tbf
have you considered that using gemini to translate would have better quality than whatever google translate is using
eg language specific idioms, special meaning that depends on context, ect
even p small llms destroy traditional MTL in this regard
like I can go:
Context: blah blah blah
Given the above context, translate the following into english:
<text in other language>
```and the translation would get a lot of nuances right
hmmmmmmm
big if true?
katex 😃
lets hope it happends
massive
.latex in shambles
.latex
\text{in shambles}
would be huge
.latex
\text{\huge in shambles}
.latex
\text{\massive low taper fade}```
.latex
\text{\Huge if true}
my skip manager has a tendency to be maybe too terse, seeing a big bold [RUN] as a group chat message reads pretty worrying until it was made clear it was really ||"I'm going for a run, anyone want to join"||
real
chat I think i accidentally baked bread in my dish washer
I had a mixture of some white flour + water in a bowl which I used to clue some samosas shut
and I put it in the dishwasher but some of it was left stuck to the bowl
couldn't wash it all off so I hoped it would melt off
It got even more stuck
🗿
awesome
@lost marlin
pls
i wanna tell you one last thing
pls?
you can block me after 😦
can somebody check for me the Golang discord server offtopic channel?
@lost marlin
Hello!
Would the M4 Air suffice for Software Dev/ DevOps/ Full Stack career?
with 24gb ram 512gb storage
or would it be wiser to go with the M4 Pro?
MacBooks
Im heading into my final CS year for university ^^
I'd expect your employer to provide you with a computer to use
Oh really? That's sweet lol. What about for my final year of study? I do want to carry on using this if the employer doesn't give one
in my experience, employers won't even allow you to use a personal device for work. It's an unnecessary security risk
fair enough, makes sense
I'd be kind of surprised if it didn't (but also, what godly said)
honestly the Pro models arent even heavy
like I've walked around the city at uni with it in my backpack and it's so light
can imagine the airs to be even lighter and why people like their portability a lot
I dunno, for a 14 inch laptop the m4 mbp is pretty chunky.
Man
@wispy sundial
My mbp is on the floor in an oversized bag rn
I take that shit to work. It's gonna get scratched
If you took piles of 5 cards and used insertion-sort to sort them, you'd find that in the worst case, you'd need 25 comparisons to sort them.
For 6 cards, you'd need 36 comparisons in the worst case.
For 8 cards you'd need 64 comparisons.
And for 10 cards you'd need 100.
Now, the exact number of comparisons is NOT what we care about measuring. What we care about is: if we graph the number of comparisons, the graph makes a Parabola
So, here's a practical question
What does the parabola tell us about Insertion-sort?
It tells us this: if we need to sort 20 million cards, it's going to take forever!
You sound like a professor who just got their second wind in the middle of their career and suddenly is passionate about what they're talking about again for a short time
So, if we need to sort 20 million cards, what algorithm should we use instead of insertion-sort?
There are lots of possible answers. One of them is called Merge-sort
Why is merge sort better for sorting 20 million cards?
Because it makes the blue graph!
If we use merge sort instead of insertion sort, we can sort the cards way faster.
This is what O notation is measuring. It's not measuring the exact amount of work, it's measuring how the number of cards changes the amount of work.
The red graph is N^2. The blue graph is N * log N
The reason we drop constants is because they don't change the shape of the graph.
N^2 + 50 is still just a square parabola.
N^2 + 50 has the same shape as N^2, so we simplify it to just N^2.
the important part here is that 100000 * N * log N will still be less than 0.000001 * N^2 given sufficiently large N
Also true!
I mean, it sound off, with algorithm we try to lower amount of operations for some sort of task, so we try to use information we got to lower the need to do use linear operation
if we can skip some elements its common sense that it gonna be faster
That doesn't apply here. We're sorting piles of randomized cards.
Even if it did apply, making an algorithm slightly more efficient won't help you much if your algorithm doesn't scale.
I just vagually know bubble-sort take biggest and move to the back xD
Can you tell me how bubble-sort would scale to the problem of sorting 20 million cards?
im not sure what you mean by scale, i just know it would be super slow
How much slower would it be than sorting 10 million cards?
Bubble sort is N^2
So 20 million cards takes four times as long to sort as 10 million cards
is that 2 because we need to use 2 loop? if i remember one for linearly walking and other to linearly walk and check?
Yes
If you have one loop which needs to happen at most N times,
And another loop which executes the inner loop at most N times,
that's N * N total times
Also known as N^2
note that not all nested loops end up quadratic in complexity (e.g. turtle-hare algorithms).
that ^2 means squared?
my shady mind just read turtle-harem, sorry
Ok, now let's look at merge sort again with the same question
Well i dont know a lot of algorithms, i mentioned that i just started, merge sort sounds like you take small amount of elements sort them and merge them in without need of looping all things?
It's a rhetorical question. I'm not trying to explain how to calcualte complexity (yet), I'm trying to explain what complexity even is
So how much slower is sorting 20 million cards than sorting 10 million, with merge sort?
Bubble sort was 4 times slower.
But merge sort is only a little more than 2 times slower.

Imma blame the snek ppl for not using ^ for exponent :p
I cant visualize things with big numbers xD
Well surely you understand that "four times as slow" is worse than "about twice as slow"
i mean, my mind digs deeper to understand, but if i take what its written 4 > 2
Right
That's the point of all this.
It's important that we can quantify how algorithms perform when you give them larger and larger workloads.
Algorithm A becomes 4x as slow when you double its workload.
Algorithm B becomes only about 2x as slow when you double its workload.
That's very useful information.
Understand what we're calculating now?
i mean, in this case we comparing how fast different algorithms perform under the same load of data
That's still wrong
We're comparing how they scale to different loads of data.
"double the workload" is what I mean by scale
Is it something like we got a car and the more troleys we connect the car speed gonna drop type of shit
Not quite.
how much does it drop for every trolley you connect?
That's what we care about.
In that sense it would be O(n) speed decrease for each troley
That's right! If you have 4 trolleys already, adding a 5th doesn't make the car lose half its speed
It will only go a little slower
How many trolleys would you need to add, to make the car go half as fast?
(assume the car is weightless)
Im thinking but its hard 😄
It's easy. To halve the car's speed, you'd need to double the number of trolleys.
Twice as much work = half as much speed. That's a linear relationship.
Let's call the number of trolleys N
The amount of work the car has to do to pull N trolleys to its final destination is... O(N)
twice the trolleys, twice the time the trip takes.
That's what O notation is for communicating.
O is like time to relation of size or something like that
Yes
exactly
It's obvious that time and data size have a relationship. But in different algorithms, they have different relationships
For insertion sort, 2x the cards -> at most, 4x the time. So we write it as O(N^2)
what if you have to use 2 algorithms together? like sort_search function, the time complexity of sort and search would be of they own algorithm but the whole function would have combined?
Then things get complicated
Well, for simple algorithms it's not bad
probably very math related
If you have an algorithm which is N^2
And that algorithm runs inside another algorith, at most N times
that's N * N^2 total work
like buble sort and linear search
Which is just N^3
I feel like at this point i just need practice and that all
Yeah, I think you understand what you're calculating now, which is important
How about this? If we have an N^2 algorithm which we always run 4 times, what's the O?
4 * N^2? The thing is, the 4 doesn't change the relationship between time and N
i would say we drop constants
Yo can I speak
But why do we drop it here?
Plz
What am I, a cop?
because it doesnt alter the time
It does change the total time, but it doesn't change the time with respect to N
Wdym my broski
Oh so it alters the time but its too small to care?
It always multiplies the time by 4. The time's relationship to N isn't affected.
Aight safe guys ima go jork off
I wonder whats time complexity of that 
4*N might be easier to demonstrate than 4*N^2
If you have an O(N) algorithm, 2x N = 2x the time
If you have a O(4 * N) algorithm, 2x N still = 2x the time
That's why we drop the 4, and O(4 * N) simplifies to O(N).
oh, the time in actual seconds would be different so even if our algo run in 10secons if we increase the size twice its gonn run twice longer
so if we got 4*n or n it doesnt matter if we 2x N the time is 2x
so for example:
N is 10
4*n = 4*10 = 40
n = 10
if we increase N to 20
4*n = 4*20 = 80
n = 20
So by comparing we increase 2x times, so we dont look for actual number but the amount times it increases
Admin I’ll sned 7 vbuvks to let me speak
Time to start a REBELLION
UNITE
Yo this guys is sharing too much personal information 😭😭😭😭
Nah respect it though
I recommend not spamming the chat about this. If a moderator sees it they may extend your voice verification time
You need to meet these requiresments to speak in voice #voice-verification
I never seen a wild yapper, so thats how they look like 🫢
Th e disrespect is mad
At least muffin was being kind and like a gentle mother figure
Not a meanie
no disrespect, im a veteran yapper myself
english poetry actually not bad when it uses a a scale
Iambic pentameter
@sick nexus now u owe me an explanation of why alignment and padding is a thing when it comes to structs
^ Best reading material on the subject I think
What they don't explain is why tho
They only mentioned that its because cpu can fetch stuff faster but why?
Ive been told that its because cpu can only read discrete blocks
So like it reads block 0 and then block 8 (65th bit to 128th bit) and continues
But is this really true?
Yeah
Ok, I'm trying to find some good material on the subject
A basic version is: the CPU has a thing called the Memory Chip Controller
MCC
HERE we go: http://denethor.wlu.ca/pc300/memory/mem_lec.html
These lecture notes should help I think
There are images
Actually, this might not be useful, 1s
Ok no, this still doesn't cover the relevant part. Sorry
@narrow coral So internally to the RAM chip, memory cells get split into blocks of some size.
And the MCC basically says to the RAM chip "I want the contents of this block"
And the RAM chip sends the data back over the memory bus
If you have a value which spans two blocks
then the RAM chip has to query the first block
And then query the second block
RAM architecture is really complicated but that's the gist of what's relevant
I think I get it, one question still remains but lemme get back to that later
I had the wrong interpretation of memory ig
I used to think that every byte is assigned an address
Every byte is assigned an address, but we don't fetch bytes one at a time. We always fetch them in bulk
But from the image u sent, it looks like every address is associated towards a block of 64 bits at a time
Instead of every single byte
The way a RAM chip internally does addressing is different from how addressing works at the instruction-set layer
There's a layer of abstraction, where the CPU takes an address of the type you're familiar with ("I want this byte") and translates it to what the RAM understands ("I want all the bytes in this block")
Got it
okay so my last question is
Why does this struct gets padding (i think it does but not sure)
struct {
i32 x;
// Padding
i8 y;
}
Ah, good question actually
It's because C guarantees elements in an array are always touching
There's no padding allowed between array elements
struct S {
int32_t x;
int8_t y;
uint8_t _pad[3];
};
void foo() {
struct S array[2];
char *p = &array[0]; // p points at start of array[0] S.x
p += sizeof(struct S); // p now points at start of array[1] S.x
}```
If sizeof(struct S) were 5, then p would be increasing by 5 here, which is out of alignment. So array[1] would have to be out of alignment for this to be valid, which is bad.
If we increase the size of struct S to 8 (using 3 bytes of padding), p += sizeof(struct S) increases it by 8, and alignment is preserved.
The reason arrays can't have padding between elements is to preserve this behavior, also. If sizeof(S) were allowed to be 5, and we had 3 bytes of padding in the array, it would be harder to find the start of array[1] using pointer arithmetic.
That explains everything
My long awaited question has finally been answered lol
Btw, after the cpu receives a block, what does the cpu do with it to get the exact byte it needs?
Does it do a logical and?
Yeah basically. It knows which byte to get from the block and then extracts the byte from it
It has to translate an address "this byte" into "byte N from this block"
It asks the RAM for "this block"
then it gets "byte N" from the result
I haven't personally read it, but the book Digital Design and Computer Architecture by David Harris comes recommended from a highly reliable colleague
Btw i have increased my suspicious that u r a witch now
U have been awake for 12 hours 🤨
You can skip the sections on logic gates etc. if you want to get right to the comparch stuff in that book
Chapter 8 is the stuff relevant to this discussion
👍
This might also be relevant reading, though it's very dense: https://docs.amd.com/r/en-US/pg313-network-on-chip/DRAM-Addressing
Unlike static RAM (SRAM) in which access to any location is treated equally, DRAM has a specific structure which makes access to different parts incur different overhead. The structure of a typical DRAM includes rows, columns, banks, bank groups, etc. A DRAM row (or ‘page’) is a block of DRAM space that shares some int...
I hope one of these or the other helps. Sorry I don't have the best resources off the top of my head
Trying to find worthwhile stuff on the fly
Yeah this seems more relevant to the question than that book actually. I skimmed the contents and the book does explain some stuff, but doesn't seem to go into details on RAM internals. This AMD doc is more applicable
@narrow coral
This is basically a much better version of what I was trying to explain LOL
Unlike static RAM (SRAM) in which access to any location is treated equally, DRAM has a specific structure which makes access to different parts incur different overhead. The structure of a typical DRAM includes rows, columns, banks, bank groups, etc.
A DRAM row (or ‘page’) is a block of DRAM space that shares some internal resources and has to be 'opened’ before access to it is possible. A row contains many columns. A typical DRAM may contain 64K rows. Switching between rows incurs a performance penalty due to the required closing of the current row and opening the next row using ‘Precharge’ and ‘Activate’ DRAM commands, and the mandatory minimum allowed time interval between such commands and the next read or write operation.
A DRAM column is a single addressable memory location. A typical DRAM row contains 1024 columns.
A DRAM bank is a group of rows. Within each bank, only a single row can be ‘open’ at any time, and switching between rows is costly. By having multiple banks, multiple rows can be open simultaneously, and switching between rows in different banks can be very efficient. Precharge and Activate commands to different banks can be scheduled concurrently. Typical DDR4 components have 16 banks.
As components got faster and more sophisticated, the concept of bank groups was added (for example in DDR4 and HBM). For example, a DDR4 DRAM has 16 banks arranged in 4 bank groups. A new restriction was added: when switching between banks belonging to different bank groups, there is no performance penalty, but when switching between banks belonging to the same bank group, there is a mandatory wait time of a few clock cycles, leading to lower performance.
Other DRAM partitions such as rank, logical rank (in 3DS), and HBM stack ID (SID) also have some performance implications similar to banks and bank groups.
computer engineering is complicated and I only know a little about it TBH
Dont worry
I understood everything :)
Basically i was wrong about cpu would fetch data from ram and the use of padding is to avoid multiple reads from different blocks
yep exactly 👏 from a programmer's perspective that's all that matters
xD
I used to think that cpu would get a single byte everytime :p
Or rather it would ask for specific bytes one at a time (like first the i32, then i8, then i64, depending on the fields of the struct)
Makes sense for it to fetch at bulk
Oh also, paging :p
I know what it is and how it works but i keep forgetting about its existence :p
yall got recommendedations for work out tracking apps? for sets and reps an
and times
I like Jefit
oh it looks nice, ty
I don't take advantage of the different workouts you can make, I just have one "workout" that has all of the exercises I do
I just do whichever exercises I can given the time / availability of equipment / muscle rotation
It's nice to track the numbers go up, and helps me remember what weight / number of reps I was at last time
hmmm, I do want it for a home work out and just that
I think they should have all of the common body weight exercises in the app
I go to a gymn with digital machines that track that stuff themselves
That sounds pretty sweet
my work out is 15s break 30s work, the exercises are as follows:
jumping Jack's
burpees
planks
plank jack
mountain climber
military press
Russian twist
a couple things whose name idk
2 rounds of each
I go to a small gym that is the closest to me, so going after work is always a toss up depending on the crowd
In that case maybe just an interval timer would work to let you know when to switch / break
yeah those are actually great
What colours changed?
all of them
hapy
That poor leopard is just tryna take a nap and all those people are talking
Hey, is anybody on? I just joined this server for some tips lol. I just started Python and I want to make JARVIS. I tried watching videos and asking others, but nothing is helping. Where can I go for help (which channel I mean)
#python-discussion is good for quick questions and #1035199133436354600 for complex/time consuming problems
Well, I didn't just start, but I'm still pretty new. I am basically 100% self taught and have been using Python for about a year
well, 8 months to a year -ish
okay, thank you
oh nice! I did the same thing, hardest part is always getting out of the advanced beginner hell :p
lol
Basically all I did for that long was make simple text adventure games in CodeHS (I was running on a school chromebook) I have a computer now but it sucked for the first like, 4-5 months
maybe see if the ChatGPT api provides their voice feature. it’s not gonna be like anything you see in the movie though
yeah ik
I was just using Jarvis as a reference
I tried using OpenAI api keys but they made me pay 😭
You could look at existing implementations https://github.com/sukeesh/Jarvis
well good AIs are expensive to train. you either have to pay someone else or put down a lot of money yourself
This one is even written in Python
Sorry, but idk how to use Github 😭
I have an account but the interface is confusing for me lol
could you help?
You're asking how to read code?
You have to keep exploring it until get familiar with that interface
Even I faced the same at the start
No, what to do on the website or wtv
Okay
I just don't know what a lot of the stuff does lol
Just go to any worked repository or open source project repo page
Then try to read readme.md it has brief about the project
And it has different folder base approach same.as in vscode or any other sub folders and folders you will open it and see what is there in it . It has everything that has taken that project or repo to reach at that stage of development
Repo --> project folder with readme.md as it's documentation summary to make it understandable by any reader or contributor
@orchid yacht have you got the idea what it offers and you have to find yours
??
gone
Guess they figured out how to make JARVIS
Numerous individuals have died while using a toilet facility or in the process of defecation or urination. This includes confirmed or suspected historical figures as well as more recent notable cases.
8:10
Good moment to learn 
obviously this is 8:05
according to the clock in my house, at least
I don't imagine this would be an especially difficult solve for a computer.
i assume any recent vision model could solve these
20:10
who the heck reads clocks in military time
true that
actually now that i think about it
military time makes sense
just drop the am/pm
It makes the math easier
i'm pretty sure you'd just read the clock as-is without the am/pm
am/pm with analog clocks is determined with context but this one doesn't have or need it i think
I switched to using 24hr time when I started working overnight
so it's still 08:10?
8 to 12 (4) + 11, makes 15
Yes
or 20:10 ;)
the 12-hour clock is a halfless form of timekeeping, so there can only be hours 1 to 12
so 8:10
0 to 11:59
We sound like nerds talking about clock xD
12:00 to 11:59
I use / to seperate the date
The US will be a dick and say it should be yyyy-dd-mm-mm-hh
so 8/3/2025/21/40
US says mm-dd-yyyy
The worst format
i'm literally the only person in my class using d/m/yyyy
everyone else uses m/d/yyyy
Fking weirdos they r
long term effects of the american colonial rule
not that the teachers care what date i put in but they're probably confused sometimes
Btw saw in yt today that trump called and wrote letters to countries asking them to do certain things or else military will be used lol
i wanna like military time but i'm too used to am/pm
would u buy one
nah i want an infinite state machine
this is like the 3rd or 4th time ive seen this image in the last few days
wtf happened?
Bruh
well yeah technically you're correct
bool is a subclass of int
ok pyright you're a smartass
that's why they call you pyright
Maybe u need to use value is int?
I dont remember how python works :p
you can just move the isinstance(bool) check above the int one
which is what i did
idfk
ask whoever made this protocol
* spin
a spin wheel that can be an integer in a certain range
"spin wheel" 😭
I use arch btw
Me too btw
sigma
Arch is a virus
i can say it about my phone (#channel_topic)
it's Linux ubuntu system topic of server?
what DE though
i mean arch really just gives you the benefit of the AUR, but are you maintaining your sanity by avoiding something like hyprland?
Hyprland is cool wdym?
Not as good as i3 but yk
Still pretty cool
It's tech. We're tech people. This channel is offtopic/general. It's fine.
yes
btw if anyone here use arch can they share their X11/xorg.conf.d ?
r u using it as compositor of wayland?
what display server r u on?
It's both a compositor and a window manager
oh hey furti
not what i was trying to ask lol
btw hi fruti
what were you asking then?
display server
Wayland window managers are commonly also compositors
i added basic arithmetic, assignments and ternary statements to my mini programming language. what's the next step?
- conditionals
- loops
- functions
- arrays (indexing and literals)
control flow for sure
loops and conditionals
id put functions before loops
cuz they can be recursive?
anyway are you using Lark? @scarlet peak
check the name
do u also change you resolution in hyprland conf?
oh my bad. yes i'm using lark
no, it detected it automatically
damn
it's the "stroking my shit" meme but with parsing buzzwords
it didnt for me..
gave up on handwritten parser 😔
truly a sight to witness
pratt was only gonna work for single statements
it was cool when it lasted
You can combine pratt with generic recursive descent to parse basically ANYTHING :(((
I'll go through Writing an [Interpreter | Compiler] in Go again and figure this shit out once and for all
I use windows btw
-# 🤡
honestly i'm finding BNF a lot more fun
except for shit like: ```yml
Expected one of:
* EQUAL
* IDENTIFIER
Previous tokens: [Token('IDENTIFIER', 'if')]
where you regret ever starting
...
IDENTIFIER: /[a-zA-Z_]\w*/
datatype: /[a-zA-Z_]\w*/
?start: stmt+
IF: "if"
ELSE: "else"
?conditional: IF "(" comparison ")" "{" stmt+ "}" (ELSE "{" stmt+ "}")?
?stmt: assignment | declaration
?declaration: datatype IDENTIFIER ("=" expr)? ";"
?assignment: IDENTIFIER "=" expr ";"
...
nevermind
simpler than writing it yourself
i wanna do BNF but I wanna try making a parser myself first
lmao
start
declaration int x = -11;
assignment x = 2;
declaration int y = 17;
declaration int z = 19;
declaration int other = z;
declaration bool is_bigger = False;
conditional
if
False
assignment is_bigger = True;
the assignment went through
what is this weird language
even though the condition is false
is the start inspired by assembly or something
no it's just an entry point
and it's a pretty-printed AST
well, yes, parsing is not evaluating
i guess i should stop evaluating during parsing then 
start
declaration int x = -11;
assignment x = 2;
declaration int y = 17;
declaration int z = 19;
declaration int other = z;
declaration bool is_bigger = False;
conditional
if
False
assignment is_bigger = True;
{
x: <Variable name='x' type='int' value=2>,
y: <Variable name='y' type='int' value=17>,
z: <Variable name='z' type='int' value=19>,
other: <Variable name='other' type='int' value=Token('IDENTIFIER', 'z')>,
is_bigger: <Variable name='is_bigger' type='bool' value=True>
}
bro........
programming language warcrime
in my defence, i thought the transformer came AFTER fully parsing the output
It's how things like shell work
it also means you can prepend your language to a zip file and just evaluate it to unzip itself
transformer?
That's how lark does semantic actions.
yes. lark has those
you redefine rules as methods in the transformer that take in a list of tokens and then spit out a reformed output
you can use this for constant folding
A lower level parser generator would have you use this for building the AST
so... compile time expression eval?
internet friends be like: "so an X is a Y with a Z"
but what's Y and what's Z
what's the point of building an AST if a transformer rebuilds one from scratch anyway, or was that your confusion?
yes
variables
no you build one raw AST and then optimise parts of it before evaluation
how can you optimize such things without some evaluation?
constant folding
3 + (5 - 2) * 9 can be folded into 30
and it will always be 30
That requires evaluation
oh wait yeah
you cant im guessing
apparently it's called partial evaluation
I use hyprland
wait furti, are you meant to interpret declarations / assignments at compile time or runtime?
int x = 2;
int y = 17;
int z = x + y;
bool is_bigger = false;
if (y > z) {
is_bigger = true;
}
because when trying to fold this, is_bigger is True, regardless of the fact that it's not a surface level assignment
so clearly i dont think i should be doing this
declarations: at compile time you'd add the name & type to the scope, at runtime you'd do the assignment
assignments: only runtime
optimizations are a separate question
Constant folding demands you track whether something is constant or not
ok so i think i'm gonna take the route of scrapping premature optimisations
alright i'll just make it bare bones and worry about optimisations later
(haven't read the convo, but if this is for a compiler llvm will do constant folding in a lot of cases for you)
interpreter ideally
In that case yhe you would need to do a lot of optimizations yourself, assuming you want them
Depending on how dynamic your lang is you might not want constant folding at all
Like for example in python you can overwrite the int addition method using some ctypes magic, but that won't affect constant folded integers
!e ```py
import fishhook
@fishhook.hook(int)
def add(self, other): return 10
x,y = 2, 5
print(2 + 5, x + y)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
7 10
The first argument gets constant folded, the second is calculated at runtime
So this is a case where constant folding technically produces a wrong result
(tho tbf it's a very nonsensical edge case, you should never really do this)
Hence 
Was just using python as a example of where constant folding "goes wrong"
hm alright, makes sense.
also, as a side question, in my bnf, i have this: ```
...
?add_sub: mul_div (ADD_SUB_OP mul_div)*
?mul_div: simple (MUL_DIV_OP simple)*
...
this means that i get `5 + 2 + 3` all on one line instead of `(5 + 2) + 3` (in terms of AST nesting). what's the best way to change this?
do you need them nested?
🍞
yeah i'd prefer them nested. makes processing them a lot easier
it's because of the way our backend works
// more krazam scenes: https://www.patreon.com/KRAZAM
// merch: https://merch.krazam.tv
this the kinda bread u eat as is
new gif
That's old as hell
hellooo
darabyte reference?
LET GO OF HIM
It's so lame that America doesn't have high-speed rail.
The only way to quickly get from Washington, DC to Pittsburgh for PyCon is to fly. But they're not even that far apart. And it's hard to even find flights that don't have a layover in Atlanta or NYC.
Just two more lanes on the expressways should fix it. Just two more.
My company is paying for the flights, so I only feel kind of guilty.
If I were going to PyCon on my own time and dime, I could take buses, which are 7 hours each way.
Except I wouldn't do that, because then I'd be wasting my time off sitting in a bus.
you could suffer through the four hour drive 🥴
this is what the katy, tx civil engineers were saying
I have a decently nice car (an accord but with """luxury features""") that's almost paid off, but I can get almost everywhere I want to go on public transit. So my long term financial plan is to not drive my car very much and for it to last forever.
fair enough
although since it's a honda, won't it last like, a long time regardless
I drive a prius that's been pretty faithful for the last 200k miles, doesn't seem like it's dying anytime soon
Let's assume it lasts for 300k miles. If I don't drive it to Pittsburgh and back, I save 500 miles, which isn't nothing.
yeah fair
Also driving a Prius
Kinda sus

You should confuse people even more by driving a Subaru
you could make the drive every day for almost 2 years straight. it is kind of nothing
Sounds terrible
Mass transit is the way
Then you can read books or listen to them and get all kinds of stuff done while getting to where you need to be
Like sleep
👀
real, I am eager to see caliofornia hsr even though I haven't ever stepped foot in that whole continent, trains r just cool
Why do so many americans have car loans?
Cars are mandatory if you want to have access to society, and thus people need cars very early on in their lives. Thus, loans
Mine is almost paid off 🙏
Just buy a 2k car?
sometimes that is viable, other times it is not
I worked as a delivery driver for most of my life, a cheap car ends up costing way more in the long run because of maintenance and repairs
I was spending hundreds a month on keeping my older car on the road vs spending about the same just paying for a new car that didn't constantly require repairs, and then cost me days of work because I didn't have a car
cars under $2000 are also going to be quite old (> 20 years), and there have been significant upgrades over the years
honestly that seems like a perfect situation for some rental/car sharing thing
my Prius doesn't even have aux 😭
it's a bit shy of 20 years old at this point
I've been considering just getting a cheap Bluetooth speaker and permanently putting that in the car. I could get one of the Bluetooth adapter things but the front speakers for the car are busted anyways
yeah but our mass transit is also pretty mid
the big jbl pill like things that the cool kids in the park have
fetty wap on the jbl speaker 💔🥀
Bruh Just buy toyota or honda don t have that problem at all
Mostly bad ones 
modern cars are strictly safer than older cars.
my car that needed constant maintenance was a toyota.
old jap cars are reliable yes
but they're not exempt from being old.
Never had that 300k+ on my car
Yeah but also track you no Manuel and overpriced
yeah you can still get manuals today, but even so, most people just don't want them
I do unless they are overpriced
sure, but most people don't.
Only americans in the rest of the world it isn t a problem?
aren't we talking about America here?
I don t live in europe 🗣️
well, sure?
manuals have become less popular in europe now that electrical vehicles are on the rise
Wouldn t drive one for free lol
Really? Free is very cheap.
Yep
Why
Cuz i do like the control of my vehicld and want a real engine and no stupid software when it is not needed
Thats silly
Youre not better at handling an engine than a computer is
Thats like saying you prefer abacuses to calculators
I do get wanting a simple car that works in an understandable way
I mean i got full control can t get stopped can t get speedlimited or does things i don t want
Your "full" control doesnt mean youre better at handling a car than a computer is
The software/simplicity argument is fine, this one isnt
I mean i wouldn t trust software when im driving fast always change for problems in the sofware itself
a false sense of security might be better for some people
Better for some people is just worse for everyone else
although i don't really see how electric (are we really talking electric vs manual here?) vehicles would overspeed anyway
The manual vs auto argument is usually made on fuel efficiency
But what makes you think the average driver is more efficient
Nah you can have an Electric cars that burns benzind
Talking about the range of Electric cars
What about it
Yeah and not be a data npc







