On 18/05/2017 01:19, Steve D'Aprano wrote:
On Thu, 18 May 2017 07:47 am, Ian Kelly wrote:
Because, as has already been stated, there's no way to make such a simple
process cross-platform.
Please understand that Bart's understanding of cross-platform and the Python
community's understanding of cross-platform are different.
Bart's understanding of cross-platform is:
"I have a Windows box, or maybe two of them, and a Linux VM, and so long as
my code will compile and run a few simple scripts on each of them with no
obvious bugs, I'm going to assume we're done!"
The Python community's understanding is:
"We have to support literally tens of thousands of different combinations
and permutations of hardware, operating system version, variations in how
the OS and user's environment are configured, and variations in C compilers
and how they are configured; we have to support hundreds of different
flavours of Linux alone, plus FreeBSD, OpenBSD, NetBSD, and other Unixes,
plus multiple versions of Windows and MacOS, and possibly a few others; we
have to support machines with different floating point capabilities, and as
much as possible abstract those differences away so that they're not
visible to the end user; and importantly, we want to halt the build process
with a comprehensible[1] error message if some essential feature is lacking
on your platform."
I've been looking at the CPython sources, and it shows.
When I first started using Python in version 1.5, among the many Unixes
supported were:
- VAX;
- VMS;
- Sun OS/Solaris (technically a Unix);
- HP UX (also technically a Unix);
- Windows 95/98;
- Windows NT;
- Windows CE;
- OS/2;
- classic Mac OS ("system 6", I think, or possibly 7).
My memory is a little fuzzy on the following, so don't quote me, but I think
the following were also officially supported:
- IBM AS/400 ("System i" or "iSeries");
- BeOS;
- MS DOS;
- Z/OS (OS 390);
- Acorn RISC;
You seem surprised. A portable C application should run anywhere there
is a C compiler.
So tell us Bart, what do you think are the chances that your Q compiler will
*just work* with no modifications at all if somebody tried to build it on
an IBM AS/400, or under BeOS?
Maybe somebody can try it:
https://github.com/bartg/langs/blob/master/qlang/qcc64.c
https://github.com/bartg/langs/blob/master/qlang/pcc64.c
The first is a compiler, the second an interpreter. They need to be
built for a system with 64-bit pointers (as these aren't original
sources but intermediate code targetted at 64-bit C).
>Or for something a little more current, how
> about Android?
If Android has a terminal window, then why not?
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list