How much effort is involved in porting an X11 program to Cocoa/Aqua?
Well, it varies wildly... But if it uses straight X (as opposed to frameworks) I would say it's probably worth calling a rewrite.
I should look at the port of emacs.
Emacs actually had a UI layer.
That's a real problem - and very frustrating. The impedance mismatch between X and any of the APIs is probably too great to make any sense to provide an adaptation. There's no good answer to this. What's thestory on windows - the win api seems to be low level engough to providea reasonalbe X11 server. Still X11 is low level and it shows.
The problem is not so much the API mismatch; it's the UI mismatch. A X11 app in the windows world does not jar Windows UI assumptions quite as badly (in part because there are less assumptions!) than in the mac world. I'm speaking about feel more than look, here.
One thing I noticed during my benchmark tests (inlined integer loadsand stores - sequential access to memory) is that on my powerbook - fast-mcpu=G4 was not as good as -O3 (gcc 3.3).
Interesting.... I did some testing, but not nearly enough, obviously. Did you measure the impacts on the ozbench? I suggest you take that over, find the best setup, and propose a change to config. (As for me, zero time to give mozart these days myself. It's a fluke I read your first post.)
I work in C/C++ for all my critical code and do my integration at this level - sharing application data in a common bus (purpose built for the kind of data I work with) - based on shared memory (posix shm seems not to work ondarwin as far as I can tell so currently SysV).??? I know it is there, and used to pass the tests in the Oz config. Can I ask what problems you ran into?I've attached a small test program which I used
You seem to be right, shm_open works but I could not manage to mmap to the resulting fd. What the mozart tests use for shm, btw, is not shm_open but shmget. I tried to use those in the program you sent me and the results are fine. And that should be posixy too; try it on your SysV machine.
posix2m.c
Description: Binary data
Oh, I just saw this thread: http://lists.apple.com/archives/Darwin-kernel/2005/Feb/msg00076.htmlThey got shm_open to work, read the thread through... But it's not pretty! Basically you have to call ftruncate before mmap, but only when you first create the thread; after that, unlink in one processes creates issues for the next process. Sigh.
Marc-Antoine
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
