Slashdot Mirror


Hacking Quartz

Exposed writes "Meaty interview with Rich Wareham who is known to Linux users for his libdvdnav library which is used by Xine and other linux players. On OS X he created Desktop Manager, the GPL solution for VirtualDesktops on the Mac. Highlights are secret APIs in OS X for VirtualDesktops, who steals GPL source and why beginner programmers are at a disadvantage now."

19 of 298 comments (clear)

  1. Why it wasn't put in already by emo+boy · · Score: 3, Insightful

    I am just curious why OS X didnt' support this out of the box with at least Panther. Is it just me or was this a no-brainer?

    1. Re:Why it wasn't put in already by Ianoo · · Score: 5, Insightful

      Perhaps Apple's HCI team didn't consider it to be "intuitive" or comprehensible/necessary for the average user. After all, the majority of Macs are shipped with high(ish) resolution screens these days, and the Dock and Exposé take care of managing your screen real estate fairly well.

    2. Re:Why it wasn't put in already by ArbitraryConstant · · Score: 4, Insightful

      WHAT? THIS IS EXACTLY WHAT EXPOSE DOES -- SHOW/HIDE EVERYTHING WITH ONE CLICK.

      What you're talking about -- granularly assigning arbitrary windows to a particular desktop set across application


      You say that's what it does... but then you go on to admit it's not what he's trying to do. We can dance around the issue all you want, but what he's saying is that Expose doesn't help him with his workloads. His workloads are what he needs to do. Sure, he's not typical, but that just means Apple's solution doesn't work for him. He exists. Get over it.

      This guy says he needs 11 desktops... that's probably dozens of windows, a lot of them are probably terminal windows, which look almost identical when they're zoomed out enough. Even with a 30" Apple Cinema Display, can you imagine how hard it would be to find the one he wants?

      The Apple way of doing things doesn't scale well past the moderately used desktop system (eg, a significant but limited number of concurrent tasks). The OS can handle it easily, but the interface can't. In cases where you can do more with a Mac, it usually means using 3rd party software like this virtual desktop thing, or falling back on stuff that's available on any UNIX machine.

      That's not a knock against Apple. They have the API for multiple desktops, and I'll bet they don't publish it just so they don't have to maintain the API eternally, and make their unit tests even bigger than they are. They have all the UNIX tools because they know sometimes people will need to fall back on something with no GUI front end. That makes everyone's life a lot easier, including mine.

      Apple gives people enough so they can sort themselves out if the shiny happy GUI isn't good enough. Learn from them.

      --
      I rarely criticize things I don't care about.
  2. Re:Virtual desktops by Kenja · · Score: 3, Insightful

    Apple is of the opinion that two buttons on a mouse is overwhelming. Do you realy expect them to think that we the consuming masses can handle more then one desktop?

    --

    "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
  3. Undocumented API calls by mst76 · · Score: 4, Insightful
    I found this slightly disturbing:
    Sure. OS X has a couple of undocumented API calls 'CGSSetWorkspace' and 'CGSGetWorkspace' which allow you to split the window trees into different desktops and move between them.
    [...]
    Believe me there is a lot in OS X that is undocumented and suggests interesting things.
    While not many people blame Apple for keeping Quartz closed source, many would argue that at least the APIs should be exposed. This gives independent app writers a level playing field when writing apps that might compete with Apple's own offerings.
    1. Re:Undocumented API calls by Otter · · Score: 5, Insightful

      I don't think this is so much a way to stifle competition (competition with what Apple product?) as either 1) those calls are not stable yet or 2) they don't want to encourage use of certain things at the application level.

    2. Re:Undocumented API calls by ebooher · · Score: 4, Insightful

      Well, I couldn't help but whip my thang out here. I also apologize in advance for my patent pending Bullshit Theory of the Day

      Anyway. The API's for Quartz, and what you can do with the UI for the system is documented. Pick up some of the dog books from O'Reilly (Which, while I'm on the subject, where did the dog come from anyway. I mean .... it may not have been exactly public knowledge, but OS X has always been a cat.) Everything you need to know about how to do proper manipulation is there. All black and white.

      The problem enters the equation when developers poke around and find things that Apple didn't mean for them to find. Ergo the undocumented hooks this guy is using. Now, while I will agree there is a bit of coolness about being able to locate something and then add it into your own code so you can just make a simple call and use it like you wrote it yourself, there is a problem with it. A guy in an earlier post complained about it not working with Jaguar. Most likely, it won't work with Tiger either.

      You see, you have to understand that Apple, even though they are a big corporation out to make money off of both you and your grandmother, isn't specifically trying to hide something that you can use to write cool software to get your grandmother to buy a brand new G5. They want you to write something your grandmother will feel compelled to spend $2000 on a brand new Mac to use.

      Here comes the but....

      But the internal developers deep within the bowels of Apple are slaving day and night to make The Next Cool Thing (TM) that everyone will have to have in the newest version of OS X. These features are extremely fluid, sometimes disappearing completely in a simple increment upgrade within the same major version of the Cat. Because those same developers might have tried to create something too cool and have opened a hole somewhere else. They are undocumented because they might be gone tomorrow, or might change how they are called, or might become a butterfly all by the next major revision when they become concrete.

      You see, when they solidify and become concrete, then documents are written, then become published API's with which to write code against. I mean, I don't know about you, but I wouldn't want to write code against an API, documented or not, that I knew wasn't standard yet and would most likely change tomorrow.

      But this is all just the opinion of one old man.

      --
      "Genius may shine aloof and alone, like a star, but goodness is social, and it takes two men and God to make a Brother."
  4. Re:Desktop Manager is Amazing by rjstanford · · Score: 4, Insightful
    I really have to say that Desktop Manager is amazing. It even has eye candy transforms between desktops (such as the sides of a cube representation of things).

    Good ... but not exactly amazing ... from TFA:

    Q:[Y]our app feels faster than any of the competing apps out there by an order of magnitude, even though you arguably throw a hell of a lot more eye candy in there and you've recently made it even faster. Where is this speed coming from?

    A:Apple :). The actual 'switching' is performed by calling the secret API functions above. This is actually implemented in the Window Manager and hence is as fast as if I could delve in there myself and manipulate them 'by hand'. The transitions eye-candy in later releases is actually using Apple's own code.
    Does that mean that it's good code? Absolutely. But not startlingly good code, since most of the heavy lifting was done by the OS itself (Apple uses similar transitions for switching between multiple users, for example - which would lead me to belive that had Apple done this they would have used something visually distinctive for the desktop switch, come to think of it).
    --
    You're special forces then? That's great! I just love your olympics!
  5. Big Brick Walls by ObsessiveMathsFreak · · Score: 4, Insightful

    With the old home computers one could get instant gratification by writing a program which drew a space-ship on the screen in 10 lines of BASIC. Nowadays you'd have to learn COM + Win32 + DirectX just to get a black rectangle.

    Amen.

    It required at least 300+ lines of Visual C++ to get a black screen and almost 150 lines of C++ to get SDL to throw up a black screen.

    What the hell is going on here?!?! I know a lot of things need to be set up, resolution, sound, etc. But most people were happy with the default options they were given on those old computers. They made Elitle out of it for christs sake.

    So how come I can't start a gaming project with a simple

    Setup_SDL(SDL_STANDARD_OPTIONS);

    Is it too much to ask?

    --
    May the Maths Be with you!
  6. I'd like to rephrase that as... by Kjella · · Score: 4, Insightful

    ...the distance between a beginning programmer and what you see commercially available is eons apart, compared with before.

    I programmed my C64 with "state-of-the-art" GFX (320x240x16 color, woot), SFX/music (think PC squeaker-like), most else was limited by memory/CPU constraints. In retrospect maybe my AI and gameplay wasn't quite up to par, but I was very close at least.

    One thing is to get a person started - which is hard enough, true, but it's also takes a lot more before you feel you're doing something that feels "cool". Something you could compare to everything that's out there and in some small, limited way be better than. Because once you've done that, you begin to believe you can do it in every other way as well.

    Kjella

    --
    Live today, because you never know what tomorrow brings
  7. Hacking Quartz and Mach directly? by tyrione · · Score: 3, Insightful

    How is this giving Apple's consumer applications an advantage? What this shows is where Apple has optimized security and performance within the WindowServer and its functionality of Expose in conjunction with the Dock.

    This has nothing to do with Apple utilizing a secret API for all its consumer applications like Final Cut Pro, etc to put it one leg up on the competition.

    This has everything to do with strictly improving the performance of the Operating System and core functionality that all applications may benefit from by the fact they are written for OS X. There isn't a Core Graphics for third parties and a Core Graphics for in-house. Get real folks.

  8. Re:Virtual desktops by nine-times · · Score: 5, Insightful
    ' I don't really understand why Apple doesn't offer them. I've hears several reasons: the dock, expose, tranparent windows, or whatever makes them unnecessary, they're confusing for new users, etc, etc. But none of these addres the fact that Aqua WITH optionally selectable virtual windows (selectable for the "advanced user") is BETTER than WITHOUT. You can make all the same arguments for the presence of Terminal: it's unnecessary and confusing for the majority of users, but I bet few Mac users would want Apple to leave it out.'

    There's a weird Apple mentality at work here. I'm not Apple bashing, it's just that the reasons are ones that most on /. won't really identify with.

    Apple likes to control their product; they don't want the interface very customizable. They'll allow little tweaks, and they'll allow people to make 3rd party products that can do... whatever. But this is the issue from the point of view of Apple: look around at linux desktops. Heck, just find some screenshots online somewhere- they all look different. Both KDE and Gnome are very customizable. Great. But a lot of users are going to find it confusing. Here's an example:

    If I tell you I'm running Linux with a gui, and I want to reboot, can you tell me, without looking over my shoulder, where, spacially, on my interface, I need to go? Even if I tell you "I'm using Gnome" or "I'm using KDE", can you then tell me where the 'Log-out' or 'Reboot' button is? No- because it's very customizable, any button could be anywhere.

    This means that the user's understanding of where things are and how the interface operates is not necessarily portable from one installation of Linux to another, even if you're using the same window manager on the same distribution. So what you need to understand about Apple's design philosophy is this: they don't like that. They want it so, if you're using their software, with no complicated tweaks or 3rd party hacks, everything will look pretty much the same, act pretty much the same, and be in pretty much the same place.

    Virtual desktops would be fine with Apple, if they liked virtual desktops enough to use it with the standard interface, but they don't. It's not that they mind virtual desktops, but Apple doesn't want to add in extra options that will change the interface and confuse many users, unless it's necessary. They'd rather, instead, come up with another interface design feature that, they believe, will be as powerful as virtual desktops, but less confusing to users (like Expose). And if you want virtual desktops, their are 3rd party implimentations available.

    So, there's your difference between the Terminal and Virtual desktops. One is an application (of sorts) than can be run within the current standard Apple interface (Terminal), and the other actually changes the behavior of and the user interaction with the interface.

  9. Re:Difficulties for beginning programmers by Tim+Browse · · Score: 3, Insightful

    I don't buy this "it's much harder these days to start programming" bullshit. It's purely a perceived problem because apps are more complex these days, and there are lots of them. But don't expect to write complex stuff when you start.

    Hell, the first program I 'wrote' on my Commodore PET was something that made a rocket fly up the screen over and over. It was very simple. You could accomplish the same these days on any machine by downloading gcc and writing a C program of frankly a very similar length and nature.

    I don't actually remember my PET or my BBC Micro running ICQ or browsing the web, or doing any of these things that people seem to think they can just pick up a compiler and throw together in a few days.

    Stuff has got more complicated, and people expect more features and UI. But to complain that it's hard to get started is just not true.

    Hell, with the GUI toolkits around now, it's actually way easier to do some of these cool things. Think back to the early days of GUI programming. From my own experience, programming RISC OS GUI apps was horribly complex and difficult to get going with. On the other hand, I remember how cool I thought it was when I realised that the OS did stuff like those handy edit boxes for you - you didn't have to do anything! :)

  10. Re:Somewhere in the middle by bfields · · Score: 4, Insightful
    The real problem is that there are far more people who know programming that you have to compete against for jobs...

    I don't know, it may be that the market for "programmers" is poor, but that doesn't mean there isn't a need for a higher level of computer literacy in the general population. If you're someone in another specialty (e.g., you're mainly a biologist) and have some programming skills, then there's probably a lot of people that will be very happy to have you around.

    think it is far easier for young people to get started these days and they have access to far more powerful tools and OS than the beginners of the past. I didn't get a Unix machine (NeXT) until I was 20, we have 5 year olds using it on a Mac now. The barrier to entry is far lower now than it ever was and it will continue to be.

    That's all true, it's amazing that these days you can get such high-powered hardware so cheaply, and run entire operating systems entirely from code that you can tinker with.

    On the other hand, even the lowest-end machine has so many other distractions on it now--games, email, etc. The basic interpreter was sometimes the only fun thing that came with the cheap home computers of the 80's--the only way to get a game might be to spend money on a cartridge or type one in from a magazine--whereas now you have to dig a little and look up documentation elsewhere to find a programming environment for your new PC.

    --Bruce Fields

  11. Re:Many people feel Expose serves well enough by SilentChris · · Score: 4, Insightful

    I'm still waiting for Expose to have a way to move windows around with the mouse. At least as an option. I like the feature, but often I find myself wanting to reorder the windows after it does so (put all the important stuff on one side, web stuff on the other, etc. If I could do that, AND Expose could remember it, the feature would be an absolute godsend. It would literally be like having a physical desk organized by work.

  12. Imagine you are ten years old by SuperKendall · · Score: 4, Insightful

    Lots of people are mentioning PHP and so forth.

    You are perfectly right that Basic was really a scripting language. But try to imagine you are ten years old.

    PHP is very easy to download. But how do you hear of it? How do you even know what it is to download? Even as a professional programmer I would have said to use PHP for web apps but not to learn programming with.

    Also, what were you trying to program for? When I was a kid I did not really program just for the sake of programming. I perhaps wrote a small utlity that did some calculation I was interested in. My cousin did fractal generation. I might type in a game from a magazine and decide I wanted to improve on it.

    So now you have a kid not knowing here to start, because there is not central starting place. Then you have the will of the kid to even figure out where to start, the barrier of having enough interest to create something he cannot just download.

    Perhaps things like Mindstorms are taking the place of traditional programming. I'm not really sure. But it does seem like a kid could not be led into programming as much by accident anymore, he would definatley have to seek it out. And that will always eliminate some people from the path, that might otherwise have liked programming quite a bit. Obviously people do still learn programming now, where are the sixteen-year olds and how did they pick up programming? That's what I'd like to know.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  13. Choice by gidds · · Score: 4, Insightful
    I think it comes down to the matter of choice.

    Now, in general, we tend to think of choice as a Good Thing(tm). But it's not always so -- e.g. when choice means incompatibility, confusion, fragmentation, duplicated effort.

    For example, here in the UK we have (basically) just one mobile phone system: GSM. That terrible restriction on our liberties means that mobile phones can work on all networks, and there's coverage almost everywhere. Result: mobiles are cheap, and just about everyone has one. In the US, so I gather, there's the wonderful free choice of GSM, CDMA, and goodness knows what else. Result: expensive phones, no coverage, lots of vendor lock-in, and mobiles are less popular. Lack of choice can be a good thing.

    The computing world is surprisingly close in terms of interfaces, APIs, and protocols.

    It's less so in terms of GUI features, admittedly, but some of the same economies of scale apply. However, I think Apple's principle here is that if a feature is done right, then people won't need alternatives.

    Far better to have one option that works right, than ten competing alternatives, none of which does the job properly. Easier to learn, easier to document, easier to code to, easier to administer, easier to support.

    Now, in this particular case, I do miss virtual desktops in OS X. (Codetek's is just too slow with the number of windows I have, and I can't use Desktop Manager in my 10.2...) I don't think Apple have come up with a better solution to the problem it solves. But I'm right behind most of Apple's other decisions. Simplicity and elegance are underrated virtues.

    --

    Ceterum censeo subscriptionem esse delendam.

  14. Re:Honed to a fine sheen? by krel · · Score: 3, Insightful

    I just thought I'd add my 0.02$;
    The close buttons on Safari's tabs are a feature I can't live without. Call me petty, but I've used Firefox's one close button on the far right, and I feel limited when I can't open up twenty tabs without looking at each of them before I can close them.
    I have a huge list of people's blogs, and I open them all at the same time in countless tabs. There are some really boring people there, and I like being able to close the tab without having to view the page.
    It's those little things that matter.
    Also, you have to be really clumsy to accidentally click those tiny little exit buttons on the tabs.

    --
    karma: ouch!
  15. Not PHYSICAL by SuperKendall · · Score: 3, Insightful

    Everyone here seems to be totally missing the point I am making. Yes there are a million tools around now. Yes there are 800MB of docs that ship with the Mac.

    But think people, think like a ten year old!! You don't even know you want to program - and nowhere in the docs that come bundled with your shiny new computer (Windows or Mac) does it mention that tools to do so are bunlded with the computer (Mac) or that it is easy. On the Mac the development tools are not even in Applications, but under /Devloper - so you'd have to know to look there.

    And then once you're starting, you have to know about editors and compilers and IDE's and so forth to do all the things people are proposing. There's nothing truly basic to guide you through the first few steps of what is going on.

    If I'm wrong then I would LOVE for all of the parents who are not programmers themselves and have kids that are picking up programming spontaeously to tell me how things are working out. But instead you have me, who has no kids, hypothizing a probem with kids being able to pick up programming easily, and a bunch of people who have obviosuly been programming for years and ALSO seem to have no kids, stating it's not the case and programming is super easy to get into. Our problem is we know to much, and have lost site of what you have to know even to get to the point where we can enter that eight line Java/C#/Applescript/PHP/Perl/Haskel/Ruby/Python program!

    Yes it's all very easy once you choose a path and get started, and easy to dabble in multiple languages. But it's still harder than it used to be to go from the "I don't know what a program is" to "hey I just ran my first program" than it sused to be.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley