Thursday, December 31, 2009

Macbook Memory and Swap files tip

If you are like me, meaning (in this special case):
  • don't like to reboot your Macbook and have it running for weeks,
  • from time to time have some heavy computing sessions with dozens of progs running,
  • realising, that OS X Snow Leopard still does not manage its memory efficiently, by for example releasing the many and huge swap files created for these heavy computing sessions after these programs have been closed, even so your memory monitor shows you, that you have plenty of free RAM left
  • and you still don't want to reboot to remedy this problem (= OSX still using the swap files, even so it has free RAM).
you could try the following in a Terminal (found here: Link, but I save you from reading all that.. ;) )
  • sudo purge
  • sudo killall -HUP dynamic_pager
From the manpage of purge:
Purge can be used to approximate initial boot conditions with a cold disk buffer
cache for performance analysis. It does not affect anonymous memory that has been
allocated through malloc, vm_allocate, etc.

dynamic_pager is the prog responsible for the swap files on the Mac. This command is what you could call a 'friendly' kill, because it asks to 'HangUP' on the program, not just to terminate it.
I have tried it and so far it looks very efficient, and saved me already 1 or 2 reboots after only 1 day (of heavy computing.. ;)

Enjoy and Happy New Year to all my 2.3 readers.. ;)

Wednesday, December 9, 2009

Mac data analysis tip of the day

So, you have a lot of plots/images in a folder, but you now only want to look at some of them.
Fortunately, in a Terminal, you could easily 'grab' the right ones by shell globbing (=a form of pattern matching for you non-geeks out there), meaning:

Let's say you have plots/images ending in *.profile.png and *.histo.png, so you easily 'grab' only the profiles by ls *.profile.png, nothing easier than that, but how do you get Mac's Preview now to show this choice to you?

Well, as so often, Mac OS just does the right thing:
You type: 'open *.profile.png' and you get all plots/images nicely put into one Preview window.

A slight setback, but logical:
So far they are treated as single documents, so if you just hit Cmd-P to get a print of all your analyis work, you only get offered to print the currently-selected one.
Even a Cmd-A to select all does NOT change this completely, but is on the right track: After selecting all images you can use the File->Print Selected Images menu entry (Or Alt-Cmd-P) to do just that.
And of course with that you can now print again into a new PDF file to have your plots nicely saved all together.

So, I would call this 'efficiency-with-a-hickup', but nevertheless a much more workable and faster solution to produce a pdf out of a shell-globbed (you don't wanna mouse select every 2nd or 3rd image in your folder now, would you?) selection than possible under pure *nix or *doze..
(I timed it, took me rougly 20 seconds to get the pdf, and only because I couldn't decide nor type the resulting filename ;)

PS.: The way to combine/edit PDFs has slightly changed in SL, get the details here.

Wednesday, November 4, 2009

Using the space station: where does the US go from here?

With the International Space Station nearly completely assembled, attention now turns to how to best utilize it. Taylor Dinerman explains how that will depend on how much access scientists will have to it once the shuttle is retired.

.
.
.
.
A lot!

Monday, June 22, 2009

A2DP on iPhone with P590

Just tried to connect my Plantronics P590 to my iPhone 3G that I updated last week to 3.0.
I am running this for 20 minutes now, and so far I love it in total.
Some points I noticed:
  • Quite some bass coming from the P590.
  • There are some problems, some songs show skipping like an old CD player, and even more enerving is a pitch-down effect (not good for musical ears).I found in some forums that there are indications that this only happens for self-imported tracks and not for iTunes tracks bought on iTunes? I would find this a weird selection effect and would propose that this is caused by differences between mp3 (less efficient) and ac3 (more efficient)?
  • Volume control is after pairing with headset blocked on iPhone and solely done via the headset
  • With the P590 next and previous track selection does NOT work.
  • Even high data rate songs in m4a format (lossless) play nicely via the headset. They /might/ sound a bit better, but that might be wishful thinking as the bluetooth encoder might reduce that quality all away
So overall I am very pleased that this is finally in the iPhone OS, pity that next track does not work with the P590, but I am looking anyway for a new Stereo Bluetooth headset, want to try in-ear plugs this time.

Tuesday, June 2, 2009

Bug in Project 2007

When formatting the Gantt Chart Bar Styles in a way, that something is put on top of the bar, so that the height of rows have to be expanded for it to make space, the bars become invisible in the print-out.

Friday, February 27, 2009

Significances

What does a significance of three sigma mean ? Four sigma ? Five sigma ?

  • something not so rare; something quite rare; something exceptionally rare.
  • evidence of some new phenomenon; strong evidence of same; observation of new physics!
  • evidence of something fishy; a bug in the code; a horrible bug in the code.