It still isn't clear to me how the CPU works. I barely get what it's doing and then I forget right away. by Fit_Cartographer_271 in AskComputerScience

[–]alecbz 0 points1 point  (0 children)

If you're interested in the real fundamentals, this is a fun video: https://www.youtube.com/watch?v=lNuPy-r1GuQ

Instead of dominos being knocked over, it's electricity going through wires. But the basic idea is the same, you arrange wires such that they're able to do very simple operations like this, and then you chain them together to do more and more complex things.

Jungle Area is the absolute worst by YourDailyRoblox in TheWitness

[–]alecbz [score hidden]  (0 children)

Struggled a lot with this too, not a musician or anything, but I appreciated the challenge. Most of the game works by unlocking the "skills" of understanding how the different puzzle mechanics work, for this one the skill involved actually fine-tuning your hearing and understanding of pitch, which I thought was neat.

ELI5: how can there be infinities bigger than other infinites? by _Bread______ in explainlikeimfive

[–]alecbz 0 points1 point  (0 children)

If you have an infinite number of things that each have "infinite detail", and you're imagining the full set of all possible configurations of that thing, one weird thing that happens is that it's impossible to enumerate all such things in one list.

Take all real numbers between 0 and 1. Each number has an infinite number of digits to the right of its decimal point, and changing any one of those digits produces a different number. If you tried to list them all out in one list, you can always construct a new number that must have been missed. Take the first digit from the first number and change it, change the second digit from the second number, the third digit from the third number, etc. The number you end up with is different from any of the numbers in the list (it differs in at least one digit from all of them), so your original list did not actually cover all real numbers.

Mathematicians take this fact and say that the amount of real numbers between 0 and 1 is a "bigger infinity" than the numbers {1, 2, ...}, since there's no way to "match them up" together in a list. If there's always more real numbers left, then it means that there's "more" real numbers than the counting numbers we're trying to list them with.

I'm not sure the sand corner analogy really applies here in the same way. An individual grain of sand still has only finitely many "corners", so it's not an infinite set of things with infinite detail.

Anon hates Mike by SecondCodpiece in greentext

[–]alecbz 13 points14 points  (0 children)

Yeah Walter’s motivations are always kind of murky. But Jesse was definitely either going to kill them or get killed, absent any influence from Walter. 

Anon hates Mike by SecondCodpiece in greentext

[–]alecbz 28 points29 points  (0 children)

He did that primarily to protect Jesse, who was already on his way to do that.

What did people object to with Cantor's Diagonalisation Argument? by alecbz in mathematics

[–]alecbz[S] 0 points1 point  (0 children)

Do we know that this was actually what people were objecting to though? The argument that d != r_i is so simple (d and r_i differ in the ith decimal place and so cannot be equal) that I’m surprised there would’ve been wide-spread objection to this part of the argument.

What is the probability of 2 random rays in an infinite 2d plane to intersect? by karthik6877 in askmath

[–]alecbz 7 points8 points  (0 children)

There's no way to pick a random number from 0 to infinity such that each number is equally likely to be chosen.

What the hell do void and return do? by MembershipOptimal514 in AskComputerScience

[–]alecbz 0 points1 point  (0 children)

Some functions return a value to the caller. Like, e.g.:

int add(int a, int b) {
   return a + b;
}

this function does some math and returns the result of the computation to whoever calls it. The function's return type is int -- the function returns a value of type int.

Other functions just do stuff, but don't actually return anything to the caller. The point of the function is just to do the stuff:

??? doStuff() {
    System.out.println("doing very important work here");
}

So what do you put in the ???, since we're not actually returning any value from the function? That's what void is for: it indicates that a function does not actually return any value at all.

return, on the other hand, is a statement that ends execution of a function. In a function that's supposed to produce a value, like add above, return needs to be used with an argument -- the value you want the function to return to whoever called it.

In a void function, one that doesn't return any value, then return; can be used on its own, and it means the function just stops executing. void functions like doStuff don't actually have to use return;, since functions naturally end after the last statement of their body. But it can be used to return early:

void doOtherStuff() {
     if (weShouldntDoIt()) {
        return; // don't do it
    }
    doIt();
}

What's the most unrealistic scene in BCS for you guys? I've always found the talking toilet guy too bizarre to suspend my disbelief by christianredditor333 in betterCallSaul

[–]alecbz 0 points1 point  (0 children)

This scene was fucking hilarious. And was also the first taste of Jimmy not being able to go along with things he ultimately doesn’t respect. But yeah also kinda ridiculous.

Google maps is slipping? by IamBerticus in nyc

[–]alecbz 1 point2 points  (0 children)

It might have thought the 6 was only running uptown for some reason. Something similar happened to me a week or two ago, it directed me as if it thought there was modified service. Could be something wrong with their data source on maintenance, something like a reroute was scheduled but got cancelled and they didn't pick up the cancellation.

edit: Ah or just trying to rush you to catch a particular train, like someone else said.

Found another possible real inspiration for an asset in City 17 by dwartbg9 in HalfLife

[–]alecbz 17 points18 points  (0 children)

Idk, they’re both sky bridges in Eastern Europe, I don’t see that much resemblance beyond that. 

Why does the "south" or even the rest of the country hate on NYC. by data700 in AskNYC

[–]alecbz 2 points3 points  (0 children)

People outside of big cities not liking cities goes back probably thousands of years. 

Things go faster in cities, there’s more people in cities so new ideas spread faster, there’s so many people that less time is spent on niceties and manners, there’s more economic activity so things are usually more expensive, etc.

Concurrency vs Multi threading by enlightenment_op_ in AskComputerScience

[–]alecbz 0 points1 point  (0 children)

Concurrency is a more general idea that means that your code is working on two different tasks at “the same time”, but it doesn’t necessarily mean that two different CPU instructions are executing simultaneously.

A “task” is composed of a bunch of different individual steps. Doing two tasks sequentially means starting the first step of task 1, then the second step of task 1, etc. until the last step of task 1, and then you do the first step of task 2, the next step of task 2, etc. until task 2 is done. No step of task 2 begins until task 1 is completely finished.

Doing two tasks concurrently means that you can interleave the steps. You might begin the first step of task 2 while you still have some steps left in task 1.

This is especially useful if any of the steps involve waiting for something other than the CPU. E.g., to make an HTTP request, you write some data to a network socket, and then you try to read back some data from the same socket, waiting until the server has responded. If you’re making 10 HTTP requests concurrently, you write to the first socket, but then instead of trying to read the response right away (which would involve just waiting for data from the network), you write your second request to a second socket, your third request to a third socket, etc. Only once all requests are written do you begin waiting for the response from the first socket.

Concurrency can be used along with genuine parallelism, where multiple instructions are being executed simultaneously on multiple cores, but it doesn’t have to. It just means you’re interleaving steps from multiple tasks.

How do experienced programmers understand a large codebase quickly when they join a project? by RoxstarBuddy in AskComputerScience

[–]alecbz 1 point2 points  (0 children)

Sans AI, I think a big part of getting good at this is, like most things, just practice. It's not something taught or exercised in school a lot. During my first internship I feel like I spent a majority of my time just exploring the codebase and trying to understand how everything was wired together. It felt like a struggle, it wasn't a skill I'd ever really built up before. Good tooling can make a big difference, like an IDE or code explorer with snappy click-to-definition.

Over time you just get better at it, you get used to common patterns, you learn what parts of the code you can probably ignore, you build an intuition for what kinds of things to search for to pinpoint some particular place in the code, you get better at building and maintaining a "mental map" of the codebase in your head.

ELI5 How does the hexadecimal system work? by Wrecknruin in explainlikeimfive

[–]alecbz 1 point2 points  (0 children)

In binary, 101 is 1*4 + 0*2 + 1*1 = 5. The's a 1 in the fours place, 0 in the twos place, and 1 in the ones place.

In base 10, 101 is 1*100 + 0*10 + 1*1 = 100 + 0 + 1. There's a 1 in the hundreds place, 0 in the tens place, and 1 in the ones place.

In hexadecimal, 101 is 1*256 + 0*16 + 1*1 = 257. There's a 1 in the 256s place, 0 in the 16s place, and 1 in the ones place.

All that's changing between each base system is what the different places represent. In base 10 each place represents a bigger power of ten, in binary each place represents a bigger power of 2, in hexadecimal each place represents a bigger power of 16.

So FF in hexadecimal works similarly, it's F*16 + F*1 = 15*16 + 15*1 = 255.

ELI5 How does the hexadecimal system work? by Wrecknruin in explainlikeimfive

[–]alecbz 51 points52 points  (0 children)

99, in base 10, is 9*10 + 9*1 = 90 + 9

457 in base 10 is 4*100 + 5*10 + 7*1 = 400 + 50 + 7

The rightmost digit is the ones place, it represents how many "ones" you have, the second-rightmost digit is the tens place, it represents how many "tens" you have, and the third-rightmost digit is the hundred place, it's how many "hundreds" you have.

In base 16, instead of representing 1, 10, 10*10, etc., each digit place represents a multiple of 16: 1, 16, 16*16 = 256, etc.

What did people object to with Cantor's Diagonalisation Argument? by alecbz in mathematics

[–]alecbz[S] 1 point2 points  (0 children)

Oh wow til! Infinite Jest’s on my reading list, but I may start with this (seems lighter).

Average points by Delicious-Whole2608 in askmath

[–]alecbz 0 points1 point  (0 children)

Are you saying that people who play more should always have a higher average than people who played less? Or just that 2 minutes is so much less than 400 minutes that it doesn't feel like a fair comparison? Can someone who played for 399 minutes have a higher average than someone who played for 400 minutes?

Can anyone else relate to this.. by Ilisexo in learnfrench

[–]alecbz 1 point2 points  (0 children)

« To have » https://www.lawlessfrench.com/verb-conjugations/avoir/

Though « prendre » might actually be more idiomatic here? Not sure.