Here is a seemingly nice presentation by Guy Steele. I haven’t watched it yet but the original poster vouched for it.
(via comp.lang.scheme)
Category: Link
Philosophy always comes down to the details
Here is a good post about language design philosophy and implementation details of inner classes in Java. The focus is more on the latter; and the article is still interesting.
Managing your PDF library
If you have already got a lot of PDFs then you probably have a personal approach to managing all of the content. For example, I keep everything sorted by topic in a directory structure. Here are two ways that seem to provide a better approach (both are interesting): Papers and Digital Editions.
(via Pascal)
Succeeding as a Scientist
This presentation is brilliant and inspiring. Maybe the ideas aren’t new; but the way that Hamming put it all together really “spoke” to me.
It might seem like a long read; but isn’t personal success worth your time?
For now I am not going to highlight the key points; that is an exercise much better left to the reader.
(via Reddit)
Concepts, Techniques, and Models of Computer Programming
Here I asked “What is a good multi-paradigm book on programming?”.
Michael answered:
“Concepts, Techniques, and Models of Computer Programming” by Peter Van Roy and Seif Haridi
http://www.info.ucl.ac.be/~pvr/book.html
A Command Line tool for the Windows Clipboard
This command line tool for working with the Windows clipboard looks very useful for Windows power-users.
Random Art
Suppose we take an expression in x and y, built by nesting simple primitives: product, average, sin(pi*_), and cos(pi*_). These four operations map arguments in the range -1 to 1 to results in this same range. Thus, at any point with -1 <= x,y <= 1, our expression built from these primitives will return a value between -1 and 1. By scaling the answer to a grayscale value 0-255, we can plot the function in this 2-by-2 square. (From three such expressions, we can get red, green, and blue values for each point.)
What you get is some very nifty art!
(via PLT)
Addendum: 03/11/09
Noel posted some PLT Scheme code for implementation here:
#lang scheme/gui
(define (make-plotter drawing-fn size)
(lambda (canvas dc)
(for* ((x (in-range size))
(y (in-range size)))
(let* ([intensity (inexact->exact (round (* (/ (add1
(drawing-fn x y)) 2) 255)))]
[colour (make-object color% intensity intensity intensity)])
;;(printf "~a ~a ~a\n" intensity x y)
(send dc set-pen colour 1 'solid)
(send dc draw-point x y)))))
(define (draw-grayscale size drawing-fn)
(define frame (new frame%
[label "Random Art"]
[width size]
[height size]))
(define canvas (new canvas%
[parent frame]
[paint-callback (make-plotter drawing-fn size)]))
(send frame show #t))
(define (example1 x y)
;; some random stuff
(sin (* (sin (* (cos x) y))
(cos (*
(sin (* (sin y) (cos x)))
(cos (* (cos (* y x)))))))))
(define (example2 x y)
(if (> x 200)
1
-1))
;;(draw-grayscale 400 example1)
How PLTCOLLECTS works in PLT Scheme
R6RS Scheme systems are composed of code artifacts that are either libraries or top-level-programs. Libraries simply map to directories. In PLT Scheme, you can configure the library search path by configuring the PLTCOLLECTS environmental variable.
Having configured it and not getting results that I had expected, I asked about what I was doing wrong and got a great explanation here. It is pasted below.
The path-list function does something that is common with environment variables that specify paths: you have a string of several paths, separated by a “:”, which are searched in order. In addition, an empty path means “splice the default here”. So you get:
“/foo:/bar” — look in /foo and then in /bar
“/foo:/bar:” — look in /foo, then in /bar, and then in the default
“:/foo:/bar” — look in the default, then /foo then /bar
“/foo::/bar” — look in /foo then the default, then /bar
The last example shows why it’s useful — it allows you to both override PLT collections, as well as specify collections that could be overriden by PLT collections. For example, the first is useful if you want to try patching libraries, and the second is useful if you want to add a library that is added to a later version of PLT and you want to use it now but not when you upgrade.
Finally, on windows, the path separator character is “;” instead of a colon. (And remember the possible pitfalls with backslashes, or just use forward slashes.)
Hopefully that detail gets added to the documentation; it wasn’t obvious from reading it.
The Genius of Turing's Machine
Here is one person’s take on the genius of Turing’s machine.
I forget how I reached this page.
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)