Scheme in the Real-time CG Content Production

If you try to pin down Schemers to a particular stereotype, you will fail; they are just too diverse a bunch.

Take Shiro Kawai’s website. He’s got some great resources on that page. Dig in deeper and have a look at his paper Gluing Things Together – Scheme in the Real-time CG Content Production.

The short story is that

Square USA R&D Team had been developing an in-house real-time rendering engine in a project called Dancer, and we adopted Scheme as an embedded scripting language.

Here is how they used it:

  1. As a File Format
  2. As a Debugging tool
  3. For Rapid Prototyping
  4. For Authoring

There are a lot, and I mean a lot of really interesting bits about how the tackled the problems they were facing.

The best part: you don’t have to be a computer graphics buff to have a heck of a good time reading this paper. Enjoy!

Naughty Dogs use Scheme in Video Games

Once again Naughty Dog Software has used Lisp to write their video games.

Here are the two blurbs where I heard about it:

I had held off posting this for a while in hopes that presentations materials would show up. They haven’t set; so I’m going to have to do some digging!

Ur-Scheme: Compiling a Subset of R5RS Scheme to Asm

The home page for Ur-Scheme tells the tale of one mans journey implementing a compiler from a subset of Scheme to Assembly on Linux.

For folks interested in almost totally pure functional programs, here is a teaser:

It contains relatively little mutation. Although almost every line of the compiler has “side effects” like outputting lines of assembly code, there are fairly few locations where the compiler’s internal state is mutated. I count 25 calls to set! and string-set! in the 1600 lines of code, including the standard library.

Mr Ed Designer: Generating User Interfaces with PLT Scheme

PLT Scheme’s user interface library is called Mr Ed. It is used to provide DrScheme to thousands of computers running Windows, Mac OS, and UNIX. It “just works”, and does so well; it is a fine graphics toolkit. MrEd Designer aims to make Mr Ed even easier to use!
Addendum: 7/14/8:
Peter Ivanyi now maintains this application.
Addendum: 09/10/08:
MrEd Designer 2.1.2 is released; it now supports tab-panels.
Addendum: 09/20/08
In MrEd Designer 2.1.3:

  • tooltips are added for the main buttons
  • the no-border style for the tab-panels is fixed.

Caveats of Object Creation using Closures

At one time or another you have probably heard the claim made that since you can utilize closures while programming in Lisp, there is no need to utilize an object system. That claim is sort of a half-truth. While closures are the language construct that allow you to create objects, they certainly don’t provide you with all of the object oriented programming language features that you would expect. Instead, you need to implement those features yourself.
The question was posed on the PLT discussion list. Some very good points were made about the issues you must address when implementing such an object system yourself, along with a pointer detailing how the issues are addressed in PLT Scheme.

Nonstandard Interpretation with Scheme

In response to this excellent blog post by Dave Herman, Jay McCarthy pointed the reader to this interesting paper about creating a language construct that allows you to modularly redefine how your code (that you may or may not have written) gets evaluated (in other words, nonstandard interpretation).
Nonstandard interpretation

is a powerful and useful construct that supports such tasks as tracing, security logging, sandboxing, error checking, profiling, code instrumentation and metering, run-time code patching, and resource monitoring.

Obviously, these things aren’t new features. You can probably already perform nonstandard interpretation using your language of choice.
The interesting thing about this approach is that rather than performing compile time environment or code manipulation, a new language feature is applied to perform the non standard interpretation at runtime.
While both will get you to the place that you want to go; only the latter offers you an opportunity to build a conceptual framework for understand how you reached your destination. Neat!

Distributed Programming in Scheme

Here are two places to start with distributed programming in Scheme:
Termite
Dimitris Vyzovitis’s patch for revision 8983 (of trunk) in PLT Scheme
Addendum 03/21/08

  • Dimitris’ patch for additional mailbox functionality.

Addendum 04/26/08

Addendum 06/24/08
I’m pretty sure this patch has made it into the main source branch.

Encript-ing Scheme

Enscript is such a versatile and helpful tool.

Here is how I use it to pretty print Scheme code:


enscript --landscape --columns=2 --highlight=scheme --borders --line-numbers --output=.ps .ss

Addendum: 03/06/09

Here is the direct link for the GnuWin32 download of Enscript.

Addendum: 03/08/09

Here are my new favorite settings for rendering code with this excellent program:


enscript --word-wrap --underlay=Underlay --ul-gray=0.9 --line-numbers --
landscape --highlight=scheme --columns=2 --borders --output=test.ps C:\collects\wisdomandwonder\resume\latex-renderer.sls