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?

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.

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)

Coroutines in Lua

Link: The Lua folks discuss their implementation of coroutines, using Create, Resume and Yield methods.

Lua implements the concept of asymmetric coroutines, which are commonly denoted as semi-symmetric or semi-coroutines. Asymmetric coroutine facilities are so called because they involve two types of control transfer operations: one for (re)invoking a coroutine and one for suspending it, the latter returning control to the coroutine invoker. An asymmetric coroutine can be regarded as subordinate to its caller, the relationship between them being similar to that between a called and a calling routine.

Lua coroutine facilities provide three basic operations: create, resume and yield... Function coroutine.create creates a new coroutine, and allocates a separate stack for its execution... Function coroutine.resume (re)activates a coroutine, and receives as its required first argument the coroutine reference... A coroutine suspends by calling function coroutine.yield in this case, the coroutine’s execution state is saved and the corresponding call to coroutine.resume returns immediately.

The main difference with typical thread implementations is that (a). the caller is suspended until completion and (b). a coroutine can return values like a function call. I suppose I'd summarize it as functions that retain state between calls.

Back to the language roots

Link: The article discusses the future of HDLs given the encroachment of software programming languages.

It's not time for the revolution yet. Traditional hardware-description languages have specific features that make them superior to software programming languages; although SystemC has its place in the hardware-design process, it still can't compete with Verilog and VHDL...
Verilog may have C-like syntax and VHDL an Ada-like syntax, but there are significantly different concepts in HDLs and software programming languages. Most importantly, an HDL adds the notions of concurrency and time.

From a PL perspective, it always seems to get back to whether a dedicated language is better suited than a more flexible general purpose one. And whether the specifications are best verified within the language or by a suite of tools and tests.

How birds learn songs

Research on Teaching Birds to Sing. Since we periodically delve into general language issues, I thought this work might be of interest since it is related to language learning.

Learning how baby sparrows learn to sing their songs could provide clues to how humans learn to speak languages. University of Utah biologist Gary J. Rose and his colleagues have taught baby sparrows to sing a complete song, even though the birds were exposed only to overlapping segments of the tune rather than the full melody.

(Though, we still appear years away from providing a general purpose PL for the winged community. And even then, we'll have to engage a full combinatory community).

Tim Bray: Sun & Dynamic Java

Tim Bray,

So on Tuesday we held a summit here at Sun, with a few of our internal Java leaders, and on the dynamic-languages side, Larry Wall and Dan Sugalski (Perl and Parrot), Guido van Rossum, Samuele Pedroni and Sean McGrath (Python), and James Strachan (Groovy). It was an educational day for us; herewith some take-aways and pictures.

Everyone and his sister is linking to this blog post, so you might have seen it already.

For a touch of flavor, here’s just part of the list that of things to discuss that Larry had prepared: anonymous code/closures, lvalue methods/functions, variadic call/return, constant/rw/copy/ref/lazy parameters, wrappers/AOP, eval, exception handling/undef/nil/unthrown exceptions, exception handlers with lexical access, temporization/hypotheticality, efficient regex with complete semantics, access to dynamic context/want/caller, redispatch of methods (fallback upon "fail"), efficient switch statement?, versioned modules/classes, virtual classnames, continuations.

Feel free to express your opinion regarding this list, and other relevant factors.

Casting SPELs in Lisp

A short and sweet Lisp tutorial that has the courage to introduce macros to absolute beginners.

The reader is shown how to build a simple text adventure game using Lisp. The code is available for download.

The IDE Divide

(via Keith)

Oliver Steele:

The developer world is divided into two camps. Language mavens wax rhapsodic about the power of higher-level programming — first-class functions, staged programming, AOP, MOPs, and reflection. Tool mavens are skilled at the use of integrated build and debug tools, integrated documentation, code completion, refactoring, and code comprehension....

You can be the only one on a team to use Eclipse. If you’re the only one on your team using Haskell, something is probably wrong.

It has been awhile sine we had a good IDE war er.. discussion...

The distinction between language mavens and tool mavens rings true. It shouldn't be too hard to guess to which camp I belong... I rarely spend time thinking about IDE issues if I can only help it.

XML feed