Sunday 4 July 2010

Bridge to Bridge

I rode along the Brisbane river from the bridge at Indooroopilly to the Gateway bridge and back.

Date:26/06/2010 7:22 am
Distance:65.0 kilometers
Elapsed Time:3:20:22
Avg. Speed:19.5 km/h
Max. Speed:56.3 km/h

View Larger Map

Friday 25 June 2010

Hyperref and Cleveref LaTeX Conflict

I ran into a conflict between two LaTeX packages when writing my thesis. Both the hyperref and cleveref are useful packages for automatically dealing with references in a document.

Hyperref is a TeX package for making documents with live links in PDF and HTML output formats. This places automatic links for \ref{} and \cite{} commands into the final PDF document. This allows readers to simply click on a reference to a Table, Figure, Equation or Citation and be taken to its location in the document.

The cleveref package enhances LaTeX's cross-referencing features, allowing the format of references to be determined automatically according to the type of reference. This is almost like type inference found in modern programming languages. When using the \ref{} command in LaTeX, one typically mentions the type of reference in the text and then \ref{} provides the number for the reference. For example, Table \ref{table:x2} shows the values of x^2 for integers 1 through 10. Using cleveref one can omit the leading Table and the package automatically infers it from the reference. For example, \Cref{table:x2} shows the values of x^2 for integers 1 through 10.

I used cleveref throughout my entire thesis and I included the hyperref package at the end to add PDF links. Unfortunately this somehow manages to conflict with cleveref and it no longer works as expected. The following demonstrates what happens. The caption of the Figure is inserted into the reference.

cleveref and hyperref conflicting

I ended up not using the cleveref package for this reason. I am not a LaTeX expert when it comes writing packages, so until I can dedicate some time to learn what is going on I have no working solution.

I used the TeXLive packages from the Ubuntu repository which contains the hyperref package. I downloaded cleveref from the CTAN repository.

Monday 18 January 2010

A Crash Course on Modern Hardware

Cliff Click from Azul Systems gives a talk on one of my favourite subjects, Computer Architecture. He looks at the difficulty of predicting performance on modern x86 CPUs.

Tuesday 12 January 2010

Ride to Portside

I rode to Portside this morning to try out MotionX GPS on the iPhone. I found a couple of weird signs along the way.

Date:12/01/2010 8:49 am
Distance:22.0 kilometers
Elapsed Time:1:12:46
Avg. Speed:18.1 km/h
Max. Speed:44.5 km/h

View Larger Map

Sunday 10 January 2010

Turing's Cathedral

Turing's Cathedral is an interesting look at computing at the 60th anniversary of John von Neumann's proposal for the digital computer. It cover aspects of computational models, biology, AI and the growing wealth of knowledge on the internet.

The quotes below show how we have far exceeded the original expectations of computation. Even though we are still programming the von Nuemann architecture / Turing machines, I have always wondered how much the languages we use would change given an entirely different computational model.

"When the machine finally became operational in 1951, it had 5 kilobytes of random-access memory: a 32 x 32 x 40 matrix of binary digits, stored as a flickering pattern of electrical charge, shifting from millisecond to millisecond on the surface of 40 cathode-ray tubes."

"By breaking the distinction between numbers that mean things and numbers that do things, von Neumann unleashed the power of the stored-program computer, and our universe would never be the same."

"In the early 1950s, when mean time between memory failure was measured in minutes, no one imagined that a system depending on every bit being in exactly the right place at exactly the right time could be scaled up by a factor of 10^13 in size, and down by a factor of 10^6 in time. Von Neumann, who died prematurely in 1957, became increasingly interested in understanding how biology has managed (and how technology might manage) to construct reliable organisms out of unreliable parts. He believed the von Neumann architecture would soon be replaced by something else. Even if codes could be completely debugged, million-cell memories could never be counted upon, digitally, to behave consistently from one kilocycle to the next."

"As organisms, we possess two outstanding repositories of information: the information conveyed by our genes, and the information stored in our brains. Both of these are based upon non-von-Neumann architectures, and it is no surprise that Von Neumann became fascinated with these examples as he left his chairmanship of the AEC (where he had succeeded Lewis Strauss) and began to lay out the research agenda that cancer prevented him from following up."

"We can divide the computational universe into three sectors: computable problems; non-computable problems (that can be given a finite, exact description but have no effective procedure to deliver a definite result); and, finally, questions whose answers are, in principle, computable, but that, in practice, we are unable to ask in unambiguous language that computers can understand."