Scheme on the CLR

Common Larceny (alpha release) is a CLI-targeted implementation of the Scheme programming language. The compiler generates MSIL and is interoperable with other .NET languages.
(spotter: Brad)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


So now I have a Scheme REPL, apparently running on the CLR. This is good. Now, how do we interoperate with the framework libraries?

Bigloo has been available on

Bigloo has been available on .net for quite some time. However, I could not get it to work (as an extension language library) on Compact Framework.


There are examples of Scheme code calling/using .NET assemblies in the Larceny distribution. See for example windows.sch (under Lib/MzScheme).

so many languages targeting the cli

next, ada as A#
should make some people here happy.

Every Hour Spent Porting to Microsoft's CLI...

is an hour that could have been spent improving your software. As Joel Spolsky says in How Microsoft Lost the API War:

It's just Fire and Motion as far as I'm concerned: Microsoft would love for me to stop adding new features to our bug tracking software and content management software and instead waste a few months porting it to another programming environment, something which will not benefit a single customer and therefore will not gain us one additional sale, and therefore which is a complete waste of several months, which is great for Microsoft, because they have content management software and bug tracking software, too, so they'd like nothing better than for me to waste time spinning cycles catching up with the flavor du jour, and then waste another year or two doing an Avalon version, too, while they add features to their own competitive software. Riiiight.

.net compatibility

can be seen as a selling plus for some managerial types who are confused and need reassuring.

Also true for Parrot?

Is it ever worthwhile porting anything to anything else? What sorts of factors might make it worthwhile?

I wonder how much it matters that it's Microsoft's CLI. Spolsky's assumption that anything Microsoft dangles in front of developers is tainted is, I suppose, one that many sensible people will be inclined to share. I admit to not understanding why many of the same people don't appear to feel the same way about Sun's JVM.

PLT Scheme is the last non-mainstream platform one would want to accuse of lacking library support, so the benefits of being able to access the .Net framework libraries are perhaps not overwhelmingly persuasive in this case. But if I were doing GUI development on a Windows platform, I would certainly consider access to Windows.Forms an advantage. And http.sys / Indigo is shaping up to be a pretty interesting framework for web development.

languages vs. applications

There's a big difference between porting an application to a new runtime environment, and porting a language. The latter enables a potentially huge (depending on the popularity of the language) number of applications to run in the new environment, as well as allowing developers who prefer the ported language access to whatever facilities and libraries the new environment offers.


Having installed from the .msi, I wasn't aware of the code samples.

Time for a closer look, then.

I would be most interested in using Scheme as a scripting/extension language for .Net applications, a là Guile.

a la Guile

Well, I was not explicit enough: Bigloo works for my simple examples (on full .NET).


And Microsoft scores yet another point towards world dominance... oh, wait! already hit... :P

The real question is... where is the Scheme for Parrot implementation? :)


Will it also run on the other .NET implementations? Eg and Mono. Otherwise, it is just a fancy Windows port of Scheme with a non-portable FFI (into an admittedly large API library). Is there an equivalent that runs on JVMs?

Portability - A Goal I Believe

:...Common Larceny does not work with version 0.6.10 of Portable.NET. Portable.NET cannot compile methods of the size used in Common Larceny...."

"... Common Larceny does not work with version 1.0.4 or version 1.1.2 of Mono. Common Larceny runs briefly, but then exits without raising an error. The cause is unknown...."

There are lots of Schemes that run on the JVM - SISC being the best known.

Re: Portability - A Goal I Believe

Thanks. Useful info.