archives

Scheme2Js

Scheme2Js is a Scheme to Javascript compiler distributed under the GPL license. While some effort has been spent on being as close as possible to R5rs, we concentrated mainly on efficiency. Usually Scheme2Js produces Javascript code, that is comparable to hand-written code. In order to achieve this performance, Scheme2Js is not completely R5rs compliant. In particular it lacks support for continuations, exact numbers and it treats tail recursion only partially.

I think Scheme2Js was mentioned in the forum, but I think it might be of more general interest.

A nice touch is that Scheme code can use JavaScript variables and functions, and JavaScript code can use Scheme variables and functions (perhaps not as cool as the Javadot notation of JScheme, but mighty useful anyway).

Scheme2Js is used in HOP.

What is the Meaning of These Constant Interruptions?

Graham Hutton and Joel Wright discuss the semantics of interrupts.

Interrupts are important for writing robust, modular programs, but are traditionally viewed as being difficult from a semantic perspective. In this article we present a simple, formally justified, semantics for interrupts.
Although I didn't get into the details of the article (though it will probably interest the more astute LtU readers), what got me interested in the article was the correlation drawn between exceptions and interrupts:
An important concern in modern programming is exceptions, events that cause computations to terminate in non-standard ways. There are two basic kinds of exceptions: those that arise from inside a computation itself, such as a division by zero, and those that arise from outside a computation, such as a timeout. The former are termed synchronous exceptions, because they can only arise at specific points; for example, division by zero can only occur when performing a division. Dually, the latter are termed asynchronous exceptions, because they can potentially arise at any point; for example, a timeout can normally be received at any time. For simplicity, however, we follow the common practice of referring to synchronous exceptions as exceptions, and to asynchronous exceptions as interrupts.
I can't help but think this is related to resumable exceptions that was discussed in the LtU discussion of Common Lisp Exception Handling and Oleg's subsequent implementation in OCaml. That is, aren't interrupts basically a form of asynchronous exceptions that require a resumption mechanism?

Cat version 0.2

I have posted a new version of the Cat interpreter and documentation at http://www.cdiggins.com/cat/. Cat is a programming language designed as a high-level intermediate language. Cat is inspired by Joy, and resembles a cross between Scheme and Forth.

Comments, questions and suggestions welcome!

Lang .NET Symposium Registration Now Open

The day of the beast has passed without any noticeable effect; Bill Gates has announced his retirement and the Microsoft stock actually goes up. The coast  finally seems safe for another post on the Lang .NET symposium!

Registration for this heavily debated event is now open. I believe that we have a very interesting set of non-Microsoft invited speakers including Gilad Bracha from Sun, William Cook from UT Austin, John Gough from QUT, Miguel de Icaza from Novel, and Shriram Krishnamurthi from Brown; Microsoft folks including Mike Barnett, Gary Flake, Jim Hugunin, Polita Paulus, Don Syme, and Paul Vick; and a fine line-up of submitted papers.

Hope to see you all in Redmond this August!