Live data from Hacker News

Linux is an interpreter

astrid.tech

51–60 of 65 posts

Re: Linux is an interpreter

#53
post #22

This article was painful to read because of all the misconceptions. A cpio archive is not a filesystem. Author uses initramfs, which is based on tmpfs. Linux can extract cpio to tmpfs. An archive of files and directories is in itself not a program. Just because something looks similar doesn't mean it's equivalent. Binary programs are executed on the CPU, so if there's an interpreter involed it's hiding in the hardwar…

> An archive of files and directories is in itself not a program. Okay, but you can make the same argument to say that ELF files aren't programs in and of themselves either. In fact, some ELF files are dynamic libraries without an entrypoint, and therefore not actually executable in any meaningful way unless connected to yet another program. If you can accept that some ELF files are executables and some aren't, then…

ELF files are an image format which is a format to store things in basically..image being a legacy term.

an elf file is not executable, but depending on what you do, a linker and loader might cause the operating system to execute some or all of its contents at some point.

Re: Linux is an interpreter

#54
post #45

Earlier quoted context omitted.

> An archive of files and directories is in itself not a program. Okay, but you can make the same argument to say that ELF files aren't programs in and of themselves either. In fact, some ELF files are dynamic libraries without an entrypoint, and therefore not actually executable in any meaningful way unless connected to yet another program. If you can accept that some ELF files are executables and some aren't, then…

By that logic, everything is executable. Not entirely wrong, but mostly because of vulnerabilities. Not because of a highly contrived way of using a file format to run a program. You could do the same thing with json or xml.

i agree, its linkers and loaders which parse a file and extract meaning, which might be executed by yet another program that runs in kernel and creates a 'user space' part to run the untrusted code in.

its not as simple as executable file, blap now it runs. they made it like that on the surface so people dont need to bother with the details.

a lot in this article, writes about the abstractions and maybe how they work. not really sure as you i found it hard to read. It doesnt mean its all wrong though, maybe theres more ways to look at a system which has layered abstractions. Each layer can be a different view and be discussed independently in its design.

if you look at what the CPU and kernel code is doing its a messy afair :D hard to talk about (fun tho :D and imho good to understand as you pointed out)

Re: Linux is an interpreter

#55
post #34
post #22

This article was painful to read because of all the misconceptions. A cpio archive is not a filesystem. Author uses initramfs, which is based on tmpfs. Linux can extract cpio to tmpfs. An archive of files and directories is in itself not a program. Just because something looks similar doesn't mean it's equivalent. Binary programs are executed on the CPU, so if there's an interpreter involed it's hiding in the hardwar…

Binary programs are executed on the CPU but the program file is an archive with sections, and only one of them is the program, usually, while the others are all metadata. The CPU isn't capable of understanding the program file at all. Linux has to establish the conditions under which the program runs, that means at a minimum establishing the address space in which the program counter lies then jumping to that address…

not too bad explain, though the 'usually' might be clarified that an ELF file 'can have sections marked as executable' (tho ofc i get not wanting to get into segment flags :p) and also a program is cobbeled together potentially from many of these ELF files. in most cases the single file is useless. (most cases as in binaries provided by a standard linux distro, now 'producible binaries')

Re: Linux is an interpreter

#56
post #26

Earlier quoted context omitted.

At least it isn't AI slop!

I dunno, sure seems like "AI research" at least.

might be, i wouldnt be sure but i would encourage author to dive a lil deeper based on some comments in the thread. Theres obviously lots to explore. Anything that goes into this topic is likely to make omissions, have some ,wrong viewing angle' or such things.

its not a phd paper so thats fine!

Re: Linux is an interpreter

#57

Isn't every OS an interpreter for machine code with kernel privileges?

OS is an interface that allowes to uses system resources. it is usually a collection of software and interfaces that do this these days because system resources are complex especially to use securely. the cpu interprets machine code.. the OS might tell the CPU what to execute (might, depend on design).

Re: Linux is an interpreter

#59
post #18

Earlier quoted context omitted.

I think the sense of the word professional here is not as a boolean professional/amateur, but the sense of professionalism, the characteristic of taking business seriously, not letting personal matters intervene, and in this case, investing into tools. To put an example, suppose you hire a painter, and they show up with non-work attire, no ladder, no brush, they ask you to buy a can of paint for them and a brush. Com…

Nope. There's no broader debate. "Professional" means "X is getting paid for this", not "X is paying something in order for X to be able to do this". It's that simple. > To put an example, suppose you hire a painter, and they show up with non-work attire, no ladder, no brush, they ask you to buy a can of paint for them and a brush. Compared to a contractor that bills you flat and brins their own ladder, has work clot…

https://www.merriam-webster.com/dictionary/professional

adj sense 1c

>characterized by or conforming to the technical or ethical standards of a profession

>"did a competent, professional job"

>exhibiting a courteous, conscientious, and generally businesslike manner in the workplace professional behavior/attire

>"I thought the whole meeting was going to fall apart but you rescued it like a true professional!"

As you can see there's more than 1 sense for the word, I didn't just make it up, it's a well established use of the word.

The definition you refer to is the 2nd sense:

>a: participating for gain or livelihood in an activity or field of endeavor often engaged in by amateurs

> "a professional golfer/poker player"

>"Few think of Idaho as fertile ground for developing professional baseball players."

>b: having a particular profession as a permanent career

>"a professional soldier"

>c: engaged in by persons receiving financial return

> "plays professional football/sports/poker"

Post reply on HN