what is reality?

I had a discussion on #linux yesterday about what my own beliefs about physics, the universe, and reality are. This post will hopefully clarify it.

In short, I said that I believe that the sum total of all things is zero – that, in effect, the universe is not “real”.

While that sounds implausible (after all, you are “real”, as is everything you see and touch), I’d urge that you continue reading.

One of the most basic laws this universe seems to obey is that “symmetry rules” – there is the law of Conservation Of Energy, the law of Conservation Of Angular Momentum, and Newton’s classic “every action has an equal but opposite reaction”.

In other words, it is impossible to change the sum state of the universe – you can change the order of it, but you will never add new energy, or destroy it.

Taking that a little further, you can extrapolate that the sum energy of the universe at its beginning must be exactly the same at its end.

But how can that be? We obviously exist, so there must be a sum greater than 0, right?

Well… no.

If you were to take the mathematical sum “x + -x = 0″, you can easily see that it is possible for two objects to exist (x and -x) even though the sum total of the equations is zero.

I explained this to someone, who then half-jokingly suggested that every piece of matter must be balanced by anti-matter, and every piece of positive energy must be balanced by an equal amount of negative energy.

This summoned up images of whole anti-worlds, where anti-Kaes lived their lives backwards. Preposterous…

The sum “x + -x = 0″ can also be written as “x + y + z = 0″, where one or more of those variables has a negative value. The balance must be maintained, but the symmetry does not need to be blatant.

I think that’s an over-simplification of it, though. I think the truth is more fundamental than thinking about energy or matter.

How can matter or energy pop into existance?

Here’s the bit that sounds like science fiction, but I think actually fits quite well with modern physics. The idea of virtual particles is that it is possible for a particle and an anti-particle to pop into existance without needing external energy to cause it. In fact, this happens all the time.

Usually, though, the particles exist for only a very short time before they annihilate each other. This is remarkably similar to the maths analogy. In the formula “x + -x = 0″, the “particles” x and -x can be considered to be real, as they are distinct. The analogy is continued when you consider that bringing the two particles close enough to each other will cancel them out, allowing the formula “0 = 0”.

So, the difference between existance and non-existance, is just a matter of distance between particles and their opposite values.

I won’t pretend to understand what can possibly cause the two opposites to drift apart enough that they are considered “real”, but this tiny idea is a solution to the puzzle of how something can possibly come out of nothing.

missing functionality?

I’m writing a shoppingcart plugin for my employers’ CMS. This cart is innovative in that it uses XMLHttpRequest to manage the basket, and to fetch item details – it’s pretty impressive, even if I do say so myself. Unfortunately, I don’t have a demo online yet, but hopefully soon…

Anyway – while writing it, I came across a little lack of functionality and couldn’t think of a way around it. I am hoping that making people aware of the problem may spark ideas on getting around it

Shopping items mostly have a title, a price, a description and an image associated with them. The first three are simple to do. The last, the image, is tricky, in XMLHttpRequest.

The reason is that JavaScript is generally given absolutely no access to local files. This means that you cannot create an Input file element, and then forward that file using JavaScript to the server.

The security reasoning behind it is obvious – it would be trivial for a black-hat to write a script which sucks up personal files of people that visit their website. Paranoia is important when you work in the web.

Unfortunately, I believe the Mozilla crowd have been a little over-paranoid. I think it should be possible to access a file when the user has manually clicked on the Browse button, selected the file they want, and clicked Open.

It’s tricky…

Anyway – if anyone reads this, that has ever found a workaround for uploading files via XMLHttpRequest, please chime up in the comments box.

Update: After contemplation, I think the simplest solution is to allow the browser to submit the form with POST, without interfering with JavaScript, and target it to an IFrame. The IFrame will then call the parent page, announcing completion and calling the next function in the algorithm. Ugly, but trusty.

Jareth’s progress

A few months ago, Jareth refused to stand up, even when holding onto anything. Then, he figured out that standing against a coffee table or box meant that he could reach all the goodies that we had so thoughtfully placed on it.

He took a few exploratory steps on his own, but never saw the point in actual walking – he’d either walk along the edge of a couch, holding on with both hands, or he’d take a step out into open space and then get down on all fours and crawl the rest of the way.

Last week, in one day, he decided that he likes walking. Now, he’s phenomenal! Unbelievable how quickly he picked it up.

He’s yet to speak. I can’t help but compare other kids born around the same time. John and Maria’s kid (they’re my bosses) Jack has been walking a while, and is also making speaking noises. He’s just a month or two older than Jareth. I heard his speaking once while getting a lift with them. It was a great experience! I couldn’t make those gurgly noises myself. It was like he was trying to speak at the same rapidity as his dad (a notorious speaker 🙂 ).

I’m looking forward to speaking with Jareth. So far, he only says “Mam!” when he’s upset, and I’m not sure if it’s an intentional word, or if he’s just vocalising.

new lappy

I got a Dell Latitude C610 today. I’m pretty happy about it – got it through a refurbisher, so it was practically brand new, and very cheap. 585 euro for a laptop is very reasonable in my book

I’ve only had one or two problems setting it up. The machine was supposed to come without an operating system on it, but arrived with Windows 2000. One quick format later, and that was solved…

The hard-drive is an 18G, and there’s 256M RAM, so I partitioned the drive with 6G for Linux (Fedora Core 3), 512M for swap space, and the rest for WinXP. I will only be using WinXP for gaming, but as Linux can easily read vfat partitions (but WinXP cannot read ext2 or ext3 partitions), I felt it was best to give Linux breathing room (6G is plenty!), and leave the rest to be shared by Linux and Windows.

WinXP installed without a hitch, which annoyed me. I don’t like to say nice things about Microsoft, but their OS installations are usually very pain free. One thing that did annoy me about the install was that it did not allow me to customise the languages, etc of the machine, but instead installed absolutely everything it could. Oh – and the lack of out-of-the-box applications is always a pain with Microsoft. Another minor hickup was that I was asked for a network setup early in the install, but then asked for the exact same information again near the end. Apart from that, it was reasonably simple.

The Linux setup was almost as simple. The Fedora install is amazingly simple these days, compared to when I was installing RedHat 5.1 “way back when”. There is a lot of point and click, so it’s very similar to the Windows setup. The major differences are in the amount of choice you have. You can have a straight-forward “you want Linux? Desktop okay? Okay – here you go” deal with minimal fuss and a default system (which I’m typing on at the moment, while a custom upgrade is carrying on in the background), or you can customise the install and get everything you want straight away without the mess of reconfiguring packages after the system has installed.

The default install is usable, and includes much more usable applications than the default Windows install provides.

The only snag, that I’ve so far come across, is that the TFT display was recognised. Most people would not even notice this, though, as the system provided me with a readable 800×600 monitor, but I was not happy with that. I paid for a 1024×768 monitor, and I’d be damned if I settled for less! Adjusting this was simple – the install process catered for that possible error, and gave me a chance to select a monitor for myself. The Latitude C610 uses a “Dell 1024×768 Laptop Display” as its monitor. I’ll tell you, this is much simpler than messing with refresh rates in /etc/X11/XF86Config!

I’m not a fan of Gnome, and I prefer Thunderbird to Evolution as my email client of choice, so the first software changes I made to the system were to install a good package manager (I prefer Synaptic to the usual system-config-packages that comes installed with Fedora), then I could get to the important task of configuring the system to my own liking.

One very happy surprise was that the X configurateur recognised the ATI Radeon Mobility card I was using, and properly installed the drivers, including the proper accelleration drivers. I have traditionally had a lot of pain getting ATI cards to play nice with Linux, so that was a great thing.

fc3 broken midi

If you are having trouble with your upgraded Fedora Core 3 – the MIDI no longer works, then your system may just be missing the synth module. The udev method seems to be to blame – some hardware drivers (in this case the MIDI sequencer) are not loaded until they are actually requested. Mumbo-jumbo, really, but there you have it.

After running a modprobe snd_emu10k1_synth, I was then able to continue with my usual sfxload to load the sound bank, and back to my normal guitar practice.

The problem has been reported to Redhat.

livecalendar

Good name. A short while ago, I wrote a new version of the wordpress calendar which I called “xmlhttprequest calendar“. jonabad picked up on that and has been working on it.

I’m looking forward to the plugin. There are some things I will get around to completing for my own version, but I’m sure his improvement will be well written and probably easier to install than mine!