SRFI 40: A Library of Streams

The SRFI 40 document (now in "final" status) includes a very nice discussion of streams, especially as regards implementing them in strict languages (i.e, "even" vs. "odd" streams).

The code is in Scheme, of course, this being an SRFI, but basic knowledge of Scheme should be enough in order to read the highly readable SRFI document. Do check it out if you are interested in streams.

PLaneT

(via Gordon)

PLaneT is PLT Scheme's centralized package distribution system.

PLaneT provides automatic run-time module distribution and caching.

Cute, and be sure to check out the available packages on the PLaneT website, as well as the implemenetation details.

What's up guys?

LtU is becoming boring. Editors are urged to post ineteresting stuff. I can't do it alone.

More specifically. it has beeen awhile since we had any new items in the OOP, LP, and meta-programming departments.

Demonic Nondeterminacy: A Tribute to Edsger Wybe Dijkstra

Jayadev Misra's tribute to EWD at Europar-2003.

A short essay that may be relevant to the question whether language designers should make their languages more forgiving as regards programmer errors, or more stringent.

Higher-order module system of ML is actually possible in Haskell

A nice post from Oleg on the Haskell mailing list shows how to implement high order modules, and more specifically translucent applicative functors in idiomatic Haskell.

Thus different instantiations of the functor with respect to type-compatible arguments are type-compatible; and yet the functor hides the representation details behind the unbreakable abstraction barrier.

The work is inspired by (our own) Ken Shan's work that can be found here.

Oleg concludes,

The example illustrates that Haskell already has a higher-order module language integrated with the core language and with the module checking being a part of the regular typechecking.

"Types and Reflection" by Lauri Emil Alanko

Types and Reflection by Lauri Emil Alanko.
If you're interested in reflection or dynamic loading in statically typed languages, this is worth reading.


One of my favorite parts of this thesis is the dynamic loading section, along with discussion of the strengths and weaknesses of Haskell's Data.Dynamic, Template Haskell, and Don Stewart's hs-plugins.

Personally, I've been trying to figure out how to get elisp quality source evaluation with Haskell, and this thesis goes a long way towards answering my outstanding questions.

Grid Computing & the Linda Programming Model

(via Phil Windley)

This Dr. Dobbs article describes how tuplespaces can serve as an alternative to web-service message passing APIs.

A nice explantion of the Linda programming model.

Subcontinuations

Subcontinuations. Robert Hieb, R. Kent Dybvig, Claude W. Anderson. Lisp and Symbolic Computation 1993.

...traditional continuations are not useful in the presence of concurrency, because the notion of the rest of the computation represented by a continuation does not in general make sense...

Subcontinuations may be used to control tree-structured concurrency by allowing nonlocal exits to arbitrary points in a process tree and allowing the capture of a subtree of a computation as a composable continuation for later use.

Strangely enough this paper wasn't discussed here, even though it was mentioned in the discussion group a long time ago. Now's the time to rectify this omission.

Implementing Declarative Parallel Bottom-Avoiding Choice

Implementing Declarative Parallel Bottom-Avoiding Choice. Andre Rauber Du Bois, Robert Pointon, Hans-Wolfgang Loidl, Phil Trinder. Symposium on Computer Architecture and High Performance Computing (SBAC-PAD) 2002.

Non-deterministic choice supports efficient parallel speculation, but unrestricted non-determinism destroys the referential transparency of purely-declarative languages by removing unfoldability and it bears the danger of wasting resources on unncessary computations. While numerous choice mechanisms have been proposed that preserve unfoldability, and some concurrent implementations exist, we believe that no compiled parallel implementation has previously been constructed. This paper presents the design, smantics, implementation and use of a family of bottom-avoiding choice operators for Glasgow parallel Haskell. The subtle semantic properties of our choice operations are described, including a careful classification using an existing framework, together with a discussion of operational semantics issues and the pragmatics of distributed memory implementation.

amb breaks referential transparency (e.g., think about (\x.x+x)(3 amb 5) - how many choice points are there?)

This paper presents the problems, and shows how to implementat bottom-avoiding choice operators in Galsgow parallel Haskell (GPH).

The paper is worth checking out for the references alone, which can server as a useful guide to the subject of non-determinism in functional languages. Section 3 of the paper summarizes the semantic properties of the choice operators, and can be a good place to start reading if you are familiar with the subject.

A Conversation with Manfred von Thun