Saturday, November 21, 2009

Picnic Food

So,

I want more picnics. I'm writing things down now so next time I don't have to think up a list of food.

strawberries/other berries/nuts + chocolate dip / yoghurt / hot nutella
dry biscuits / bread + soft cheese / hard cheese / dips
sliced ham / twiggy sticks / cabana sausage
watermelon / sliced apple / sweet oranges
small double-layer sandwiches - mayonnaise egg tuna ham gherkins beetroot
hot chicken / potato salad / sausage rolls

Friday, November 13, 2009

Reminder: agent-based simulation.

Thursday, November 12, 2009

Geant4 and SRIM

So I've spent a while trying to get Geant4 to do ion implantations similar to SRIM. Turns out Example TestEm7 models a particle (can be an ion -- see the included C12 macro) impacting a block of material, and even includes some extra physics to make the "low-energy" ion calculation more accurate (screened nuclear stopping, custom-defined physics list standardNR, by Mendenhall and Weller). It calculates the predicted range of such ions.

Using Geant4.9.3.b01 and the standardNR physics list, my quick accuracy test gave an ion range for P-31 at 10keV (very low energy in Geant4 terms) into NIST-parameterized Si of 15nm versus SRIM-2008's 17nm (monolayer mode). Both give rms values of about 5-6nm.

To get energies and positions of transmitted particles requires some editing of the C++ code.

Why am I doing this? SRIM only does layers of material, I'm trying to model a more complicated geometry.

Thursday, October 01, 2009

X Sharing Screens

Found this in my archive, I dunno where from..

When I pop up with my laptop to discuss with a colleague, after a while I might do on their computer:
xhost +mylaptopname

and on my laptop I do:
x2x thecomputername:0 -west

Then suddenly my mouse can go over the two computers, my keyboard works on both as well, and I can even copy-paste between the two computers. It looks like the two computers got united. In a flash, newbies get a new idea of what means unix and X ;-

but I thought it was worth reposting.



Sunday, September 13, 2009

Ubuntu Jaunty seems to have just updated its wireless network and broke my settings. Had to change the mode from Infrastructure to Ad-Hoc in the connection settings.

Friday, September 04, 2009

Techdirt

This is a bit of an e-vote for TechDirt. I don't agree with everything those guys say, but lately they've had several in-depth articles and they research their stuff well and are honest when they're wrong.

Techdirt.

However, I was a bit annoyed at them dissing CSIRO's wifi patent. I mean, fine, the patent system is heavily abused, but the suggestion that CSIRO should have become a wifi device manufacturer instead of licensing out the technology is a bit ridiculous. And they did license it -- the companies involved just tried to weasel out of paying up once they'd learned everything they needed.

Monday, August 31, 2009

Last Piece Puzzle

So I was away on holiday and I found a puzzle called the Last Piece Puzzle. Basically trying to arrange tetris-like pieces to fill a square with no gaps.

I wrote a program to solve it, which was going to take about thirty years to try every combination. The second attempt found all possible solutions in about 2 minutes.

The difference between the two algorithms is what gets me - it's so subtle. The first algorithm picked a piece and then tried every position on the board for that piece, then once it found a position, it moved on to the next piece. The problem here is that there were often holes left behind that no piece would fit into, so it spent a lot of time trying to solve a board that obviously couldn't be solved.
The second algorithm was only slightly different - instead of trying the pieces in order, try to fill the squares in order. This way there were almost no holes (or the holes were found without too much extra effort) and the algorithm turned out to be hugely faster.

There was a contest to solve it in lisp - the fastest solution there was 0.3 seconds. My second attempt copied the winning algorithm there.

My solution is also floating around.

In total, there are five possible solutions: