I’ve finally begun to breed snakes
Published June 26th, 2008 in ProgrammingAfter long and exhaustive discussions and an even longer period of frustrating experiments with all kinds of curly braces and toy languages, I’ve spent the last couple of days on some more exhaustive and frustrating experiments.
Wanna hear about how lovely Netbeans 6.1 runs on Apple’s Java 6 implementation? Well, maybe it will suffice to say that it runs dog slow on my Quad Core Xeon Mac Pro with 8 GB RAM and that it is like watching a slow motion movie on my PowerBook G4 1.67 GHz with 2 GB RAM.
Netbeans does not even react to keyboard input when it is configure to use JRE/JDK 6. On JRE/JDK 5, it does react to keyboard input, but printing is less than sub-optimal: All letters are out of place and certainly not printed proportional to one another. With Java 6, printing works fine, but you can’t type.
Pardon my sinister sarcasm, but Java’s Swing is so ‘beautiful’ on OS X Leopard that I no longer have any questions why nobody in their right mind wants to use it.
So I’ve deleted Netbeans from my hard disks, and with that I finally buried any fancy ideas about using Java as my programming language of choice for anything.
Seeing that Objective-C is about as attractive as the contents of my bio-waste container, and having to admit that my favorite toy BlitzMax is not leaving its gaming niche anytime soon and neither supports 64-bit CPUs nor multi-threading, I am now going back to trying to breed snakes in my basement.
The Python books are back on my desk, Eclipse Ganymede with PyDev is installed and pyglet, pysqlite2 and PyGreSQL are also ready to be used.
The Eclipse/PyDev combo actually is fun to use, and unlike Netbeans, it runs fast enough even on my PowerBook. And it does not have the printer bug: The release version of Eclipse Ganymede CANNOT even print, the function is grayed out. Now that is a workaround! But may I ask why the SWT framework on which Eclipse is built still does not support printing on OS X? Anyway, other than that Eclipse is a very fine tool.
But more importantly, I’ve already had my first real ‘wow’ with Python today. Just try something like this in your own old fashioned language of choice:
def MyFunc():
print “Hello from MyFunc.”
x=MyFunc
x()
Yes, you are assigning a function to your variable x. Now obviously everything in Python is an object, including functions, and since variables are only pointers to an object, this works.
Now add this to our little program:
def AnotherFunc(param):
print param
param()
AnotherFunc(x)
It shouldn’t be surprising anymore that this also works, after all we’re only passing the reference to an object as a parameter to the function, even if this object is a function. But coming from languages with many rules and constraints, this now smells like real programmer’s freedom.
No Comments to “I’ve finally begun to breed snakes”
Please Wait
Leave a Reply