|
|
Subscribe / Log in / New account

Python discusses deprecations

Python discusses deprecations

Posted Dec 9, 2021 3:08 UTC (Thu) by NYKevin (subscriber, #129325)
In reply to: Python discusses deprecations by dvdeug
Parent article: Python discusses deprecations

Does 16-bit code run on x86_64 (say) Debian? Because I would be pretty surprised if that were the case...


to post comments

Python discusses deprecations

Posted Dec 9, 2021 8:31 UTC (Thu) by eru (subscriber, #2753) [Link] (13 responses)

>Does 16-bit code run on x86_64 (say) Debian? Because I would be pretty surprised if that were the case...

If it is a MS-DOS program, there are several ways to make that happen: DOSEMU, DOSBOX, VirtualBox, probably also QEMU could be made to load MS-DOS (the last one I have not tried myself). Years ago, I made hacks for running MS-DOS based cross compilers transparently on 64-bit Windows and Linux, these were needed for maintaining very old products, and could not be replaced.

Python discusses deprecations

Posted Dec 9, 2021 13:01 UTC (Thu) by Wol (subscriber, #4433) [Link]

I believe that old IBM mainframe code for S360 (or even earlier) may well still be in production use on the latest zXXX mainframes.

That was one of IBM's selling points - every upgrade came with a VM for running earlier code - and that VM would run an earlier VM - turtles all the way down.

So your S360 code would be running on an S360 emulator, which would be running on an S370 emulator, which would be running ... on a z800 emulator which would be running on z9000 hardware.

It would be nice if we had something as reliable for x86 ... given the way hardware speed has increased, chances are your program is still running faster on top of the stack of emulators, than it would have done on the original hardware.

Cheers,
Wol

Python discusses deprecations

Posted Dec 9, 2021 18:16 UTC (Thu) by nybble41 (subscriber, #55106) [Link] (9 responses)

For running 16-bit GUI apps under 64-bit Windows there is otvdm/winevdm[0]. This is based on the APIs reverse-engineered for Wine so compatibility isn't quite 100%, but it gets most of the way there. Presumably Microsoft could have shipped something similar based on their own 16-bit Windows implementation for near-complete compatibility but chose not to.

[0] http://www.columbia.edu/~em36/otvdm.html

Python discusses deprecations

Posted Dec 9, 2021 18:23 UTC (Thu) by Wol (subscriber, #4433) [Link] (3 responses)

The really annoying thing, so I've heard, is that the apps are almost always 32-bit. It's just that you can't install them because it's the installer that's 16-bit.

Cheers,
Wol

Python discusses deprecations

Posted Dec 9, 2021 18:45 UTC (Thu) by NYKevin (subscriber, #129325) [Link] (2 responses)

Microsoft actually ported at least some of those installers to 32-bit specifically to solve that problem: https://devblogs.microsoft.com/oldnewthing/20131031-00/?p...

Python discusses deprecations

Posted Dec 9, 2021 19:15 UTC (Thu) by Wol (subscriber, #4433) [Link] (1 responses)

Interesting. So if your software of interest used InstallShield or whatever, then MS will install it for you. Hmm...

So why am I still running XP so I can carry on playing MS Age Of Empires :-) (although I haven't tried to install it on a later Windows recently, so it might work now ...)

Cheers,
Wol

Python discusses deprecations

Posted Jan 3, 2022 10:53 UTC (Mon) by cpitrat (subscriber, #116459) [Link]

Especially when AoE (both 1 and 2) runs perfectly fine on wine.

Python discusses deprecations

Posted Dec 11, 2021 4:46 UTC (Sat) by bartoc (guest, #124262) [Link] (4 responses)

This appears to use a CPU emulator to actually execute the code, and at that point you almost may as well just install 16-bit windows in dosbox (those old versions of windows are available for free I think). WoW32 (and WoW16, on 32bit windows) actually execute the code directly on the processor, but once in long mode I don't think it's possible to use virtual 80386 mode anymore, so WoW16 no longer works on 64-bit windows. It may be possible to run 16-bit protected mode apps on a kernel in long mode, I'm not sure why windows can't do that.

By the time 64-bit windows came out I think straight emulation was sufficient to run 16-bit apps, and that's a much simpler approach as far as the kernel and userland are concerned.

Python discusses deprecations

Posted Dec 11, 2021 15:49 UTC (Sat) by nix (subscriber, #2304) [Link] (1 responses)

> It may be possible to run 16-bit protected mode apps on a kernel in long mode, I'm not sure why windows can't do that.

The processor is capable of it (what doesn't work is real mode, "unreal" mode (i.e. real mode with nonstandard selectors), and v8086 mode). But it does take more work to implement this, mostly due to having to mess about with LDTs some more in ways you don't have to do if all you support is 32-bit protected mode programs. I can entirely believe that MS didn't want to do that.

Python discusses deprecations

Posted Dec 14, 2021 0:04 UTC (Tue) by khim (subscriber, #9252) [Link]

That's the most likely reason. Note that even pure 32-bit programs which use NtSetLdtEntries wouldn't work on Windows x64 whileas sys_modify_ldt works just fine on x86-64 Linux kernel.

Python discusses deprecations

Posted Dec 13, 2021 3:42 UTC (Mon) by nybble41 (subscriber, #55106) [Link] (1 responses)

> you almost may as well just install 16-bit windows in dosbox

I've tried it both ways, and I would say that it's easier to work with 16-bit apps running "rootless" via otvdm (even if the CPU is emulated) than inside a DOSBox frame running Windows 3.11. I never was able to get the emulated mouse working reliably, for example, though that probably had something to do with the fact that DOSBox was running on a remote system accessed via Remote Desktop, so it was turning relative mouse events into absolute "tablet" events and then back to mouse events. In any case, while the app did run in DOSBox it was basically unusable for my purpose. With otvdm all the inputs worked normally, the window size wasn't limited, and I could easily access files on both local and mapped network drives (albeit with truncated names).

Any modern 64-bit CPU should be fully capable of emulating the 16-bit environment the app was originally designed for at better than native speed, even without hardware support, so that isn't much of a handicap.

Python discusses deprecations

Posted Dec 13, 2021 6:01 UTC (Mon) by raven667 (subscriber, #5198) [Link]

Funny enough I recently saw that someone made a new mouse driver for Win3.x supporting the VMWare-Tools mechanism for injecting mouse events, bypassing the emulated PS/2 support and resolving some of the issues with relative vs absolute "tablet" positioning when running in a VM.

https://github.com/NattyNarwhal/vmwmouse

Python discusses deprecations

Posted Dec 9, 2021 18:43 UTC (Thu) by NYKevin (subscriber, #129325) [Link] (1 responses)

Most if not all of those tools also work on Windows, so I don't see how Windows's lack of 16-bit support is materially worse than Debian's.

Python discusses deprecations

Posted Dec 13, 2021 13:06 UTC (Mon) by eru (subscriber, #2753) [Link]

I don't think anyone said it is. In my hacks, I used DOSBOX for the Windows version of the "compiler wrappers". One advantage of it is that it comes with its own MS-DOS emulation, no need to install a copy of MS-DOS or FreeDOS. Unfortunately I had to work around some bugs in it. Another problem is that DOSBOX is a GUI program, but I just wanted the outputs of the compiler to appear on stdout at the end, so the console window popping up for each compiler run was a nuisance, and hard to get rid off. Finally found a way to immediately move it somewhere off-screen before it opened.

Python discusses deprecations

Posted Dec 9, 2021 19:48 UTC (Thu) by dvdeug (guest, #10998) [Link] (4 responses)

Linux has been more focused on source-code compatibility than binary compatibility, and has never natively run on 16-bit systems. IBM System/360 computers were sold between 1965 and 1978, and the code written for those systems still runs on the IBM z15 system released in 2019.

More to the point, so what? The fact is that a working program in use stopped working, frustrating the user, and forcing them to find a replacement. Why does whether Debian does the same thing matter?

Python discusses deprecations

Posted Dec 9, 2021 23:02 UTC (Thu) by NYKevin (subscriber, #129325) [Link] (2 responses)

> Linux has been more focused on source-code compatibility than binary compatibility,

The average user does not know how to operate a compiler, so from their perspective, source compatibility is entirely worthless.

> More to the point, so what? The fact is that a working program in use stopped working, frustrating the user, and forcing them to find a replacement. Why does whether Debian does the same thing matter?

So what to your so what. The user wanted to keep using the same software indefinitely, but maintaining existing software (fixing security vulnerabilities, supporting new hardware, etc.) is expensive. Somebody has to pay for that work, and right now, it would seem that nobody is willing to do so, including the user in question. So why should I care if their software stopped working abruptly? More bluntly, what's in it for me?

Python discusses deprecations

Posted Dec 10, 2021 3:32 UTC (Fri) by dvdeug (guest, #10998) [Link] (1 responses)

> The average user does not know how to operate a compiler, so from their perspective, source compatibility is entirely worthless.

Which is a reason the average user doesn't use Linux. In any case, it's not entirely worthless; learning "./configure; make; make install" isn't that hard, and it makes it much easier to find someone who can make the program work.

> So why should I care if their software stopped working abruptly? More bluntly, what's in it for me?

So much for even dreams of "the year of Linux on the desktop". So much for dreams of free software taking over. Such an attitude will even drive away geek users; there's at least one user commenting on this article pointing out this is why they're using Go instead of Python, and comments on this thread have said that Python 2 was ANSI C and thus should still compile; surely the fact that ANSI C was stable and universal was part of the reason Python 2 was written in it.

At a more values-based level, this feels like digital vandalism. Instead of making a world where things work and someone can use a tool until something better comes along, it's making a world where planned obsolescence is built in, where code has to be rewritten regularly, not because it wasn't good, but because people decided to make some arbitrary changes, where everyone has to learn everything anew on a regular basis.

Python discusses deprecations

Posted Dec 10, 2021 4:35 UTC (Fri) by NYKevin (subscriber, #129325) [Link]

> So much for even dreams of "the year of Linux on the desktop". So much for dreams of free software taking over.

That's capitalism.

> Such an attitude will even drive away geek users; there's at least one user commenting on this article pointing out this is why they're using Go instead of Python,

Exactly. Vote with your wallet. Don't complain about X failing to meet your needs when you could just use Y instead of X.

> comments on this thread have said that Python 2 was ANSI C and thus should still compile; surely the fact that ANSI C was stable and universal was part of the reason Python 2 was written in it.

Sounds to me like Guido was already practicing this even back then.

> At a more values-based level, this feels like digital vandalism.

Nothing has been destroyed, at least on the FOSS side of things. All of the code still exists, is still publicly accessible, and can still be used, if you can only get it to run. Characterizing that as "vandalism" is ridiculous. If you can't get the code to run, that's your problem. This is the social contract on which all FOSS code has been founded ever since the FSF stuck a "THERE IS NO WARRANTY" disclaimer on the GPL.

> where code has to be rewritten regularly, not because it wasn't good, but because people decided to make some arbitrary changes, where everyone has to learn everything anew on a regular basis.

Unfortunately, we live in a society. If those changes were completely worthless, they would hopefully not be made. In most cases, they at least accomplish *something,* even if you personally think that thing is not worthwhile. You're always free to fork and revert, if you really think it's bad enough.

Python discusses deprecations

Posted Dec 15, 2021 18:03 UTC (Wed) by anton (subscriber, #25547) [Link]

Linux has been more focused on source-code compatibility than binary compatibility
It seems to me that Linux (the kernel) focusses on binary compatibility for the most part. Given that it does not include a compiler, there is no way for it to provide source-code compatibility.

That said, the Linux developers committed digital vandalism on a.out binaries on the switch to Linux-5.1, based on the excuse that core dumping of running a.out binaries was broken and nobody volunteered to fix it. Given that many systems (mine included) have a core file size limit of 0, core dumping is not an important functionality, certainly much less important than running a binary. Siegfried Pammer heroically implemented a partial user-space solution for this problem, but it's surprisingly hard to actually do that and the result still does not work as well as the kernel did before Linux-5.1.

Python discusses deprecations

Posted Dec 19, 2021 23:09 UTC (Sun) by plugwash (subscriber, #29694) [Link] (2 responses)

Linux was a 32-bit OS from the start, so 16 bit Linux apps were never a thing (I don't know if there were ever any experimental 16 bit ports of Linux, but I'm pretty confident there was nothing that saw widespread use)

16 bit protected mode code (aka win16) can be run on an x86-64 system without emulation, MS simply couldn't be bothered doing the work to get the "WoW" and "WoW64" compatibility layers to work together. Wine on the other hand *does* support 16 bit code while running on a 64-bit system (though the wine process is 32-bit)

16 bit real mode code (aka DOS) on a 64-bit OS on the other hand does require either emulation or use of the virtualization features.

Python discusses deprecations

Posted Dec 20, 2021 6:00 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

There was ELKS (Embedded Linux Kernel Subset or something) that worked on 8086. It was an interesting project.

Python discusses deprecations

Posted Dec 20, 2021 9:41 UTC (Mon) by geert (subscriber, #98403) [Link]

Looking at the recent activity on https://github.com/jbruchon/elks, there still is ;-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds