Pascal-FC

Pascal-FC is a programming language aimed at supporting the teaching of concurrent programming. It supports a wide range of concurrency primitives including semaphores, monitors with condition variables, synchronous message passing using channels (as in occam and CSP), remote invocation (as used in the Ada rendezvous), protected resources (as used in Ada 95 protected objects) and requeue. All of these features can be easily used, either in isolation or together.

An important feature of the implementation of Pascal-FC is the random switching between user processes incorporated into the run-time system. This provides an excellent simulation of true parallelism and invariably finds bugs in poorly structured programs.

It seems like Pascal-FC wasn't mentioned here before, and since there are implementations for various platforms I thought some of you may want to download and play with it a bit.

Use Continuations to Develop Complex Web Applications

An introductory article from IBM developerWorks on Cocoon, continuation-based (sometimes called "modal") web applications, and such.

If you've ever developed a non-trivial Web application, you know that development complexity is increased by the fact that Web browsers allow users to follow arbitrary navigation paths through the application. No matter where the user navigates, the onus is on you, the developer, to keep track of the possible interactions and ensure that your application works correctly. While the traditional MVC approach does allow you to handle these cases, there are other options available to help resolve application complexity. Developer and frequent developerWorks contributor Abhijit Belapurkar walks you through a continuations-based alternative that could simplify your Web application development efforts.

via comp.lang.scheme

An Invitation to SETL

Link: This article gives an easy to follow introduction to the SETL language. SETL has been around since 1970 and excels at manipulating sets.

Being a mathematician, I've always dreamt of a programming language that would make use of the powerful formalism of Set Theory. Two years ago, I started looking for an open-source software tool to use in an elementary Set Theory class. I had a hard time finding any on the Net, but in the end I found the object of my dreams: a structured, general-purpose, open-source programming language that implements as closely as possible the Set Theory formal language.

(Previous LtU discussion)

New Year's Resolutions

A couple of years back, the Pragmatic Programmers had this sage advice:

Learn at least one new [programming] language every year. Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut.

For 2002, Haskell was presented as the LOTY choice - pretty good choice. But since that time, the authors became enamored of the Ruby way, and have failed to submit a nominee for subsequent annums. My personal choice for the coming year is tender young Alice. Anyone else have their dates picked out? Or are you all into the Language of the Week per our dear moderator?

Python is... slow?

An interesting blog post and comment thread.

Linux Clustering with Ruby Queue: Small Is Beautiful

A nice article outlining the design of a small clustering engine using Ruby.

The article highlights several interesting features of Ruby,

Yukihiro Matsumoto, aka Matz, has said that "The purpose of Ruby is to maximize programming pleasure", and experience has taught me that enjoying the creative process leads to faster development and higher quality code. Ruby features powerful object-oriented abstraction techniques, extreme dynamism, ease of extensibility and an armada of useful libraries. It is a veritable Swiss Army machete, precisely the sort of tool one should bring into uncharted territory such as the NFS-mounted priority queue I was seeking to build...

One of the things to note about this extension is I actually was able to add a method to Ruby's built-in File class. Ruby's classes are open--you can extend any class at any time, even the built-in ones. Obviously, extending the built-in classes should be done with great care, but there is a time and a place for it, and Ruby does not prevent you from doing so where it makes sense. The point here is not that you have to extend Ruby but that you can. And it is not difficult to do...

In Ruby a module not only is a namespace, but it can be mixed in to other classes to impart functionality. The effect is similar but less confusing than multiple inheritance. In fact, Ruby classes not only can be extended in this way, but instances of Ruby objects themselves can be extended dynamically with the functionality of a module--leaving other instances of that same class untouched.

Integrating support for undo with exception handling

MSR: Integrating support for undo with exception handling. Avraham Shinnar; David Tarditi; Mark Plesko; Bjarne Steensgaard. December 2004.

One of the important tasks of exception handling is to restore program state and invariants. Studies suggest that this is often done incorrectly. We introduce a new language construct that integrates automated memory recovery with exception handling. When an exception occurs, memory can be automatically restored to its previous state. We also provide a mechanism for applications to extend the automatic recovery mechanism with callbacks for restoring the state of external resources. We describe a logging-based implementation and evaluate its effect on performance. The implementation imposes no overhead on parts of the code that do not make use of this feature.

The authors propose a try_all construct that restores program state, and analyze its semantics. They implemented the proposed construct using Bartok, a research compiler and runtime system for CIL.

I guess some here would see all the work required to implement this construct and the issues it raises as a demonstration of the perils of state...

Adding Optional Static Typing to Python

Link: Guido van Rossum broaches the subject of type tagging for Python.

Optional static typing has long been requested as a Python feature. It's been studied in depth before (e.g. on the type-sig) but has proven too hard for even a PEP to appear. In this post I'm putting together my latest thoughts on some issues, without necessarily hoping to solve all problems.

Static vs. dynamic is a never-ending thread in most PL discussions these days. But designing a type system is a *hard* task, one which I'm not sure doesn't require from a ground on up approach. But it would be nice if you could choose to work your way into, though most of the Smalltalk crowd will inform us that Strongtalk never did quite catch on.


(accompanying discussion forum)

Polyglot and Nested Inheritance

Polyglot is a compiler front end framework for building Java language extensions that doesn't seem to have been mentioned here.

Amongst the extensions is an implementation of nested inheritance which, I admit, I don't completely get. There's a discussion (moderately critical) of the paper in the context of OCaml that starts here.

This caught my eye while scanning the latest Caml Weekly News - a useful summary of the (rather high volume) (O)Caml list.

Alice Through the Looking Glass

Link: Alice is an extension to ML to support Open Programming, described as ML meets Oz. Alice Version 1.0 has been released.

Alice [is] a conservative extension of Standard ML. It adds only few simple, orthogonal high-level concepts that together form a coherent framework supporting all aspects of typed open programming.... Our understanding of open programming includes the following main characteristics:

  • Modularity, to flexibly combine software blocks that were created separately.
  • Dynamicity, to import and export software blocks in running programs.
  • Safety, to safely deal with unknown or untrusted software blocks.
  • Distribution, to communicate data and software blocks over networks.
  • Concurrency, to deal with asynchronous events and non-sequential tasks.

(via Chris Double)

(also Previous discussion on LtU)