Slashdot Mirror


Hacking Mac OS X

Bill Hamm writes "DB is carrying a deep interview with Jonathan Rentzsch, who created an open source technology to allow other developers to inject their code into any running process to alter its functions and written papers for IBM to program the PowerPC correctly. The interview is huge and technical, and all over the place in terms of content. Some of the things discussed are the reasons for corporate America's resistance to buying from Apple, software optimization, the importance and history of 10.4's Core Data, why WebObjects is no longer relevant, the status of PowerPC compilers, and why Mac OS X's Finder should be killed off."

35 of 486 comments (clear)

  1. Probably worth mentioning... by daveschroeder · · Score: 4, Informative

    ...that the "hacking" in "Hacking Mac OS X" is referring to "hacking" in the traditional sense, not "cracking".

    And for more on mach_inject, referred to in the summary, see Jonathan Rentzsch's website...and an interesting list of mach_inject and mach_override users.

    As for the Finder, it may be true it was a "compromise" of sorts between the NeXT world and the Mac OS world. But it wasn't necessarily the social compromise between "personalities" within Apple it's pained to be; it was likely more of a technical one. It's not perfect, and it's woefully inadequate for some tasks that involve managing thousands (or hundreds of thousands) of files. But it's still more than sufficient, and there's no reason to completely junk it: it can continue to evolve and be improved upon.

    1. Re:Probably worth mentioning... by displaced80 · · Score: 5, Informative

      Finder is multi-threaded (at least as of 10.2 I believe). Just fire up Activity Viewer and see that Finder's #processes is > 1.

      But it blocks for network responses. This is really, really annoying. I wouldn't call it the shittiest thing, but it definitely needs some rejigging. If you've been using OS X since 10.0.3 then you'll remember that the Finder has indeed come quite a long way since then.

      My hopes are high for what 10.4 will bring. The problem as I see it is that earlier versions of OS X have had quite a bit of the underpinnings in a certain amount of flux. The Finder (or indeed any 'file manager') is an important element of how the user interacts with the OS. Which means that things like CoreData, Spotlight and other enhancements give an opportunity for a proper overhaul of Finder which makes the most of these technologies. Time will tell I suppose.

      --
      What's the frequency, Kenneth?
    2. Re:Probably worth mentioning... by Sometimes_Rational · · Score: 2, Informative
      the two big things I wish my powerbook had were pageup/down keys (it's the 17" - there's plenty of room!) and a higher resolution screen.
      One wish granted:
      pageup = fn + uparrow
      pagedown = fn + downarrow.

      While we're at it:
      home = fn + left arrow
      end = fn + right arrow .

      You can also use (command OR ctrl)+ left arrow to go to the beginning of a line, (command OR ctrl)+ right arrow to go to the end of a line, (command OR ctrl) + uparrow to go to the beginning of a document, and (command OR ctrl) + downarrow to go to the end of a document. Admittedly, these are key combinations rather than dedicated keys, but where would you put the extra keys? There really is no other logical place for the speakers be.

      As for higher screen resolutions, it looks like they may be coming (as you point out), and I suppose that some people may really need them, but 1440 × 900 works quite well for me, and I wonder (I really do wonder, I don't know) if the toll a higher screen resolution would take on the battery would really be worth it.
      --
      Warning: The intelligence of this post may be larger than it appears.
    3. Re:Probably worth mentioning... by solios · · Score: 2, Informative

      I find the CLI to be vastly superior for everything but dealing with large amounts of data. I just like having the ability to see what I'm working with on multiple levels at once, make irregular selections, etc. In this respect, an Apple gui is stupidly efficient for me.

      As a Quicktime Pro user, all I can say is that the player is a piece of shit- it hasn't evolved much since 1999 and it really, REALLY needs to. Quicktime the API is GREAT for video work, I wouldn't use anything else, but for playback? omfgSUCK. I use VLC for everything and mplayer for whatever VLC doesn't handle- Quicktime (including Pro) doesn't believe in playlists, and VLC and MPlayer both have application-level volume control, whereas QTP implements on a per-file basis, which is 31 flavors of ghey.

      For working with video, Quicktime Pro is pretty decent, though I try like hell to stay away from the player as much as possible. As an entertainment devices.... gag. It sucks. The ONLY area where Qucktime Pro has an advantage over VLC or MPlater for entertainment purposes is it'll go fullscreen on the monitor of your choice (both VLC and MPlayer pop fullscreen to the "root" window), it listens to the typical system keyboard shortcuts, and it's about as good as it gets for scrubbing or single-frame advance/rewind, which is something VLC and MPlayer both suck hard at.

      Cracks me up that here we are in 2005 and you can't "go to" a specified time in any of these apps- you have to scrub close to where you want and let fly from there. You want precision? You have to dump into editing software and hope to hell the quicktime API can handle the video (it horks like a mother on a wide, wide variety of divx-variants).

    4. Re:Probably worth mentioning... by mooncaine · · Score: 2, Informative

      To move files from one disk to another: hold down the Apple key when dragging files. Dragging ordinarily moves files, but when you drag from one disk to another, OSX wants to help you by assuming you want to copy.

      It can be a little weird if you're used to Windows [that's how it felt for me], but I got used to it.

      The thing I can't get used to [or should I say, the thing I don't want to accept] is that you can't copy a folder to a place with a folder of the same name, without completely replacing the existing folder and its contents. Here's what I mean:

      I have a folder named "text" on my desktop. It's got 3 files. They are all a day old.

      I have another folder called "text" on my portable HD. It only has two files, but one of them has the same name as a file in the "text" folder on my desktop. All these files are newer.

      If I copy the folder from my portable to my desktop, OSX warns me that the folder will replace one of the same name. That's fine, but what happens next is very different from the other OSes I've used:

      The folder on my desktop has only the files I just copied. File 3 is gone. So are the older versions of my files. There were no separate prompts about overwriting files. OSX just treats my folder as one file -- screw the contents, it's just a file to OSX.

      In other words, I can't easily combine folders.

    5. Re:Probably worth mentioning... by displaced80 · · Score: 4, Informative

      Wow... ok, there's definitely something not right there, let's see if we can fix it...

      FYI: I've got a 1.42GHz Mac Mini and a 500MHz G3 iMac (the old 'gum-drop' style). Even the G3 can handle most DivX's I throw at it, and the Mini's fine even with these DivX-HD trailers... both using QuickTime for playback.

      Let's look at what codec you're using. QT codecs are kept in /Library/QuickTime. Looking in mine, I see I'm using 3ivX D4 4.5.1 for OS X which you can download from here.

      Bear in mind that it's not too clever to have multiple codecs installed which can handle the same formats. So move any existing DivX codecs out of the above folder. You'll have to restart QuickTime (and any QT-using apps -- hell, a log-out/back in will do it for sure) for the new codecs to be used.

      Note that QuickTime sometimes chokes on the indexing in AVI files which use MP3 audio tracks. Symptoms include no or stuttering video, or perfect video but stuttering/no audio. This is purely a stream indexing problem -- there's a tool on the 3ivX download page above called DivX Doctor II which will create corrected files (and maintain PC compatibility). Note that there's no re-encoding going on, just a bit of tweaking to the indices -- takes a minute or two to fix a 2-hr long film. I've got a little Folder Action Script attached to my Movies folder which automatically runs any .avi's I copy in there through the Doctor, so the process can be made completely invisible.

      Finally, if you're playing DivX's with AC3 audio, get the AC3 codec from here, and drop it in with the other QT components at /Library/QuickTime.

      QuickTime Player itself has never been a performance slacker on my two Macs. Duff codecs are another story :)

      Hope this helps! There's absolutely no reason at all you should be having problems with DivX files on your Mac.

      Chris

      --
      What's the frequency, Kenneth?
  2. The person submitting this CLEARLY did not RTFA by tabkey12 · · Score: 4, Informative
    (and btw I did, yesterday)

    The interviewee argues that WebObjects is still relevant, and the fastest way of coding Web Applications, but is in danger of becoming irrevelevant if Apple do not update it soon!

    1. Re:The person submitting this CLEARLY did not RTFA by grahams · · Score: 4, Informative
      Actually, no, it isn't that clear. FTFA:
      But that wasn't your question. Your question was "is WebObjects relevant"? As a commercial application server: no. It hasn't been for a long time.

      No, WebObjects is only relevant if you're on the hook for writing lots of web applications fairly quickly. There's an definite escape velocity however -- the learning curve is steep, so it really only makes sense if you are currently or planning on becoming a professional developer.
  3. Re:What's wrong with finder? by tabkey12 · · Score: 4, Informative
    Firstly, he is specifically talking about the OS X Finder (comparing it to the OS 9 Finder) and complaining about its design.

    To understand the basic complaint about the OS X Finder look at this ArsTechnica article.

  4. Re:What's wrong with finder? by Golias · · Score: 3, Informative

    Those compaints are from before 10.3 came out, which is when the OS X Finder took several leaps forward.

    Also, most of the article seems to be about pimping an alternative design ideas (mainly credited to Tog) which don't sound better than the current design in any way whatsoever (IMHO, YMMV, uh... IANAL.)

    --

    Information wants to be anthropomorphized.

  5. Path Finder by SendBot · · Score: 2, Informative

    I use Path Finder as a drop-in replacement for Finder. It's a nice improvement over the standard finder, and its many options and side panels can be turned off to suit your preferences. I really like the drag n' drop 'holder', and showing directories grouped separately from normal files is just a good idea (haven't figured out how to do this with finder, what a pain!)

  6. Re:What's wrong with finder? by pavon · · Score: 3, Informative

    John Siracusa of Ars Technica has written up a very fine article about the problems with the OS X finder. I'd give my opinions on the matter, but I have to get back to work.

  7. Re:What's wrong with finder? by John+Siracusa · · Score: 4, Informative
    Those compaints are from before 10.3 came out, which is when the OS X Finder took several leaps forward.

    No it didn't.

  8. Re:Automator by Anonymous Coward · · Score: 1, Informative

    Isn't that what we complain about so much with IE and Active X?

    That depends, is it going to run arbitrary untrustable code off some untrusted website?

    Seems like it'd be far safer than ActiveX if I can't email someone an Automator script and have it run, or trick someone to coming to my website and running an Automator script I provide.

    On the other hand, lets (theoretically) say I have an image that causes photoshop to overrun a buffer and run arbitrary code. I could email the .psd files to users. Now lets say their mail app uses Automator to ask Photoshop to display the image. THAT could be dangerous, but unlike ActiveX installing code that is dangerous by design, Automator would require exploiting a real, installed application.

    While the presence of Automator doesn't make this THAT much more dangerous (most people would use photoshop to open a psd file anyway, making the whole Automator thing not-an-issue), this does make it possible to "surprise" users who may have known about the exploit but thought that FooBar.App was "safe".

  9. Business Our Way by SuperBanana · · Score: 2, Informative
    Some of the things discussed are the reasons for corporate America's resistance to buying from Apple

    It's surprisingly simple. You know the Burger King motto "your way"? Apple's motto has always been "our way", and this simplicity, while it makes things easier for Apple, is a royal bitch for business customers. Further, Apple has always focused on "how can we control this to minimize our work" instead of "how can we help the customer?"

    It used to be that if your Mac broke down and you were a business, an independent (but Apple certified) technician, maybe even one on your premises and employed by you, could ring up Apple, get the replacement part (it could even be done electronically, way back in the mid 90's, gasp!) and you'd be in business the next day. Many Apple resellers stocked common repair parts. As long as you had a serial number that wasn't out of warranty, nobody asked any questions. I got a free bezel to my 8500 when it broke, simply because the model wasn't old enough yet to be out of warranty. Two days later my new bezel was at the local Apple reseller. When I lost the end-cap on the hinge of my old powerbook, the university Apple technician took my serial number, and the next day tossed me a bag of 6.

    Nowadays, Apple Stores are pretty much the only game in town thanks to preferential prioritization on severely limited inventory and (borderline illegal) price fixing.

    They don't, for the most part, stock replacement parts. They don't do anything but the most basic repairs. Independent technicians can get certified by Apple (for thousands of dollars, which gets you self-study materials and 6 months access to Apple's internal support DB) but unless you meet a whole bunch of criteria (like moving around a half million dollars of product a quarter, carrying boatloads of insurance, etc) you don't qualify to be a reseller, and ONLY RESELLERS can order parts OR have access to Apple's internal technical support database OR perform "warranty" repairs. When I had one of the tiny little plastic feet replaced on my PB 17" a few months ago, I had to wait for half an hour while the Genius (broken sticky feet = Genius level) clicked through endless menus on the apple website, printed out about 10 pages, half of which I had to initial or sign to "authorize" the warranty repair, and the other half I got to keep (oh boy.) Replacing the foot took...2 minutes.

    So, the short of it is that unless you bought Applecare AND you have a desktop (on-site service for laptops is not done under any circumstances; you've got to wait several days just to get it to them, because they have to ship you a box first), you're dumb shit out of luck for fixing your Mac quickly.

    Want another example? If I'm a small business, I can get an account rep assigned from Dell, Gateway, etc. Even if I only buy a machine once a month- and it's been my general experience that they do a decent job at remembering who you are. Apple? You can buy 100 Macs a year and still not get anybody at Apple to say "boo" to you, because there's no such thing as direct sales. The best they can manage are "regional" business liasons, and they don't remember you from a goddamn hole in the wall.

    Still not enough? If your Dell, Gateway, or HP breaks, out of warranty, you can call up that company's parts department and get a replacement. Apple? Nope. Sorry. You have to send your machine to the one Apple service center in the country (Texas) which will cost you a minimum non-refundable $250+ just to "look at it". They're infamous for wrecking unrelated parts and damaging stuff, and you can pretty much foget any data on the system...and how many of us have the facilities to back up 60GB? Not me.

    As mentioned before- independent techs can't get parts. Customers certainly can't. Even Apple employees can't get parts- an employee said if he wants a personal system fixed, he has to take it to a repair center on the Apple "campus". So there's a huge "black market" in parts, often times from used machines that were bought on ebay and ripped apart for their guts because they're worth their weight in gold as parts.

    1. Re:Business Our Way by g3000 · · Score: 5, Informative

      They don't, for the most part, stock replacement parts. They don't do anything but the most basic repairs.

      I have to chime in here. I have a refurbished dual G5 in which one of the processors stopped showing up. The guy at the Genius bar told me it could be anything from an improperly seated processor to a bad CPU or logic board -- both of which were parts that they had in stock and could fix within a day or two. Luckily, it the processor wasn't firmly "in place" and it just took a bit of reassembly.

      They had it diagnosed and back to me in less than 24 hours, no charge. And I don't have Applecare on the machine. My opinion is that Apple hardware is great, but regardless, I've had few occasions to have to get repairs over the years. And when I have, it's been a relatively painless experience. I never had to ship anything in or wait for some obscure supply-chain hopscotch to get a part.

      A number of other comments in this post give me pause, but I'm not qualified to respond so I'll just say "hmmm...OK, whatever" to the rest, and admit people's experiences vary.

    2. Re:Business Our Way by Frumious+Wombat · · Score: 3, Informative

      For their business machines, i.e. the G5 XServes, this isn't a problem at all. I bought 16, and the 3yr extended warranty, and with the machines came two extra packages. One had extra HD modules for the main server, and the other the entire guts of an XServe G5. If I have one drop out, my downtime is how long it takes to open a box and swap the guts. If you're buying consumer hardware, they do tend to the control-freakish, but most of the internals are commodity, so easy to replace yourself, and probably cheaper than shipping it. With the others, you can get parts, but quite frequently, you can't really afford them.

      My account rep has been helpful and responsive, including ordering custom parts for my cluster set up. Maybe they're hungrier in upstate NY, but I don't find them any different to deal with than HP or IBM. (though I've never been asked about my AIX needs by the Apple rep)

      As for the facilities to back up 60GB, a couple of 80GB USB/Firewire external HD's are ~ $100 each, and you can install them to make them bootable as well. A stray Linux/BSD server running Software RAID with a terabyte shouldn't set you back much over 2K, depending on what you build it out of, or you could buy the 80GB MacMini for $600, and partition the disk into a 20GB OS and 60GB backup partition.

      They aren't perfect, and they do tend to the secretive, but in my experience they're pretty much the same as any other major vendor to deal with.

      --
      the more accurate the calculations became, the more the concepts tended to vanish into thin air. R. S. Mulliken
  10. will this troll ever die , please mod it down agai by FidelCatsro · · Score: 3, Informative
    hahaha , seriously this troll is so old , Ok i realise you are probably a new member of some trolling group , but you wont rise up the unholy order .
    What is amazing me most is the fact the someone has moded this up .
    People this is a trol and a very old one that has been posted a great deal.

    from wikipedia
    The My freelance gig in front of a Mac trolls appear in virtually every discussion about Apple Computer. The troll claims to have witnessed <the latest Apple hardware> taking 20 minutes to copy a 17 MB file from one folder to another and proceeds to question all Apple users as to their platform choice. It is a straight forward copy-and-paste from a weblog entry (http://www.kottke.org/98/11/my-mac-sucks) by Jason Kottke. It has also led to some very inspired and amusing parodies.
    http://en.wikipedia.org/wiki/Slashdot_troll
    --
    The only things certain in war are Propaganda and Death. You can never be sure which is which though
  11. Re:Why has corporate America avoided Macs? by sribe · · Score: 2, Informative

    For years Mac's windowing/subwindowing functions required multiple open windows on a screen to explore subdirectories.

    No they didn't. You're just showing your ignorance.

  12. Re:No 'Up' button. by As+Seen+On+TV · · Score: 3, Informative

    If you want to add it, there's a "Path" button that can be applied to the Finder toolbar. Use the "Customize Toolbar..." menu item and drag the "Path" button to the Finder toolbar.

    A better choice in my opinion, though, is to command-click on the window title. That's been a feature of the Mac Finder since System 7.

  13. Re:Compilers by Anonymous Coward · · Score: 1, Informative

    Because Apple probably wouldn't be able to distribute it with the OS (for free at least).

    The OS and people's applications are compiled with the same compiler leads to fewer support issues. Given that GCC's C++ ABI has changed a couple of times in the 3.x series do you know the head aches that would cause if the system libraries were one ABI and the users were compiling to another ABI?

    Once GCC settles down a bit and finally gets the ABI correct then we'll talk.

  14. Re:Automator by As+Seen+On+TV · · Score: 5, Informative

    That's not what Automator does. It's understandable why you'd get this wrong, but please check out "Working with Automator."

    Short version: Automator lets you chain together very small bits of code called Actions to create Workflows.

    Think of Actions as being like UNIX tools, and Workflows as being like command pipelines, and you'll have the idea.

    Automator is not a general-purpose AppleScript tool. You can write Actions in AppleScript if you want -- though Objective-C is better, in my opinion -- but you can't use Automator to just talk to any application with an AppleScript dictionary. That's not its job.

  15. Re:Compilers by rsmith-mac · · Score: 4, Informative

    XLC only writes code that's compatible with the G4+ processors, Apple can't use it as long as they need to support G3's too. There are also issues with the fact that it doesn't behave exactly like GCC, so Apple would have to deal with this when building apps that are based on OSS software(i.e. most of the BSDness of the OS), and they'd need to pay to include a copy with every copy of OS X or be stuck in an odd situation of users using GCC while Apple uses XLC.

  16. Re:Automator by Carthag · · Score: 4, Informative

    You can make it stop the nagging if you turn the date to some amount of years in the future (say, 2030), open quicktime and say "ask me later", then quit quicktime & turn the date back to normal. It'll ask you again in 2030. I'm not saying that it's not annoying, but thankfully there's an easy way to stop it.

  17. Re:Why has corporate America avoided Macs? by podperson · · Score: 4, Informative

    For years Mac's windowing/subwindowing functions required multiple open windows on a screen to explore subdirectories.

    This has been untrue since System 5, circa 1989. Certainly pre Windows 3.0.

    Mac designers were so proud of multitasking that windows didn't maximize automatically -- hardly making efficient use of screen real-estate.

    This is a bizarre remark... drug induced?

    1) Macs had overlapping Windows before they had threading.

    2) The first multi-tasking implementation (beyond desk accessories) involved multiple virtual screens (no overlapping applications).

    Many applications remember the state you set them in when you last used them and reinstate it when launched. Some don't. The same applies in Windows, with the exception that (a) it's easy to force maximization if you know a bit, and (b) Windows maximizes windows to fill the screen whereas the Mac maximizes windows to show as much as possible, but no more than required. I don't see how the latter is a less efficient use of screen real estate than filling the screen with a largely empty window.

    So ... um ... WRONG.

    Mac never attempted to price their machines competitively for corporate America

    I assume by "Mac" the writer means "Apple". In fact, Apple has offered many price-competitive computers, e.g. the Classic, the SE, the IIcx, the IIsi (the Mac mini being the most extreme example). It's not like the IBM XT was priced under the Apple II.

    In any study of TCO I've read (e.g. from Gartner) you'll see Macs have a lower TCO than Wintel boxes. I would assume TCO matters to corporate America -- but only when comparing non-Apple options.

  18. Re:Compilers by bloosqr · · Score: 2, Informative
    I am a bit surprised as I have run xlc on aix running on the 200 mhz ppc chip (the brief moment when mac allowed clones, so we bought a slew of mac clones and installed aix on them.. ) I believe this support issue is just a support rather than an intrinsic compiler issue actually as aix on the g3 chip has xlc supported so it shouldn't really be that hard to port over at least if apple was receptive to the idea. Regardless they could use the equivalent of a fat binary if they wanted to and have different run paths for g3 versus g4/g5 it would not be that hard to setup.

    I don't think having a different compile platform for the OS versus apps is that big of a deal (do all people use the same compiler in the windows world? let alone microsofts?), though I do think it would be in apple's best interest to buy some sort of license for the xl* compiler and/or give away to some of the performane intensive benchmarking apps out there like photoshop..


    As an aside what would be brilliant would be to try to convince ibm to do what intel did which is make the compiler free for GPL compatible apps..


    I guess in the grand scheme of things if you get a minimum 10% speed boost, turning a 2.5 ghz machine into a free 2.75 ghz equivalent isn't anything to sneeze at, and given some of the speed gains turning a 2.5 ghz box into a 3.75 ghz box would be fantastic, especially since its practically free and carries over as the chip speeds actually increase..


    -bloo

  19. Re:What's wrong with finder? by Have+Blue · · Score: 3, Informative

    Going into terminal and killing the Finder would not help it recover from a fucked up network volume anyway. What's going on is that the Finder is halted and waiting for a response from the network file system driver in the kernel, and *that* is halted waiting for a response from a remote server that is probably never going to arrive. In order to keep everything in synch (I assume it's trying to avoid the driver returning data to internal process accounting structures that no longer exist, or trying to kill the driver within the kernel itself), NOTHING can kill the frozen Finder, up to and including kill -9.

  20. Re:Python with Cocoa by fishbowl · · Score: 3, Informative


    >I would like to know more about it.

    www.python.org

    >What is it good for?

    It's good for general-purpose programming, particularly if you need the end result to be cross-platform.

    It's extensible with all kinds of 3rd party libraries available. It's a much better fit for many types of work than is Perl, and arguments have been made that it is more efficient and easier to learn than Java.

    >Any drawbacks?

    Like Java, it's a bytecode-interpreted language, so to-the-metal programming isn't really possible.

    >How to learn it?

    It's quite easy to learn, even as a first programming language. It's extremely easy to do certain kinds of complex things (you name it) because there are so many modules available. This is something that Python shares with Perl and Java, of course, but python programmers argue that it's altogether easier to work with.

    I was on the fence, until some production code rolled in my company that was written in Python. It's a success story for the folks involved, and the quality of their work and the speed at which it was completed, really speaks for itself.

    --
    -fb Everything not expressly forbidden is now mandatory.
  21. Re:Not true by plastik55 · · Score: 1, Informative

    It's a well known fact [wikipedia.org] that the term "hacker" did not originally apply to the people that media now calls hackers....And just in case you all are too lazy to read the links.....[blah blah blah]

    There isn't anything on that Wikipedia page about the original use of the word. Perhaps you yourself should read your links?

    It's well known that the very first use of the term "hacker" in the context of IT referred to people who destructively abused computer networks.

    --

    I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!

  22. Re:Imperative code? What is this? by 3770 · · Score: 2, Informative


    While I don't have a formal definition it basically means a programming language where you have a sequence of statements.

    Most languages widely used are imperative languages, such as C/C++/C#/Jave/Perl/whathaveyou.

    An example of another type of language is functional programming languages such as ML, Miranda and F#.

    I believe Lisp is generally considered a functional language, but it also supports sequences of statements so I guess it really is a mix.

    I'm a bit rusty on this subject, so if someone wants to correct me on this then please go ahead.

    --
    The Internet is full. Go Away!!!
  23. Missing step... by argent · · Score: 2, Informative

    In his original paper there's a missing step:

    1. Discover the original function's address.
    2. Test the waters.
    3. Make the original function writable.
    4. Allocate the escape branch island.
    5. Target the escape island and make it executable.
    6. Build the branch instruction.
    7. Optionally allocate and engage the reentry island.
    8. Atomically:
    a. Insert the original first instruction into the reentry island.
    b. Target the reentry island and make it executable.
    c. Swap the original function's first instruction with our custom-built branch instruction.

    Missing step?

    9. Make the original function non-writable.

  24. Re:Not true by curtlewis · · Score: 2, Informative

    cracker (kråk-er) n.
    A thin crisp wafer or biscuit, usually made of unsweetened dough.

    One that cracks, especially:
    A firecracker.

    A small cardboard cylinder covered with decorative paper that holds candy or a party favor and pops when a paper strip is pulled at one or both ends and torn.

    The apparatus used in the cracking of petroleum.

    One who makes unauthorized use of a computer, especially to tamper with data or programs.

    Offensive.
    Used as a disparaging term for a poor white person of the rural, especially southeast United States.

    Used as a disparaging term for a white person.

  25. Re:Imperative code? What is this? by TheRaven64 · · Score: 3, Informative
    Imperative code refers to languages where you give a list of instructions (e.g. C/C++/Objective-C/C#, Pascal, Java, etc.). It is contrasted with declarative languages, where you give a list of non-sequential statements. Functional languages (e.g. ML and LISP) as well as logical languages (e.g. Prolog) are declarative. Declarative languages tend to make heavy use of recursion, and are often stateless, while imperative languages have a well defined state (a set of global variables and the abstract equivalent of a program counter).

    If you've not used a declarative language, try playing around with Prolog. It's not always fast, but sometimes you can do things in two or three lines of Prolog code that would take tens or hundreds of lines of imperative code.

    --
    I am TheRaven on Soylent News
  26. Re:What does "rebuilding the desktop" mean? by Graff · · Score: 3, Informative
    What does "rebuilding the desktop" mean?
    I'm not joking, I don't know what it means and I'd like to know.

    I get the impression that I'm missing a whole dimension to this discussion by not knowing what "rebuilding the desktop" means.

    The Mac OS Finder has an internal database which stores meta information on files. It mostly handles what creator types and file types map to certain applications, but it performs other duties as well. The idea is that each file has a 4 byte creator type which says what application created it and a 4 byte file type which classifies what type of data is contained within the file. When you open a file the Finder does a lookup to find out how the file should be treated and what application should be notified of the action.

    Occasionally this database would get out of date, would require compacting, or would be come corrupted. To rebuild it all you needed to do was to get the Finder to restart and then hold down the option and command keys. The Finder would then take a few seconds to recreate the database and clear up any issues.

    Rebuilding the desktop fixed most of the problems that Mac OS was prone to. The rest of the problems were either bad preferences, a bad system extension, or bad hardware. Typically the first step in diagnosing a Mac OS problem was to first rebuild the desktop database, then reset the PRAM (a set of preferences retained between reboots), then test to see if there was corrupt preferences, then system extensions, then hardware. Overall you usually caught problems quickly and they were easy to correct.

    You can read a bit more about rebuilding the desktop here

    Currently under Mac OS X the desktop database is much more advanced. It uses different methods to keep track of files and auto-corrects problems that used to hang up the Finder. Thus you do not have to worry about rebuilding the desktop database under Mac OS X. In fact the entire Mac OS X operating system is much more stable than the pre-Mac OS X systems.
  27. Re:I agree--Finder is a disappointment by diamondsw · · Score: 2, Informative

    And the performance isn't nearly what it could have been. Every use BeOS? You make a file on the desktop from within an app, boom, it appears in the background instantly. OS X: make a file or folder, click on the desktop to (hopefully) force a redraw, and a moment later (on a dual-G5) it'll show up. Editing a file that you can see in a window in list view? Save it and BeOS updates the 'date modified' column in the background instantly. OS X? Click the file and it'll update. And the Finder is especially lazy about updating disk usage when you have the 'calculate folder sizes' option checked. C'mon, Apple... I had BeOS R3 for Intel and PPC in *1998*! It's 2005 now! Want me to send you my old CDs?

    This has nothing to do with performance, but the fact that the Finder does not use kernel event notifications (kqueue and such). Early betas of Panther had it enabled, but something was causing problems as it vanished before the final release. I think I recall reading that Tiger has this finally implemented (and it better).

    --
    I don't know what kind of crack I was on, but I suspect it was decaf.