The Null Device

Posts matching tags 'osx'


A big list of useful shell commands for OSX. Some of these are generic UNIX shell tricks, but many are OSX-specific and quite useful; to wit, a few examples:

# Copy output of command to clipboard
grep 'search term' largeFile.txt | pbcopy

# display a Quick Look preview of a file; ctrl+C to kill
qlmanage -p photo.jpg

# converting an aiff file to 160kbps AAC:
afconvert track.aiff -o track.m4a -q 127 -b 160000 -f 'm4af' -d 'aac '

howto osx tech tips unix 0


In 2001, a chap by the name of Aaron Ardiri wrote a port of Lemmings to the PalmOS PDA platform. Now, he has given himself 36 hours to port it to two modern mobile platforms, the iPhone and Palm webOS, with OSX and Windows desktop ports for good measure. Ardiri posted his progress, and interim OSX binaries, to a liveblog here; it seems to be down, but there's a long, scroll-like screenshot of the whole thing here. It's quite interesting, in its descriptions of how coding practices have changed as platforms have become less cramped, and of the process of adapting 2001-vintage PalmOS code to larger (mostly UNIX-based) systems.

Ardiri is considering adding another port to Android; I imagine this would involve some means of translating ancient, low-level C code into Java (or else a C compiler that produces Dalvik bytecode). If he's just dealing in C-based platforms, he could add Nokia's various platforms and (from what I hear) Samsung's new "Bada" OS, though whether there'd be much reason to bother is an open question.

iphone lemmings osx palm palmos programming retrocomputing software tech webos 0



Geekier-than-thou technology blog Ars Technica have posted a detailed technical review of Snow Leopard, the latest revision of MacOS X, which delivers few new features but instead comprehensively overhauls the inner workings of the system. And there are a lot of interesting things there, from transparent compression of files to the shift to 64-bit and the replacement of the legacy QuickTime system with a new, Objective C-based one, not to mention a judicious sprinkling of user-interface improvements and technologies brought over from the iPhone programme. (Core Animation, it seems, is everywhere, and there's a CoreLocation service which can determine where a machine is.)

One of the most intriguing improvements (to me, as a programmer, anyway) is one at the lowest level: Apple have quietly extended the C language, adding anonymous/lambda functions and closures, which they call "blocks". So now you can create and pass back blocks of code (more or less) as if you were in Lisp, Python or JavaScript, like so:

typedef void (^work_t)(void);
void repeat(int n, work_t block) { 
  for (int i = 0; i < n; ++i) 
repeat(5, ^{ printf("Hello world\n") });
Which, of course, opens the door to functional-style algorithms like map/filter/reduce, passing predicates as function arguments, and other nifty tricks which people in the functional-programming world have been doing without a second thought for decades.

The code in bold is a block. It's not the prettiest syntax in the world, though it is consistent with C, and gets lexical scope. There are more technical details on blocks here (fun fact: a block is an Objective C runtime object, though can be used from vanilla C), and Apple's own documentation here. Apple have made the blocks extention open source, contributing it back to both GCC and the LLVM compiler they're moving to, and submitting it to the C standards working group (as in this paper), so there's a decent chance that they'll filter through to other platforms. (How quickly they're adopted elsewhere is, of course, another matter.)

Blocks in themselves are nifty for the functional-programming enthusiasts, though understandably may seem esoteric to everybody else. Apple, however, are making thorough practical use of them in a new subsystem named Grand Central Dispatch, which allows programmers to rewrite processor-intensive processes in terms of fine-grained units of work, pass them to queues, and have them automatically spread across however many processors the machine has free at the time; which, in theory at least, should greatly increase efficiency without requiring much more effort on the programmer's part.

(via MeFi) C apple functional programming osx programming tech 0


Recently I was going through some photos I took, on my Mac, and found that they all looked a bit blurry; none of them, I thought disappointedly, had turned out well enough to post to Flickr, and my photographic expedition had been for naught. A while later, I looked through them on my Linux box, using eog, and was surprised to find that they looked much crisper, and some of them had come out quite well. Which suggests to me that OSX 10.5's Preview has a bug in it, which causes images to be blurred.

Some evidence: here is a photograph, as shown in OSX using Preview:

And here is the same image, as viewed using eog on Linux:
Notice the difference? Here are details of the displayed images, blown up 4x:
It appears that the blur issue is well known, though not something Apple seem interested in addressing. Presumably in Apple's official worldview, those working with photos who wish to see them without blur should be importing them into iPhoto or Aperture, and managing them with that.

The only workaround given is to copy the version of Preview from an OSX 10.4 machine, modify its version information to run on OSX, and use that. Which, quite frankly, is not good enough.

apple bugs osx photography 1


Tech blog Ars Technica has a meticulously detailed review of OS X 10.5 Leopard. As one would expect, it's 17 pages long and goes far deeper than the usual roundup of cool features and visual effects, delving as deeply as the kernel and APIs. In it we learn, among other things, that Apple are finally killing off the old Carbon APIs, inherited from the old MacOS, meaning that someone at Adobe and Microsoft will have a lot of rewriting to do. Not to mention that, while the UI isn't seamlessly scalable yet, it's going in that direction, with elements (such as window decorations and checkboxes, for example) being assembled from XML-based "recipes" (and all the "Aqua" eyecandy appears to be made by distorting a source bitmap of a glass sphere). On the downside, the article's quite scathing about the new Dock and folder icons.

apple leopard mac osx review tech 0


Two technological death notices: firstly, the latest version of OSX, 10.5 ("Leopard"), can no longer run MacOS Classic (that is on PowerPC machines; the Intel ones, of course, never got Classic in the first place). Apparently this has nothing to do with technological constraints and everything to do with Steve Jobs having decided beneficiently that the users should have moved on by now. Of course, if you still want to run that ancient copy of Fontographer or whatever, you can probably do so on SheepShaver or similar.

Meanwhile, TrollTech have knocked their Linux-based Greenphone on the head, and will be concentrating on developing their phone OS on the very hackable and (soon to be) highly commercially available (though somewhat more cheap and plasticky-looking) Neo1973 phone.

(via Engadget, /.) apple greenphone linux neo1973 osx rip tech trolltech 0


A web site on hacking the AppleTV, Apple's new TV set-top box, which appears to be a low-power Intel-based machine running a customised distribution of otherwise standard OSX. Unlike the iPhone, it seems that it doesn't require executable code to be cryptographically signed. So far, there are instructions on enabling SSH for logging into the AppleTV, installing DivX decoders and the VLC media player and copying things like Apache from an Intel Mac to the AppleTV.

(via /.) apple appletv hacks osx tech 0


I've just discovered a slightly nifty feature in MacOS X, when running on a relatively recent *Book.

If you hold down Ctrl and drag up on the trackpad with two fingers (as you would to scroll upward), the screen zooms in around the cursor. Releasing Ctrl keeps it magnified, though following the cursor. Holding down Ctrl and scrolling down zooms back out.

I'm told the feature is new to the 10.4.8 update that recently came out.

mac osx 0


Google have just released a MacOS X version of their amazingily intuitive CAD package SketchUp. This program is rather nifty, and seems to use various human-interface heuristics to disambiguate what the user is trying to do, and consequently making 3D drawing a lot less painstaking than with traditional CAD/modelling programs. It also has some rather nifty rendering modes (such as pencil sketch, or precise-yet-cartoonish-looking textures), and looks good for everything from designing DIY projects to making comics. And it's free.

Also from Google: a new beta of Google Earth, now with a Linux version. (For some reason, though, the view window is all black on this machine, even though it does have OpenGL.)

(via Make, /.) google google earth linux osx sketchup software 0


As Apple starts looking more and more like another PC company (or, more precisely, a MP3 player company with a sideline in prestige PCs and software), it emerges that Apple almost merged with Sun three times. One of these mergers was an attempted acquisition of Apple by Sun. Apart from this, the two companies had abortive talks about a number of proposals, including sharing a user interface (so perhaps we could have seen Solaris with a MacOS Classic interface) and the SPARC architecture.

It would have been interesting to see what would have happened if any of these ventures had been successful. I don't know whether SPARC chips make better laptop processors than PowerPCs, but if they do, then perhaps we wouldn't be seeing Apple capitulating to the x86 monoculture*. On the other hand, if Apple had Solaris offered to them, they may not have bothered buying NeXT, and OSX may be based on a less exotic strain of UNIX.

* not that that's entirely a bad thing; perhaps, once Intel Macs are commonplace, smart hackers will figure out ways of shoehorning Windows code (such as, say, the numerous free VST plugins that never make it to OSX) into running on one. But I digress.

(via alecm) apple macos osx sparc sun 0


It's official; Apple are moving to an Intel Pentium architecture, and will phase out the PowerPC by 2007.

Steve Jobs says that a reason for the move is that Intel chips now offer much more power per watt than PowerPC chips. Which sounds strange, given that Intel chips are encrusted with legacy backward-compatibility baggage dating back to the IBM PC, whereas the PowerPC platform is free of such constraints. Though perhaps, because of Intel's far greater market share, enough was invested in getting around this.

Jobs also revealed that MacOS X had been built internally for Intel platforms for the past five years (which is plausible, given that NeXTSTEP, on which it is based, was sold for Intel machines). Which goes some way towards explaining the somewhat backward choice of architectures: i.e., it's inertia.

Of course, this does not make it any less of a missed opportunity to provide a computing platform on a new, unencumbered architecture. Especially given the PowerPC-like nature of the Sony/IBM Cell CPU, which would (if reports are correct) have been an immensely desirable platform for a new era. (Who knows; perhaps whoever owns the Amiga can resurrect it as a Cell workstation?) And as far as x86 chips go, AMD would have probably been a better choice than Intel. Unless, of course, it's the DRM issue again, and Jobs needs to have a black iron prison in place that the MPAA will sign off on.

And so, the last major bastion of diversity in the world of computers falls to the x86 monoculture, and Apple becomes just another PC manufacturer, albeit one with its own OS. Perhaps in five years' time they'll give up on that as well and switch to providing a Cocoa layer over Windows too? After all, it'd save them a lot of hassle.

apple intel osx 6


For the best part of a decade, the application for anyone who wanted to make their own fonts (PostScript or TrueType) was Fontographer. Then, sometime in 1997, Macromedia (who had recently acquired it) abandoned it. They kept selling it, but no new development took place, and advances in font technology (such as, say, Unicode and OpenType) passed it by. Even worse, the last version turned out to not work at all under MacOS X, presumably due to the programmers having used some sort of undocumented shortcut that the Classic environment couldn't handle.

Anyway, now Fontlab has acquired Fontographer from Macromedia Adobe (who have no font editing tools of their own on offer and no intention to change this; which is rather surprising from the inventors of PostScript), to integrate into their font-editing product. It'll take the mid-range niche, between basic font editing program TypeTool and the high-end FontLab package.

(via gths) fontographer osx software typography 0


You know those nifty "Widgets" that MacOS X 10.4 supports; those lightweight HTML/JavaScript objects that sit on a special desktop layer and can show you the weather/train timetables/your iTunes playlist/how all those APPL shares you bought are doing? Well, they can automatically install themselves without your consent, as this page demonstrates. The author even provides a widget (not auto-installed, mercifully) to underscore the potential for mayhem.

Meanwhile, a carefully-constructed trick webpage can cause Firefox to execute arbitrary code on any platform (such as, say, installing rootkits or botnet clients). The Mozilla Foundation have patched this, though it's not in the Debian distro yet.

(via substitute, slashdot) apple osx security 2


Ars Technica has a review of MacOS X 10.4, and, as you might expect, it goes into a staggering amount of detail, from changes in the kernel APIs to the quiet addition of arbitrary file metadata (only a few releases after Jobs consigned resource forks to the dustbin of history and told Mac users to and make do with Windows-style file extensions) and Apple's new hierarchical file-typing system, from internal improvements in Quartz to how Spotlight hooks into the kernel:

Any file i/o that goes through the Tiger kernel will trigger the appropriate metadata importer. This kernel-level integration ensures that the Spotlight indexes are always up to date.
A smart folder could be a normal directory that is specially tagged using an extended attribute (in the "system." namespace, masked-out just like the extended attributes used for ACLs). The actual Spotlight query for the smart folder would also be saved in an extended attribute. The contents of the smart folder would be generated on the fly in response to file i/o system calls (opendir(), readdir(), etc.) and would appear to be a series of read-only hard links to the actual files.

(via gizmodo) mac osx tech 0


It looks like Sony are finally releasing a MiniDisc-based data drive; only a decade too late, too. The Hi-MD drive (with the catchy name "PIT-IN") will apparently be a USB Mass Storage device, and will go head-to-head with smaller and more robust USB keyrings. Chances are it'll still not be able to rip data off audio MiniDiscs for copyright-enforcement reasons, so all your bootleg gig minidiscs are still locked up in the translucent plastic prison of Sony DRM.

Meanwhile, the next Palm handheld will be the Tungsten X; it's basically going to be like a T5 with a built-in iPod Mini-sized hard drive, and MP3 player software to take advantage of that. If they put some audio inputs on that (other than the voice-grade microphone they come with), it'd make a pretty nifty portable audio workstation.

And someone has created OSX developer trading cards. Which make you wonder whether they buy their shirts in bulk from the same retailer.

(via gizmodo) apple dead media minidisc osx palm sony tungsten 2


It's official: MacOS 10.4 Tiger will be coming out in April, as speculated. Though it won't be out until the 29th.

apple mac osx 0


What is MacOS X?, a fairly detailed and technical look at OSX, covering how an OSX system boots, how the various components hang together, the main differences between OSX and other unices, and what exactly it's doing when it says it's "Optimizing".

osx tech 0


Apple release Garageband, a cheap, beginner-oriented music/audio sequencer, to become part of its iLife package. The page is somewhat light on specs, though if it uses AudioUnits for effects and instruments (as opposed to some locked-in proprietary format designed t subtract value), it may be usable as an OSX substitute for Cubase VST (which is mostly a platform for plugging softsynths into); it'd certainly be an order of magnitude or two cheaper than Cubase SX.

apple computer music garageband osx 0


Apparently MacOS 10.3 doesn't come with Microsoft fonts, consigning users to Helvetica Hell. Until web designers start taking advantage of the rather nice fonts that OSX comes with. (There should be more Gill Sans in the world, I think.) (via MeFi)

fonts osx 6


The MacOS X softsynth landscape is set to look slightly less austere, now that Muon are finally porting the softsynths (CM101, SR202 and DS404) they wrote for the Computer Music magazine cover discs to MacOS X. That's 3 fewer things I'll have to do without when I finally end up taking the plunge (probably when I have A$900 to spare and nothing better to spend it on). Hopefully by then Pluggo will be out for OSX as well.

Of course, this doesn't resolve the massive VST/AudioUnits uncertainty that's balkanising the OSX digital audio world. But that's another issue.

osx softsynths 0


A list of new features in MacOS 10.3, aka Panther, which is due out by the end of the year. Though I'm still not sure about the brushed-metal Finder. (Wasn't that look just meant for hardware-accessing applications?)

mac osx 7


Good news; a Trolltech developer now has KDE building on MacOS X; this is presumably without an X Window server. Which means that you soon will be able to wait ages for your KDE apps to load up and/or do things whilst looking at the lickable native OSX interface. (via Richard)

kde osx software 2


Nifty MacOS X program of the day: iTerm, a better replacement for Terminal, featuring Mozilla-style tabs. (via bOING bOING)

osx software unix 3


An article about the state of Cocoa support under Python. In short, some progress is being made with pyobjc (and Python 2.2's improved object system), but it's not there yet.

cocoa osx python 0


MacOS X geek-out: Qt is now available for MacOS X. Mind you, there's no X11-style free licence. Meanwhile, Apple say they have ported Tk to MacOS X. Which means that Tkinter may soon be available to Python scripts running on OSX.

Now hopefully someone will get around to writing a Gtk backend for Quartz (the MacOS X windowing/drawing mechanism). (There are already backends for Win32 and frame buffers, so it shouldn't be impossible.) Then it will be possible to run GIMP on MacOS X without an X server.

Another thing I'd like to see would be some Python bindings to Cocoa/AppKit. (Given the nature of the Objective C runtime, it may be doable.)

osx programming qt 0


MacOS X:I've managed to get the Classic environment working under MacOS X; the problem was that it doesn't work unless your MacOS X disk is in the HFS format. Though, much to my annoyance, I've noticed that Fontographer 4.1 doesn't run under the Classic environment. (Well, it starts, but as soon as I open a font, it dies mysteriously.) Rather annoying.

osx 0

This will be the comment popup.
Post a reply
Display name:

Your comment:

Please enter the text in the image above here: