« April 2004 | Main | June 2004 »

May 2004 Archives

May 2, 2004

Added PKCS#5 Padding to MulleCipher

Got a request for that, thought this was easy and added it. As I am going to use MulleCipher finally for the little private project I am trying to restart again. There might be some more changes. Offhand I think it would be nice to be able to specify the encryption modes as well and maybe also the padding like in *gasp* Java.

May 14, 2004

XCode hate and loathing

Is the debugger now completely messed up in 1.2 ? I compile and link with -g -O0 but often my breakpoints are just not used. I have to type them into the console to get them working. Regularly stepping into a function makes the debugger just continue even though source is available. More often than not setting breakpoints in debug compiled framework code doesn't seem to work at all. Finally today I got this lovely message from the debugger:
Could not find file /Volumes/Source/srcM/PPCReassembly/PPCReassembler/OS.subproj/MachO.subproj/MachOTransformer.m. Perhaps it was moved or deleted?

Well lemme check:

-rw-r--r-- 1 nat 100 6140 31 Dec 1999 /Volumes/Source/srcM/PPCReassembly/PPCReassembler/OS.subproj/MachO.subproj/MachOTransformer.m

why, it's right there.

I can't remember having so many problems with XCode 1.1. Maybe I need to reinstall. Apple's installer... hate.... loathe.

I had hoped that developing on my G5 with XCode would be fun, but truth be told I prefer a more reliable workhorse like Visual Studio. VS is not really doing anything fancy, it just has a real nice editor, a very fast compiler and a debugger that just works. The very few bugs and inefficiencies of VS do not prevent me from getting the majority of my work done quickly, which happens to be edit, compile and debug.

XCode on the other hand, neither edits, compiles nor debugs well. The user interface is obscure and clumsy. Make still runs in circles around XCode when compiling. The debugging is broken. - Eclipse on Mac OS X (not on windows) is no real winner either.

Here's a quote off an article from "MacDevCenter" Ten Things I Dig About Xcode:

1. New User Interface:
The first and most obvious thing you'll notice about the new Xcode IDE is that the Project Builder interface of old has been totally replaced with a new and much more polished UI. The old Project Builder interface was functional--good enough for day-to-day work, but evidently was not something that Apple was happy with. So they brought in their UI experts--the same ones that worked on the new Finder and iTunes--and rethought how the IDE should go together. The result is something that just plain feels a lot more polished and honed.
I can fully believe that the geniuses behind the new Finder had their fingers in it...

May 18, 2004

Der Mainstream streckt seine schmutzigen Finger nach den Mullen aus

Nach den Namensgebern unserer Seite, nicht nach uns :)


Der letzte Blick eines Mullopfers.
Der blutdürstige Räuber im Anflug.

In Spiegel Online hat der auf einer journalistischen Stufe mit Bela Rethy stehende Frank Patalong, mal wieder eine seiner Schülerzeitungsartikel eingestellt. Während man den Text, wie üblich, völlig vergessen kann, enthält ein kleiner Kasten ein paar aktuelle und interessante Links.

Ich gehe mal stark davon aus, daß dieser von Spiegel Online angezettelte Minihype schnell wieder abstirbt. :P

May 20, 2004

I am using now MT-Blacklist for deSPAMming of Comments

MT-Blacklist looks very nice so far. The good thing about Movable Type is, that it has quite a bit of community development behind it. I am thinking of moving to WordPress because its all free and also supported by KungLog (now ecto), but the community involvement does not seem to be quite up there with MT. And I am of course too lazy/no time to get involved. :)

MulleIDE project started

It's called MulleIDE. Chances are fairly slim that this will become anything useful, because of my tendency to procrastinate in my free time recently, but maybe something will come out of this after all. The general idea is to have a small yet very convenient tool to maintain Makefiles. If this works out I can ditch XCode, yay :)

May 21, 2004

Looking for a built-in interpreter for MulleIDE

I looked down the list on Fscript.org to figure out which interpreter to use as the primary MulleIDE script language. I want most of the logic to be scriptable and plug-in able. This way I figure, I can enhance the IDE on the fly when I need it. Also if I find some suckers to use MulleIDE, they might write stuff for me :) Here's a quick rundown of the choices, with a comment how I scientifically determined what to use and what not:

AppleScript Studio (Cocoa/AppleScript)I hate Applescript. I have had the nastiest experiences with it. I might support it later on, because it does get used.
CocoaBasic (Cocoa/Basic)Never heard of this. BASIC is an idea. But I don't know, I doubt REALBasicers will ever gonna use this. Would be a natural choice on Windows probably.
PerlObjCBridge (Cocoa/Perl)
CamelBones (Cocoa/Perl)
PERL. Never really got into perl. LamersPeople love it. It's a likely candidate, although I don't really wanna learn Perl.
EiffelCocoa (Cocoa/Eiffel)The language for students who prefer to write papers instead of code. I don't think so.
F-Script (Smalltalk dialect for Cocoa scripting)Never heard of one using this. Way too obscure for my taste.
OpenMCL (Cocoa/Lisp)
Gauche Objective-C Bridge (Cocoa/Scheme)
LISP would be my personal preference, unfortunately it's not popular enough. Otherwise everybody would be doing Emacs.
Cocoa Squeak (Cocoa/Squeak Smalltalk)Smalltalk is for students who prefer coding to writing papers, same problem as F-Script really.
Gwydion Dylan (Cocoa/Dylan)Dylan that still exists ?
Java Bridge (Cocoa/Java)Java is not scripted
Joy (Cocoa/JavaScript, interpreted Objective-C, interpreted Java, Tcl)Commercial, otherwise my first choice. JavaScript that is.
Lua Objective-C (Cocoa/Lua)I already tried this once. The language is a little to PASCALish for my taste. Also a bit too rudimentary in terms of library support. Otherwise this would have been my choice.
PyObjC (Cocoa/Python)Has this stupid white space indentation thing.
RubyCocoa (Cocoa/Ruby)I have no problems with Ruby.
So I will try Ruby first. If that doesn't work out, next up is either Perl or Python. Last in line is Lua and F-Script.

May 22, 2004

Der VfL im UEFA Cup!

Neururer mit 'nem Glas Fiege

May 23, 2004

Failed to build RubyCocoa by hand

Aden:/Volumes/Source/src/Ruby/rubycocoa-0.4.0 nat$ ruby install.rb setup
/Volumes/Source/src/Ruby/rubycocoa-0.4.0/metaconfig:7: warning: don't put space before argument parentheses
/Volumes/Source/src/Ruby/rubycocoa-0.4.0/metaconfig:9: warning: don't put space before argument parentheses
install.rb: entering setup phase...
---> framework
pbxbuild
setup failed
'system pbxbuild' failed
try 'ruby install.rb --help' for usage

Curiously, this isn't working with XCode. Or maybe a good sign :) So I replaced pbxbuild with xcodebuild in install.rb. But the next problem, was right around the corner:

CompileC /Library/Developer/BuildArea/RubyCocoa.build/RubyCocoa.build/Objects-normal/ppc/rb_NSGraphicsContext.o
/usr/bin/gcc-3.3 -c -F/Volumes/Source/src/Ruby/rubycocoa-0.4.0/framework/build -I/Volumes/Source/src/Ruby/rubycocoa-0.4.0/framework/build/include -I/usr/local/lib/ruby/1.8/powerpc-darwin -Isrc/objc/cocoa -arch ppc -fno-common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe "-fmessage-length=0" -g -Wp,-header-mapfile,/Library/Developer/BuildArea/RubyCocoa.build/RubyCocoa.build/RubyCocoa.hmap "-fno-common" src/objc/cocoa/rb_NSGraphicsContext.m -o /Library/Developer/BuildArea/RubyCocoa.build/RubyCocoa.build/Objects-normal/ppc/rb_NSGraphicsContext.o
src/objc/cocoa/rb_NSGraphics.m: In function `init_NSGraphics': src/objc/cocoa/rb_NSGraphics.m:1483: error: `NSAlphaEqualToData' undeclared (first use in this function)
src/objc/cocoa/rb_NSGraphics.m:1483: error: (Each undeclared identifier is reported only once
src/objc/cocoa/rb_NSGraphics.m:1483: error: for each function it appears in.)
src/objc/cocoa/rb_NSGraphics.m:1484: error: `NSAlphaAlwaysOne' undeclared (first use in this function)
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h: At top level:
src/objc/cocoa/rb_NSGraphics.m:8: warning: `VA_MAX' defined but not used
...failed CompileC /Library/Developer/BuildArea/RubyCocoa.build/RubyCocoa.build/Objects-normal/ppc/rb_NSGraphics.o ...
** BUILD FAILED **
setup failed

Maybe I should have used the CVS version. Anyway I will discontinue my exploration of RubyCocoa for now. None of the two demo applications I downloaded worked. The build process is obsolete and hosed. Last framework update was one year ago. The project has all the signs of being abandoned.

Chances are just too good that more problems will appear around the corner.

May 26, 2004

Argh! Wasted two hours on stupid bug.

I am using the DragNDropOutlineView from the developer examples as the basis for my IDE organization screen. Now I didn't do anything spectular, but I already ran into a dreaded retain, release crasher.

This function in ImageAndTextCell.m is wrong:

- copyWithZone:(NSZone *)zone {
    ImageAndTextCell *cell = (ImageAndTextCell *)[super copyWithZone:zone];
    cell->image = [image retain];
    return cell;
}
Do you know what could go wrong ? Sorry, no price money for this.

Hint 1: This is also defined in ImageAndTextCell a subclass of NSTextFieldCell:

- (void)setImage:(NSImage *)anImage {
    if (anImage != image) {
        [image release];
        image = [anImage retain];
    }
}

- (NSImage *)image {
    return image;
}
Hint 2: Copy would not solve the problem.

Hint 3: The superclass calls setImage: during copyWithZone:

Hint 4: NSCopyObjectdoes a memcpy of the source object into the copy.

The solution
ImageAndTextCell ist declared thusly:
@interface ImageAndTextCell : NSTextFieldCell {
@private
    NSImage	*image;
}
Notice the clever use of @private there.

NSTextFieldCell subclasses eventually from NSCell. NSCell implements setImage: but has it's own instance variable _support which it uses for setImage: (amongst others).

Now NSCopyObject, which is apparently used, copies both instance variables over to the new cell. When -[NSCell copyWithZone:] calls setImage: to copy over the information (yet again) it calls -[ImageAndTextCell setImage:] with an argument of nil because _support isn't set. This will now release our image and of course that is no good.

Continue reading "Argh! Wasted two hours on stupid bug." »

About May 2004

This page contains all entries posted to Nat!'s Web Journal in May 2004. They are listed from oldest to newest.

April 2004 is the previous archive.

June 2004 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34