.java

musings on java and object oriented software development

Tuesday, August 28, 2007

Implicit declaration / short instance creation in Java 7

So today I'm reading Alex Miller's blog about proposed features of Java 7. I noticed something he refers to as "Short instance creation" and has a few links to other bloggers. I then notice some of the dates on the linked blogs, some in 2006, some in 2007.

I'm thinking "hang on, didn't I post something, somewhere, about this ages ago?".

So I googled for "implicit declaration java distiller" and, sure enough, I'd posted to a Sun forum about new language features in October 2004. 2004 !

I'm not suggesting that I was the first to ever write this, but way back on October 7 2004 I posted to that forum about the ":=" syntax and got shot down from folks who thought the world would end if such evilness was ever brought into the language. I honestly hadn't seen that syntax or read about the concept anywhere before that, but I'd implemented it in the now defunct project UCL (Universal Class Language) about 5 or 6 years ago.

Even James Gosling is suggesting it !

I still think it is good idea.

----------
Objectopia.org

PowerBook narcolepsy - Part II

My sincere apologies to those who have posted comments on this issue and I've not published them. I hadn't received any comments because I think when blogger changed their account management to be part of the Google framework, they forced people to re associate their accounts with the blogs. In the mean time, no comments go through to my gmail account. I hadn't logged in for a while and only noticed this today.

Anyway, I've been away from this blog for a while and have been running my PBook for almost 10 months now and it is has not spontaneously caught on fire !

The rough guide ( this was back in October 2006 so my memory is a little hazy):

The crucial bit is in the xnu source, in
iokit/Kernel/IOPMrootDomain.cpp look for the "emergency overtemp signal" line.

I just commented out the sleepSystem() call, though in theory you could write something better to deal with it.

You'll need to get : [ this list is probably a little out of date, I'm currently running 10.4.10 but still with the patched kernel ]

IOKitUser-277.8
Libstreams-24.1
bootstrap-cmds-49
cctools-622.5.1
kext_tools-65.2.1
switch_kernel.sh
xnu-792.12.6

from the apple opensource site and build the kernel corresponding to
Apples instructions (which may not fully work for you).

You'll need to tell the boot loader to use the new kernel, so you'll have to do something like this (this differs per system)

nvram boot-file="pci2/ata-6@D/@0:3,mach_kernel_10_4_8"
reboot

You can get this figure by typing

nvram boot-device

and using the bit before the comma, e.g. mine says pci2/ata-6@D/@0:3,\\:tbxi

----------
Objectopia.org