On Mon, May 22, 2017 at 5:32 AM, bartc <b...@freeuk.com> wrote: > On 21/05/2017 16:21, Chris Angelico wrote: >> >> On Mon, May 22, 2017 at 12:58 AM, bartc <b...@freeuk.com> wrote: >>> >>> On 21/05/2017 12:06, Chris Angelico wrote: > > >>> Explain why ALL these drivers, including the one I've just created, need >>> to >>> be part of the common source code for the OS. >> >> >> I don't know. YOU are the one who said the source code should be in a >> single file. > > > No, it was you challenged me to produce a one-file kernel source code.
Yes, because you claimed that non-trivial projects could follow your model of making a single source file that can then be compiled as-is. It seems that you ended up arguing in favour of splitting the file out and compiling only the parts you need, right? > What I wanted was a more streamlined, more compact, more portable, less > troublesome way of distributing self-contained applications. I wasn't > suggesting bundling the source to an entire OS with it! If the OS kernel can be considered an application (and in GNU Hurd, I believe it can), then there should be no reason for your claims to stop short of it. Unless they don't actually hold up for anything more than a trivial toy project. > I don't consider the CPython bundle that portable because it really demands > that it be built under Linux. There is (now) a grudging concession for > Windows, but that solution wasn't satisfactory when I tried it. Oh? Demands to be built under Linux? Where do you get that from? With the exception of some controller boards and such, Python is generally built on the target system, so the Mac builds are built on Macs, the Windows builds are built on Windows, the OS/2 builds are built on OS/2, and the snozberry builds taste like they were built on snozberries. > My links show extreme versions of what is possible. For much simple > applications, but they will still comprise 1% of the number of files that > would otherwise be required if I simply made available my sprawling working > setup like everyone else. > > (With Linux kernels, I don't know enough about them to provide realistic > answers. But 60,000 files seems a lot, for the same reason that 100,000 > files for a C compiler [gcc] seems a lot considering that some are MUCH > smaller. But then, both these projects are dwarfed by the apparent 1.5 > *million* files of the VS sources.) The thing is, that "sprawling working setup" is actually a well-designed system where each file has a purpose. (At least in theory. You might find some places where that's not actually happening, but it's always the intention.) If you were to lump everything into a fraction the number of files, you'd end up needing to divide sections in those files to help organize them. And that's what directories and files are for. We've had linkers since roughly the dawn of compilers, and they're not just to let people "sprawl". They're there to let people organize. Why are you so afraid of multiple source files? ChrisA -- https://mail.python.org/mailman/listinfo/python-list