For fun, free and interesting programs, visit Voidspace Shareware.
Support Voidspace and, Advertise Here.
Friday, January 23, 2004Do plants act like computers?: Leaves appear to regulate their 'breathing' by conducting simple calculations.
"Some scientists even think that distributed computation is fundamental to the way the world works. In his book A New Kind of Science, mathematician Stephen Wolfram argued that the laws of physics might arise from units of matter, space and time interacting with one another according to simple rules2. He showed that so-called cellular automata - simple, discrete 'particles' programmed to switch between different states depending on the states of their neighbours - can mimic computers."
Definitely weird theory of the week...............
See an overview of this here - but it's pretty weird, the theory is *basically* that the way that 'stomata' (pores) on plant leaves open and close (to get optimum results) is equivalent to a distributed processing calculation. This is definitely at 'theory' stage, but the article notes that it's already been shown that individual units reacting to each other are identical to computation (because that's basically what computation is - switching adjacent transistors ??). Wolfram - a hyper intelligent scientist with some far out views - reckons that this might be a fundamental property of the way the universe works. It would in part explain how intelligence can rise out of a collection of individually unintelligent members (individual neurons...)..... hmm... anyway - it's weird and I like it. What that means is that 'intelligence' is a fundamental principle of the universe.... it's just that some people object to us calling him God... ;-)
posted by Mike Foord on Friday, January 23, 2004
Thursday, January 22, 2004Math Forum: Ask Dr. Math FAQ: Calendar and Days of the Week
"Rule : The following formula is named Zeller's Rule after a Reverend Zeller. [x] means the greatest integer that is smaller than x. You can find this number by just dropping everything after the decimal point. For example, [3.79] is 3. Here's the formula:"
In our church we celebrate 'victory days' of people who decide to join the church - every three months for a year we celebrate their spiritual growth and continued commitment. We always do this (by encouraging and praying for people) on the nearest Tuesday, which is our 'agape' family meal.
A while ago a colleague of mine wrote a nifty little program (in pascal I think - using the console for in/out) that given the date they joined, calculated the four Tuesdays on which we celebrate their victory day.
Not only that - but for the whole database of people - if you give it a Tuesday it will tell you exactly who is celebrating a victory day for every Tuesday after that (for a couple of months or so...). A nice, simple and effective program.
Unfortunately, the inexorable march of time means the program is showing it's age... or at least modern computers are having trouble running the program ! I thought I'd take up the challenge and write a simple equivalent in Python with a nice Tkinter user interface......
The trouble is....... how do you work out what day of the week it is given a date... and how do you work out the closest Tuesday, three months from a given date........ ??
Well... after a quick google (is that really a verb ?) it turns out that the simplest formula is called Zeller's Rule which states that :
f = k + [(13*m-1)/5] + D + [D/4] + [C/4] - 2*C
Easy hey !! If you really want to know more..... click on the link above. Anyway - writing the program will be a nice exercise in Tk and will also be useful to a few of our different households.........
posted by Mike Foord on Thursday, January 22, 2004
Wednesday, January 21, 2004The Voidspace CGI-News Home Page
How many websites can one man need ?? Well, I'm probably not as bad as some people... but I have just started another web-page.
This one is hosted by www.xennos.com and the great thing is they support python CGIs and it's even a relatively modern version of python.
I'm working on a CGI script that will let me read and post to USENET newsgroups..... but I've already got a random link CGI working - which I'll use on my book mark pages shortly...........
posted by Mike Foord on Wednesday, January 21, 2004
Friday, January 16, 2004Hello, World!
Sorry to subscribers to Void-Shockz message group who've already seen this message... but in my excitement I posted a message to the group immediately.
Running scripts/programs on servers has always been a mystery to me - mainly because I don't have a server to play with. I've found a very generous company that have given me a years hosting ona server with python installed though !
If you go to the page above - it's weird and totally pointless output is generated entirely by a python script !!
The program is :
# for unix of course
print "Content-type: text/html"
print "<TITLE> Hello, World!</TITLE>"
print "<B>Hello, World!
print "Strange Fish<BR>"
if (__name__ == "__main__"):
As you can see it's very basic and the HTML output to the browser is done entirely with 'print' statements...... hurrah.....
Writing dynamic webpages is now *officially* a doddle for me !!
It would be *nice* to be able to write several simple but useful scripts (like a guestbook etc) and sell them for a quid via a paypal link on my site... this might enable me to get rid of the tacky advertising on Voidspace - which is currently yeilding about 15 to 20 pence a day... not a lot......
The *real*project I'd like to work on is an nntp to http script !! This will allow me to remotely view USENET newsgroups via simple client on my desktop - which will speak to the script in simple http (normal web language) and get around the firewall which blocks all nntp access........
Sounds complicated.... well..... there's a standard python library that creates an nntp object.... all you do is pass the news server in when you create the object and it handles the whole thing.
Posting messages, reading messages, getting message lists (including new messsages since a certain date) etc are all one line commands.......
I've just got the hang of a basic GUI framework using Tkinter to write the desktop client with.......... cool..... Hmmm... keeping the nntp objects alive between cgi accesses might be interesting..... we'll see - unless I create a new object for each query... we'll see what works - there is a 'protocol' called persistent cgi.. so I might have to investigate that.
posted by Mike Foord on Friday, January 16, 2004
Tuesday, January 06, 2004Scientific American: Scientists Turn DNA Tubes into Nanowires
It used to be the case that you couldn't turn over a rock without stumbling across another nanocomputing or nano technology article... The trouble is I can't resist them. It seems that on a daily basis scientists the world over discover some unique and amazing properties of substances with names like 'bucky-balls', 'nano-tubes' and the suchlike. Not only do they 'promise' to replace wires in chips and provide us with a lift to the moon (stairway to heaven ?) but all at lower cost and lower power use blah blah blah
Hasn't happened yet - but then things change so fast that who knows what society will be faced with in ten or twenty years time. It seems that technology offers us many opportunities that we haven't yet developed the moral and psychological tools to cope with them. Take for example the explosion of cameras in mobile phones - in Japan where they are now ubiqitious (everyone has one !) - they are faced with the bizarre social problem of cameras being taken everywhere and into situations where you wouldn't normally expect them.... like public toilets for example......
Broadband streaming internet on your mobile anyone ??
DVD Jon Does it With iTunes
This story first appeared a couple of weeks ago. DVD Jon the young Norwegian hacker (in the original sense of the word :-p ) has cracked the iTunes proprietary 'DRM' format... the method the music corporations (via Apple) were using to prevent you playing music purchased from them on unlimited machines. The format meant you could only use authorised players nad only on up to three machines for each tune.
Unfortunately this cut Linux users out of the loop as an authorised player just wasn't available for their format. When it was first reported a couple of weeks ago that Jon had cracked the format no-one could get the example code to work... but now Jon has integrated with various other standard packages to make using it a doddle.
Johansen deduced that the system key that locks the locked music to a single Windows computer is derived from four factors: the serial number of the C: drive, the system BIOS version, the CPU name and the Windows Product ID.
Ostensibly (and the reason that Jon won his court case in Norway) this now allows Linux users to play the tunes on their machines (a perfectly legitimate use)..... in practise (and like the famous DeCSS DVD code) it will be widely implemented to allow music piracy ;-)
posted by Mike Foord on Tuesday, January 06, 2004