R6RS OpenGL Demos

Ed posted here about his R6RS OpenGL libraries and demo ports.

They are very nice. Here are some screen shots:

[[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2009/05/empathy-150×150.png]]

[[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2009/05/flexiline-150×150.png]]

[[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2009/05/jitterbug-150×150.png]]

[[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2009/05/trails-150×150.png]]

Going beyond filesystem based library loading

In this post, Edward explains how he extended the library loading facilities in Ikarus to allow loading from not only the file system, but also URLs, and some day maybe even SQLite databases. Very nice!

Background:

The report does not specify how source code is represented and stored. The only requirement the report imposes is that the source code of a top-level program (see report section on “Top-level program syntax”) or a script (see section D.2) be delimited. The source code of a library is self-delimiting in the sense that, if the beginning of a library form can be identified, so can the end.

Implementations may take radically different approaches to storing source code for libraries, among them: files in the file system where each file contains an arbitrary number of library forms, files in the file system where each file contains exactly one library form, records in a database, and data structures in memory.

Similarly, programs and scripts may be stored in a variety of formats. Platform constraints may restrict the choices available to an implementation, which is why the report neither mandates nor recommends a specific method for storage.

Revised 6 Report on the Algorithmic Language – Non-Normative Appendices – Appendix E – Source code representation

Adding Soft Typing to Ruby

Here is an interview with two of the Diamondback Ruby developers. You can read more about how there system works in this paper: Static Type Inference for Ruby.

It is interesting that they took the approach to compromise by neither being too aggressive nor to permissive; in other words they wanted to make sure that people would actually use the tool. As such, type inference is strong enough to detect type errors, but permissive enough to allow for the same variable to have a different type of object assigned to it within the flow (dynamic extent) of a single method.

Another nice feature is the addition of a contract system for cases where type inference would not work; the two primary examples being utilization of the built-in classes which are implemented in C or the use of eval. The contracts specify the behavior and the implementation needs to conform to it.

With things like Diamondback Ruby, PLT Scheme Contracts, and Typed Scheme (mentioned in the paper) becoming available; I wonder if the statically vs lately typed language arguments will eventually go away.

(via LtU)

Lisp is the smartest way to misuse a computer

Lisp has jokingly been called “the most intelligent way to misuse a computer”. I think that description is a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts.

Edsger Dijkstra, CACM, 15:10