Recent comments in /f/explainlikeimfive

OneHumanPeOple t1_je39bfh wrote

It is not a diagnosis but a general description of what happens when a person collapses from stress.

It’s also perceived to be polite way to describe a mental health decompensation or drug addiction relapse that requires inpatient treatment. Hopefully we stop calling it “exhaustion” in the future because it only fuels the stigma of seeking mental health or addiction services.

30

csl512 t1_je37vun wrote

A chess set is designed to play chess. The game and the stuff are tightly tied to each other. Uno is a card game that uses a specific deck. A standard deck of cards can be used to play a lot of different games. New games can be made by making rules around that common deck of cards, like numbers go on the same number, or black goes on red.

The very first games were like chess games. To input controls and output the game state they had to write it from scratch because it didn't exist yet, both for text-based games and graphical games. Eventually instead of rewriting the entire game from scratch every time, developers made flexible systems that could take the parts that make their game unique and reuse common elements, like taking and interpreting input, managing the state of the game, etc.

Game engines are also used in text adventure games. You tell it what rooms there are, how they're connected, what objects are there, and what you can do with them.

As you get more complex and graphical, you start adding animations, images, sound, physics, and so forth.

1

the_original_Retro t1_je37snx wrote

It's not a "I am completed with this package here you go there next stage knock yourself out" process.

It's a "chemicals are removed and passed on in various orders depending on how filled the digestive process already is" process.

You're not a first-in-first-out organism. Further, you'r e also not a fastest-in-fastest-through organism.

If your innards are not otherwise busy, you process liquid foodstuffs far faster than complex organic foodstuffs like high-fibre proteins. But that processing takes time for the more filling types of food you eat, at least in most cases. Pack your stomach with wagyu-steak fats and proteins, and it'll take a while for everything to sort itself out even if you gorf down an ice cream sundae afterwards.

20

fiatfighter t1_je35lzm wrote

This really made sense to me and I am NOT that technologically literate. And I definitely do not understand coding or this byte structure thing. But when you said-ok this piece is the program or file saying this, and this one is telling it this-that helped me wrap my brain around it. Thank you! Off to submit my resume to Twitter! Oh wait…

17

explainlikeimfive-ModTeam t1_je34nzn wrote

Please read this entire message


Your comment has been removed for the following reason(s):

  • Rule #1 of ELI5 is to be nice.

Breaking rule 1 is not tolerated.


If you would like this removal reviewed, please read the detailed rules first. If you believe it was removed erroneously, explain why using this form and we will review your submission.

1

jezvin t1_je332dg wrote

With computers you need to tell them everything you want to do. If you wanted to draw a picture you would need to tell each pixel to turn on in a way to make the picture you wanted.

That would take a lot of effort so someone made a program that would draw a line when you told it to draw a line. This moved into another level. Drawing a 3D environment where you could draw a ball by just telling this program to draw a ball. It would handle everything to make it look like a 3D ball on your screen with just a sphere equation. This was the foundation of a 3D engine.

Now these were used to make games, but some people went father and started making game engines where you can tell it to animate characters or do other game related tasks without telling the computer to do every step along the way. Things like real world physics were added so you could just tell the engine to make said ball and turn on, the ball would just drop and hit the ground and roll all without any extra programing required.

So a game engine is comprised of multiple different types of engines and programs that allow a game designer to focus more time and effort on designing games rather than other tasks.

1

TMax01 t1_je31any wrote

It's predefined. There is a fascinating (or not) history to and technical justification for how technology developers settled on an "8 bit byte" which then also became a 16, 32, 64, 128, or bigger bit byte, but in every case the answer is the same: it's predefined how many digits the reader will consider.

1

aqhgfhsypytnpaiazh t1_je3081x wrote

Modern computers, in terms of data storage and processing, basically only operate on bytes (groups of 8 binary digits [bits]). So at least in most cases you can assume that 00001001 should be treated as a single value.

Beyond that, it's really up to the software interacting with that data to determine how to process it. This is where file formats come into play. The file format is a specification that clearly defines how to interpret the data in a file. So it will tell you what each byte in a file means.

Sometimes the rules are very strict, like a format will say "Every byte of the file represents a character of the alphabet, here's an ANSI table that maps binary numbers to characters". Or it might be less rigid, like "The first section of the audio file is free text ANSI metadata, which ends when the null byte (00000000) is encountered. The next section..."

Without some context as to what the data represents, it's meaningless. Often this can be conveyed by following the conventions for file extensions - the part of the file name after the last dot (eg .txt is universally recognised as text data encoded with the ANSI or Unicode standards). Often there is also a specific pattern of data at the very beginning of the file (a magic number) that indicates what type of file it is. The file is stored in a file system, which is a particular arrangement of data on a storage device following file system standards. Programs are stored using standard data formats built into the operating system, which in turn send a series of electrical signals to the CPU and other processors following a standard instruction set. It's standards all the way down.

Binary data is ultimately just a series of binary digits - an abstract representation of on/off electrical signals - that the program (by way of the programmer and/or user) has to figure out what to do with. If your friend came to you and blurted out "Eleven! Seventy four! Two! Five thousand, nine hundred and sixty six!" it's not going to mean anything without context.

1

sacoPT t1_je2zwlu wrote

That problem is not specific to computers. 123 456 can be either one single number or 123 & 456 taken separately. Heck, negro can be dark if you read in Portuguese or black if you read in Spanish. You will know which one is the right one by using context.

In the digital world it’s up to the software to decide what 1001 means, based on context. That’s why if you open a png file with mspaint you see a picture but if you open it with notepad you see gibberish

2

bulbaquil t1_je2yzza wrote

To summarize the .wav specification u/turniphat mentioned:

  • The first 4 bytes tell the computer "Hi, I'm a multimedia file. Please treat me accordingly."

  • Bytes 5 through 8 tell the computer "Here's how long I am." This is the answer to your question - one of the first things files of any kind will do is tell the computer how big they are, precisely because this is something the computer needs to know.

  • Bytes 9 through 12 tell the computer "Specifically, I'm a .wav file."

  • Bytes 13 through 36 tell the computer "Because I'm a .wav file, here are some things you need to know about me. Like, what's my bitrate, am I stereo or mono, how many channels do I have, etc."

  • Bytes 37 through 44 tell the computer: "Okay, the actual data's coming now. Just a reminder: this is how big it is."

  • Bytes 45 through whatever number the previous 44 bytes told us are the actual sound itself.

As for why the computer treats 1001 as 9 instead of as 2-1, because at a very fundamental level the computer isn't reading the data bit by bit; it's reading it in chunks (sort of like taking steps two at a time). By default, the chunk size is the "X" that they're talking about whenever they refer to an "X-bit system" or "X-bit architecture", but if a file is encountered, its directives on How to Read This Kind of File take over. So it isn't seeing it as a sequence "1-0-0-1" and trying to figure out where to break it; it's seeing it as a gestalt "1001" (really, "00001001") and treating it as a single unit. If you wanted a 2 and then a 1, you'd need two different units: 00000010 00000001.

Tl;dr: Files share information about themselves to the computer when they're loaded. One of the things they share is how big they are, and another is how many bits of data the computer should read from them at a time.

67