Friday, April 01, 2005

Humorix

Thursday, March 31, 2005

Prefetching Google Results

Google now supports Mozilla's prefetching feature:

"On some searches, Google automatically instructs your browser to start downloading the top search result before you click on it. If you click on top result, the destination page will load faster than before."

When you add a rel="prefetch" attribute to a <link> tag Firefox will begin downloading the target page to cache to speed up browsing. It seems like a neat feature. I first questioned it as another attempt to "extend" standards but according to the HTML 4.01 spec it's perfectly legal:

"Authors may wish to define additional link types not described in this specification. If they do so, they should use a profile to cite the conventions used to define the link types. Please see the profile attribute of the HEAD element for more details."

Read more about prefetching.

Tuesday, March 29, 2005

IronPython 0.7

IronPython 0.7 has just been released. [download]

This project is something to definitely keep an eye on. For kicks I wrote quick little Fibonacci script to play with:


# Fibonacci Sequence Seed
n = [0, 1]

# Calculate the rest of the series
start, stop = 0, 10
while start <= stop:
n.append(n[-1] + n[-2])
start += 1
print n[-1],

print "\nItems in list: ", len(n)

# Calculate sum of the series
sum = 0
for x in n:
sum += x

print "Sum of list: ", sum


I pushed the script to calculated 10000 numbers into the series. It handled the task with no trouble. That to me is the beauty of python's number system...you could say it "scales". The sum of a 10000 number fibonacci series is a number that's 2092 digits long =0

As posted on the web site...IronPython is:
  • Fast - IronPython-0.6 is up to 1.7x faster than Python-2.3 on the standard pystone benchmark. An early performance report is are contained in this paper for PyCon 2004
  • Integrated with the Common Language Runtime - IronPython code can easily use CLR libraries and Python classes can extend CLR classes.
  • Fully dynamic - IronPython supports an interactive interpreter and transparent on-the-fly compilation of source files just like standard Python.
  • Optionally static - IronPython also supports static compilation of Python code to produce static executables (.exe's) that can be run directly or static libraries (.dll's) that can be called from other CLR languages including C#, VB, managed C++ and many more. Note: static compilation is only partially implemented in the 0.6 public release. This will need further development before being useful.
  • Managed and verifiable - IronPython generates verifiable assemblies with no dependencies on native libraries that can run in environments which require verifiable managed code.
  • Not finished - IronPython is currently at a pre-alpha stage suitable for experimentation but not for serious development work. The latest public release can be downloaded below.