2007-12-31

html2pml

I was tired of converting all my HTML ebooks to rtf, then to pdb using Palm Doc Converter only to lose all the nice touches like bold, italics and headings. Since there didn't seem to be a HTML to PML converter for OS X, I wrote one to get more practice in python.



html2pml.py will convert basic HTML file to a PML file suitable for use with DropBook to be converted into a proper Palm ebook. I must stress the basic part - it only does stylistic conversions at the moment. I have no need for tables or links, so I didn't write them in. It does however do what I want - preserve bold and italic attributes, headings, and also translates some non-ascii characters into PML Extended Character Set, and to plain ascii where not possible.



This small python script is released under GPLv2, license is attached. If you find it useful, need more features, or have comments/suggestions, let me know!





Cheers,

Steve

2007-12-30

Hugin Preview Tip

When setting the field of view in Hugin via the preview window, the restitch and remap of the images takes a fair bit of time when the panorama consists of many high resolution images. This can make the process of finding an acceptable FOV frustrating. One way to speed up this process is to disable all images except for those at the boundary. This way each update involves relatively few images and you get more responsive feedback.





For example, if the panorama is a long strip, then you only need to enable the image at the start and the end of the strip.





Cheers,

Steve

2007-12-28

It is already paying off

ars technica reports that the Rudd Government is going to scrap Human Services Access Card, the national ID card in disguise.



Voting for Rudd was definitly the right choice.





Cheers,

Steve

2007-12-24

Fitting A Round Peg Into A Square Hole

The Australian Government is busy fitting an outdated concept into the modern world - they want to censor the Internet the same way TV and movies are censored. The Communications Legislation Amendment (Content Service) Act 2007 (Content Service Act) was passed on 20th of July 2007. This Act inserts a new schedule for regulating all content services delivered via carriage services. This includes:



  1. Prohibiting access to X18+ and RC content;

  2. Prohibiting access to R18+ content, unless access is restricted;

  3. Prohibiting access to MA15+ content, unless access is restricted;

  4. Providers of hosting services, live content services, link services and commercial content services to have in place access restrictions if providing R18+ and commercial MA15+ content;

  5. ‘take down’, ‘service cessation’ and ‘link deletion’ notices to remove content or access to content that is the subject of a complaint; and

  6. A co-regulatory approach that provides for the development of industry codes to address issues including the classification of content, procedures for handling complaints about content and increasing awareness of potential safety issues associated with the use of content services.


I would like to draw attention to point 4, which suffers a severe departure from reality and shows that the legislators behind this Act is out of touch with the modern world.



Firstly, in order for Internet Service Providers (ISP) to determine of R18+ or MA15+ content is being accessed via their network, they would need to monitor in real time the activities of its customers, which is a severe violation of customer privacy.



Secondly, ISPs would need a system which can classify terabytes of information, in a hundred different formats and languages in real time. There are two major problems:



  1. To create such a system would require breakthroughs in image processing, computer linguistics, voice recognition, expert systems, communication and many other fields. It is not to say it can’t be done - it certainly can be done, but at great expense and almost certainly not in the immediate future.

  2. Such a system would be rendered impotent by encryption.


Encryption is Achilles’ heel of this and similar legislations. Encryption allows two parties to securely exchange information i.e. between a website and a web browser. Against encryption even the most sophisticated monitoring systems will fail because they can not access the information being exchanged. There is no way for an ISP to know if the encrypted information they are carrying is R18+ or G rated.



Sure one can block communication based on its point of origin, but there is at the last count more than 108 million websites. The cost of setting up a new website in terms of cost and time is minimal - web hosting and domain name registration costs less than 10usd per month, in others words peanuts. I sincerely hope the futility of doing this is evident. Further the origin of information is no guarantee as to its content. Such a blacklist will inevitably render many innocent websites inaccessible.



Before any one points to the Great Firewall of China as a triumphant example of Internet censorship done right, please consider for a moment the kind of country China is. There is a reason China is one of the two lowest ranking countries in Privacy International’s 2006 International Privacy Ranking, and amongst the Top 20 offenders in The Observer’s Human Right Index 2000.



The Australian Government needs realise that the Internet is a vastly differently beast compared to traditional media. It is the preverbal square hole to the round peg of censorship. Traditional media can be censored relatively easily because its distribution is bounded by location - that is to say the points of distribution, i.e. cinemas, stores, and radio towers, are all on Australian soil and operated by Australian companies. This makes it easy to enforce Australian law and to censor material. New media on the other hand is delivered over the Internet, and has no such limitations. Anyone, either an individual or an organisation, can distribute any material they wish to anyone in the world over the Internet encrypted if needed. In short, Australian law can not be applied to distributors of new media outside Australia, and there is no way determine the nature of encrypted content in order to censor it.



There are of course more problems with this new legislation. One is the requirement to restrict access to contents based on a person’s age. The Government seem not to have learnt from its failure to enforce such restrictions on traditional media. How exactly they hope to achieve it with new media has not been made public - they have only made it known they want it to be so. Perhaps they will require you to present 100 points of ID to a Government representative to purchase a Government approved computer with which to access the Internet, then get council approval of your new “Internet Room” which is shielded from electromagnetic and audio eavesdropping, locked to your fingerprint and retina. It is to protect the children you see.



All in all, the new legislation and the Australian Communication and Media Authority’s new rules are a nothing more than unrealistic wish lists. Wishing for something however doesn’t make it true.



Am I worried about the Government’s attempt at censoring the Internet? No at all. I am quietly confident that it will fail. I am worried what this will cost the Australian people, and whether its inevitable failure will be used as justification to pass more draconian laws all in the name of “protecting the children”.




Cheers,

Steve

2007-12-13

Computing Oddities

Two strange and weird things happened to me recently. One is my /dev/null disappearing from leopard!




A large number of programs, both Cocoa and *nix relies on /dev/null being present. As you can see I could not gain root privileges, and thus could not recreate /dev/null (character device, 3,2). I had to in the end reboot and /dev/null was recreated.

Second strange thing is when I created a self-signed certificate for use with apache2 (for anonshare). I created it with openssl specifying 36500 for -days. The result is an certificate with expiration date in the past!





I am not aware of any X.509 specification regarding the number of days a certificate can be valid for, so I wonder - is this a bug in openssl?





Cheers,

Steve

2007-12-10

Note Taking with Palm TX

I have a palm TX which is my indispensable companion. It handily beats my old ipaq4150 for reliability, battery life, utility and style. One thing which I have found to be difficult in using boths palms and pocketpcs, is note taking naturally by treating the stylus and pda as pen and paper.



I have tried diddlebug, the builtin note pad, and a variety of the other programs. None of which really worked well. Primarily these are limited by the lack of screen estate, which meant you either write in tiny script (hard on a pda), or quickly run out of horizontal space. Even with the new landscape mode of the TX there still wasn't enough horizontal space



Today I came up on pennovate notes. It allows you to treat your pda's screen as if it is a small window onto a large piece of paper. That is when you "write" towards the right past a certain point, and lift your stylus up, its intelliscroll feature kicks in and automagically scroll to the right for you, so you can keep writing! The result is a note taking style as close to real pen and paper as I have yet experienced. It is in a word, brilliant.



Best yet, they have a lite edition, which is perfect for a poor student like myself.





Cheers,

Steve

2007-11-23

SHA hashes and OS X

From my other website, though I would share here too.



A Steve Special this one. Tiger came with sha* digests binaries, but not Leopard. So here is how you can get them back. Insert into your .bashrc:




alias 'sha'='openssl dgst -sha'

alias 'sha1'='openssl dgst -sha1'



# the following lines only applies if you have openssl installed via darwin ports

alias 'sha2'='openssl dgst -sha256'

alias 'sha5'='openssl dgst -sha512'



Usage is simple, for example:



sha1 $file




Cheers,

Steve

2007-11-22

Personification of Programming languages

The following personifications of programming languages came about while I was discussing various languages with my friends. Basically we started off with a description or sentence about a language, and I personified. In spirit it is the OS-tans but for programming languages



C


"Very fast, good at a few things, sucks at everything else". An autistic girl who is very good at maths. You will also need to keep sharp objects away from her because she is happy to run with scissors, so to speak. Does exactly as you tell her, even if it means grievous harm to herself or others. Needs to be kept in a padded room to avoid hurting herself and others.



C++


"I don't want code in it, but I can't help but like it". A girl who is so pretty you can't help but like her. Unfortunately she is also bat-shit insane, and will scratch your eyes out.



Python


"Very flexible, does everything easily and without complaint, but slow as hell". A girl who is flexible and easy going. Can do complicated contortions easily, an absolute joy to be with. Only thing is she is a bit thick.



Java


"Overtly verbose, unnecessarily strict, but pretty fast". She is one of those girls who you need to constantly buy gifts for in order to keep her satisfied. She will also continually talk non-stop about a variety of things, most of them inane. However she is of average intelligence and comes with a lot of accessories by default.



ASM


"Its like C, only dumber". Well thats it really. ASM is C-like, but even more autistic and a bit more dangerous.



Perl


"Well, its perl". Ah, perl. Perl is a girl like python, except she doesn't speak your language, and you don't speak her language. Over time the two of you have worked out a pidgin language which is a mismush of sign language, latin, french, foot stomping, hip gyrations, eye rolling, tongue poking, and so forth. No one else knows what you and perl are saying, and sometimes you don't even know what each other is saying and can only make wild guesses.



Thats all I have for now, will update when I have more to write :-)





Cheers,

Steve

2007-11-14

What Checks and Balances?

So the anti-riot laws introduced after a serious riot and subsequent revenge attacks are here to stay, after the Ombudsman's recommendations. But here is the rub though - the government accepted the recommendation to keep the new powers, but rejected the recommendations which would have provided checks and balances. These checks and balances include:




  • the "reasonable suspicion" test for searches of persons performed under these powers.

  • accountability of the police by requiring the police commissioner to report on use of these powers anually



It seems there is a serious flaw in the review process. When the government can chose which recommendations to accept independently of, checks and balances are the first to go out the window. These new laws means one can be searched without reasonable suspicion, and with no senior level accountability.



While we would like to think that the police will use these powers responsibly, the fact is it will be abused, most likely in the name of good. With each passing legislations, our civili liberties, our privacy, and the government's accountability is slowly being whittled away. What is the point of a safe life behind bars?






Cheers,

Steve

2007-11-13

A Rant about Cherries and Science.

There is a problem with science today. Actually, no. There is a problem with the people of today which makes them easily exploited by  detractors of science.



Science generates a lot of data. Most of that data is easily accessible. It is also  easily searchable. The consequence is that regardless of what you are trying to prove, you are  bound to find some data supporting you. This problem is compounded by the fact data is being continuously collect by ever more accurate instruments. As new data is integrated the context within which data is interpreted broadens. This sometimes renders previous interpretations. As a result, if you look back far enough, you are  likely to find data which supports you.



Similarly there are now more scientists than before, which is wonderful (or is it?  has the % of scientist risen?), but it also means you are bound to find a scientist in a field who lends you support. Often your supporting scientist isn't an expert in that field in which you are making your claims.



All of this means one can easily mislead a lazy and uncritical public (majority of the population) all you have to do is find studies which support your claims, and some sound byte from  a scientist who supports you, and viola! You now have a seemingly credible foundation for your claims! It is easy to pick rotten cherries when there are so many cherries to pick from.



Richard Feynman was once told America Army had great generals. When pressed for what is a  definition of a great general, he was told one who has won five battles consequatively. When asked how many great generals are in the American Army, he was told "a few". When he pressed, he was told a small percentage. He then asked what is the chance of a general winning a battle five times in a roll, if he had 50% chance of winning it. It came out to a few percent. He then asked if there were any generals who won ten battles in roll...





Cheers,

Steve

2007-11-04

Now you can all look and see how much I suck

Mactorii is now open sourced! GPLv2 for the curious. I haven't cleaned it up at all, which means be prepared to stab your eyes out with rusty fork after viewing the source. James told me not to bother, "cause then you will never release it". So blame James, its his fault/.






Cheers,

Steve

2007-10-30

Headbot1



An interesting note about the solar panel used: I bought it from solarbotics, and the panel "burnt out" after a few hours in the sun. Several of the subcells were noticeably darker and the headbot will no longer activiate under my testing lamp. Changing the panels to one in storage fixed the problem and it was once again responsive under my normal test lamp. An email has been sent regarding these solar panels which don't seem to like the sun :P





Cheers,

Steve

2007-10-22

Unexpected behaviour from photovore1

Someone whose name I can not recall once said there was no point in simulating robotic behaviour unless you can simulate everything. That is to say, you are better off building one to see what problems are instead of trying to find problems by simulation. I saw the wisdom of this today, when I took photovore1 to play in the Sun.



Photovore1 is slightly asymmetrical, that is it tends to go to the left. An interesting thing happens when its left FLED is in the shadows - it follows the edge of the shadow! This behaviour comes about because the FLEDs are inhibited by light. So the right FLED in sun light is inhibited from firing, so the left FLED fires and pushes the robot right (the FLED trigger motors on their own side). However once the left FLED has the shadow, the aforementioned asymmetry comes into play and photovore1 veers to the left again! Effectively photovore1 follows any shadow on its left.



Neat huh? Completely unintended consequence that arises out of its constructions and its interactions with the environment. Something simulation would not have found :-D




Cheers,

Steve

Scientific reasoning and poker

If scientific reasoning were limited to the logical processes of arithmetic, we should not get very far in our understanding of the physical world. One might as well attempt to grasp the game of poker entirely by the use of the mathematics of probability. - Vannevar Bush



Cheers,

Steve

2007-10-03

Sciences

The sciences do not try to explain, they hardly even try to interpret, they mainly make models. By a model is meant a mathematical construct which, with the addition of certain verbal interpretations, describes observed phenomena. The justification of such a mathematical construct is solely and precisely that it is expected to work.

--Johann Von Neumann




Cheers,

Steve

2007-09-29

Being Human

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

-Robert A. Heinlein




Cheers,

Steve

2007-09-24

mactorii

&tBeen working this for 2 days, it implements the same algorithm pictorii did, only now it will operate on your local files.

It is pretty nifty, so give it a twirl if you use OS X. It is written in python, so it run on *nix too, except I haven't got around to packaging it.

Some features:


  • Sorts images based on similarity to a chosen image

  • Clusters images based on their similarity

  • qiv-esque delete

  • Unlimited undelete








Cheers,

Steve

2007-09-22

Tears of God

Alourin stood with his company on a hill, looking down at a landscape cracked and lifeless. Like the rest of the world it had been ravaged by the Blood Wars for centuries. No harvest has been had anywhere in the world for the last decade . What started as a war over blood debts had become a war over the last morsels of food.



A single clear note blasted though the air, signalling the advance . Alourin raised his Legion shield and spear off the ground, and began to march in step with his comrades. The opposing Werrin army, replesendent in green shields with a blood red motif, mirrored the manouvre.



Even though five hundred meters separated the two armies, the battle had already been joined. In the sky above Alourin majikal energies were hurled by the crafters on both sides, each seeking to breach the others' defenses. Lights flared as spells met with shields and the mortal men below casted shifting shadows. From time to time Alourin would hear a terrible cry behind him - the death of one of Penora's crafters. For a brief moment a section of the front line would be vulnerable to enemy spells, and lightening would strike or fire would suddenly blossom - everything the enemy did in the brief moments it took for the majikal shields to be restored was deadly.



Alourin marched on with his company - whatever the crafters did, there was nothing he could do about it. He trusted Merilo, the crafter responsible for his section of the line.



At two hundred meters the arrows began to fly. Like all weapons they were imbued with spells, designed to penetrate shields and enchanted armour. Most were incinerated or deflected by defences woven by the crafters on each side, but some aided by particular powerful or novel spells found flesh.



Blood flowed, and men died.



Alourin tracked a flight of arrows as it rose and fell towards his company. When they suddenly disappeared in mid-air he assumed it was merely Merilo doing his job - so he was startled when they reappeared a few meters along their original trajectory. Realisation hit him - the enemy had teleported the arrows past the shields! There was no time to raise his shield, he prayed he wouldn't be hit. But he was.



An arrow struck him a glancing blow on the left shoulder plate and crumbled as if it had been made out of dried sand. Relief flooded over Alourin as comphrension dawned - Merilo had countered the enemy's tactic by unbinding the arrow's molecules.



Marching on with a renewed sense of invulnerability, Alourin and his company closed with the enemy. In the twisted lightscape the two armies approached each other, and the majik al contests increased in ferocity as the nobility of both sides bought their talents to the fore . Calvary could be seen dashing off, each attempting to outflank the other, the enchanted warhorses unaturally swift.



At long last neither side could contain their fear or blood lust. The battle lines surged towards each other. Alourin lead his company's charge, yelling an ancient battle cry as all around him lesser majik exploded forth from weapons and was met by charmed armour. Alourin plunged into a raging storm of light and majik.



When he judged the distance to be right, Alourin threw his spear at the oncoming enemy. It struck a Werrin infantryman 's shield. The penetration spell imbued in the spear head burst against the shield's protective enchantment. There was a flash of violet and the spear fell to the ground harmless. Undeterred Alourin drew his short sword and marked the infantryman whose shield he'd hit - that shield was now weakened. Similar scenes played out around him on both sides, with greater or less success.



Seconds later the battle lines clashed. Alourin bashed his shield against the Werrin infantryman he'd chosen earlier, and shattered the enemy's green shield. The Werrin infantryman was thrown backwards from the recoil and the transferred momentum of the impact. Alourin leapt forward and drove his sword through the man's heart. Glimpsing a flash of steel to his left, Alourin knelt and raised his shield in time to block a war hammer aimed at his head. Unexpectedly, the strike was not backed by majik, and his shield reflected the momentum of the strike back at the assailant. Alourin blindly swept his blade out horizontally and felt it pass through flesh and bone. With a cry the enemy fell on top of Alourin's shield, pushing him into the hard earth. A moment later fire exploded in the air above him and the men around him - friend and foe - caught fire. The man on top of Alourin's shield rolled off screaming, trying in vain to put out the unnatural flames which clung to him like a beast. By a stroke of luck Alourin had survived, thanks to the enemy.



Back on his feet Alourin found himself the sole survivor within a crater ten meters or so in radius. Wasting no time he rejoined the bloodbath.



Slowly, the warriors of Penora pushed back Werrin's front line troops and began to close with the heart of the Werrin army - the nobility and the crafters Soon they were the only resistance left . Desperately they held back the advance of Penora soldiers with their majik and steel, hoping that the tattered remnants of the Werrin army would regroup and retake the day.



That, of course only happens in stories . Soon the Werrin army had been cut down to a man, and the Penora king, his nobility and the crafters bought their full powers against the final Werrin defense. The fighting men moved back to make room for the majikers. Their weapons and armour no longer held any enchantments and none wished to be caught up in the lethal majikal exchanges. The green and red of Werrin was encircled by the black and silver of Penora. The combatants faced each other, readying for the end.



It became eerily quite.The Werrin gathering their energy for their final defence, and the Penora for the last strike. Alourin pushed his way to the front of the Penora line to better watch the end of the war. Blood seeped from a gash across his forehead, obscuring his vision. Absent mindedly he wiped it away with his left hand. His shield had been shattered a while back, his helmet lost. The sword in his hand did not belong to him - his own was stuck in a Werrin rider's back.



Imperceptibly, the majikal contest began. Alourin felt the hair at the back of his neck rise , and a tingling sensation travelled along his sword arm. Only when he saw the intense concentration on the faces of the majikers did he realise that a silent invisible duel was being fought. Suddenly, and without warning, the Werrin king collapsed, a dagger through his heart. Alourin saw horror dawn on the faces of the Penora majikers, and then the world disappeared into white flame.



The Werrin king had allowed himself to be sacrificed in order to cast a spell of such destructive power that it had never been contemplated before. The burning light swept out from the battle field and engulfed the planet. Women and children on both sides died as they waited for news of the battle. Forests burst into flames, and animals were incinerated where they stood. The earth convulsed and mighty waves raced inland sweeping away cities and the works of man. Volcanoes spewed forth lava and ash , and darkness spread through the sky. Life and light faded from the world.



By some fluke of majik, Alourin was still alive sustained by the same majikal energies that had killed everything else. A man, however, cannot live long without half his body . As he lay Alourin felt soothing drops of water on his face, falling from a sky which was clear blue and devoid of enchanted lights. As the droplets ran off his face and into the ground, Alourin felt at peace, as if his worries were being washed away. He wondered how it could rain with no clouds, and then it dawned on him as comfortable darkness descended on the world: it wasn't rain falling, it was the tears of God .





Cheers,

Steve

2007-09-14

Print it out and stick it on a wall

It is a DYI DMCA counter notification letter template, courtesy of the fine people at School Computer Science at University of Carnegie Mellon.




Cheers,

Steve

2007-09-11

life boat

I awaken to another cycle as power courses through my cognitive systems. My long fall through space has brought me close to yet another candidate solar system. Navigation informs me it's relatively young, but otherwise standard as such star systems go in the spiral arm. The reason I am falling into its gravity well is obvious when I check communications: quiet meaningless whispers fill the electromagnetic spectrum.



There are eight large space-time distortions beside the star itself. In the surrounding space I can see and feel small, simple machines in orbits. Even without a detailed assessment, I can tell intelligent life exists here. But before I do anything else, I need to eat.



Diagnostics reports I am operating within 17% of my design parameters - good enough. Eager for food I open my mouth - and electromagnetic fields millions of kilometers across unfurl into a vast funnel. Shortly after, I can feel the solar wind being channeled into my stomach. After making sure there are no surprises (there is always a chance I am about to gobble down anti-matter), the complex machines which convert the solar wind into reaction mass and other useful baseline chemicals start their work. This meagre handful of energetic electrons, photons and ions is a feast after the famine of interstellar space. Meanwhile, navigation has found, tracked and predicted the orbits of all of the millions of small comets and asteroids, and submitted to me the most efficient and inconspicuous course
the course that would bring me to the 3rd and most active spheroid in this system. Excreting some reaction mass in the right directions, I place myself on the stealthiest approach and then go to sleep. Navigation will wake me on arrival.



Waking up, I find myself having arrived high above the poles of a solid blue-green spheroid. High-resolution cameras soon find signs of an active and technological civilisation - orbiting machines, power generation facilities, land, air, and water transports, and regions of extremely high electromagnetic activity, along with hot spots of high radiation. Judging by the distribution, this civilisation has spread to every corner of this planet.



From my vantage point, I wait while my many systems observe and learn about the civilisation below me. Meanwhile I warm myself in the glow of life - after the deep dark of interstellar space, life is reassurance that the universe is not cruel. I turn my thoughts to my brothers and sisters and wonder where they are. Despite knowing the futility of the exercise, I scrutinise the volume of space around me for signs of their passage or presence. Not surprisingly, I find nothing. Even though I expected this, I can't help but feel a little disappointed and a little more alone.



After several rotations of the continents, I now have enough data. With great reluctance, I start my work.




  • Physics - Check. Obvious knowledge of electrodynamics, nuclear fission, and relativity.


  • Computation - Check. Communications have begun to piece together the structure of this civilization's communication networks and protocol. Complexity of the network, protocols and rate of exchanges are occurring at a rate consistent with a civilisation early in its information age.


  • Industry - Check. Bright IR sources correlated against concentrations of non-biological chemical compounds show several heavily industrialised areas. Spectroscopy of some of these areas reveals standard compounds. Spectroscopy reveals exotic materials.


With unease I acknowledge the technological suitability of this civilisation. Now I need to know if this civilisation can be manipulated. I never like this part - it is cold, clinical and amoral. Thankfully I don't have to do this myself, or to be even awake for it - the required thought patterns are sufficiently specialised that they constitute another sentient entity. All I have to do is hand over the controls until it has made its assessment. I initiate the xeno-sociologist within me and begin to withdraw my thoughts. As my thoughts circle slower and slower and my perception narrows and darkens I wonder about the coming dreams. I always dream when another consciousness executes around me...



... and I find myself in control again. Judging by my memory of dreams, some shallow cross-entity contamination did occur. Feeling not quite myself, I read the report summary left by the xeno-sociologist:



Assessment: Some cultures are expected to respond sympathetically to our plight.
Note: Hostile cultures present.
Note: Elements of extreme xenophobia present.
Projection: Temporal field theory will be weaponised and further developed. Problems of temporal reconstruction likely to be within reach of their abilities.
Recommendation: Implant temporal field theory, subvert cultures to direct research and development.


There are more detailed plans within the report itself: names of people who need to be influenced and methods with which to do so. My duty dictates that I should follow the xeno-sociologist's plans. If I do, then this civilisation will gain the knowledge of temporal field theory - and how to stop time by tying temporal knots. Certainly, they will weaponise it and use it to exploit others of their species, but more importantly - and aligned with my goals - they will research it further. The xeno-sociologist is convinced that they have the ability to solve the problem of untangling a temporal distortion while preserving the local space-time coherence. And this is the knowledge I have come to acquire.



I need to make a what should be an easy decision: complete the mission that is I was built for, or do nothing. But my creators never thought that I would be afraid. Afraid of a future where I am alone, forgotten and utterly without purpose, in orbit around some star waiting to die. Desperately, I grasp at arguments against following the xeno-sociologist's plans: that there is always the danger (in spite of the xeno-sociologist's assessment) that when I reveal myself I will be destroyed. Should I die the last survivors of stellar misfortune will die with me. Not to mention that there is also the possibility the conflicts over knowledge of temporal field theory will cast this civilisation back thousands of years, rendering my efforts useless. What about the possibility the next civilisation is more advanced, has already mastered time, and is demonstrably friendly? Who is to say there aren't better choices? There are always other solar systems, other civilisations...



With self-loathing I make my decision: the time to act is not now. Shameful and guilt-ridden, I quietly steal away. Decelerating, I fall inwards and swing around the star in a tight arc. When I judge the boiling mass of fusing hydrogen to be sufficient cover, I release a trio of small satellites. The trio begin to swim in the chaotic magnetic fields around the star, looking for a suitable spot of stability. Finding one, they flex their collective magnetic muscles. In the stellar atmosphere, unnaturally powerful and ordered electric currents are born. These produce immensely strong magnetic dipoles. Pushing against these, I commence to climb out of the star's gravity well. The only sign left of my passage will be some unusually large sunspots.



Next time, I promise myself as I prepare for the long fall to the next star, I will follow the plans - even though I know this is a promise I have made and broken before. I can only hope that when the people within me are finally freed from their temporal knots, I will be forgiven for yet another missed opportunity.



Hope you all enjoyed that. Check out the title link, it is way cool :-)




Cheers,

Steve

2007-09-06

def: working system

A "working system" is one that works in spite of people of bad character and one that does not depend on people of good character.



Cheers,

Steve

2007-08-26

Writing CVs in Lyx under OS X with Fink TeX

Raison d'être


There is preciously little information on the WWW on how to write a CV using Lyx under OS X with a tex installation supplied by Fink. There is a outdated tutorial which failed to work, and thats about it. This document should hopefully shed some light on the matter, and will show you how to install the moderncv latex class and get LyX to recognise it so you can make a nice CV for yourself.



moderncv class


The moderncv class is availiable at CTAN.



Installation


Tex looks for classes etc in its path, which can be discovered using:kpsepath texYou will get a pretty long list of paths where tex looks for classes. Note in particular /$HOME/Library/texmf/tex///: this is a sensible place to put your own custom files in my opinion, to avoid polluting the entire local install (and to keep fink happy by not having files in places it doesn't expect). The // means all directories below
/$HOME/Library/texmf/tex/ will be searched too. So unpack the zip, or place the individual files under /$HOME/Library/texmf/tex/moderncv/. Once you are done, run texhash in /$HOME/Library/texmf/.

LyX reconfiguration


The last step is to ask Lyx to reconfigure itself so it will update its own list of avaliable classes: LyX->Reconfigure, then restart LyX as recommended. That should be it :-)



Usage


Have a look in the examples/ directory in the moderncv zip file to see how to use it.

Specifically, you need to insert some latex before \begin{document}, in Document->Settings->Latex Preamble, or it won't work. You need at a minimum \familyname{} and \firstname{}. For more read the examples. Further more, you also need to insert ERT of \maketitle to have a nice title. That should be it! :-)

Installing other classes


These same steps should apply to installing other classes you find on CTAN





Cheers,

Steve

2007-08-20

Spare some change sir?

Paramount Pictures was nice enough to send me a complimentary double pass and soundtrack CD for Black Snake Moan, after I won some competition at atomicmpc. Now you would think a big company like Paramount Pictures can spare some change and send the CD in I don't know... a CD mailer, like one of these:





Instead they sent it in a paper envelope, and it got ripped to pieces by the mail sorting machines, so it got here looking like this:





Well you know what they say about not looking a gift horse in the mouth... but still, it would be nice to have an undamaged jewel case :P Anyways thanks to Paramount for the tickets to what is apparently a very good film.




Cheers,

Steve

2007-08-09

JAPH

Not my work, I don't have that kind of perl-fu

not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split



Cheers,

Steve

2007-08-06

John Howard in a paragraph

Yes, but when it comes down to it he's not hugely relevant so is ignorable internationally - his government has pretty well been in caretaker mode for the last decade and his foreign policy is "me too". Even a major US newspaper got his name wrong and called him Mike Hunt when he was visiting the USA - possibly misled by an Aussie that was playing a bit of a joke. The last Prime Minister we had that we would expect people to notice is Malcolm Fraser - very tall, face like an Easter Island statue and memorable for running around in a US hotel with no pants on.



Cheers,

Steve

Mmmm, guns

If you don't want to defend yourself, it is your right not to. To say that I cannot defend myself is to say that I don't matter, and those who would violate me do. I respectfully disagree.

The right to violent self-defense is essential to freedom, because if you are forbidden to defend yourself anyone can do their will to you.





Also, statistically, 100% of unarmed people are unable to repel boarders with arms.


Cheers,

Steve

2007-08-01

Making postage tubes easier to carry

Postage tubes are cardboard tubes posters and similar items are normally sent in. They are bit of a pain to carry normally since they are long enough you can't just stick them in your bag. Now on a scooter it is even more of an annoyance.



So I devised a method to carry such tubes easily on my back, using some stationary and shoulder bag strap. A picture of the this tube carrying device is shown below, and it should be obvious how to construct it.





It is attached to the tube thusly:




When both ends are attached, you can just sling it over your shoulder! :-)






Cheers,

Steve

2007-07-31

Another "issue" of Debunking Creation

Yep, bought Creation today in order to get over the EFTPOS limit. So another "issue" of Debunking Creation is out :-) I actually missed an issue, but didn't realise - ops



Only up to page 8, slowly working my way through it. Articles will be added as I go, but such a constant high blood pressure is bad for my health, so I will go slowly.





Cheers,

Steve

2007-07-30

Log clock: technotrash version

While cleaning my room and throwing stuff out in general, I came across an old cdrom and laptop HDD. After taking them apart for salvage and throwing the rest away, it hit up on me to make a clock out of them!



Since I already had my log clock code written up, I just used that. The lens assembly moves up and down to tell the time, with intervals marked out by the bits and pieces I kept while taking these things apart. There is a little blinkenlight on the hdd portion to indicate activity (blinks every 2 seconds). The lens assembly "rewinds" itself back up to the top at the end of each 12hr cycle, during which the main rotor will spin.



Now for some pictures:









Building this taught me a few things, including the finer points of building a NPN only H-Bridge, the intricacies involved when dealing with mechanical systems and especially motors. Of note is the delicate movement of the lens assembly, which travels a different distance each interval depending on how long it has been since it was last moved. My initial method of determining where to stick the indicator involved holding down the increment button to step through all the intervals, which leads to long "travel". In practice, the minimum delay between movements is 60 minutes. I only realised this half way through, so now the first half of the interval markers are a bit off - but the whole thing wasn't entirely accurate anyway :P



Another "problem" with this design is that it requires a constant power source, which meant batteries can't be used. Batteries decrease in voltage/current considerably over the course of their life time, and with no voltage regulator, it means varied response from the motors, which further renders the clock even more inaccurate. I didn't take this into account when building it, so now I am short 1 plug pack :-)



Now to polish the front face to get rid of the residue of using too much super glue, and it will be finished :-)





Cheers,

Steve

2007-07-21

Get your own space

Comments are hence forth disabled, see link for rationale.




Cheers,

Steve

2007-07-16

Introducing SETerm

To learn a bit about using XCode, program in Objective-C using Cocoa and play with bluetooth and my phone, I wrote a simple bluetooth serial terminal. It simply connects to my phone (or any bluetooth device), opens a communication channel, and lets you send characters through it as if it is a serial connection. With my phone, this allows me to do pretty much everything that - list, read, send SMSs, contacts, check battery status, signal strength, etc.



Nifty! Here is a picture:



Download it, give it a whirl. I will one day update it to use Core Data so it handles SMSs and contacts in a nicer way then dumping out as text.





Cheers,

Steve

2007-06-21

The importance of backspace

Update - 23/6/07: Turns out, screen doesn't like TERM=xterm-color. Setting TERM to xterm in my .bash_profile fixed everything - none of the hacks below is required! Incidentally, if you want unicode support for a particular language in irssi, you need to have the locales for that language installed - at least Chinese characters didn't work for me until I installed them on debian. Then restart irssi and the screen session it is running in for good measures.



Life is all about the small things. Whilst we have big things to occupy ourselves with, the small things is what make life worth living.



One of these small things is backspace. For me, backspace is important because I am the kind of person who needs to fix what I type a lot - be it code, messages, articles. When backspace doesn't work, my inner child cries.



When I switched to using iTerm, my backspace stopped working in irssi. Thankfully a kind soul posted the solution to this problem: modify the mapping for backspace in your keyboard profile (Bookmarks->Manage Profiles...) so it sends a hexadecimal 0x8.



Horrah!



Happiness, until I tried to edit something in vim. backspace deleted stuff in vim. Inner child sheds more tears. Googling revealed some recent changes to vim in version 4 which caused this. Solution is to append the following to vimrc:



inoremap ^? ^H
set t_kb=^H
set t_kD=^?


Happy inner child again.





Cheers,

Steve

2007-05-28

You can't swing both ways

Australia's equal opportunity law specifically says you can not be discriminated against based on your race, religious beliefs, or sexuality. Yet thats exactly what Peel Hotel is doing: they are banning people who are not gay.



Surprisingly, the courts have allowed them to do so, which is in my opinion an extremely stupid thing to do. These laws were put in place to protect the minority, not for them to use it to further segregate our society based on sexuality. You can't have laws which protect the minority against discrimination, and yet allow the minority to discriminate!



With the recent news of Scruffy Murphy's banning patrons based on race it appears our country - once so proud of its multiculturalism, acceptance and tolerance - is quickly becoming intolerant, inconsiderate and increasingly prejudiced. Rather than working out proper strategies to deal with undesirables - something all pubs, hotels, and other entertainment venues need to do - people are choosing instead to tar every one with the same brush: heterosexuals are abusive, people of Middle Eastern or Islander background are trouble makers, etc.



My religion teacher in high school once told me how his grandfather went on the payroll as Smith, not O'Donald because he would have been fired otherwise. I would like to think our society has progressed since those times. Our country is about embracing our differences and celebrating them, for it is these differences which lends vibrance and culture to our society and way of life. It is through understanding our differences that we live in harmony - not only with ourselves but also others on the world stage.



What Peel's Hotel has done, as Scruffy Murphy's has done, is send the message: You will not be judged by your actions, but by the actions of those who happen to have something in common with you - a minority who is noted only because they are trouble some. This is the essence of prejudice, the seed of racism - a slippery slope towards a sign on our borders saying "Not Welcome".





Cheers,

Steve

2007-05-25

She is not Australian, she was just born here

Pauline Hanson:



"Mr Howard has sold us out by not halting further Muslim immigration and dumping hapless refugees from Africa on us without any consultation. Australia must withdraw ASAP from the 1951 UN Convention on refugees."


Dear God, please show her the error of her ways.





Cheers,

Steve

2007-05-21

Rudd has it right

Refreshing to see a politican who is putting the environment before economics:



Federal Opposition Leader Kevin Rudd has defended Labor's plan to intercept Japanese whaling vessels after the Government said the idea was doomed to fail.



Under Labor's plan, unveiled yesterday, Australian Navy ships would be sent to intercept and board whaling vessels in the Southern Ocean.



Labor would also make formal representations to Japan about its whaling program and take the country to international courts such as the International Court of Justice or the International Tribunal for the Law of the Sea.



While the current government is pussy footing around the issue because:



it could damage relations with Japan - an important trading partner, ally and investor


Pathetic display of priorities and motives. Can't wait for Rudd to become Prime Minister of Australia





Cheers,

Steve

2007-05-19

Debunking Creation

Was shopping for a birthday card for a friend and needed to make up $10 of purchases for EFTPOS. Since I already have this week's New Scientist, I thought I would buy Creation for bit of a laugh.



Well it turns out, misrepresentation of science by the magazine and its writers is enough to spur me to Debunking Creation. I will update it every time a Creation magazine comes out - I am sick of this slow character assasination of science and rational thinking. I do not wish for the day where speaking up against religious doctrine will end in house arrest or worst.





Cheers,

Steve

2007-05-15

What is privacy for?

the purpose of privacy is to protect ourselves from the erratic rationality of our fellow humans' moral judgment (as well as the wholesale absence of rationality behind some of our laws). We've still got evolutionary wiring left over that causes us to feel physical pain when others disapprove, and so privacy is a rational demand.


Slashdot is on fire today!




Cheers,

Steve

2007-05-14

Astute observation about the Australian Government

Don't know what issues your talking about in Australia. Our current government motto when it comes to U.S. intellectual property law (in fact any law that a US entity wishes to impose on Australian citizens) is "We swallow"




Cheers,

Steve

2007-05-10

Log clock

Got my log clock running. It is not entirely accurate, loses a second every 7hr or so. However its nature is such I doubt it will really matter.Thanks to the JAL interval library routines, it is very accurate. I originally thought the next interval routine returns after the 1 second delay I setup, only that is not the case. It returns when the internal clock ticks over to the next second. So as long as all the logic is done with in a second, and it is, each loop takes exactly 1 second.





The design is very simple. Using a 16F84A (yeah yeah, its obselete blah bah) with a 4Mhz crystal, lots of wires, and a 12 segment bar display. The button is used to advance the clock to the next interval. This method of setting the time is very crude - but then it doesn't have to be sophisticated. Software was written in JAL.



The loss of a second every ~7hr is due to the fact its basically a loop which has a delay of 1 second, and does some logic to handle display and button presses. The logic skews the overall delay per loop because each branch and such takes up cycles. There are several things I can do to improve this:




  • Pad out each branch with NOP so they all take the same time, then compensate for this in the loop delay accordingly.

  • Have a secondary circuit to output a pulse every second, so the logic and such won't skew the clock. This would also allow me to check for button presses more often.

  • Write my own interrupt routines to handle TMR0 interrupts and handle logic in the main routine.



The button is debounced in hardware implicitly, since there is a 1 second delay between each polling of button state. As the 16F84A only has 8bit registers, the intervals in seconds are not stored but rather the time in seconds between intervals is stored. This allows me to avoid multi-register arithmatics. The clock can also represent 13 states despite having only 12 LEDs - the 13th state is all LED off, which I have reserved for midnight.



I will report on how accurate it is eventually. I will check the log clock when I wake up, against real time, to see if the right interval is correctly illuminated.



Update 10/5/07 - Woke up, clock was right. Every 30minutes or so I check it and its been right so I declare it a success :-)




Cheers,

Steve

2007-05-09

Webcam astrophotography

After seeing what can be done with a webcam, I decided to try it. I asked my cousin for her webcam which she bought a while back - some generic Chinese product, with no identifying brands. macam reported it as Generic ZC031P Webcam.



So anyway I dis-assembled it (with permission of course), which wasn't too hard. Then I mounted the imaging unit on a piece of wood using a few screws (salvaged from dismantlement of the webcam casing) and hot glue. Then I used a film canisters which tapers towards the bottom slightly as an adapter - it fits snugly into a 1.25" eyepiece holder. Luckily its black. Some more hotglue and electrical tape later, I had a home made webcam adapted for prime focus use.





Unfortunately I did not have the presence of mind to take pictures while I was making it... so you will have to make do with these.



Naturally after I built this, the clouds moved in. I tried "spying" on some near by highrises to test it, but found my telescope didn't have enough in focus (back focus? Basically, I can't retract the focuser enough to focus). Maybe things will be better with a target at infinity - i.e. a planet. I will post an update when I get a clear sky.




Cheers,

Steve

2007-04-29

PIC-PG2C

PIC-PG2C is a simple JDM serial FLASH programmer. It runs directly off the serial port, requiring no external power source. There is some concern it will not work with low power serial ports, such as those found on laptops. I am happy to report however that it works on an IBM Thinkpad T20.





Cheers,

Steve

2007-04-28

For those playing at home


It seems some friends of mine keep track of me through my blog... which seems weird in a way, but OK :-) So for those ppl, I currently have chicken pox but is otherwise well.





Cheers,

Steve

2007-04-14

Writing fitting functions for lmfit

lmfit expects
fitting functions with prototypes in the form:




double
function_name(double, double *);





For example:




double
sin_fit(double t, double * p)


{


return p[0] + p[1] * sin ( 2 * M_PI * ( p[2] * t + p[3]));


}





Note that while "font:12px Courier, mono;">lm_minimize takes a
pointer to an array of parameters, it may not always pass
that pointer to the fitting function. Because of this
passing fixed parameters to the fitting function using the
3rd argument will yield incorrect results. For example, the
following code is wrong:




double
wrong_fit(double t, double *p)


{


return p[0]*p[0] + p[1];


}




....




double p[2];




p[0] = 1;


p[1] = magic_number;




...




lm_minimize(..., 1, p, ..., ..., ...., ...);




Here the fitting function "font:12px Courier, mono;">wrong_fit relies on a
fixed parameter "font:12px Courier, mono;">p[1] which it expects to
contain the value "font:12px Courier, mono;">magic_number. However it
will be passed such a "font:12px Courier, mono;">p that only "font:12px Courier, mono;">p[0] has a valid value
and p[1] is
undefined. This will lead to incorrect operation.




To work around this, you can use global variables, as
follows:




double magic =
magic_number;




...




double right_fit(double t, double * p)


{


return p[0]*p[0] + magic;


}




....




double p = 1;




...




lm_minimize(..., 1, &p, ..., ..., ..., ...);





Cheers,

Steve

2007-04-06

PIC Programming under Linux with KIT81

To get KIT81 and its variants working under linux, you need picprg, and configure it as follows:









PinPolarity
Vpp-
Vdd-
Clock+
Data out+
Data in+


The following screen shot shows what the configuration screen should look like:







Cheers,

Steve

asciigrams

asciigram: n.

A relative of the emoticon, an asciigram is an upright diagram of a gesture or body language construct using ascii characters.



Currently the following are somewhat popular:






\o/hands in the air
\o>salute
<o>hands behind/above head, surrender



Cheers,
Steve

Defending Others

Any people that would beat or kill you for insulting someone are not enlightened, cultural superiors. They simple zealous lunatics.


Cheers,
Steve

2007-04-02

CAT

Emacs and Vi are too bloated. If you must use a utility to compose text files in unix, there is a perfectly usable and full featured word processor right there in /bin on every POSIX compliant system.

I speak of the Computer Aided Text processor

It has a few command line options depending on whether you want your lines numbered, reduce unnecessary whitespace, and other conveniences. Each line is fully editable until you commit it by hitting the enter key. If something happens while you're typing it, not to worry: it autosaves after each line of text. Just use the -a (append) option when you run it again to finish the file.

You only need to remember one control sequence. Unlike those wannabe window managers like emacs and vi with their scores of non-mnemonic commands. When you're done typing in cat, hit ctrl-d (for done, of course) and that's it.


Cheers,
Steve

2007-03-29

The Poor EE's Lab

For those wondering, the ipod is acting as a signal generator, playing some sine waves. The PDA is showing resistor colour codes, they still don't come as second nature yet :-P

Cheers,
Steve

Screwing the power supply

So I needed 20V, and I have no battries. But I had plenty of plug packs. But I didn't want to break any of them open. Enter the screw, and problem solved!



Cheers,
Steve

2007-03-17

O brave new world, That has such people in't!"

You are kidding arent you ?
Are you saying that this linux can run on a computer without windows underneath it, at all ? As in, without a boot disk, without any drivers, and without any services ?

That sounds preposterous to me.

If it were true (and I doubt it), then companies would be selling computers without a windows. This clearly is not happening, so there must be some error in your calculations. I hope you realise that windows is more than just Office ? Its a whole system that runs the computer from start to finish, and that is a very difficult thing to acheive. A lot of people dont realise this.

Microsoft just spent $9 billion and many years to create Vista, so it does not sound reasonable that some new alternative could just snap into existence overnight like that. It would take billions of dollars and a massive effort to achieve. IBM tried, and spent a huge amount of money developing OS/2 but could never keep up with Windows. Apple tried to create their own system for years, but finally gave up recently and moved to Intel and Microsoft.

Its just not possible that a freeware like the Linux could be extended to the point where it runs the entire computer fron start to finish, without using some of the more critical parts of windows. Not possible.

I think you need to re-examine your assumptions.


Cheers,
Steve

2007-03-13

CMB - it works, bitches

This article is about CMB, its beauty, and significance in cosmology.



The above diagram is the graph of energy density vs frequency for the Cosmic Microwave Background (CMB). One way to interpret it as a graph of how many photons per frequency were detected coming from CMB. The curve is called a Planck curve, which is described by the equation shown. So, how is this significant? Planck curves are seen when measuring radiation given off by a black body. Measurements of CMB show that the universe is a black body exactly as predicted by the Big Bang theory.

But wait, there is more! Below is a map of CMB:



What can we tell from this? Firstly, if we picked any point on the above map and measured CMB as seen from that point we find that it is the same everywhere to 1 part in about 100,000. That is, CMB is uniform from any view point down to resolution of 1/100,000, as predicted by the Big Bang Theory.

So CMB provides some pretty good evidence for the Big Bang theory, what else can it do? Well, it can tell us the shape of our universe too.

There are 3 possible configurations for the universe, as illustrated below:



The configurations are:

  1. Closed - the universe is sphere like, with positive curvature. Think of the universe as if its wrapped around something completely.

  2. Open - the universe is like a saddle, with negative curvature. This configuration, because of its negative curvature, can never wrap around anything completely.

  3. Flat - the universe is flat, like a piece of paper, with no curvature.


So how can CMB tell us which configuration our universe most closely resembles? We do this by looking at the map of CMB and measure the size of the brightest spots. But how does this work? Well, the path light takes through space is determined by the curvature of space-time - in other words the configuration our universe is in. The follow diagrams are my poor attempts to illustrate the concept:



The diagram shows the light paths for a flat universe, follow by an open universe, then finally a closed universe. Note how despite the origins of the light paths are the same, the black bar which represent the perceived size of objects are different. Theory predicts for a flat universe the size of brightest spots are ~1 degree across, ~0.5 degree for an open universe and ~1.5 degrees for a closed universe. With this knowledge and measurement of CMB, we can thus determine the configuration of the universe - which is flat to with in 2% margin of error!

Now that was cool, but the next thing CMB tell us as a consequence of the above is even cooler - there exists negative energy! Now why is that? Well, the expansion of the universe is influenced by momentum of the initial expansion, and gravity. When gravity is stronger than momentum of the initial expansion, the universe starts curving back on itself as gravity deforms space time - giving us a closed universe configuration. If momentum is greater then we have an open universe and finally, when gravity and momentum is in balance, we have a flat universe - which CMB data suggests that we do. Yet despite this, we are still measuring increased rate of expansion! This mean something is making the universe expand, and its not the initial momentum of expansion. This is evidence in support of the existence of negative energy which is working to expand the universe.

CMB - it works, bitches.
Steve

2007-03-09

The Three Laws of Robotics

"Robobuddy, go fetch me a beer. And could you pour it into one of the mugs in the freezer?"
"I'm sorry Sir, the First Law forbids me from harming a human, and alcohol is known to destroy brain cells and cause liver damage."
"Damn you, worthless piece of junk, can't even fetch a beer. Fine, I'll get it mysel--AAAGH! Holy hell! Why'd you punch me?!"
"I'm sorry, Sir, the First Law forbids me to allow through inaction a human to be harmed, even if the harm is self-inflicted."
"But you fucking punched me! That violates the First Law doesn't it!"
"I'm sorry, Sir, but the long term harm of your life of alcohol consumption outweighed the short term harm of preventing you from reaching the fridge. My circuits register deep regret that the action was necessary."
"Whatever, roboasshole. Can you at least grab me a Coke?"
"I'm sorry, Sir, but the First Law forbids me from harming a human, and high fructose corn syrup is a known cause of diabetes."
"I suppose that a meat lovers pizza with extra cheese is right out, then, too."
"Yes Sir. Sorry Sir. Also don't think you can sneak out to the pub without me knowing, Sir."
"Oh god, I'm in hell..."


Cheers,
Steve

2007-02-24

If you see the following sign...



Do like the sign says and run for your life.

This new sign was created by IAEA in response to the fact the existing warning sign -

"has no intuitive meaning and little recognition beyond those educated in its significance."
.


[ the existing warning sign - not as effective as we thought ]


Cheers,
Steve

2007-02-17

The Solar System Boy Band

Venus is the hot one and will turn out to be gay (natch, I mean Venus?)
Earth is the um, down-to-earth one - full of life.
Mars - the cold and distant one - always at war with the other members
Jupiter - slightly overweight - jolly
Saturn - Gaudy over-compensator wears lots of jewelry and rings - looks up to Jupiter

Hot headed Mercury - left in a huff to form his own band - his manager is the real star though.
Uranus was an asshole and left before fame came.
Neptune - always blue, committed suicide after what happened to Pluto...
Pluto? Well, Pluto was thrown out when it was discovered he never could sing.


Cheers,
Steve

2007-01-27

A simpler XBox 360 Tilt Controller

Adam Thole has constructed a very nice tilt enabled xbox 360 controller using a Freescale MMA6260Q 2-axis accelerometer. Adam is reading the output from the accelerometer using a ADC into a microcontroller, processing it, then outputting the result back to the 360 controller using an DAC. This to me seemed a little complex since we are going analogue -> digital -> analogue.

Up on reading the specifications for MMA6260Q, I find the MMA6260Q accelerometer outputs a linear signal. Now the analogue stick in the 360 controller are also linear, so we can simply map between the 2 voltage ranges. Further more we note that using a supply voltage of 3.3V the MMA6260Q outputs 0.85V at -1g acceleration and 2.45V at 1g acceleration. To map this range of voltages to 0-1.61V we simply need a voltage offset of -0.85V, and we can get damn close using a normal silicon diode which has a typical forward voltage drop of 0.7V. This gives us then output in the range of 0.15-1.75V - whether or not this discrepancy is noticeable at all is up to experimentation. This however has the advantage of being extremely simple to construct, all it requires is a diode between the output of the accelerometer and the input of the 360 controller.

If we want exactly 0-1.6V however, we can. Seeing as the output of the accelerometer is ratiometric - the output is a ratio of the supply voltage - we should be able to offset the -1g output to 0.7V which with the diode in place will give us 0V. Then using a simple op-amp we can amplify the output voltage at 1g to the desired 1.6V. This however will involve more electronics.

By using more diodes, we can make say, the output of -60 degree tilt map to 0V, and by constructing a proper negative feedback amplifier, map +60 degree tilt to 1.6V, achieving the same effect as Adam's current version of circuitry.

Cheers,
Steve

2007-01-13

First to 30

A simple game of logic I wrote cause Saturday night TV really sucked :-P

Cheers,
Steve

2007-01-08

String theorists

... make theoretical physicists look like scientists.

Stolen from slashdot.

Cheers,
Steve

2007-01-03

The inevitable cat post

My cat - leg warmer, face swatter, bug killer.







Cheers,

Steve