No more pink walls

    Still kickin

    Browsing Posts in Apple

    Tonight I was in a very retro mood. I was also bored. In the end I set OSX to black and white then browsed the net for an hour or so. Its very refreshing actually. If there was some filter to apply small amounts of static/graininess or dramatically reduce exposure that’d be cool too. Kind of like what an old cheap B&W film.

    When I got bored of that I set it to B&W negative. Now I have a headache.

    I tried to take screenshots, but of course they simply turn back to colour when you take the filter off. Shame OSX doesn’t easily let you reduce colours to greyscale.

    One of the funky new features on the MacBook is the built in iSight. OK, let’s not beat around the bush, its a webcam that is built into the screen, which is a pretty useful gadget in some cases.
    Currently though, I’m yet to find it anything more than a toy. As its the only webcam that I currently have available to me, its useless as video chat device, although I’m sure this will be cool in the future, and as its on a laptop that gets switched off and on all the time, it can’t really be used as a 24×7 webcam.

    Still though, the owner of this particular Macbook seems to like it, particularly some of the funky little apps that come with it that can apply some pretty nifty filters in real time.

    Correction, she did seem to like it. Right up to the point when, completely unknown to her, I ssh’d in, copied over a little app for taking pics through the webcam and wrote a script to routinely copy these back onto my PC, then showed her the pics (that were, of course, of herself). Apparently doing this sort of thing remotely (ie from a different building) is against the rules.

    Go Figure.

    Just to set the scene….
    The MacBook is running like a charm. Its been on basicaly since it arrived with only 1 or 2 reboots due to OS updates, but certainly no crashes. So just another day at the office for a Mac really.

    I goto install Windows on it1
    Within 4 minutes I have received a bluescreen and things are corrupt. Need I say more?

    1) Windows is required for work purposes.

    Well it finally arrived. OK finally is probably a bit unfair as it was a week before Apple’s original arrival date, but it seemed like a damn long while. That’s right, the MacBook.
    What can I say that anybody reading this probably hasn’t seen 10 times before? I’ve yet to really notice any flaws with the unit, its fast as hell, looks great and, being a Mac, just works.


    Hear are my thoughts on what have been some of the more ‘controversial’ aspects of the MB:

    • The screen: When I read that Apple had switched to a glossy screen for the MB I was a little concerned. I’d seen glossy laptop screens before and thought them to be just annoying, especially when looking at them from any angle other than straight on. Well there was absolutely nothing to be worried about. The screen is far less glossy than other laptop screens but is bright, very clear and the colours are strong. Infact I’d been using it for about an hour before even realising that its a glossy screen. The glossiness can be noticed clearly when the unit is off or something very dark is taking up most of the screen (How often does this happen on a mac tho?) but other than that you don’t see it. It took me 5 goes take a picture with it on where you can even see the glossiness, I had to take it from an angle with the flash up high:
    • Heat – This one also concerned me greatly. I’d had visions of burnt thighs and, more worryingly, the unrelenting genocide of my little swimmers. Back to reality though, it gets hot but not burning hot. I haven’t really stressed it at all yet as I’ve only been transferring data and installing apps, but if anything, its probably running cooler than the 15″ PowerMac that I’ve used in the past.
    • The keyboard – Again when the first pics came out I thought the following:
      “Great, Apple have decided to reinvent another input device that everyone was happy with anyway”
      )Yes, incase you couldn’t tell, I was bitten by the MightyMouse disaster) Again back in reality, the keyboard is the same as any other on a laptop. The keys are really nice to type on, probably better than previous Apple laptops that I’ve used, but not necesarilly better than some other brands of laptops. This is obviously personal preference but I’ve felt that some of the xBooks in the past have had too little movement in the keys or that they are too firm. I’m not really sure as its a hard thing to define, but I’ve prefered, say, the keyboard on my (Shock Horror!!) Thinkpad. Up until now that is.

    Other than that there’s very little other than what you would expect. I’m running emulated apps without even realising so there’s no problems there. The magnetic power cord is fantastic, especially the little light on it, the iSight is a great little toy, the wireless is better than previous Apple portables and the new features on the trackpad are pretty nice too (Once you get used to them).

    All up, there’s not much more to say about it. I can’t find fault in any areas, especially the ones they may have been a little worrying. Easily one of the nicest laptop packages I’ve ever used.

    Its been coming for a while but today I decided that I’d upgrade the memory in the trusty MacMini. The 512mb it had in it was fine but open a few applications, or start playing Wow, and it really starts to chug. Put your ear up to it (I love how quiet the little thing is!) and very quicly you realise its thrashing its poor little heart out.

    Unfortunately its a Gen-1 Mini so only the one RAM slot. Frustrating, but far from difficult. After doing a quick bit of reading I discover that Macs, particularly the Mini’s, seem to be a little bit fussy about their RAM. PC2700 or PC3200 only and must be low density. Fine.

    So I headed off to the monthly swap meet and purchased a 1gb stick of what I was assured was highly compatible PC3200 RAM, Kingston brand too so its not like it was the ultra crappy stuff.

    I bring it home and the fun begins.

    Normally when you think about replacing RAM you just whip out the ‘ol phillips head and 30 seconds later you’re clicking in sticks. With the Mini however, things are a little different. First, and probably most importantly, there are no screws so lose the driver. Its top is held on by a bunch (15) of plastic clips around the sides and front that are more than a little fiddly to get undone. Flipping the little box over reveals no obvious way to get at them. Now I’d read a few articles I found on Google that said the bes way was to stick 2 putty knives down the sides and press to release the clips. Easy done. Long story short here are my notes on disassembly of a Mac Mini:

    • 1 putty knife is more than sufficient for the job. I believe that two would actually make it trickier as you can’t hold the unit as easily.
    • You don’t need to stick the knife in very far. I made the mistake of thinking that I had to push it most of the way into the unit. All this achieves is ripping the seal that goes around the edge of the case which appears to be for sound insulation. The hard bit is getting the knife into the crack initially, once its in you shouldn’t have to use much pressure to push it down.
    • These clips are hard little buggers and just like everyone says they do take a fair bit of effort to pry open

    So anyway I finally get the top off and witness the simply beautiful piece of engineering that is the Mac Mini.


    After removing the antenna for the wireless/bluetooth (Not sure which) I popped out the old ram and slotted in the new. All very standard, much like any x86 unit. I may only be 23 but I’ve done these sorts of operations long enough to know that you don’t put everything back togerther until you know it works so I dutifully plugged the naked Mini back in.

    I hit the power button and….
    BEEP!
    Steve happened to be in the room at the time and we both just looked up and said:
    “Beep’s not good”
    Nothing appeared on the screen and the power light just flashed on the front. Damn. DAMN!
    I removed the stick and put it back in to make sure it had seated properly, I’d read that 1 beep on powerup meant that no ram was detected so I thought it may have just been badly seated. Try again….
    BEEP!
    OK, i tell myself, nothing to worry about, probably just needs its logic board cleared or something. I told myself this, but I knew it wasn’t right. I knew that it simply meant the Mini was turning its nose up to the ram.

    Eventually I popped the original 512mb stick back in and it fired up perfectly. The nail in the coffin really. I tried the 1gb stick in my P4 and it ran like a charm, bummer, was kinda hoping the stick may have just been a dud.

    So I’m left with a 1gb ram stick thats very much non Mac compatible. I’ve had a few offers to buy it from me so I’m not really worried about being out of pocket (I did get it for a pretty good price, apparently the vendor was selling it for a $3 profit). The mini is now going to run naked for a while as there’s no way I’m putting that cover back on just so I can take it off again henever this new RAM arrives.
    Its a lesson in Macs though and really it was pretty frustating. I did my homework and bought exactly what i thought was needed and yet it still didn’t work. I guess I’ll just have to spend a few more dollars and get something that is gauranteed for a Mini, Apple tax strikes again (Even if it doesn’t go directly to them)

    Well I’ve finally finished the write-up for my Altivec vs SSE testing. Believe it or not its quite an interesting read (Even if I do say so myself) and if you’ve ever wondered about what exactly SIMD is then its not a bad place to start.

    The report is available here

    IM Tales

    2 comments

    As much as it pains me to admit this so unequivocally, the Frog was right. I’m referring to the MacOS multi protocol messenger, AdiumX. This product is simply amazing. Everything is infintely customisable and tweaking it into the perfect, unobtrusive IM client that still provides the necesary notifications is not only possible, its made to look gorgeous at the same time.

    If anyone out there is using a Mac and IM without AdiumX then you are missing out big time. Like the Frog said in his own post, Fire was good, but this is so much better.

    Now if only there was a linux equivalent that was even in the ballpark.

    AS promised here are the results from the testing with the SIMD code. If you have no idea what I’m talking about see my previous entry here

    Results 1
    and
    Results 2

    As can be seen there was quite a bit of variance accross the different systems. The P4 2.80 really seems to come out on top everywhere and I can only put it down to the fact that it was the only system in the group that has SSe3 capabilites. I also wish to run the tests on this machine underclocked to 1.4Ghz under linux as I believe it will yeild slightly different results.

    Also I’ve recently learned that the speed of SSE on a chip is largely independant of its core clock speed, hence the similarities thats can be seen between SSE scores.

    Stay tuned for more details

    [Update]: The final results from this work can be found at http://noisymime.org/blog/?p=20 

    For the last few weeks I’ve been playing around using Single Instruction Multiple Data (SIMD) instruction sets. More specifically I’ve been trying to do a very high level, basic comparison of Altivec and SSE as it seems like something that is both intersting and relevant considering Apples imminent move to Intel.

    However, this seemingly simple comparison has a number of problems at the practical level. Firstly, there is no chip in production that supports both Altivec and SSE, nor does it appear as if there ever will be. This immediatly rules out a direct comparison. Secondly, and this is obvious but still a necesary point, there is no single architecture (ie x86, ppc etc) that has Altivec and SSE chips, making comparison even trickier.
    Finally thie clincher, I’m an impoverished uni student so any grand hopes of testing accross many different setups was always going to be impossible.

    The Plan
    Write a simple program that serves very little purpose other than to stress the SIMD units of various chips. Obviously repetitive is the name of the game here as SIMD units come into their own when dealing with unrolling loops. In this case a pi generator was chosen and all compiling would be done in gcc-4.0, no direct ASM code was to be written.

    The Hardware
    Obviously I needed test beds capable of running Altivec and SSE. Altivec was covered with both my Mac Mini (G4 1.4ghz) and the iMac (G5 1.8ghz). SSE was taken care of by my trusty P4 2.8 (Prescott). There was, unforunately a significant clock speed difference but it was unavoidable as I do not have access to faster ppc machines or a slower x86 (with unix)

    What does it do?
    OK so I wrote a little pi generator that uses basicly the most inneficient method of calculating pi, the series 1-1/3+1/5-1/7 … ~= pi/4. Initially I wrote up a version that uses the CPU alone. No unrolling of loops, no ‘normal’ optimisations, just basic, raw CPU grunt. I then wrote up versions of this that do their work with Altivec and SSE packed vectors. These two are almost identical except for the intrinsic names (These vary between Altivec and SSE) and 1 other, probably important detail. The SSE instruction set contains a hardware divide function whereas Altivec relies upon a software implementation of this.
    The Macs were both running OSX 10.4 (Tiger) whilst the P4 has been tested in linux (Ubuntu, Hoary) and the hacked Intel version of OSX.
    The pi generator itself performs a 128,000 iteration loop 1000 times in order to complete this testing.

    The results
    OK, the results amazed, confused and annoyed me. Instead of getting the nice spread of results I was hoping for, I came out with 1 clear leader. The P4 blew the other two machines apart, both in linux and OSX. By blew away, I mean the other two couldn’t even come close. The raw CPU time for the P4 was nearly twice as fast as the Altivec enhanced time of the Mini. Of course I expected the P4 to be faster in raw CPU due to its higher clock speed, but I did NOT expect it to be faster than the Altivec version, at least not by such a significant margin.
    Unfortunately the G5 decided to pack it in during testing. It gave results that were (considerably) slower than the mini and then crapped itself. Its back with Apple as I write this.
    I will be posting ‘exact’ results tomorrow for this, though roughly this is how it broke down:
    G4 1.4 PPC Raw CPU: 7 seconds
    G4 1.4 PPC Altivec: 2.5 seconds
    P4 2.8 Raw CPU: 1.5 seconds
    P4 2.8 SSE: 0.8 seconds

    There was practically no difference between the P4 in linux and OSX (They use the same header files etc so no real surprises). The difference between the Altivec and SSE times really amazed me though. The code is practically the same in each case (just changed for the platform) and yet the difference is more than would be expected from the clock speed difference alone.
    It should also be noted that the code on the P4 was using SSE2, NOT SSE3.

    So in the hope of getting some results that are even slightly comparable, the next step is to underclock the P4 and try again. I also wish to try some older, slower x86 CPUs if I can get a hold of them.

    Notes
    OK, this whole thing was aimed at being a programming learning experience rather than a comparison. These are my major notes:
    – Documentation for SSE is _terrible_! I’m sure its out there somewhere but I could find very little. Apple provide a small amount but even that is more related to migrating code (Altivec -> SSE) and there is not much on the additional features of SSE (ie the divide intrinsic and double precision variables)
    – Altivec is a ‘nicer’ interface than SSE. I’m sure this is due to Apples influence but there is a lot less ‘ugliness’ about it compared to SSE.
    – Its quite easy to get good improvement using both Altivec and SSE
    – I’ve really only scratched the surface of SIMD and its something I’d like to play with more down the line. Adding to my list of things to play with when I’ve finished this damn year.

    Impressed

    13 comments

    Well I’ve been having problems with the Mac. Disapointing I know. Its especially difficult trying to convince people how good the system is when it dies.

    Anyway I decided that the only step forward (Other than sending the damn thing back to Apple again) was to reinstall OSX. So I start doing all the things I normally do when reinstalling an OS. I copy my data. I make backups of all the application installers I can find. I backup all the data from the other userID on this PC. It takes a while.

    Eventually I stick in the OSX install disc and boot to it. I select the option to use existing user profiles on the new install and progress through normally. When the thing finishes and boots up I am blown away to find that the system is exactly as it was before! Not in the sense that it crashes all the time (This is still yet to be seen) but in the sense that my profile, the profile of the other user, applications and configs are all exactly the same! 90% of applications are still there are working without the need for a reinstall. At first glance I would swear that the installer didn’t actually do anything except for the fact that it actually boots up again.

    I know this is what a modern operating system SHOULD do, but I was blown away by the fact that this actually did it. More impressed with Apple, now if only it doesn’t start crashing again I’ll be positively delighted.

    Edit: OK the problem began reoccuring. bugger. Anyway long story short, and this will sound stupid, but I think its possible that it might be gcc-4.0 causing the problem.
    no I don’t have any technical reason to back this up (Maybe someone can help here) but after installing it the problem began again, after removing it and replacing it with gcc 3 I haven’t excperienced a single crash. I’ve fired up a heap of memory/CPU intensive apps and pushed pretty hard, but no crashes. If anyone can provide a reason for this I would love to hear it. Does gcc-4.0 replace any system files when its installed? its hard to imagine but its the only thing that even remotely makes sense.