7 ms·
In case you weren't aware Wine is not an emulator, it is a compatibility layer. The whole point of wine is to take a native Windows app, only compiled for Wind
by WarChortle 4y ago
In case you weren't aware Wine is not an emulator, it is a compatibility layer.
The whole point of wine is to take a native Windows app, only compiled for Windows and translate its Windows calls to Linux calls.
- Wowfunhappy 4y ago> In case you weren't aware Wine is not an emulator, it is a compatibility layer. Ehhh. I know it’s in the name, but I feel like the significance is debatable. It’s not a CPU emulator, true. It is emulating calls, which is emulation of a sort.
- udp 4y agoIt’s a reimplementation of the APIs rather than an emulation. Same as how Linux reimplemented UNIX APIs, but it’s not a UNIX emulator.
- messe 4y agoThat's still emulating the underlying API, and accepted usage of the word. Much like the FreeBSD linux emulator translates linux syscalls into FreeBSD ones.
- Spivak 4y agoIs any compatibility shim an emulator?
- entropicdrifter 4y agoThis is all really just a philosophical question as to how you choose to use the word. It's the same as people who get in a twist over every game with procedural generation and permadeath being called a "Roguelike" even though that particular subgenre used to be more specific to turn-based RPGs with procedural generation, permadeath and total loss of all progress between runs. People who came into using the term earlier tend to think of it more narrowly, but colloquial use of the term has drifted to mean something more generic, e.g. "emulation" used to mean "making one piece of hardware pretend to be another", but now can sometimes just mean, "when one thing acts like another at all".
- Wowfunhappy 4y agoIn this case, however, the term "to emulate" predates microprocessors, so it clearly can't have ever referred exclusively to ISA translation! "Emulator" might be a more recent term—it would be interesting to see the etymology, actually—but it's reasonable to conclude that anything which "emulates" must be an "emulator". (Also, OP didn't actually use the word "emulator".) Edit: Nope, the word "emulator" dates back to at least the 1800s (although it has certainly grown in usage more recently): https://books.google.com/ngrams/graph?content=emulator&year_start=1800&year_end=2019&corpus=26&smoothing=3&direct_url=t1%3B%2Cemulator%3B%2Cc0#t1%3B%2Cemulator%3B%2Cc0 https://books.google.com/ngrams/graph?content=emulator&year_...
- entropicdrifter 4y agoHuh, what happened in 1984/85 that made "emulator" so much more popular a term than before? Aha! It was Apple's Macintosh release, which included an Apple II emulator built-in: https://books.google.com/books?id=Ti8EAAAAMBAJ&pg=PA13&lpg=PA13&dq=%22ii+in+a+mac%22+emulator&source=bl&ots=KZZfp6Xuwl&sig=AisRDIfiQ4S3lkcUyfahfVnt-Pc&hl=en&ei=RzgUTOnFJ4SClAfl_eWIDA&sa=X&oi=book_result&ct=result#v=onepage&q=%22ii%20in%20a%20mac%22%20emulator&f=false https://books.google.com/books?id=Ti8EAAAAMBAJ&pg=PA13&lpg=P...
- Wowfunhappy 4y agoI don't think it could have been just that? Usage peaked in 1984, but it rose quite steadily starting in the early 70s. I do assume most of the increase in usage was related to computers/software, however. The timing is right.
- extropy 4y agoBy that logic any modern windows is an emulator of win32, since that is not a kernel API but a user space library "emulating" it. Exactly the same way as wine. Wine does not translate the calls, it for most part actually implements the underlying logic. Win32 is just a bunch of shared libraries: https://en.wikipedia.org/wiki/Microsoft_Windows_library_files#KERNEL32.DLL https://en.wikipedia.org/wiki/Microsoft_Windows_library_file...
- deleted 4y ago[deleted]
- messe 4y agoYou're exactly right, and the Wine project agrees. > That said, Wine can be thought of as a Windows emulator in much the same way that Windows Vista can be thought of as a Windows XP emulator: both allow you to run the same applications by translating system calls in much the same way. Setting Wine to mimic Windows XP is not much different from setting Vista to launch an application in XP compatibility mode. > [...] > "Wine is not just an emulator" is more accurate. Thinking of Wine as just an emulator is really forgetting about the other things it is. Wine's "emulator" is really just a binary loader that allows Windows applications to interface with the Wine API replacement.
- littlestymaar 4y agoSaying wine is an emulator is as wrong as saying docker (on linux) is a virual machine, even though you could say it allows you to run a “virtual environment” in the same hand-wavy way you're using the word “emulating” in your sentence.
- messe 4y agoHow is it hand-wavy? > emulate (transitive verb) > To imitate the function of (another system), as by modifications to hardware or software that allow the imitating system to accept the same data, execute the same programs, and achieve the same results as the imitated system. It's the exact same way its used by FreeBSD for its linux compatibility layer. It's the same way that Wine even uses in their FAQ. > That said, Wine can be thought of as a Windows emulator in much the same way that Windows Vista can be thought of as a Windows XP emulator: both allow you to run the same applications by translating system calls in much the same way. Setting Wine to mimic Windows XP is not much different from setting Vista to launch an application in XP compatibility mode. > [...] > "Wine is not just an emulator" is more accurate. Thinking of Wine as just an emulator is really forgetting about the other things it is. Wine's "emulator" is really just a binary loader that allows Windows applications to interface with the Wine API replacement.
- littlestymaar 4y agoThe problem with this definition is that it's so broad it encompasses many many things that are never talked about as “emulators”. By this definition, Docker is an emulator, a VM is an emulator, an x86_64 CPU is an emulator (because it “emulates“, in the broadest sense, x86), a C compiler is an emulator (“emulating” the PDP-11 on modern hardware), etc. Even your own quote reveals the issue: > > That said, Wine can be thought of as a Windows emulator in much the same way that Windows Vista can be thought of as a Windows XP emulator Yet nobody talks about the latest Windows as being an emulator for older windows … In short, this definition is akin to defining humans as “bipeds without feather”, we definitely fit this definition but it's way too broad to be useful.
- xeromal 4y agoI think most people interpret emulation as CPU emulation, not a compatibility layer otherwise .NET core is probably just one fat emulator.
- deelowe 4y agoI hate to break to to those people, but that approach to emulation is only used for very old systems. Once you get into 32 bit, it’s mostly HLE.
- lenkite 4y agoBy that definition, wouldn't the whole of POSIX simply be an "emulation layer" ;-)
- kmeisthax 4y agoUsually when you say "emulator" people think there's an inherent performance hit because of a fetch-decode-execute interpreter loop somewhere. Reimplementations of things don't have that performance hit even though they are lumped under the same umbrella as actual interpreters and recompilers. Related note: if WINE is an emulator why isn't Linux or GNU? They both reimplement parts of UNIX, which was even more proprietary than Windows is today.
- btdmaster 4y agoUNIX source code, at least for the original versions, was released in 2002: https://slashdot.org/story/02/01/24/0146248/caldera-releases-original-unices-under-bsd-license https://slashdot.org/story/02/01/24/0146248/caldera-releases...
- Wowfunhappy 4y ago> If WINE is an emulator why isn't Linux or GNU? I mean, it depends on the context. I don't think it would be wrong to say that Linux "emulates a UNIX environment" or some such, which is closer to what OP actually wrote about Wine. You've probably used a "terminal emulator" at some point today. ;)
- nmz 4y agoIt does have a terminal emulator, but you can also drop to a tty.
- shadowgovt 4y agoNowadays it's emulators all the way down. On most of these architectures the software eventually executes as x86 machine code, and the distance between x86 machine code and the actual processes inside a modern CPU implementing the x86 code set is so vast you can call a modern CPU an "x86 emulator built in hardware."
- broodbucket 4y agoEntirely accurate. Also makes it easier to have a firmware/microcode update that gives you a new instruction.
- messe 4y agoOne might say it emulates windows library and system calls.
- tmccrary55 4y agoMuch like one could say it internets Windows userland and system calls with Linux and its userland.
- messe 4y agoNo, not at all like that. One slight difference is that what you said is complete nonsense. I'm using an accepted definition of emulation: > emulate (transitive verb) > To imitate the function of (another system), as by modifications to hardware or software that allow the imitating system to accept the same data, execute the same programs, and achieve the same results as the imitated system. This usage is pretty common, for example FreeBSD has a linux emulation layer that takes Linux syscalls and translates them into FreeBSD syscalls. WINE saying it stands for "Wine Is Not an Emulator" is irrelevant to the fact that it is blatantly is one.
- tmccrary55 4y agoYes, nonsense was the point. Congrats.
- rascul 4y agoOr they might say that it translates windows library and system calls.
- hot_gril 4y agoSame way a CPU emulator translates instructions.
- deelowe 4y agoA lot of high level emulation works this way as well. And, similarly, FPGA cores often aren't "simulating game hardware" either.
- DiggyJohnson 4y agoSurely you see that this is a slight semantic distinction, unless you consider Wine apps to be Linux native?
- randyrand 4y agoIt is not a "Windows Emulator", but it is certainly a "Windows Userspace Emulator" Dolphin can run Wii binaries on top of Linux, by emulating a Wii. Wine can run Windows binaries on top of Linux, by emulating Windows Userspace. Why would one be an emulator, and the other is not? Is there some distinction in what an emulator is that goes against common sense? This reminds of the Transpiler/Compiler "debate." They're both still compilers. They're both emulators (VMs & Compatability Layers). What the creators meant to say, IMO, is WINVM, "Wine is not a Virtual Machine".
- extropy 4y agoWine is more like a re-implementation of windows Userland using a different kernel (and graphics libraries). Since the hardware is all the same, there is nothing to emulate or compile. Or from the other direction - windows NT contains a re-implementation of the win16 API. Is that an emulator?
- hot_gril 4y agoThe creators also would not call virtual machines emulators because they don't translate CPU instructions, which is their narrow criteria for "emulator" that nobody else seems to use.
- littlestymaar 4y ago> is their narrow criteria for "emulator" that nobody else seems to use. Except the people actually writing or talking about real “emulators”. You know, for things like NES or Gameboy on x86, x86 on WASM, etc. Sure, you can argue that VMs or Wine are emulators in the broadest sense, but then I could argue that your CPU is an emulator too since it doesn't really runs ASM, and with that very loose meaning almost anything computers related is an emulator. And in practice that's never what people mean when we're talking about an emulator. (Even this thread started with the wrong postulate that WINE must have incurred a performance penalty because the commented believed it was an emulator).
- hot_gril 4y ago
- hot_gril 4y agoBy any well-known definition of an emulator, like https://en.wikipedia.org/wiki/Emulator https://en.wikipedia.org/wiki/Emulator, Wine is an emulator. It's emulating a Windows system to Windows programs. It's not emulating hardware is all. That WINE acronym, other than being a slightly annoying way to correct people, is wrong. Reminds me of Jimmy Neutron smartly calling table salt "sodium chloride" when really he's less correct than the layman he's talking to, since there are additives. WINE should simply stand for WINdows Emulator.
- dwaite 4y agoAccording to the Wikipedia link given, emulation is for host and target computer systems. In a computing context, 'emulate' is not a synonym for 'impersonate' - it describes an approach for a goal. Wine does not aim to emulate a "Windows computer system" (aka a machine which booted into Windows). For instance, it doesn't allow one to run windows device drivers. WINE is taking an approach that ultimately means it is doing a subset of what is possible with full emulation (hopefully in return going much faster). To put it another way, a mobile phone app with a HP49 interface that understands RPN is not necessarily a calculator emulator. It could just be an app that draws a calculator interface and understands RPN and some drawing commands. It doesn't necessarily have the capability to run firmwares or user binaries written for the Saturn processor.
- tzs 4y agoThe people who wrote Wine thought it was an emulator. Their first idea for a name was "winemu" but they didn't like that, then thought to shorten it to "wine". The "Wine is not an emulator" suggestion was first made in 1993, not because Wine is not an emulator but because there was concern that "Windows Emulator" might run into trademark problems. Eventually that was accepted as an alternative meaning to the name. The Wine FAQ up until late 1997 said "The word Wine stands for one of two things: WINdows Emulator, or Wine Is Not an Emulator. Both are right. Use whichever one you like best". The release notes called it an emulator up through release 981108: "The is release 981108 of Wine, the MS Windows emulator". The next release changed that to "This is release 981211 of Wine, free implementation of Windows on Unix". As far as I've been able to tell, there were two reasons they stopped saying it was an emulator. First, there were two ways you could use it. You could use it the original way, as a Windows emulator on Unix to run Windows binaries. But if you had the source to a Windows program you could you could compile that source on Unix and link with libraries from Wine. That would give you a real native Unix binary. In essence this was using Wine as Unix app framework. Second most people who would be likely to use Wine had probably only ever encountered emulators before that were emulating hardware. For example there was Virtual PC from Connectix for Mac, which came out in 1997, and there were emulators on Linux for various old 8-bit systems such as NES and Apple II. Those emulators were doing CPU emulation and that was not fast in those days. It really only worked acceptably well if you were emulating hardware that had been a couple of orders of magnitude slower than your current computer. Continuing to say that Wine is an emulator would likely cause many people to think it must be slow too and so skip it.