Slashdot Mirror


Native Windows PE File Loading on OS X?

ozmanjusri writes "Coders working on Wine for Mac have found that the Mac loader has gained its own undocumented ability to load and understand Windows Portable Executable (PE) files. They found PE loading capabilities in Leopard that weren't there in Tiger. Further dissection showed that Apple is masking references to 'Win' and 'PE' in the dll, which means it's not an accidental inclusion. Is Apple planning native PE execution within OS X?"

60 of 397 comments (clear)

  1. noooo FP by Anonymous Coward · · Score: 5, Insightful

    please not - i don't need every windows malware able to run on my mac...

    1. Re:noooo FP by onefriedrice · · Score: 5, Interesting

      > please not - i don't need every windows malware able to run on my mac...

      Except windows malware is just that: malware written for Windows. While it could potentially run, malware wouldn't automatically become a problem. You'd have a much easier time accidently running OS X malware than Windows malware. Think of it as WINE for OS X (which is apparently exactly what it is or will be except Jaguar can load the binaries itself). People running Windows binaries via WINE on Linux don't experience the same problems with malware because the expected security flaws in the underlying OS and/or applications aren't there.

      In short, if Apple plans to implement a built-in WINE-like ability to run some Windows binaries in OS X, there is no reason to suspect it will cause a breeding ground for Windows malware. Malware only has the opportunity to run if it can somehow get installed.

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    2. Re:noooo FP by 99BottlesOfBeerInMyF · · Score: 5, Informative

      The trouble is they have NIH and so won't just work with the wine project.

      Apple? NIH?!? Umm, the BSD subsystem, Webkit from KDE, OpenStep from Next, BeOS bits recreated, MAC from TrustedBSD, PDF as the basis for their display from Adobe, dtrace from Solaris, Apache, CalDav from Oracle... I could go on.

      Apple might avoid the WINE codebase, but only because they have rights to much of an older version of the Windows API directly from having won a lawsuit against MS quite a while ago when MS stole their code. I don't think Apple would otherwise have a problem supporting WINE and I would not be surprised if Apple employees have submitted code to WINE or one of the offshoot projects. I think, however, they're probably content with the current ease of running Windows apps, inconvenient enough that not many mainstream developers can ignore OS X, but easy enough so that businesses are not put off and people are not afraid of trying OS X as their primary OS. I would not be surprised, actually, if this feature was added at the request of Parallels, whose latest RC supports making Windows apps the default for opening filetypes in OS X (which will launch the VM and open the file in the specified application.

    3. Re:noooo FP by ozmanjusri · · Score: 3, Interesting
      Apple might avoid the WINE codebase, but only because they have rights to much of an older version of the Windows API directly from having won a lawsuit against MS quite a while ago when MS stole their code.

      Apple might even license Win32 code from Microsoft.

      There's writing on a lot of walls for Microsoft.
      The EU legal settlement will eventually, despite the bitter fighting, force them to open their APIs to anyone.
      They're facing an onslaught of low-end Linux machines like Asus Eee PC and the Walmart $199 box. So far, their response has been to lower the price of Windows below $40 for Eee PC owners. That's going to be hard to sustain when other buyers balk at paying three times Asus' price.
      Vista won't drive any new sales, and looks losing anyone who was waiting for a sign from above.
      Essentially, all MS has left to sell on the OS front is compatibility with the enormous back-catalogue of Windows applications.

      Being able to sell Win32/FX as an API pack to other OS vendors might be a way out for MS. The future of computing looks like hypervisors and VMs anyway. Most tech savvy people already run Windows in a VM on their preferred OS (or vice versa) already.

      Selling a portable API would just be going with the flow.

      --
      "I've got more toys than Teruhisa Kitahara."
    4. Re:noooo FP by noewun · · Score: 2, Interesting

      Webkit from KDE

      Webkit isn't "from KDE". Apple started with KHTML and went from there, but saying "WebKit from KDE" sounds like they just copied it, which isn't at all true.

      PDF as the basis for their display from Adob

      Quartz and its related technologies aren't based on PDF: they're original Apple technologies from the ground up. Some of Quartz correlates pretty closely to PDF, but they are not at all the same tech.

      Just being pedantic. . .

      --
      I am a believer of momentum and curves.
  2. Not for Win32 compatibility by SigILL · · Score: 5, Interesting

    I don't think this is intended for Win32 compatibility. Apple has every reason not to do that, because it will mean there will be no more native versions of high-profile applications such as Photoshop. Adobe is probably already pissed off there won't be a 64-bit version of Carbon, which requires them to rewrite the entire UI of Photoshop in Cocoa to be able to release a 64-bit version of it. Giving them an easy way out by offering Win32 binary-level compatibility isn't in Apple's best interest there.

    However, consider that the PE file format is also used by Microsoft's Common Language Runtime (CLR/.NET). Therefore, I think this is a preparatory move to start offering a native implementation of the .NET platform for OS X.

    --
    Error: password can't contain reverse spelling of ancient Chinese emperor
    1. Re:Not for Win32 compatibility by cnettel · · Score: 3, Insightful

      UI includes showing the actual images. Sending them over IPC is certainly not wise from a performance standpoint.

    2. Re:Not for Win32 compatibility by Anonymous Coward · · Score: 2, Insightful

      Umm...one of Apple's biggest selling points for the Mac if you go into any store that sells one is that it can "still run all of your Windows stuff." They've changed architectures over to Intel-based PC's.

      You have any special insight that would suggest why they _wouldn't_ want to be as compatible with Windows as possible, being that they're trying hard to convince people to switch? Why they wouldn't want a PC that can already run all of the Windows software on the shelves, without the painful experience of having to use Vista (which they reference more and more often in their commercials)? I think not.

    3. Re:Not for Win32 compatibility by SigILL · · Score: 2, Insightful

      You have any special insight that would suggest why they _wouldn't_ want to be as compatible with Windows as possible, being that they're trying hard to convince people to switch?

      Because if they did, customers could choose between machines that sorta run Windows applications (Macs) or machines that run Windows applications properly (PCs). As Wine proves, any reimplementation of the Win32 API is inevitably not going to be as good as the real thing.

      Providing compatibility with Windows through VMWare or Parallels is a lot better in that respect. And if a virtual machine should fail, so what? It would only make Microsoft or the virtual machine maker look bad, not Apple.

      Besides, as I said in my original post: I think the moment Apple starts offering integrated Win32 binary-level compatibility is the moment software vendors stop offering Mac-native applications. And that's the point where Apple might as well start bundling the current version of Windows with their systems.
      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    4. Re:Not for Win32 compatibility by Anonymous Coward · · Score: 3, Informative

      Dude, most X servers running on Linux, Solaris, *BSD and a host of other modern UNIX systems make liberal use of IPC, in the form of the MIT-SHM shared memory extension:

      The basic capability provided is that of shared memory XImages. This is essentially a version of the ximage interface where the actual image data is stored in a shared memory segment, and thus need not be moved through the Xlib interprocess communication channel. For large images, use of this facility can result in some real performance increases.

      Additionally, some implementations provide shared memory pixmaps. These are 2 dimensional arrays of pixels in a format specified by the X server, where the image data is stored in the shared memory segment. Through use of shared memory pixmaps, it is possible to change the contents of these pixmaps without using any Xlib routines at all.


      This extension goes back nearly two decades. Yes, 20 years! Lower-end computers 20 years ago were able to use UNIX IPC, for high-performance graphics, in a very usable manner. There's no reason why a computer from today, especially a high-end Mac, couldn't effectively use shared memory in such a fashion. This is especially true on Mac OS X, which does offer the UNIX-like functionality that is required. Combined with the brilliant minds at Adobe (they hire a large number of the top Indian graduates each year), there's no reason why they couldn't get Photoshop working using such technology.

    5. Re:Not for Win32 compatibility by Marcos+Eliziario · · Score: 5, Funny

      "As Wine proves, any reimplementation of the Win32 API is inevitably not going to be as good as the real thing."

      Yeah, most of my pet spywares fail to run correctly under wine.

      --
      Your ad could be here!
    6. Re:Not for Win32 compatibility by jcr · · Score: 4, Insightful

      one of Apple's biggest selling points for the Mac if you go into any store that sells one is that it can "still run all of your Windows stuff."

      No. The big selling points are what you can do with the Mac OS. Boot camp is more in the vein of removing a common barrier to a sale.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    7. Re:Not for Win32 compatibility by SigILL · · Score: 5, Informative

      Not likely. Apple's not about to sign up to support a Microsoft API on OS X.

      You realise it's an open standard, do you? Hell, it's even ISO approved.

      Apple would gain a _lot_ by providing support for .NET, without losing much.
      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    8. Re:Not for Win32 compatibility by abigor · · Score: 2, Insightful

      I'd personally love it if Apple replaced its aging Cocoa/Objective-C/XCode infrastructure with something more modern like .NET or Java, but I don't think it's going to happen anytime soon. Well, Apple has cut loose the Java bindings to Cocoa, so I guess you're right.

      I've only dabbled with Cocoa in order to learn Objective-C, but the whole thing seems super elegant, and Objective-C itself is SO much nicer to work with than Java - it's like C combined with Python (very dynamic). The class hierarchy is clean and not particularly deep. I don't know, I personally think moving to, say, Java for infrastructure would be a step backwards (and I say this as someone whose current contracts are all big Java projects). But that's just my opinion.
    9. Re:Not for Win32 compatibility by sjf · · Score: 2, Insightful

      If I had mod points, you'd get them. This is a good point. There are a lot of .NET programmers out there, and anything to encourage coding for a platform has to be a good thing.

      On the otherhand, I doubt this is the full story. I'd bet on "you can run your windows apps without running windows" before I'd bet on, ".NET programmers wanted, no Mac experience necessary."

    10. Re:Not for Win32 compatibility by jcr · · Score: 5, Insightful

      Mind telling me what the difference is between a selling point and removing a barrier to sale, exactly?

      A selling point is a reason why a product is superior to another product. A barrier to sale is a reason why a customer might be bound to stay with a different product.

      You don't buy a Mac because it can run a windows app, since the cheap shit from Dell will do that, too. You buy the Mac for the things that it offers over and above what the Dell box can do.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    11. Re:Not for Win32 compatibility by Space+cowboy · · Score: 5, Informative

      I'd personally hate it if they gave up the beautiful elegance that is ObjC and forced Apple developers to move to Java or .NET.

      I've said it before, and I'll say it again now: Objective C is exactly at the sweet spot for a computer language - it has all the power of C (it's a formal superset), the nice features of a true object-orientated language (OOP, garbage collection, protocols, etc.), adds in dynamic dispatch (thus removing the need for generics), and does it all by adding about a dozen commands to the C language. The only thing against it is the unfamiliar (to C/C++ programmers) syntax. Really, though, how hard is it to make the mental leap to [myObject insertObject:xxx atPosition:yyy] from myObject->insertObjectAtPosition(xxx,yyy) ? And which is the more readable ?

      Plus, the class library is *very* well designed. It makes easy things easy, and hard things possible. A lot of hard things are pretty easy too... There's a site that often compares .NET and ObjC/Cocoa. It frequently (despite the obvious potential bias given the name of the site) argues that the ObjC method for doing something is better thought out, more elegant, or simply more capable than the corresponding .NET approach.

      Objective C is a classic example of how a simple clear approach can reap huge rewards in terms of usability and flexibility. It's not the over-designed bloat-fest that is C++ (template metaprogramming ? Really ?), and it's not the raw pedal-to-the-metal-hear-the-engine-scream-in-protest of plain old C. I've never yet met anyone give it a fair try (ie: write a real program in it) and not end up loving the language.

      Simon

      --
      Physicists get Hadrons!
    12. Re:Not for Win32 compatibility by SigILL · · Score: 4, Interesting

      Can you quantify this supposed gain?

      Sure I can... a little.

      Right now, the world's colleges and universities are churning out Java & C# programmers. Those are the popular languages, the ones for which you can almost literally open up a can of programmers for.

      Not so with Objective C. It's even starting to get problematic to find competent C++ programmers.

      Microsoft's seen the proverbial storm coming, and has been working on an alternative for their aging and clunky Win32 API. Remember a few years back, when the Redmontians announced that Vista (then called Longhorn) would only support .NET programs natively? Back then the world evidently wasn't ready for it. But it's slowly becoming ready, because it's getting harder and harder to find competent C++ programmers.

      Meanwhile, Apple is tied to Objective C. A language few people are willing to learn (remember "Objectionable C"?). For very valid technical reasons, Apple is slowly moving its developer base over from C/C++-written Carbon apps to Cocoa apps written in Objective C. However, this makes it even harder for software vendors to find competent developers for their Mac OS X offerings.

      So, enter .NET. It's reasonably fast (getting faster), it has plenty of mindshare, and most importantly: there isn't much in the way of a legacy code base for it. Supporting .NET doesn't mean hurting your own APIs, its simply an additional one.

      Is that enough of a quantification for you?
      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    13. Re:Not for Win32 compatibility by turgid · · Score: 2, Interesting

      So why to the EULA's of MS's own apps forbid you from running them on non-MS operating systems?

    14. Re:Not for Win32 compatibility by iJed · · Score: 4, Interesting

      However, consider that the PE file format is also used by Microsoft's Common Language Runtime (CLR/.NET). Therefore, I think this is a preparatory move to start offering a native implementation of the .NET platform for OS X.

      I was just about to post this myself... It makes a lot of sense for Apple to support .NET on Mac OS X. For a start C# is now the flagship language for Windows development and not supporting it may be the difference between getting hundreds of ported apps and not getting them at all. As a Mac user and .NET developer I think it would be a big mistake for Apple to ignore .NET.

      I wonder if this is how the sandboxed iPhone SDK, which is to be available in February, will be implemented

    15. Re:Not for Win32 compatibility by setagllib · · Score: 3, Interesting

      With SystemV shared memory (shmem) it's trivial, and that's a decades-old feature of Real Unixes. What, doesn't OSX support it?

      Even so, of course Photoshop should be rewritten for the new framework. After all, when a proprietary technology corporation decides to screw over their third-party developers and customers, isn't it the American Way to bear all the costs and keep paying them money?

      --
      Sam ty sig.
    16. Re:Not for Win32 compatibility by EveLibertine · · Score: 4, Interesting

      bullhonky. Apple _was_ a hardware company. Since they started selling x86 pc's, the only way to distinguish them from any other pc out there is with their software. They are a software company when it comes down to it.

    17. Re:Not for Win32 compatibility by Ahruman · · Score: 2, Interesting

      Dunno, but it does support Mach ports, which support transferring pages between processes without copying and would be a sensible way to implement this sort of thing. However, moving all the back-end work of an existing app with plug-ins that require UI would be at least as big a change as switching to Cocoa. They could have done it for 10.4, but didn't. I doubt they'll do it now either.

    18. Re:Not for Win32 compatibility by SigILL · · Score: 3, Insightful

      Nope. Do you even know what "quantification" means?

      Not right now, no. But it's half past twelve here. In the morning. And I'm writing posts in a language that's not my mother tongue. I'm actually amazed my posts are halfway coherent and readable.

      But to get back on the subject, you probably want to see hard numbers regarding this. Well, there aren't any. Developing a platform has always and will always depend on guesses. That's because we're dealing with people here, who have those nasty undefinable things called "preferences". We can only guess what's going to work out, and what isn't.

      And right now, .NET looks like a pretty good bet.
      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    19. Re:Not for Win32 compatibility by Durandal64 · · Score: 4, Insightful

      Right now, the world's colleges and universities are churning out Java & C# programmers. Those are the popular languages, the ones for which you can almost literally open up a can of programmers for.
      Having the "dime a dozen" crowd develop for your platform isn't without its drawbacks. I hear a lot of comments from Windows converts saying that the Mac indy developer scene is smaller than Windows, but the software is almost always of much higher quality and polish. When you make it easy to develop for your platform, you attract lots of developers (good), but the signal-to-noise ratio drops significantly (bad).

      Microsoft's seen the proverbial storm coming, and has been working on an alternative for their aging and clunky Win32 API. Remember a few years back, when the Redmontians announced that Vista (then called Longhorn) would only support .NET programs natively? Back then the world evidently wasn't ready for it. But it's slowly becoming ready, because it's getting harder and harder to find competent C++ programmers.
      Based on what I've heard from Windows developers, Microsoft needed a good Win32 replacement because Win32 sucked. I've seen some Win32 code; it's not pretty, and the way the UI code connects to what's happening on the screen is a complete mystery to me. When I learned Cocoa and Objective-C, the connections were intuitive and obvious.

      Meanwhile, Apple is tied to Objective C. A language few people are willing to learn (remember "Objectionable C"?).
      I'm sure that'll change in February of 2008. Then lots of people will probably be interested in learning Objective-C.

      So, enter .NET. It's reasonably fast (getting faster), it has plenty of mindshare, and most importantly: there isn't much in the way of a legacy code base for it. Supporting .NET doesn't mean hurting your own APIs, its simply an additional one.
      Apple tried that kind of thing before with the Java/Cocoa bridge. It's now been deprecated because it was a pain in the ass to maintain, and no one was using it. A .Net bridge would require that Apple map all the .Net standard classes to their own. They might be able to do toll-free bridging to underlying CoreFoundation types (like dictionaries, strings, etc ...), but I don't know if C# supports the kind of dynamic typing that makes it possible through the C/Objective-C combination. I suspect it does. But it'd still be a lot of work.

      Instead, Apple is offering Python and Ruby Objective-C bridges, and that makes a lot more sense. They've got bridging support for arbitrary scripting languages into the Objective-C runtime, enabling web developers to write native Mac OS X applications using native APIs. Whatever Apple does with respect to additional language support in the future, you can bet Objective-C will be a part of it. The language allows for a lot of dynamism and flexibility, and on top of that, it's a strict C superset, which means that there are no special wrappers required to call down to the POSIX layer. So it's just easy to bridge other languages with it.

      At the end of the day, Objective-C just doesn't get the credit it deserves. It's a very well thought-out language with lots of power. Most people just don't see it because they think Objective-C is Apple's "proprietary" language or some such nonsense.
    20. Re:Not for Win32 compatibility by coolGuyZak · · Score: 2, Insightful

      Really, though, how hard is it to make the mental leap to [myObject insertObject:xxx atPosition:yyy] from myObject->insertObjectAtPosition(xxx,yyy) ? And which is the more readable ?

      As far as a layman is concerned, the former is more readable, but less understandable. I expect most formally educated programmers (meaning college) to prefer the latter. Why? A few reasons:

      • Most institutions teach java, C#, or C++ in their core curriculum. Programmers simply know the syntax better.
      • The programming paradigms of the language are different. In C, you access a method of an object. In Objective-C you send a message to a foreign object. The latter is confusing, given the background of a majority of programmers.
      • The syntax for a function is derived from math (e.g. f(x)), which (AFAIK) most 'programming' curricula have a solid backing in.
      • It's easier to follow the C-style *syntax*. '->' appears like an arrow; it implies direction, unlike the Objective-C messaging syntax.*

      It's not perfect, though. I'd appreciate a few idioms from Objective-C to be "ported" to C#, particularly aspects of RTTI and message passing (functions, delegates, and events in C# are irritating). IMHO, it's far more elegant the Obj-C way.

      I agree with your sentiment that Cocoa development is superior to .Net. My theory of why .Net sucks a nut, comparatively, is as follows:

      • Apple considers the POV of third parties more heavily than MS. It also appears that Apple drinks from its own trough more than MS.
      • It is clear in Apple's documentation and design how they developed something--Apple discusses design patterns, object relationships, and, on occasion, history, in their docs. Meanwhile, MS reinvents the wheel using proprietary, confusing terminology while offering contrived examples that don't express the power of their tech.
      • The more I look at .Net, the more I think that Microsoft sicked their Win32 dev team on the problem. (Consider, for example, events versus callback functions. Compare with Objective C messaging.)

      I still prefer C# and .Net, as sick as that may sound. My background is heavily Java and C# based, which makes the Objective C environment is too clunky for me to like (The @'s, #'s, and XCode-IB code integration are painful). Apple tries to alleviate this by providing (admittedly, great) tools to manage that business, but it always comes off as applying gauze to a gaping chest wound.

      btw, thanks for the link :)

      --
      * Quite frankly, I think both suck. I'd like a strange frankenstein syntax. "myObject <- [message_name arg1: xxx arg2: yyy];" It's more clear than either of the other two, IMHO. Until then, I'll take C-style. As a further aside, I dislike 'dot syntax' wholesale.

    21. Re:Not for Win32 compatibility by duffbeer703 · · Score: 4, Insightful

      Q: Where do I go to buy OS X for my commodity PC?
      A: I don't.

      Mac OS, iTunes, the iTunes Music store, etc exist for one purpose: to sell Macs, iPhones, iPods, etc. The software simply isn't where the company makes the money. The old regime almost bankrupted Apple by switching to a Microsoft-like software licensing model... so I doubt that Apple would go back to that.

      --
      Conformity is the jailer of freedom and enemy of growth. -JFK
    22. Re:Not for Win32 compatibility by TheRaven64 · · Score: 2, Informative

      it's like C combined with Python Ugh, you make it sound hideous. Objective-C is C combined with Smalltalk. It's not quite as elegant as C combined with Self would be, but it's quite close. The Smalltalk philosophy is very different from Python. Python piles a load of badly thought-out crap into the language and makes something that's a third rate OO language, a second rate procedural language and a fourth rate functional language. Smalltalk aims to make the language almost as small as possible an implements everything at the library level.

      Objective-C is not quite as elegant as Smalltalk. In Smalltalk flow control structures (while loops, and so on) are part of the language and so you can add new ones as first class citizens. If you don't know Smalltalk, then you really should try it; you can't claim to understand object oriented programming until you understand Smalltalk.

      --
      I am TheRaven on Soylent News
    23. Re:Not for Win32 compatibility by The+One+and+Only · · Score: 5, Insightful

      Apple isn't a hardware company or a software company. They're a systems company. They sell a complete system that they put together. The hardware might have an Intel CPU, an nVidia graphics card or a Marvell WiFi controller, and the software might have a Mach kernel, a KDE-derived web browser, or a GNU compiler, but you don't have to invent your own kitchen sink or air conditioner to build a great house, either.

      --
      In Repressive Burma, it's not just your connection that dies. slashdot.org/comments.pl?sid=314547&cid=20819199
    24. Re:Not for Win32 compatibility by Attila+Dimedici · · Score: 2, Interesting

      right now, .NET looks like a pretty good bet.

      I'm sure that jumping on the Windows NT bandwagon looked like a good bet to Tandem, DEC, and SGI.

      -jcr No, it was their only bet. It was obvious by then that all of their other choices were losers. The Windows NT bandwagon was the only chance they had left, it didn't work either.
      --
      The truth is that all men having power ought to be mistrusted. James Madison
    25. Re:Not for Win32 compatibility by noewun · · Score: 3, Interesting

      Adobe is probably already pissed off there won't be a 64-bit version of Carbon, which requires them to rewrite the entire UI of Photoshop in Cocoa to be able to release a 64-bit version of it.

      Adobe is pissed because it can't figure out how to squeeze more money out of a saturated market. Even though the design/print/pre-press market is large, it's finite and it's not growing much. Adobe has already sold everyone who wants or needs one a copy of Photoshop, and so they've been forced into release-constant-upgrades cycle to try and generate more revenue. So, I think Adobe's pissed they can't dump the print and pre-press market altogether and just move full scale into Flash, PDF and whatever other web technologies they can think of. And I think they're doubly pissed that, last I checked their annual report, about half the revenue from their print/design/pre-press sales come from the Apple world. So, instead of dumping that business, or spinning it off, they have to expend the time, money and effort to support two platforms. Adobe isn't pissed because of anything Apple's done. Adobe's pissed they can't dump their "legacy" apps and follow whatever will make them the most short-term profit, overall corporate health be damned.

      Adobe hasn't been the same since Warnock and Company sold out and the bean counters took over. They're now a marketing company which happens to release some software from time to time. Their days as a company which produced technology which got you excited are long over.

      --
      I am a believer of momentum and curves.
    26. Re:Not for Win32 compatibility by Bert64 · · Score: 3, Insightful

      Apple sell complete systems...
      A bundle of hardware and software designed to work properly together. That's a big selling point, no hassle with drivers, no hardware conflicts etc.
      Windows could never provide the same level of integration unless microsoft start producing hardware against (remember the jazz platform?) and linux could but would really need the hardware maker to roll their own distro.

      The only other place you get good integration between hardware and software, is at the high end.. Think z/OS, Solaris/Sparc, AIX etc

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    27. Re:Not for Win32 compatibility by yabos · · Score: 2, Informative

      AFAIK, at WWDC 06 developers were told Carbon would have full 64 bit compatibility. This year at WWDC Apple said "nope, we changed our minds.". This is why many developers are mad. But, I'm with you still. It's been fairly obvious that Apple doesn't want to put more effort into Carbon than they have to and that it'll be losing support sooner rather than later.

    28. Re:Not for Win32 compatibility by denmarkw00t · · Score: 2, Funny

      "As Wine proves, any reimplementation of the Win32 API is inevitably not going to be as good as the real thing."
      Let's see, in Wine I have trouble with performance, compatibility and software just working the way its supposed to - sounds like it works a little better than Windows.
    29. Re:Not for Win32 compatibility by coolGuyZak · · Score: 4, Interesting

      You fail to differentiate between .Net and C#. By and large, I criticize the former. I can see where you might get the wrong idea, though, so I'll elaborate.

      The .Net framework suggests that the prototype for an event is as follows: "ret_type event( Object sender, EventArgs_subclass e )". Compare with a "typical" windows callback mechanism: "ret_type function( HWND hParam, WPARAM wParam, LPARAM lParam )". Suspiciously similar, neh? HWND corresponds to "Object sender", and the W- and L- PARAM objects are wrapped into EventArgs.

      EventArgs and its sub-classes encapsulate all of the data given to a particular handler, much like W- and L- params, which changed meanings depending on call context. Some EventArgs subclasses also perform odd tasks, for instance the CancelEventArgs.Cancel property. This is the downright stupidest OOP implementation I've ever seen. Cancel is not data, it's an action. I don't want to specify the "cancelness" of the data, I want to cancel an operation. A better design would be to send a message back to the sending object that says, "I can't validate this." Unfortunately, because .Net event handlers use the ambiguous "object handle." I'd need a cast before I could send my response.

      The complexity of implementing a cancel message is likely greater than CancelEventArgs, but the solution is far more intuitive. We don't even need to go as far as sending a message, though. Provide a real type to the sender argument (for instance, ICancelableControl, or just Control), and provide a Cancel method, and I'd be happy.

      Performance is a shoddy argument for the lack of a message passing system, because .Net treats the event system as a messaging network anyway. AFAIAC, use events, but add more formality to the event system. Call your EventArgs what they are -- a message--and type the sending object appropriately. Finally, differentiate functioanlly between events and multicast delegates. Events should manage their subscription list; if an object subscribing to an event is garbage collected, fail silently. If the event lacks subscribers, then succeed.

      And now for something completely different.

      Everyone knows MSDN is a steaming pile of crap. What's worse, Microsoft seems to be doing very little to correct that image. IMHO, this is a mistake. As a developer, my first exposure to .Net is through MSDN--fundamentally, it's marketing for techies. It should be thorough, describing how components interact, typical real-world use cases for code, the history or motivation of a particular interface, etc. MSDN should serve the same function as an O'Reilly book--set a mood and mindset for development.

      MS can spend as much money developing the perfect language as they want, but without the proper supporting tools--and don't get me started on the woes of VS--their efforts piss people off. This is precisely the motivation for the GGP's note that Objective-C developers are so "happy" and my "bullshit" post.

  3. maybe OSX already have wine by jim.hansson · · Score: 3, Interesting

    wine is LGPL so apple maybe already is using wine.

    --
    preview button, my computer does't have any preview button
    1. Re: maybe OSX already have wine by Dolda2000 · · Score: 2, Informative

      I think you've probably misunderstood something. The LPGL doesn't mean that Apple would be free to hide its presence or source code or anything of the kind. It just means that it is allowed to link Wine into proprietary programs. They would still need to both inform the world that they have included Wine, and to provide its source code and a way to rebuild both Wine itself and any programs that would be linked statically against Wine. This is in contrast with the GPL only in the way that proprietary programs are not even allowed to link against GPL'ed code.

  4. Hmm... by FlyByPC · · Score: 3, Funny

    A recent article was talking about how much less reliable Leopard seems to be than Tiger.

    Now we find out that Leopard has some Windows compatibility. Maybe they're just making it bug-for-bug compatible?

    How long until we hear Apple take up the "it's-not-a-bug-it's-a-feature" line?

    --
    Paleotechnologist and connoisseur of pretty shiny things.
  5. Re:Watch out microsoft by g0at · · Score: 5, Funny

    Interesting. One of the major downsides to using OSX is that there isn't as much software available for it. If OSX were able to run windows executables natively (think Microsoft Office and games) that would be a major coup for Apple. Plus you wouldn't need to sit around hoping that WINE decides to support that application. Eh? Did you copy/paste this from a discussion five years ago?

    -b

  6. Most likely there for EFI by dpokorny · · Score: 5, Informative

    The most probable reason for Apple to have partial support for the PE executable format is EFI. Both the firmware itself and all of the drivers embedded within it use the PE object format.

    If they want to natively host EFI development and not use Windows to do it, then some level PE support is required.

    Just take a look at /System/Library/CoreServices/boot.efi -- it has the same "This program cannot be run in DOS mode." at the beginning of the executable like every other PE executable.

    1. Re:Most likely there for EFI by poopie · · Score: 2, Interesting

      That's my bet too. EFI on IA64 runs Windows PE binaries (for IA64). EFI on X64 (which hasn't been implemented by many hardware manufacturers btw) runs Windows PE binaries.

      I, for one, griped at Intel about EFI the first time we tried to do any useful automation on Itanium with it -- EFI is glorified DOS, except without any of the useful tools available for DOS. Intel would have been miles ahead if the would have made a linux BIOS/preboot environment instead.

  7. Loading PE is not a big deal by apankrat · · Score: 5, Insightful

    The actual problem is resolving all external dependencies of Windows-bound binaries. If the Win32 API is somehow emulated (see Wine project for some "minor" details), this leaves (an ungodly mess of) COM interfaces. Then even if this is taken care of, Apple is going to be quite exposed to a legal beating from MS.

    Lastly, "Is Apple planning native PE execution within OSX?" - if they were _planning_ that, they wouldn't include this into a production release of the OS. This means that it's already used for something. The big question is what exactly.

    --
    3.243F6A8885A308D313
    1. Re:Loading PE is not a big deal by NTiOzymandias · · Score: 2, Interesting

      Lastly, "Is Apple planning native PE execution within OSX?" - if they were _planning_ that, they wouldn't include this into a production release of the OS. This means that it's already used for something.
      That, or they implemented the support in such a way that conditional compilation (using #ifdefs) was significantly more complicated and bug-prone than just leaving it in and not documenting it. If you've ever written a C program that had to behave differently on different platforms, you've doubtlessly run into this issue once or twice.
    2. Re:Loading PE is not a big deal by jim3e8 · · Score: 2, Insightful

      Lastly, "Is Apple planning native PE execution within OSX?" - if they were _planning_ that, they wouldn't include this into a production release of the OS. This means that it's already used for something.

      It's common to include "unused" code and undocumented interfaces in an OS, especially if they are benign.

      For example, Quartz 2D Extreme (QuartzGL) has been available since 10.4 was released, and it's still disabled, and enabling it is not officially supported as it may cause stability issues. Yet they did not simply compile it out, but left it in as an undocumented option.

  8. Re:On what fantasy planet do you live on? by colourmyeyes · · Score: 3, Funny

    Try not to say the same thing twice in your subject, because that's redundant, which means you're saying the same thing twice and being redundant.

    --
    My grandmother used anecdotal evidence all the time, and she lived to be 120 years old.
  9. isn't as much software available? by JonTurner · · Score: 2, Funny

    One of the major downsides to using OSX is that there isn't as much software available for it.
    Quite true. I've not seen an OSX virus, trojan or spyware in years.
  10. Re:Win32 on OS X -- goodness by Anonymous Coward · · Score: 5, Insightful

    That is not true. Anyone remember when IBM did this with OS/2? It killed the market for OS/2 software, because every developer just wrote for the lowest common denominator (Windows) instead of making "native" OS/2 software. Adding Windows application support in Mac OS X would kill the platform slowly.

  11. Malware's not much of an issue by Myria · · Score: 2, Insightful

    The Mac equivalent of Win32's WriteProcessMemory requires your program to be setgid procmod, so essentially you'd need Administrator access. This probably makes Mac malware considerably more difficult to make than on other platforms. Even Linux lets programs ptrace each other on all by the strictest of SELinux modes. Also, on Linux, a lot more machines have GDB installed, so malware could pipe to it when SELinux does interfere. Few Mac users have GDB installed.

    --
    "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
  12. Unlikely by makomk · · Score: 3, Informative

    This seems unlikely. Self-extracting zips are basically a standard zip file with an extractor .exe stuck on the front. Since the zip header is at the end of the file, there shouldn't be any need to parse the PE format (in fact, I don't think it'd help).

  13. Re:Watch out microsoft by PCM2 · · Score: 2, Interesting

    there have also been plenty of complaints that the OSX version is buggy and doesn't run as well.

    From who? Most of the people I know who have used both say that Mac Office 2004 is better than Office 2003 for Windows (and they think that makes no sense and they don't get what the hell is wrong with Microsoft).

    --
    Breakfast served all day!
  14. PE Loading on x86 is easy,,, by Jeff_at_RAD · · Score: 4, Interesting

    Our game middleware products load PE format binaries on GNU/Linux and MacOS. It's like 200 lines of code to load and fix up a DLL - not difficult at all.

    The two wins are that we have one binary on all x86 platforms (which usually means testing on one platform is sufficient) and that the MS compiler generates faster binaries. The downside is that when you *do* have to debug on the non-native platforms, you must resort to printf-style debugging.

    You also have to replace the default MS crt, because they make a lot of Win32 calls that you don't want to have to emulate. We just have a tiny OS layer for memory, file IO, threading, audio, and video that is native (about 30 functions).

  15. Re:Something to ponder by cduffy · · Score: 2, Interesting

    if Microsoft included support for running OSX binaries, people would be crying "Anti-competition!" faster than it would take to load up Notepad.
    Why would anyone cry that? If Microsoft started doing that folks would mostly be too busy being shocked, because it would primarily benefit Apple: Developers could write software natively for OSX using Objective C, Cocoa, and (otherwise) Apple's native toolkit, and be able to still target Microsoft's audience, rather than writing only for the lone larger-audience proprietary platform and leaving Apple's userbase unable to run their software.

    After all, it's not the general consensus that Microsoft's platform is hurting for good software. (I'm pretty unhappy with software availability on Windows, but I'm not exactly your general audience -- and I recognize that; even then, it's not OSX-specific software that I miss when working on win32, but nifty, Freely licensed POSIX-centric toolage like pexpect).
  16. Re:Watch out microsoft by 99BottlesOfBeerInMyF · · Score: 4, Informative

    ...there have also been plenty of complaints that the OSX version is buggy and doesn't run as well.

    Umm, I've mostly heard complaints that the Windows version is buggier actually. There is plenty of software that is badly ported or not available on OS X, but you picked a crappy example. Of course it cuts both ways, since iTunes on Windows is pretty crappy by comparison, and you can't get OmniGraffle at all.

    Plus how many people avoids becoming switchers because you can't run games?

    Some, but not as many as most people on Slashdot probably think. The hardcore gamer market is not as large as it is vocal. The casual gamer has a several year old machine and by the time they own one that can play a given game, most of them (especially outside the hardcore market) are ported to OS X. The top 10 games in a given year account for about half of game sales, and the last time I checked, 8 out of 10 had been ported within a year.

    When did they release a Mac version of Halo? What about Halflife?

    That's where a lot of people are misled. Most gamers could not run Halo on their machine for years, even if the owned a PC. And what most people care about is The Sims. In fact, if you look at the list of top selling games of all time, according to wikipedia you have:

    1. The Sims (16 million shipped) - simultaneous Windows and Mac release
    2. StarCraft (9.5 million) - simultaneous Windows and Mac release
    3. World of Warcraft (9.3 million subscribers) - simultaneous Windows and Mac release
    4. Half-Life (8 million) - Windows release only, no Mac - there are some interesting theories why.
    5. Diablo II (4 million) - simultaneous Windows and Mac release
    6. Myst (6 million) - Mac release before Windows

    Do you see how the average, gamer who is not hardcore would not be too perturbed by the lack of choice?

  17. Running Windows apps natively would make no sense by LKM · · Score: 4, Interesting

    I think Gruber had it right when he said that Apple wants its users to think of Windows as the new Classic, i.e. if Windows apps run inside Mac OS X, they should do so the way Mac OS 9 apps used to run inside OS X: With distinctly different windows, in a separate environment, and a bit glitchy. Users need to be reminded that running Windows apps is not the preferred choice, but merely a last resort.

    The idea is to tell users "Yeah, you can run your Windows apps using Parallels or VMWare if you really have to, but if you can, we'd much rather you ran real Mac applications." Running Windows apps quasi-natively by implementing the APIs would send the wrong message; it would put Windows apps on the same or a similar level as Mac apps. That's a bad thing: The Mac relies on Mac-only or "better on Macs" applications; the high quality of software is one of the Mac's selling point. If developers could write Windows apps and they would run on Macs just fine, hey, why not write Windows apps and have five or ten times the market at no additional cost?

    Of course, I'd personally love to see something like this; Office for Macs is about to lose support for Macros, so I'll probably have to run Office in Parallels, soon. Come to think of it... Maybe that's Apple's way of fixing Microsoft's Macro Mistake? Maybe the idea is to let Windows Office run natively on Macs?

    Anyway, Apple's actions have been extremely hard to predict recently, so I'm not ruling out anything. Maybe they are indeed going to give the Windows APIs the Carbon treatment...

  18. Re:Something to ponder by ChunderDownunder · · Score: 2, Informative

    Developers could write software natively for OSX using Objective C, Cocoa, and (otherwise) Apple's native toolkit, and be able to still target Microsoft's audience, rather than writing only for the lone larger-audience proprietary platform and leaving Apple's userbase unable to run their software. Back to the future! NeXT did exactly that in a previous life, after their hardware business dried up, as OPENSTEP.

    Any software Apple produces for Windows will probably be using this win-cocoa layer, particularly as carbon and any legacy carbon support they might have had in Windows is defunct. For everyone else there's GNUstep

  19. Re:Offtopic; Slashdot's fucked up RSS feeds by Hal_Porter · · Score: 3, Informative

    You can't read articles on censorship through the RSS feed. It's one of those clever meta jokes by the editors.

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  20. It's not quite NIH by SanityInAnarchy · · Score: 2, Insightful

    Disclaimer: I didn't even read grandparent, and your post seems reasonable enough.

    What I find frustrating about Apple is their need to so tightly control every bit of code they borrow. Look how long it's taken for Webkit to go back into Konqueror... and don't even get me started on BSD/Darwin, whose policy seems to be "Open whenever we feel like it."

    Thus, I suspect that, were Apple to include Wine, they'd fork it, improve it quite a lot (though largely in ways that can't easily be integrated back into Wine), assuming they didn't just fork Crossover, Cedega, or the newest version of Wine that's not LGPL'd. I don't know who to blame for this situation, actually -- it seems like Apple is not playing nice with others, yet with all the code there (well, most of the time), it seems like the projects which got forked could be re-integrating a lot of Apple improvements a lot faster.

    --
    Don't thank God, thank a doctor!
    1. Re:It's not quite NIH by 99BottlesOfBeerInMyF · · Score: 3, Insightful

      What I find frustrating about Apple is their need to so tightly control every bit of code they borrow.

      Partly I think this is because Apple relies upon secrecy in order to be competitive against MS's offerings so they don't like people looking at their codebase for future releases, unlike most OSS projects. They tend to wait until they have a project completely and ready to go before they let anyone outside Apple know it exists, which often means they've reworked code for a year and the original projects has a massive load of work dumped upon them at once.

      Look how long it's taken for Webkit to go back into Konqueror...

      That is actually a good example, although a bit clouded by all the nonsense people posted about it, when they had no idea what they're talking about. For some fairly obvious for business reasons Apple could not have let slip to MS they were working on their own browser, lest MS retaliate by canceling IE before it is ready, or introducing a lock-in into IE in some way. When Apple did release the code, they did not well document the evolution of their version. Someone commented on this in a forum and suddenly all sorts of people were claiming Apple was screwing over the Konquerer team, or intentionally obfuscating things, or violating the spirit of the license. Of course at that point, no one had asked anyone at Apple for a better breakdown and when someone did, the guys working at Apple went out of their way to help make things easier for them to re-integrate into KHTML. Mind you, because the Konquerer team was not happy with some of the design decisions Apple had made, they delayed implementing most of them. They had been used to being the only ones contributing and were not used to dealing with major contributions from other coders. Lately, they've come around with Apple and several other making regular contributions (something the Konquerer guys consider the best thing to come out of Apple's adoption) and they're moving to merging the WebKit and KHTML branches back together since Apple's contributions are more useful than the inconvenience caused by Apple's architectural decisions. The delay in getting Apple's changes incorporated, however, can't really be blamed on Apple, more than a few days, for the most part it was a conscious decision by the Konquerer developers.

      ...and don't even get me started on BSD/Darwin, whose policy seems to be "Open whenever we feel like it."

      Credit where credit is due, the BSD license does not require Apple to release their changes at all, so doing so on a delayed timetable is still a lot better than most vendors.

      Thus, I suspect that, were Apple to include Wine, they'd fork it, improve it quite a lot (though largely in ways that can't easily be integrated back into Wine), assuming they didn't just fork Crossover, Cedega, or the newest version of Wine that's not LGPL'd.

      I doubt it. Why do you suppose Apple publishes the Darwin source or any of the other low-level technologies they code (ZeroConf, LaunchD, etc.). They publish them because they actually see the business case for sharing the work with other companies and gaining wider adoption of said technologies. Windows API re-implementations fit in that same category. If possible, Apple would try to share the load with other players. Realistically, I think they would be prevented from using WINE because of their license to MS's code nor do I think they have a lot interest in such a project.

  21. Re:Win32 on OS X -- goodness by jcr · · Score: 2, Insightful

    You've got it. Jumping on a microsoft bandwagon is a very bad business decision, as any company who signed up for "plays for sure" now knows.

    -jcr

    --
    The only title of honor that a tyrant can grant is "Enemy of the State."
  22. Not at all Microsoft-like by GPS+Pilot · · Score: 2, Insightful

    The old regime almost bankrupted Apple by switching to a Microsoft-like software licensing model

    No, the experiment with Mac clones was not at all Microsoft-like. Microsoft makes money every time Dell ships a PC with Windows installed, and Apple lost money every time Power Computing shipped a clone with Mac OS 8 installed.

    The reason is pretty simple. Apple should have priced OS licenses such that it wouldn't matter to its bottom line whether the hardware had been made by Apple or a cloner. The price of an OS license was initially set too low, perhaps out of optimism about the extent to which Apple's hardware sales would be cannibalized. When sales turned out to be cannibalized quite a bit, instead of adjusting to the circumstances, Apple simply killed the cloning program :(

    --
    That that is is that that that that is not is not.