Off to Wocoa
Hopefully next weekend, this page will become more active.
« June 2004 | Main | August 2004 »
Hopefully next weekend, this page will become more active.
![]() (Anjo) Isn't anyone going to ask me about Cosada ? |
![]() (Dirk and ZNeK) Some mischief played on an unsuspecting participant's iBook. |
|
![]() (Michael and Helge) The future looks even brighter with a beer in your hand. | ![]() (Fiege Pils) My personal view of Wocoa. | |
![]() (Lars and Helge) Was that a fly I swallowed? |
![]() (ZNeK) "This presentation marks the end of WO and the beginning of SOPE X!" |
For that I am using Brainiacs all over the place. The Brainiac is a little class, that uses NSNotification to figure out suitable subclasses for handling some unspecified stuff. There is a priority scheme involved, there maybe user selection, and there is NSUserDefaults also somewhere in the mix.
One kind of Brainiac, the FilesystemGenericBraniac for example is used on files, to edit them or retrieve icons of a particular file. The MulleIDE supplies the FilesystemGenericBraniac which offloads the work to the operating system :). More specialized Brainiacs can be written that do more.
Another type of Brainiac are RenderBraniacs, that are used to write the internal representation into Make, JAM or Antfiles. MulleIDE will just supply a MakeRenderBrainiac. In the distant future it would be nice to also have an import Brainiac, that imports regular Makefile into the internal representation.
There will be very little subclassing for subclass writers in this environment, possibly none, except maybe for Brainiac classes.
Thank you.
![]()
Java ClownDuke's and fate's paths cross...
Anyway... For some head scratchin', use your new spanking IDE, finally with some intimations of thoughtful design, navigate to objc_msgSend and check out the first five instructions. If you figured out what it does, do you have an idea what it is good for and makes this worth it ?
An interesting new development in Quartz can be noticed by opening the Quartz Debug application in your Tiger Development Performance Tools application folder. Check out the option at the bottom of the main window, which is by default disabled. I think its easy to guess what this does.
| The file is so small I am not quite sure, that the texture is embedded. If not please substitute it with the picture on the right side in Bitmap with File, the blue box. |
As to the objc_msgSend, keep the ideas coming. Next week hopefully I will be able to present a result within the legal confines...
Next up, that objc_msgSend thing revealed, as much as possible under NDA.
Check out Pol-Online.net and have a look at Pixelshox Studio. This is a great application to create interactive visuals, which has been discontinued... Thanks to Stephane Sudre for this tip.
Because of the NDA requirement, I can't spell the solution out, but people with access to Tiger will be able to find this hidden feature. Also it's more fun this way. Here goes:
First look at Foundation, you should have a bash shell for the copy/pasting of this stuff:
otool -L /System/Library/Frameworks/Foundation.framework/Foundation |
tail -3 |
head -1 |
awk '{ print $1 }'
just notice that it's there. You don't need to do anything with it.
NEWFLAG=`strings /usr/lib/libobjc.dylib |
grep fobjc |
awk '{ print $6 }' |
cut -d , -f 1`
echo "NEWFLAG=$NEWFLAG"
Now make yourself a small test file:
cat > x.m << EOF
#import <Foundation/Foundation.h>
main()
{
NSObject *p;
printf( "retain: %lx (%lX %s)\n",
(long) [NSObject instanceMethodForSelector:@selector( retain)],
(long) @selector( retain),
(long) @selector( retain));
printf( "autorelease: %lx (%lX %s)\n",
(long) [NSObject instanceMethodForSelector:@selector( autorelease)],
(long) @selector( autorelease),
(char *) @selector( autorelease));
printf( "release: %lx (%lX %s)\n",
(long) [NSObject instanceMethodForSelector:@selector( release)],
(long) @selector( release),
(char *) @selector( release));
}
EOF
compile and run it.
gcc -o x1 x.m -framework Foundation ; ./x1There shouldn't be anything unexpected about the output. Now lets use the new compiler option
gcc $NEWFLAG -g -o x2 x.m -framework Foundation ; ./x2Foundation should print out a dead give away in the start, but also look at the other values that are output.
Finally to round it off, examine with gdb the instructions of interest:
cat > gdb.batch << EOF set prompt fb objc_msgSend run x/3i \$pc+4 quit EOF ( cat gdb.batch | gdb -q x2 | tail -3) 2> /dev/nullOk you need to know a little PPC assembler, but it shouldn't be too difficult to understand what an XOR together with a compare do.
This page contains all entries posted to Nat!'s Web Journal in July 2004. They are listed from oldest to newest.
June 2004 is the previous archive.
August 2004 is the next archive.
Many more can be found on the main index page or by looking through the archives.