Monday, October 23, 2006

We're off to see the Wozzard....

So, they said that Steve Wozniak would be there, and that he'd be signing books. So I took my book to be signed. That wasn't wrong, was it?


WozBook


N.B.: yes, I bought a copy of iWoz and had that signed too. But the iBook is cooler ;-)

Saturday, October 21, 2006

I feel sorry for...

The people credited with bringing GNUstep support to OCUnit a few versions back (at least one of whom I recognise as a competent programmer who really knows what they're doing), as the current version just won't work at all ;-).  It'll be more future-proof on the Apple platform, as it uses @try/@catch blocks.  However, as I want to use it on the GNU platform, this means a lot of #ifdef __NEXT_RUNTIME__ wrappers and NS_DURING/NS_HANDLER/NS_ENDHANDLER blocks...

Sunday, October 15, 2006

Best.  App.  Evar!

In the spirit of My Dream App, I've invented my own dream app.  BestAppEvar.app would be able to divine what needs to be done by detecting my brainwaves, and would then do it when I hit the button.  To make it easy for you to implement, I've already designed the UI:

So, why hasn't it been made yet?  Come on, you lazy coders!  The hardest bit would be the brain-computer interface, but there are example I/O Kit projects on the ADC site.

Monday, October 09, 2006

A spot of ultravaiolence, my droogs?

I'm currently having a Vaio VGN-S4M inflicted upon me.  I can't say I dislike it totally; the X-black screen is rather nice and it has one killer feature in that there's a (physical) radio kill switch on the front.  However, by and large I do dislike it.  The Centrino wireless jobbery is not fully documented, so only works with a binary blob driver which means it's useless for most of the operating systems I care about (it doesn't work in CEntOS, for instance, and I don't have the luxury of being able to switch to Ubuntu where I've heard better results are possible).  It seems to run very hot doing anything (including nothing), so the fan constantly winds up and down.  And it's a loud little fan.  The whole keyboard seems to bend a little when I press any key (although I'm used to the Tactile Pro, so probably whack a little harder than necessary...)  The only saving grace in the design is that PC manufacturers seem now to be getting over the desire to install legacy ports all over their laptops; but the thing's still closer to the size of a 14" iBoko (hi u.c.s.m) than that of its brother, the 13.3" MacBoko.

So, with a recent cash injection and an ADC hardware discount coupon both burning a hole in my pocket, as well as a desire to crack on with the ObjC 2.0 work on the c.l.o-c FAQ; it seems an Intel Mac and a copy of some virtualisation tech are in order.  The question becomes simple: do I jump now, and get a MacBoko or MacBoko Pro, or do I hold on in case the Core 2 Duo variants are around the corner?  Or I could even combine the two and get an iMac, keeping the Vaio for corridor worrying?  I'm tempted by the "buy now" approach, as I actually need^Wwant a new system now, not in January...

Wednesday, October 04, 2006

Init dead; no casualties

An interesting time if you happen to be an aging startup superserver; Ubuntu are to replace init with Upstart from "Edgy Eft". That's quite cool, the model in which everything needs to always come up and always in the same order put forward by both styles of init is long dead, and the system V style of init is particularly cumbersome (though someone at Apple clearly liked it, as they had both SystemStarter and watchdog in the past).



I'm actually both surprised and pleased to see a Linux distribution making the jump here, I've always considered them fairly conservative (apart from in throwing any old free package into the distribution; I mean from a "core stuff"[*] perspective. I know that FreeBSD attempted something with launchd last Summer, but the latter has too much mach_init magic which can't cleanly be excised.



[*]now Apple are going to start a CoreStuff API and sue me. Fantastic.



One thing from TFA saddened me (though I really ought to have expected it), and that's this:


To avoid reinventing the wheel, we first looked at how much effort it would be to use of modify the existing replacements to be able to do this. Sun SMF and Apple launchd were immediately ruled out due to licence issues. It was important for us that the solution be uncontroversially free so that other distributions might adopt it; many had already rejected these for GPL incompatibility reasons.


Yes, it's the standard "GPL first, utility second" argument. I have a fairly strong opinion here: if something works, and I can see that it works, and it works better than any alternative I have access to, I'll use it. That's why I'm posting this from OmniWeb on a Mac, despite [i]there being free web browsers around, [ii]my work involving Linux. I prefer to have access to the source, except where that involves a retrograde step in terms of utility. Anyway, I digress; the point here is that launchd is released under (well, depends which version you look at) the Apache licence, and OpenSolaris under the CDDL; both of which are free software licences, but are incompatible with the GPL on technicalities. That's nice if you really do want to split hairs, but GNU/Linux (if you like) is supposed to be a usable OS so shouldn't utility come first? Admit it, how many of you have uninstalled kaffe or gcj and are using the Sun jdk? More to the point, how many of you are using Apache (which is also released under the Apache licence)? It's time to get over it. I propose that if you want to work on a pure GNU system, you should indeed work on a pure GNU system and hie thineself over to the HURD mailing lists. I fully intend to, if a gobbet of spare time makes itself available soon...but more because I think the HURD's cool ;-).

Wednesday, September 20, 2006

GAH!

You can't use a java.awt.Color in WebObjects, because to use AWT at all on OS X requires connection to the WindowServer.  And unless you're mad, you probably aren't running your WOA as root.  This means I can't do things like, ooh, I don't know, making a PDF table have a white border instead of a black one.

Friday, September 15, 2006

WikityWebsite

Strange things can happen when I get bored.  There's a great little dashboard widget called WikityWidget, which lets you organise notes like a wiki.  Well, I thought, no point in only having my notes on one computer, why not scrape the wikits out of WW and put them online?


You may be interested in some source code.

Wednesday, September 13, 2006

Parallels may, in fact, be completely dumb

tyr:/Library/Parallels root# ls -l
total 16
-rw-rw-rw- 1 root wheel 40 Sep 12 15:52 .dhcp.en2
-rw-rw-rw- 1 root wheel 0 Jul 4 17:10 .dhcpd_configuration
-rw-rw-rw- 1 root wheel 0 Jul 4 17:10 .parallels_common_options
-rw-rw-rw- 1 root wheel 100 Jul 4 22:44 .parallels_license_2.2

Sunday, September 10, 2006

switching CPUs

I can waste a lot of time if an interesting question gets posed. The most recent culprit was Chris Ridd in uk.comp.sys.mac, wondering aloud if threads ever got shuttled between CPUs on a Mac. Here we go...



It certainly looks like the conditions for doing this through the API can never be met on a real Mac running xnu. All you can do is assign a thread or a task to a processor set, but not a single processor. Unless that processor happens to be the only member of a processor set. Thing is, on xnu there is only one processor set, which encompasses all of the processors. So there's no way to force your threads onto a particular processor in Mac OS X. The lack of multiple processor sets means that you couldn't have a box with, for instance, both a G5 and a Xeon running a single kernel, which is kindof sad in a way. It won't get missed, though.



It doesn't even look like there's an API to work out which CPU you're currently on. What you can do is get the port for the default processor set (the only processor set), then by manually furtling with the structs you can iterate through the CPUs (or you can ask your own mach_host_port for an array of the CPU ports). For each CPU you can get the thread queue, which you could compare with your own thread to see if it's the same. That'd be tedious, but would get the required information. Once there though, I don't see any way for the thread to move between any queues except the idle and run queues on its 'native' processor; so I think the answer is that no thread ever migrates between CPUs. I may be wrong, and am happy to entertain any information to the contrary.



Unsurprisingly with no API to do what I want, little useful code came out of this exercise. I found out how many cpus the system has, but that's it really.



Update 2006-09-10 16:25 GMT - I hate this not knowing, so I decided to play the Ask Amit card ;-).

Monday, September 04, 2006

OPENSTEP/Parallels/VirtualPC/Spam

I've been trying to reply to bbum's post, firstly my comments were removed as spam, then he approved them by hand, now they're gone again. So here they are again.


I wrote [in this blog] much about my experiences getting OPENSTEP/Parallels working. Networking's fine but slow, graphics is good, mouse is a bit jumpy. I was talking at WWDC with people who say that Microsoft VPC no longer supports OPENSTEP/Mach. You definitely can't boot native on a new Intel Mac, as there's no SATA driver (and no way to use a boot floppy).


BTW, the floppy images are available over HTTP from Apple: OPENSTEP floppyimages

Sunday, September 03, 2006

ObjC FAQ update

I spent a lot of today grokking Distributed Objects to write a FAQ entry on it; link above goes to the new entry. Of course, any comments on it or the rest of the FAQ are welcome...

Thursday, August 31, 2006

Comment word verification

Sorry, but I was finally pushed into turning magic word input on for comments on this blog. Anyone may still comment, but you need to decode a picture in order to do so.

Wednesday, August 23, 2006

Better clear the office out, can't remember what the carpet looks like

OK, so I said there was a good reason to set up Þæs Ofereode apart from the bandwidth at SDF not being up to the task, and it's time to come clean. Yesterday I handed in my notice to my current employers, and I'm off to Opera Telecom to become a QA/Test developer. It looks like I'll be doing funky things with GNUstep so regular readers of iamleeg will not notice a move away from Objective-C and UNIX related ventings.

Of course this has been brewing for a few weeks, but I wanted to make sure my eyes were crossed and my teas dotted before letting anyone else know. Especially on the big scary intarwebs.

New website

For reasons which will be made clear in an upcoming post (probably next week, I'm off to the 'sunny' Vaterland soon) I'm in the process of consolidating all of my website activities (except for bloggage) onto Þæs Ofereode. This also lets me do funky things like svn and mysql hosting which I'll sort out over time. I have an email address there but currently am seeing inexplicable bounceage so I won't publicise that yet. The comp.lang.objective-c alt.FAQ's new home is also there, because the bandwidth at SDF is too small. When Apple publicised ObjC 2 on their Leopard preview page, my SDF site fell of the intarwebs with people looking to see if I'd written about it. Announcements about the ObjC FAQ move will be made on the newsgroup in due course.

Saturday, August 19, 2006

Hell hath frozen over

Hell, or "vi vi vi: the editor of the beast" as Matt succinctly put it.  Anyway, I just wrote a Makefile with multiple dependent targets, and it worked first time.  That just shouldn't happen - especially when you only ever used Project Builder to avoid having to write Makefiles.  I didn't even have to look at the O'Reilly/Cygnus book much.

Tuesday, August 15, 2006

WTF is a Veo?

Can anyone explain what this cpu_type represents?  And yes, reasons I'm delving around in libstuff to follow within a few days...

Saturday, August 12, 2006

NeXT Luminaries

Here I am, trying to look as important as the bunch of people around me.  Right bunch of luminaries they are too, but I won't spoil the surprise of trying to guess who everyone is.  If you know, comment ahead.  Points for recognising someone's hat without recognising the person themselves will not be awarded.  All quite large, 2016x1512 JPEGs.  Thanks to Ken Tabb for snapping the button.


Friday, August 11, 2006

Report from WWDC

You're not going to see many discussions of talks from the conference, and this is no exception.  Beyond the keynote, the only talk I can discuss is one I went to today, which was a public talk by Amit Singh (author of the most excellent Mac OS X Internals, which I didn't bring with me in case the plane tipped over in flight) in the Apple Store across Market Street from the conference.


Amit's presentation style is as engaging as his writing, and he didn't let the wrath of the demo gods spoil what was an engaging talk.  While he was necessarily light on substance (he couldn't just read the book out, or we'd all still be in there) the demos gave indication of what is possible with Mac OS X and the material discussed in Internals.  In terms of OS X mentality we're of the same stable, although he clearly knows much more about the system than I could ever lay claim to.


I got to ask him what the best and worst features of Darwin are in comparison with other UNIX.  His answers were interesting and enlightening; best is the pragmatism Apple engineers use in generating new API or taking from existing code; worst is the poor approach to open source taken by Darwin.  I couldn't agree more.

Tuesday, August 08, 2006

Greetings, Jobs-pickers

It seems to be de rigeur to provide a rundown of the top 10 Leopard features from yesterday's Stevenote, and as I can neither sleep nor be bothered to read sample code, it's a bandwagon I'm happy to jump on, albeit in my own cynical style.  Cue the Fluff Freeman voice effects...but first, let's look at the hardware.  Amazing.  The amount of space they've freed up in the cases is stonking, so both the Xserve and the Mac Pro now actually have Pro-level expandability.



  1. 64-bit top to bottom.  What, you mean there are programmers out there too lazy to separate their workhorse from their presentation?  Apart from convenience, and a bigger OS+app footprint, I don't see that we gain much here.  Now we have four Mach-O architectures, and the system libraries have to implement all four.

  2. Time Machine.  I'm assuming that the BBC wouldn't let Apple license the Doctor Who theme music.  Because that time vortex looks just like, well, the time vortex, and every time I saw that UI I wanted to sing the theme (sorry, Back To The Future, you lose).  On the other hand, this is a sweet sweet feature and I can't wait for Leopard GM so I can dare to switch it on...

  3. Ship the whole package.  I can't remember nor be bothered to look up what Steve said but it was something along the lines of you now get all the apps with the OS.  I for one cannot wait to pay £69 for Leopard and receive my free copy of Shake.

  4. Spaces.  About.  Blinking.  Time.

  5. Spotlight enhancements.  See my comments on Spaces ;-).  Spotlight in Tiger was just plain broken, hopefully they've sorted this out properly.  After gratuitously faffing about with the Mail UI in Tiger, only to make searching even worse than before, hopefully Maileopard will actually be able to find a mail I write.  Networked spotlight definitely is most welcome.

  6. Universal Access.  The new voiceover capability is indeed much better than anything available in a current mainstream OS, sounding less like Steven Hawking (which is I think the same synthesised voice as the Amiga) and more like Davros.  But making this a Top 10 keynote feature?  I smell government contract compliance...

  7. Mail features: stationery, notes, to dos.  Oh.  My.  Gods.  Would someone please build a partition wall between Steve's office and the UI team, he keeps suggesting stuff to them.  Why would I want this?  Why would I have an OS on which I can stably run multiple apps, and write myself little notes on Stickies widgets, if I'm then going to fold all of the functionality into the Mail application?  Can't I use iCal or OmniPlan for my ToDos, like they're designed for?  And stationery; I hate to shout, but HTML MAIL MUST BE BANNINATED FROM THE INTARWEBS.

  8. Core Animation.  As my good bud Ken pointed out, this doesn't seem to be anything you couldn't previously do with Tiger classes such as NSAnimation or NSViewAnimation, but maybe it's a snatch easier.  The thing is, judging by the reactions of the Americans in the crowd, I've got a feeling this is going to be the "Web 2.0" of the Mac UI.  I feel violated.

  9. Dashboard features: dashcode, web clip.  Oh great, now we get to see thousands upon thousands of derivative widgets.  And web clip could've been so much cooler; it looks to me like it's "render this whole web page, and display a punch-out with the following CGRect".  What it should be is "load this web page, and render this section of the DOM".

  10. iChat++.  I don't really like tabs in Mac apps (AppKit does multiple windows per document, not multiple documents per window, as I said to John Gruber in response to his predictions, and the HIG deprecates trying) but I'm glad they went with OmniWeb-style tabs instead of Safari-style tabs.  The ability to stream an app's view over iChat is absolutely fantastic though, this really is enterprise-level IM (regardless of the Photo Booth-style effects).  I'm looking forward to taking a photo of my office to use as my iChat backdrop wherever I am, too :-)


So there we go.  Sorry to sound incredibly underwhelmed, but there it is.  There's been plenty of juice in the WWDC but not much of it came from the Stevenote.

Friday, August 04, 2006

See you at WWDC...?

Going to WWDC this year.  I'm not going to make any technical predictions, because last year I suggested that the Intel rumours were just a rehashing of regularly-repeated hype, and that there'd be a new edition of Hillegas to cover Core Data.  So, this year I'll restrict myself to predicting that Steve Jobs will be there, and will say "Boom" at least once.

Fellow attendees: don't know what my movements will be, except that I'll be at the Thirsty Bear on Monday with some WebObjects people, but I'd like to meet as many of you as possible so please add onetrueleeg at mac dot com to your iChat list!  :-)