Mac


Mac& Software Engineering& Technology19 Sep 2008 11:56 pm

Reading the announcement of SquirrelFish Extreme it crossed my mind that since Apple seems to be putting a lot of effort into JavaScript performance perhaps there’ s more to it than speeding up Safari. Maybe Apple want to make JavaScript fast enough that it could replace Objective-C in the the majority of desktop Cocoa applications.

I never used the ill fated Java version of Cocoa, but from the bit of exposure I’ve had, JavaScript seems like a much more suitable replacement for Objective-C than Java. In fact, I would say that JavaScript, being prototype based, is quite a bit more flexible than Objective-C (though whether that’s a good thing may be questionable). Presumably Java was originally chosen, despite its static typing, because of its popularity but these days is seems like JavaScript is getting more any more attention as a serious language. I suspect in a few years time, JavaScript will become the most common first programming language for engineers, much the way BASIC used to be, simply because it’s so widely deployed in the web browser platform.

Though Apple must be happy with the Objective-C ecosystem they’ve developed, no one else appears to be moving towards it as a language. When compared to C# as in .Net or the Java-ish platform Google is pushing for Android, Objective-C seems difficult to learn and quite low level, especially without garbage collection as on the iPhone. Fewer and fewer engineers even seem to learn C these days, which will no doubt make Objective-C appear more and more difficult to newcomers over time.

The obvious first objection to using JavaScript in the desktop application scenario would be performance, but with so much effort going into improving it, it seems like it won’t be long before it is at least on par with virtual machine languages like C# and Java. To add a bit more evidence to the pile, Apple is clearly somewhat taken with JavaScript if they’re talking about JavaScript frameworks like SproutCore (which I’m told is very Cocoa-like) at WWDC and there are already bindings available for Dashboard widget development.

Ruby and Python might also be viable options if Apple were to move away from Objective-C, but currently suffer the same performance difficulties, and don’t seem to be getting the same level of performance attention (at least from Apple). Time will no doubt tell, but thinking about it, I can’t see a language which would be more suitable as a replacement for Objective-C than JavaScript.

Mac& Software Engineering03 May 2008 12:55 pm

Looks like the iPhone developer program has gone international - I’m in Australia and just got my approval. Looks like there are now 28 countries (or at least currencies) on the list. (Actually, now I think of it, lots of those countries are in the EU and using the Euro. Hmmmmm)Cropped version of the iPhone developer program country listTime to start playing with that accelerometer…

Mac08 Mar 2008 10:15 am

Just worked it out…You need to hold down option, then drag around one of the circles which appears (under your cursor, and in the opposite corner relate to the screen’s centre). The other moves in the opposite direction relative to the centre of the touchpad. If you hold down option and shift, you can move both circles together in the same direction (though I’m not sure what that’s for).What’s surprising is that I only now realise that you can’t pinch into a specific part of the screen (even on a real iPod touch), it always zooms into the centre.

Mac& Technology03 Jul 2007 12:13 am

Apparently Apple is giving all Apple employees a free iPhone. Pretty cool, but I’ve got to wonder if that applies to employees outside the USA. And if so, are they usable (since they’re locked to AT&T in the USA)?

Technorati Tags: , , ,

Mac& Technology13 Jun 2007 10:52 pm

Yes, yes, I’d much rather see a proper API with access to the hardware for the iPhone instead of an Ajax one, but at Google’s devloper day, they claimed Safari support would be released for Google Gears very soon.

If Safari on the iPhone supports Gears, the Ajax only limitation seems a lot less limiting (even if it means we’ll never have Skype). Lots of people seem very upset about the idea that widgets on the iPhone will only work with a network connection, but gears should pretty easily circumvent that limitation.

That said, I’m not too hopeful if it doesn’t support flash movies. That, and, it will probably go through a revision or two before we can get them here in Australia anyway.

Technorati Tags: , , , , , ,

Mac& Software Engineering19 May 2007 11:46 pm

Getting the following error when you try to run html tidy from TextMate?

html tidy failed assertion `option_defs[ optId ].type == TidyInteger’

You’ve probably got the current (as of 19 May 2007) binary version installed by fink. If you install the one built by fink from source, or the one from the html tidy website, then it should start working.

(For what it’s worth, it seems the binary package fails with that error whenever it’s given the ‘-i’ flag to ask it to perform indentation.)

Mac& Music02 Jan 2007 06:17 pm

Perhaps it’s old news, but I had no idea that when you deleted some music which came from the iTunes Music Store from your iTunes library, you’d get the chance to restore it from your iPod.

copy_off_ipod

Nice touch , though not actually what I wanted in this case (I originally bought an album on iTMS which was corrupt, got a refund then bought the CD instead, and have now finally got to deleting the old corrupted songs).

There are a few question - If I check the ‘Don’t ask me again’ box, can I enable the feature again somehow later? Wouldn’t it be great if iTunes could somehow do this for all music (not unreasonable if both the iPod and iTunes have been authorised)? Why is iTunes using the word purchased only for iTunes Music Store music (the music from my CDs being just as purchased)?

Anyway, one way or another, it seemed like a cute feature.

Technorati Tags: , , , ,

Mac& Music30 Dec 2006 11:10 am

A while back, I was given a spoken word MP3 CD (by my girlfriend) as a present, and over Christmas I was lucky enough to be given an iPod nano (by my parents). I hadn’t put any serious effort into the iTunes audiobook thing into the past, but figured I should try to get everything in there so I could listen to it on the iPod. Surprisingly, it’s not obvious how to do, since when you import mp3s into iTunes, it assumes they are music, not audiobooks.

Anyway, after a bit of research, it turns out there is a not-too-painful way to pull it all together.

  1. The MP3s need to be translated into ACCs, ideally at a sensible spoken word bitrate, so jump into iTunes prefs -> Advanced -> Importing, and switch to ‘ACC Encoder’ and ‘Spoken Podcast’.
  2. Import all the MP3s (dragging them to iTunes), then select them all, and choose ‘Convert selection to ACC’ from the Advanced menu.
  3. Once they’re all converted, delete the MP3 versions.
  4. Install the ‘Make Bookmarkable’ script from Doug’s AppleScripts for iTunes.
  5. Select the converted ACC files, then pick ‘Make Bookmarkable’ from the scripts menu, which will change the file types so that iTunes thinks they are audiobooks.

(Unfortunatly the AppleScript part won’t work under Windows, but I believe changing the filename extensions from .m4a to .m4b and then removing and re-adding the file to iTunes should do the trick there).

Mac10 Apr 2006 08:26 pm

It took a while, but Ars Technica posted a reasonably thorough look at boot camp (which allows you to install Windows XP on an Intel Mac) today. Not having an Intel Mac, I’d been intentionally keeping out of the whole thing until someone serious had put it through it paces.

Anyway, by the sounds of it, it all works pretty much exactly as expected. Providing a tool to repartition the hard drive without erasing existing data is a very nice touch, but other than that, there doesn’t seem to be anything much special. It will be interesting to see if Apple comes up with a way to read NTFS formatted disks - I seem to remember reading that it was comparatively very complex, but presumably quite solvable if sufficient resources are thrown at it.

One open question for me is whether you can install XP on an external drive (USB or Firewire) rather than on the internal disk, but I suppose we’ll hear one way or another shortly.

Technorati Tags: , , , , ,

Mac01 Apr 2006 10:58 am

This is an idea which crossed my mind a while back, but despite the best intentions I’ve not found any time to work on it.

Basically, what I want to do it script things up so that I can export a dashboard widget to a image file, then have it automatically uploaded to my phone (via bluetooth) whenever it come into range.

The original idea crossed my mind while walking to work, thinking about what to do on the weekend, and wishing I had dashboard’s weather widget to tell me what the weather was going to be.

Now I’m sure there are a million and one other ways I could use my mobile phone to get a weather forecast, but it seems like one of those things which would be just as easy to upload whenever the phone was in range as to have the phone somehow pull from the network.

Anyway, the first stumbling block, which I only ever put an hour or so into, was finding a way to export a widget to an image file. Obviously, given the time, I could write something on top of webkit to do this, but if anyone has a ‘minimal amount of work’ trick to get this done I’d love to hear about it.

Technorati Tags: , , , , , ,

Next Page »