There is only text files.
No Stupid Questions
No such thing. Ask away!
!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules (interactive)
Rule 1- All posts must be legitimate questions. All post titles must include a question.
All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.
Rule 2- Your question subject cannot be illegal or NSFW material.
Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding META posts and joke questions.
Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.
On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.
If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.
Rule 7- You can't intentionally annoy, mock, or harass other members.
If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.
Credits
Our breathtaking icon was bestowed upon us by @Cevilia!
The greatest banner of all time: by @TheOneWithTheHair!
I find it so incredibke u can record random audio rn and its turned sound into stone as text that 1000 monkeys could eventually type up by random like Shakespeare
It literally reifies sound
at this point, "text" becomes a meaningless characteristic
There are thousands of types of file. They all contain data as a long sequence of numbers, and how those numbers are interpreted depends on the type of file - text characters, floating point numbers, pixel colour information or compressed data
What do u even mean by file type? Its the the extension .whatever that's just a made up human label files artfully have a MIME type which is defiantly totally a different thing.
images are pixel colour information while audio and video are compressed data ?
Depends on the file format. There is compressed and uncompressed audio - some times the numbers just represent the audio waveform (e.g. .wav) - some times with lossy lossless compression. Most, but not all, video formats are compressed due to the data size
an image, technically, is an array of pixels. specifically a 2-dimensional array. this means, it's just a long list of lists of pixels. so if you have a 1920x1080 image, it's just a list of 1080 lists of 1920 pixels each.
each pixel, again, is a tuple (i.e. a list with fixed length) of numbers which specify the brightness of red / green / blue lamp. so if you want to display a yellow pixel, the data would be (1.0, 1.0, 0.0) which turns red and green on and blue off.
so if you have a 1920x1080 image, technically you have 1920*1080*3 ≈ 6 million numbers. each number takes 32-bit, you can read it here
There's as many files as applications use. But just to make a point following your reasoning, you should include CAD, sliced and blender files at least to cover 3D objects.
Nope. Wrong. There are thousands of file types, and while a handful of them fall somehow under your four categories, most of them actually don't.
And calling .docx a "text file" is an insult to all honest text files.
I'd venture to say there is one data type, a record. At its more basic level every filesystem is a database, every file stored on the drive is a record in the database.
I'm with you though, docx is not a text file... Much more like an xml file.
There is structured text and formatted text.
There are index files.
There are databases.
There are mixed media files.
There are combined databases with mixed media and indexes, a.k.a. NOSQL databases.
t.b.c.
Executable files.
A database is a file ?
Yes, of course. Even if it claims to be on a harddisk without a file system - which makes it the only file there :)
Depends on the database system. But that's often the case.
Well, unless it is an in-memory database (which isn't too common), it needs to be stored on disk at some point. And for storing things on disk, you use one or more files.
Someone will probably correct me – but the funny thing is that stuff like docx and xls are just a zipped/tarballed collection of different kinds of files. So I would add whatever the official term for “zipped/tarballed” to your list.
"Archive" is probably the word you're looking for.
Don't understand this.
Sometimes you can just unzip a .exe file and it's got a bunch of smaller files inside
Also Java's .jar files are literally just .zip files with a different name
Lots of video files are just a group of files smashed together pretending to be one single file. Like video, audio, subtitles, a little text file with some descriptive info in it...
Compressed files. Files that contain other files in a form that takes less space but needs more processing to access
Try renaming a docx file extension to zip. Then open the file, you'll see that there are other files (mostly XML) inside. The docx is a container.
This is the kind of shit you'd read in a textbook from the 70s
I learned in computing that there are two: binary and text. If you open the file with a text editor and you can read some stuff, it's text. If just random characters, it's binary.
All files are binary. Text is just one interpretation.
The two types are text (encoded) and data (bytes)
no, nice take though
so you're right that text, audio and video are important data types. if you look at peripheral devices of computers, you can find: keyboard, printers, microphone, speakers, camera, screen. they put text / audio / video data in / out of the computer. so there's that
however, internally, databases are incredibly important. basically everything inside the computer is organized in databases if it's not some media that's displayed to the user directly. therefore, a lot of files are database files (sqlite3 files mostly). they're tabular data and you can watch them with sqlite3 command line program.
Not really.
For practical purposes, all files "binary", ones and zeros. And with those ones and zeros, you can encode stuff for example text and for example with ascii https://en.wikipedia.org/wiki/ASCII But you can also encode programs that can be executed, or what you named, visual, audio, or whatever you want. The differences are the "encodings".
Sometimes, things work a bit like one of those Russian Matryoshka dolls, for example a PDF can contain a JPG or a PNG but also TXT.
It's really not that simple as there being "4" types.
I'm not sure that answers your question though.
the would not look the same if you read them raw; much of a docx file is formatting and other metadata
If you have a .docx file, rename it to .zip, and extract it. You'll see the .docx is just packaged text (and image) files.
DocX is a weird beastie, last time I researched the topic it ended up being like an XML database with a word document mask
What about .exe / .dmg Files for installing programs?
.exes are actually just zip files
.deb files are just zip files with an accent
Not just those. Files are just a method of storing digital data, so it's not just those four. You can have files storing databases, software (think exe, AppImage, deb, rpm, etc.), design files, projects, and more!
And file extensions are a method of telling different programs how to handle different files, since the data is formatted a bit differently. For instance, a ".txt" file is stored in plain text, while an executable file is compiled code that needs to be run.
For your example, I would like to note that you are comparing a plain text file type to a rich text file type. Plain text file types, like .txt, .md (Markdown), and the different code files (like .json, .py, .rs, etc.), can be viewed and edited with a simple Notepad-style text editor. The data is stored, as the name suggests, in plain text. In comparison, rich text file types, like .odt and .docx, encode additional data like fonts, styles, images, animations, etc., and require a rich text processor (like LibreOffice, MS Office, etc.) to read them. You can't view them through a notepad-style application, for example.
And for images, video, and audio, you have it take into account compression, codecs, that sort of thing. You might have heard that a PNG can store transparent images and is a lossless format while a JPEG cannot and is a lossy format. "Lossless" means that, after compression, no data has been removed (or "lost"), while "lossy" means that some data is removed after compression. For audio, MP3s are lossy while WAV files are lossless. You might have also heard of "raw" photos and "raw" videos, those mean that the data is directly from the camera in its original quality.
For most file types, you can't just change the extension to convert them, as the data stored is arranged differently! This is why renaming a .txt file into a .odt will not be a valid rich text document, for example.
Oh, and you also have files like .zip or .tar(.gz), which are used to store a compressed version of some amount of digital files. And they can different in compression techniques, how data is arranged, etc.
If they look the same, you're either using the wrong editor or the wrong font.