Tony Hoare sorry for inventing the null pointer

I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn’t resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. In recent years, a number of program analysers like PREfix and PREfast in Microsoft have been used to check references, and give warnings if there is a risk they may be non-null. More recent programming languages like Spec# have introduced declarations for non-null references. This is the solution, which I rejected in 1965.

(via Reddit)

How to render a ^ (carrot) in normal LaTeX text

Here are two ways to render a ^ (carrotcaret) in plain text within LaTeX:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
A caret: \verb|^|
\end{document}
\textasciicircum

I tested them and both work as prescribed. They produce different carrotscarets.
(via comp.lang.texcomp.text.tex)
Addendum: 03/02/09
Corrected spelling of caret.
Addendum: 03/03/09
Wrote the wrong newsgroup name.

Minor Scheme

Minor Schemeis an implementation of the Scheme programming language. Its planned features include: good performance, via:

  • just-in-time and ahead-of-time compilers generating native machine code
  • precise, generational garbage collection
  • full support for native system threads
  • full source-level debugging
  • a C API and a foreign function interface, for interfacing with C code
  • a module system which supports separate compilation and cross-compilation
  • a hygenic macro system

Jim Blandy

Lisp as a crucible

Scheme and Lisp force you *think* from the get-go. Most engineers and programmers hate to do that and it makes them uncomfortable. Starting a program in Java or C is easy. There’s a pile of boilerplate you can type without thinking about it, and it `feels’ like you’re programming. Then you have to haul out the bag of tools like the compiler and the linker and makefiles or ant. There’s a lot of busy work needed just to get going, and you feel like you’ve accomplished something.
In Scheme or Lisp, you start it up and there you are at the REPL. You have to decide what your program is going to do. You can’t waste time writing boilerplate (it’s unnecessary), designing data structures (just cons one and specialize it later), figuring out how to build complex inheritance hierarchies (do that once you know what you are doing), you have to dive into the problem right away. If you are willing to make mistakes and learn from them, then the REPL is a great place to play. If you prefer to plan ahead so you don’t make mistakes, a REPL is a very uncomfortable place to be.

— jrm
Having experienced the “discomfort” myself, I recognize now that this development approach acts as a mirror to your strengths and weaknesses. It reveals, very very quickly, whether or not you really have got a grasp both on the problem and how you plan to solve it. There is no where to hide! It is great.
(via R6RS)

A Scheme Timeline

Sometimes understanding the history behind a technology and a community can make it easier to understand. A few months ago I wanted to better understand the history of the various reports on Scheme so I made some notes in the form of a timeline.

It includes everything up to R6RS along with the IEEE standard, and publishing of SICP and HtDP. Obviously a lot more things could be added here but I wasn’t trying to take notes for an exhaustive history. All of the sources for the notes can be found in the dot-file below.

The timeline is here; and source file is here.