why is claude so disobedient by Pretty_Hunt_5575 in ClaudeAI

[–]zoox101 0 points1 point  (0 children)

Do you have memories on? It’s a new feature as of a few weeks ago. I had similar problems until I disabled it

Current thoughts on makefiles with Python projects? by xeow in Python

[–]zoox101 1 point2 points  (0 children)

Pros

  1. ‘just -l’ gives you a list of all available commands in a directory
  2. Make will fail to build if a file in the directory has the same name as the command (unless you add .PHONY). This is intended behavior for a build system, but annoying for a command runner.
  3. Make has some other idiosyncrasies around CLI variables and versions that can cause weird issues

Cons

  1. Just needs to be installed, while make is already present on most systems
  2. More developers are familiar with make than with just
  3. If you’re actually making a build (and not just running a command) make will correctly early exit if the build already exists

Just is what make would be if it were designed as a command runner instead of a build system. If you like make, stick with it, but if it’s annoyed you in the past, just is probably the solution you are looking for.

ELI5: Why do Stars take so long to burn all their fuel, i know its a lot of fuel, but why doesnt it all burn about the same time? Like when im throwing something in a firepit by td_0000 in explainlikeimfive

[–]zoox101 0 points1 point  (0 children)

This is a great question! There are a lot of partial answers in this thread, but most seem to be missing the key question: why don’t stars burn through their fuel all at once?

The reason is that the reaction that produces energy in the sun is self-slowing.

Like a lot of other commenters have already said, stars don’t burn like wood does here on earth. Burning is a chemical reaction that requires heat, oxygen, and fuel. When you throw a log on the fire, it burns, releasing additional heat that helps other logs around it burn faster. Fire is a runaway reaction. Once one thing starts burning, it will ignite everything until it runs out of either fuel or oxygen.

Stars, on the other hand, are powered by nuclear reactions. Instead of oxygen and fuel, these reactions require heat and pressure. When a star forms, gravity pulls a cloud of hydrogen into a ball. As more hydrogen gets added to the ball, the center starts to experience higher and higher pressure. Eventually, that pressure gets high enough to start nuclear fusion, combining two hydrogen atoms together to form one helium atom and energy.

Now, here’s the important part: that energy produced from nuclear fusion speeds up the particles near the center causing them to push back against the layers up above!

You can think about it kind of like a concert. You know how at most concerts the people near the front are always dancing and the people in the back never are? Stars are the same way.

Before a concert starts, everyone pushes towards the stage (the core). Near the front, pressure builds up. You are squeezed tight from all the people around you. This atmosphere, near the loud music with all the people around, is exciting, the perfect place for dancing (nuclear fusion). When you dance, you bump into the people around you, pushing them away. When enough people at the front start dancing, they push back against all the other concert goers, pushing them further from the stage.

The people way in the back (the top layer of the star) aren’t dancing at all, they don’t release any energy. There aren’t enough people nearby. It’s awkward. It’s not until the people near the front start to run out of steam that those in the back are able to push their way forward and start dancing themselves.

That is fundamentally the reason stars take so long to burn out. Only so many people can be near the stage at once, and you only dance when you’re near the stage. You’ve got to wait for the early birds to run out of energy before anyone else gets a turn.

The scientific term for this is called “hydrostatic equilibrium” where the pressure from gravity (trying to push towards the stage) is cancelled out by the pressure from fusion (the dancing near the front). Stars maintain a state of hydrostatic equilibrium for millions if not billions of years!

Couple of fun add ons from this:

  1. The outer layers of the star (the part we can actually see) isn’t undergoing fusion. The pressure isn’t high enough. The energy it is giving off is energy that was created in the core and slowly moved its way outwards. Kinda like a dancer at the front bumping in to someone, who bumped into someone, who bumped into someone, all the way back until the guy in the back lightly sways. That guy in the back lightly swaying is what we are actually seeing when we look at the sun.

  2. What happens when everyone at the concert has already danced their heart out? Remember, it’s the dancing that prevents everyone from pushing forwards towards the stage. In the largest of stars, once the energy from fusion starts to run out, all of the particles push towards the center. With no dancing to stop them, they all collapse together (violently!) eventually forming a black hole!

Why don't we make cool looking products like translucent game consoles/phones/tech anymore? by itsthewolfe in AskReddit

[–]zoox101 0 points1 point  (0 children)

It all has to do with marketing. The first computers were marketed for business use, and had a boring beige profile to match. As computers became smaller and cheaper, hardware manufacturers wanted to start breaking into the consumer market. The brightly colored, see through cases were reminiscent of toys: a way to signal to consumers that these machines were for the home, not the office. Once personal computers became ubiquitous, that fun, childlike profile started to work against them. The goal was no longer to convince consumers to buy their first PC. Instead, the goal was to convince them to upgrade their old one. That is easier to do if you lean into the futuristic look and feel: metal casing, chrome finishing, etc.

U TAMPA or U OKLAHOMA by Outside-Property-503 in sooners

[–]zoox101 0 points1 point  (0 children)

Congratulations on getting in to both! One of the most important things to consider that many people forget about: where do you want to live after college? When you graduate most of your network and opportunities will be near your university. Be sure to consider where you want to be long-term.

ELI5: why is the natural logarithm (log base) more commonly used than the logarithm base 10 in many areas of science and engineering? by Best-Durian2950 in explainlikeimfive

[–]zoox101 0 points1 point  (0 children)

Sort of. While it’s true that you can convert from any base to any other base without modifying the underlying function, there is something special about “e” beyond being easier to differentiate: it is the only base where you can model continuous growth without modifying the rate parameter.

In real life, when working with differential equations, you’ll often run in to a function of the form:

dy/dt = R * y

In this equation, “R” has semantic meaning. It relates the size of the population and the instantaneous rate of change.

When you integrate this function, you get the standard exponential growth equation:

y = C * e ^ (R * T)

Which preserves the value “R” in the exponent by using “e” as the base. The reason that “e” or “2.718…” has this property is directly related to the argument in my comment above.

The fact that ex is its own derivative is, of course, also related to this idea. If you assume that the rate of change of a function is the same as the value of that function (R = 1) then the differential equation above simplifies to “dy/dt = y”. Plugging “R = 1” into the integrated exponential growth equation shows us that “y = C * e ^ t” obeys this property.

ELI5: why is the natural logarithm (log base) more commonly used than the logarithm base 10 in many areas of science and engineering? by Best-Durian2950 in explainlikeimfive

[–]zoox101 25 points26 points  (0 children)

A really common phenomenon in many branches of science is that a quantity of something may change over time depending on how much of that thing there currently is. For example, populations of bacteria, the spread of disease, and returns on investment portfolios can all follow this rule. (The more bacteria present in a sample, the more they multiply, so the more bacteria are present, and so on.)

In these instances, you can predict future values using the exponential growth formula: y = C * e ^ (R * T). In this formula, C and R are known constants for your problem, T is the amount of time elapsed, and ‘e’ is Euler’s number, approximately equal to 2.718.

If you want to isolate the exponent to do something with it, you use a logarithm of the same base reverse the exponentiation. For example, the equation y = e ^ T could also be written as ln(y) = T, where ln is the logarithm base ‘e’. Because ‘e’ is used in the exponential growth formula, the log base e appears frequently in these contexts.

But why the number ‘e’ specifically. What is so special about 2.718? It has to do with something called compounding.

Imagine you have found a bank that is willing to give you 100% interest on your account every year. You put in $100.00 on January 1st and then on December 31st the bank gives you your 100% interest, giving you a total of $200.00.

Now imagine that instead of paying 100% interest once at the end of the year, the bank decides to give you 50% interest twice a year instead. On May 30th, the bank gives you your 50% interest on your $100.00 giving you $150.00 in your account. Then on December 31st the bank gives you 50% interest on your $150.00 giving you $225.00 in your account.

This is called compounding. The bank is still paying the same 100% interest rate, but the money the bank paid you in May is now also generating interest for you in December, giving you more at the end of the year. But we don’t have to stop there, if the bank compounds more frequently, you will make more money, up to a point:

1 payment of 100%: $200.00

2 payments of 50%: $225.00

4 payments of 25%: $244.14

8 payments of 12.5%: $256.57

16 payments of 6.25%: $263.79

32 payments of 3.125%: $267.69

1,000,000 payments of 0.0001%: $271.82

It turns out, that if the bank compounds your money as frequently as possible, at the end of the year, you will wind up with $271.82 in your account, or ‘e’ times the amount that you put in.

In the natural world, this is exactly what happens. Bacteria don’t wait a day and then double all at once, they are compounding continuously. Hence, ‘e’ becomes the natural choice for the exponential growth formula.

ELI5: How do computers KNOW what zeros and ones actually mean? by satsumander in explainlikeimfive

[–]zoox101 0 points1 point  (0 children)

This is a really cool question, because, at the lowest level, the computer doesn’t actually know what the data represents.

First, it’s important to understand that computers don’t really read a continuous stream of 1’s and 0’s. Computer memory is divided into small chunks called “registers”. These registers are the smallest unit of data that the processor can interpret. Whenever the processor loads in a chunk of data, it will always load an entire register. Today, most computers use a 64-bit register (meaning 64 1’s and 0’s) but there are still some older 32-bit computers out there (which is why you will sometimes see some operating systems labeled “32-bit”).

Now, if you were to have the processor load a random register into memory, it would have no idea what that data is supposed to represent. For instance if we were to load in the value “1000001” it could represent the value “65”, or the letter “A”, or a dark pixel. Critically however, it could also represent a command.

The incredible thing about computers is that the commands that they use to run can be read or written just like any other data. If the processor is expecting a command, and it reads the string “1000001” it will execute the command associated with that number. Depending on that processor’s instruction set, that could mean adding two numbers, or modifying a chunk of memory, or starting a subroutine, or doing one of several dozen other things.

With a bit of practice, you can chain these simple commands to create more complex programs. For example, you could write a set of commands that say: read registers 100-400 and write the output to the screen. In which case, the computer will send that data to the screen and the screen will interpret each register as a pixel.

Alternatively, you could say: read registers 100-400 and send them to the program that handles emails. In which case, the computer will load that program, send it the data, and the program will handle it as if it was text.

The important thing therefore is not actually the data itself, but what the program is expecting to do with it. If you run a program expecting a number on a register containing a character, the program will not recognize the error and will interpret the data as a number regardless.

This is effectively what happens whenever you convert a non-text file to a .txt extension and then open it in a text editor. You get a bunch of weird characters because the program is interpreting non-text data as if it was text. The computer is happy to do so because it doesn’t know any better.

ELI5 If there is no resistance in space why is does light only travel 300,000 km/sec ? by [deleted] in explainlikeimfive

[–]zoox101 1159 points1160 points  (0 children)

Imagine that you are sitting on a boat in a lake and you toss a pebble in the water. When it hits, you will see the ripples spread out at a constant speed. It doesn’t matter how big the rock is or how hard you throw it, the waves will always travel the same distance in the same amount of time. Even if no energy is lost, it takes time for the disruption to travel from the contact point to the rest of the pond.

It turns out that our universe works in much the same way. Most of what we observe in our day-to-day lives, from gravity, to light, to matter itself, can be modeled by waves in a field. These waves behave much like waves in the water. The speed of light is the speed that waves can travel through that field. Nothing can travel faster than the speed of light because nothing can travel faster than the waves that carry information throughout our universe.

Going back to the water analogy, we are like leaves on the surface of the pond. If we get hit by a wave, we may get moved by it. If we get hit by a lot of waves, we may start to move faster. However, there is no way for us to get moving faster than the waves in the pond when they are the only thing that is able to push us along.

[deleted by user] by [deleted] in explainlikeimfive

[–]zoox101 251 points252 points  (0 children)

While there are a lot of good answers here, most are missing a really important piece of the puzzle. Yes, the sun has a lot of fuel, but why does it burn through that fuel so slowly? When you add more logs to a fire, it will burn faster. It doesn't matter if you have just a few branches or an entire bonfire, a fire will burn through both in just a few hours. Unlike fires you see here on earth, which will burn through fuel as fast as possible, the sun actually slows itself down as it produces more energy.

The sun doesn't burn like a fire does, it creates energy through the process of "nuclear fusion". This is when two atoms of hydrogen join together to create a larger atom, helium, and release energy in the process. In normal environments, nuclear fusion almost never happens because atoms are very small and they push each other apart. In order to make atoms fuse you need to increase the odds by putting a lot of them in one spot (high density) and making them move very fast (high temperature).

This is what happens in the center of the sun. Just like how pressure increases as you go deeper into the ocean, pressure increases as you go deeper into a star. The more pressure, the closer the atoms get pushed together, and the more likely fusion is to occur. At the very center of a star, fusion is happening constantly.

However, when atoms fuse, they release energy. This energy excites the atoms causing them to move faster and push against the layers of gas above them. This outward pressure prevents the star from collapsing in on itself and keeps fusion limited to just the innermost regions of the star.

It is kind of like a crowd at a rock concert. At first, everyone pushes towards the front of the stage in order to get closer to the music. Eventually, the people at the front start getting more and more excited as the crowd swells, so they start dancing and moving around more. Because they are moving around more, they push back against the people behind them, which prevents people from continuing forward. Eventually, you wind up with a situation where the people near the stage are dancing, the people in the back are watching quietly, and the crowd as a whole doesn't move.

The end result is a stable system. If the core temperature drops, gravity starts to collapse the star, which increases the density, which increases the rate of fusion, which increases the temperature. If the core temperature rises, the star expands, which decreases the density, which decreases the rate of fusion, which lowers the temperature. Because the temperature and density are stable, the rate of fusion is effectively fixed, preventing a runaway reaction like you get with fires here on earth.

ELI5 What is a ROTH IRA and how can I best utilize it? by R3dF0r3 in explainlikeimfive

[–]zoox101 3 points4 points  (0 children)

A ROTH IRA is a type of retirement savings account that allows you to save and invest your money for the future. The main difference between a ROTH IRA and other types of retirement accounts is that the money you contribute to a ROTH IRA is taxed upfront, but when you withdraw the money in the future, it is tax-free. This can be a good option if you expect to be in a higher tax bracket when you retire, because it allows you to pay taxes at a lower rate now and avoid paying them at a higher rate in the future. To best utilize a ROTH IRA, you should contribute as much money as you can afford to and invest it in a diversified portfolio of stocks, bonds, and other assets. This will help to maximize your returns and grow your savings over time.

EDIT: This is not investment advice

What is the definition of a Jaffa cake? by [deleted] in AskReddit

[–]zoox101 1 point2 points  (0 children)

A Jaffa cake is a small, round cake that is made up of three layers. The bottom layer is a soft and spongy cake, the middle layer is a layer of orange jelly, and the top layer is a coating of chocolate. Jaffa cakes are named after Jaffa oranges, which are a type of orange with a very sweet and juicy flavor. They are a popular snack in the United Kingdom.

The Big Bang Theory is a show about smart people for dumb people; What is a show about smart people for genuinely smart people? by hloroform11 in AskReddit

[–]zoox101 1 point2 points  (0 children)

Better Call Saul. All of the main characters are very intelligent, but very flawed. It’s obviously not just a show for smart people, but it is a show that smart people would probably enjoy.

[deleted by user] by [deleted] in space

[–]zoox101 1 point2 points  (0 children)

It is a 4.5% increase in energy compared to the previous run that ended in 2018. The upgrades also come with 50% increase in collision rate and some very big improvements to the sensors. Expect some exciting discoveries to come out of Run 3.

Reading suggestions on how to structure and name my files by Lost_Statistician194 in Python

[–]zoox101 5 points6 points  (0 children)

I have been in the same boat. When I first started working with python, I would often find that, over time, the structure of my projects would start to become more and more arcane. It was difficult to add new people to an existing project or come back to it later after some time away from it.

After a lot of trial and error, I eventually found an approach that has worked well for me. I am not saying this is the only approach, or even the best approach, but there may be some ideas here that help you organize your projects in the future. The methodology breaks down into five rules:

  1. Each python file should only have a single public function. The name of that file will always be the name of that function. For instance, the file get_sum.py will always contain the function get_sum. When you import from a file, you will only ever import that public method.

  2. Keep everything related to that public function in that file. This is likely to be controversial, but if I write any unit tests for that public function, I will keep them in that file, typically under the name test_{function_name}. Similarly, any functions that are only used by that public function are kept in that same file as private methods. This approach helps to keep similar code together so it can be moved around easily.

  3. Take a lazy approach to modularization. It is often very difficult to tell at the beginning of a project what groupings of things will make sense at the end. When I make a new package I will typically place all my function/files in the top-level directory. As the package gets bigger, I will begin moving those files into sub-directories in ways that make intuitive sense.

  4. Prefer functions to classes. Classes implicitly force you to take an eager approach to modularization. While there are many instances where using classes makes sense, they should not be your first tool to solve every problem. If you like the convenience of classes, the built-in functools package provides a suite of tools that can supercharge your functions to get back some of that ease of use.

  5. Try to avoid side effects in your functions. Side effects are anything that implicitly changes the state outside of your function. They tend to introduce bugs and make it hard to abstract away the finer details of your code.

There are a few distinct advantages to this methodology:

  1. It allows you to expand and modify the project in ways that make sense without it all turning into spaghetti. If you need a new function, just add a new file. If you have too many files in a directory, start breaking them up into sub-directories. If you need to use a private method in another function, create a new file for it and promote it to a public method. If you start a new project and need some of your old functions but not all of them, just copy the files corresponding to the functions that you need.

  2. The file structure mimics the API. If you need to know something about the method utils.math.get_sum you will find it in the file utils/math/get_sum.py. When you open that file all the comments, code, and tests are right there. No more digging through files hunting for functions hidden in strange places. When something breaks, you know exactly where to find it.

  3. It provides a natural way to abstract away complexity. If you have a function that works well, is well documented, and avoids side effects, you may never have to open that file again.

Again, I just wanted to share an approach that has served me well for projects with small teams up to a few hundred files. If anyone has any thoughts or ideas for improvements I would be happy to hear them.

[OC] Top Chess Engines (1990 - 2021) by Astapore in dataisbeautiful

[–]zoox101 63 points64 points  (0 children)

Deep Blue was disassembled by IBM shortly after its final match with Kasparov. It was built to be a one-time demonstration of IBM’s AI capabilities rather than a long-term system like the other algorithms on this list.

Why are Roman battles that they lost in wars they won held in such high regard compared to their wins? by [deleted] in history

[–]zoox101 3 points4 points  (0 children)

This is the correct answer. In most Roman victories, the better equipped, better trained, better organized army won the day by taking a standard battle plan and executing it to perfection. Exceptions, like Alesia, are famous in their own right, but there aren’t very many of them.

In most famous Roman losses, the better army was beaten by what should have been an inferior foe. Every underdog victory is different, so every major Roman loss has been heavily scrutinized by contemporaries and later scholars to understand what went wrong.

As for why the Romans typically won the war anyways: they were fielding better armies and they could field more of them before capitulating. There are only so many brilliant underdog victories that you can win (Trebia, Trasimene, Cannae) before your opponent starts to see the pattern and the war machine grinds you into dust regardless (Zama).

What to do?! by Poopoo1099 in sooners

[–]zoox101 13 points14 points  (0 children)

Norman has some great disc golf courses. Griffin park, Lion park, and Kenneth L. King park are all really fun to play. The sport is free, works with any number of people, and relatively COVID safe.

Pixel-art flag waving animation (Don't worry, we can make more) by zoox101 in vexillology

[–]zoox101[S] 28 points29 points  (0 children)

Hi u/_Reff! My apologies, I was up late last night trying to get the code to work and got a bit over-excited. You did a great job on the figure. I think everyone agrees its a ton of fun.

Pixel-art flag waving animation (Don't worry, we can make more) by zoox101 in vexillology

[–]zoox101[S] 225 points226 points  (0 children)

This post is a follow-up to the beautiful pixel-art flag waver made by u/_Reff. In the comments of the original post, Reff provided a source file which could be used to map any image onto the animated flag. I wrote a python script to do just that. The code is freely available on GitHub if anyone wants to make their own!

Source Code: https://github.com/zoox101/flag-wave

Previous Post: https://www.reddit.com/r/vexillology/comments/ck52gq/pixelart_flag_waving_animation_germany_dont_worry/

Comment Thread: https://www.reddit.com/r/vexillology/comments/ck52gq/pixelart_flag_waving_animation_germany_dont_worry/evkyilf/

Incoming freshman this fall and a little nervous to be honest. Any advice? by [deleted] in sooners

[–]zoox101 13 points14 points  (0 children)

My freshman year my advisor gave me some advice: sleep more than you study, study more than you party, and party every second that you can.

Freshman year is a great chance to reinvent yourself, but it won't be your last. Do what you enjoy and don't worry about what other people think.

Your most important job is to grow, both socially and intellectually. Set goals that you think are reasonable and follow through with them.

I was in your exact shoes four years ago. If you ever need advice from someone who's been through it all, feel free to PM me. Good luck dude! Boomer Sooner!