Linked by Jared White on Thu 24th Apr 2003 17:49 UTC
General Development There are two major varieties of Cocoa available. The first variety, possibly the more well known of the two, is the kind that you can use to make a nice warm cup of chocolate milk. While tasty, it's hardly proper subject matter for an operating systems information site. The second variety is far more on-topic: a programming environment for Apple Mac OS X that is the modern evolution of of the original NeXTSTEP frameworks. That's what I'm here to talk about today.
Permalink for comment
To read all comments associated with this story, please click here.
Performance
by Shamyl on Fri 25th Apr 2003 14:59 UTC

For what it's worth, I'm writing a signal processing app for some of my robot work (it's a test suite for a c++ library to smooth out "warbly" sensor input, the warbles being spikes and pits resultant from the power source being used for multiple mechanisms, like servos, serial IO, etc etc).

So, since I'm developing on mac os x, in std c++ -- what I do is write all my code as libraries, and then I write cocoa guis and objective c++ lib wrappers so I can test the mechanisms. It sounds like a pain, but really it's not so bad. It's kind of fun, actually.

Anyway, last night, in *TWO* hours only, I was able to write an app, entirely in objective c, which generates an abitrary number of fake sensor inputs, plots them along a graph with subpixel precision (go quartz!), and maintains a fast searchable "history" of values. At the moment I haven't started writing my signal processing stuff (because I only started last night) but the point is, now I have a fully GUI noise generator of sorts which I can attach my c++ library to to test the cleaning algorithms.

Anyway, this isn't a complex piece of code, but the fact is, I wrote it in two hours only, and when running it takes up less than 5% cpu -- complete with the antialiased plotting of multiple inputs.

http://home.earthlink.net/~zakariya/files/Smoother.png

Frankly, if objective c is supposed to be slow, I don't believe it. It runs beautifully, and it's quite legible. I'm not going to convert, since really I'm a c++ guy, but frankly, I think I'll be writing my GUIs in onbjective c from now on. The right language for the right task, right?