The design of C++0x

B. Stroustrup. The design of C++0x. C/C++ Users Journal. May 2005.

My basic opinion is that the language wish list is far too long, and that the libraries wish list is far too modest.

Two topics of interest: type safety, and support for concepts in the template model (i.e., the generic programming model).

Malbolge figured out?

Taken out of order:

From Ryan Kusnery's weird languages page:

The day that someone writes, in Malbolge, a program that simply copies its input to it's output, is the day my hair spontaneously turns green. It's the day that elephants are purple and camels fly, and a cow can fit through a needle's eye.

earlier:

I've succeeded in writing a Malbolge program that copies its input to its output. Since some of it is non-printing, here it is uu-encoded...

In addition the page contains a proof of Turing Completeness (of a slight modification of the language), and suggestions on how it could be made harder.

Spam

As some of you already saw, people are trying to spam the LtU forum.

I deleted the spam message that appeared earlier today, and blocked the user that posted it.

Beacuse the popularity of LtU has increased, spammers are likley to be more interested in us than in the past. In order to kill this in the bud, I am going to be more aggressive in the treatment of spam, and supposedly spam, messages than in the past.

If you have any doubts about the appropriateness a message you want to publish, don't hesitate to get in touch with me.

Design Concepts in Programming Languages

Design Concepts in Programming Languages

Below are all current draft chapters of Franklyn Turbak and David Gifford's Design Concepts in Programming Languages. This is a book based on MIT's graduate programming languages course (6.821). Many people helped in developing parts of the book, especially Mark Sheldon, Trevor Jim, Brian Reistad, and Jonathan Rees.

A Theory of Distributed Objects

A Theory of Distributed Objects - Asynchrony - Mobility - Groups -Components. Denis Caromel and Ludovic Henrio.

Distributed and communicating objects are becoming ubiquitous. In Grid and Peer-to-Peer environments, extensive use is made of objects. This book provides a general theory for distributed objects interacting asynchronously, for the sake of efficiency and scalability. Further, it copes with advanced issues such as mobility, groups, and components.

Pi-Calculus, Join-Calculus and more...

Check out the sample chapter to get a feeling of the writing style.

Squeak tutorial

A nice Squeak tutorial.

it has been awhile since we mentioned Squeak, but there were days when it was mentioned quite regularly...

Behaviour: Using CSS selectors to apply Javascript functionality

An amusing library that lets you use CSS selectors to specify elements to add javascript events to.

The terms pattern matching, and declartive programming come mind.

You can also think about it as an embedded DSL.

I came across Behaviour via this simple example which shows the style of programming the library leads to.

Language Workbenches: The Killer-App for Domain Specific Languages?

(via the LtU DG)

Martin Fowler writes,

Most new ideas in software developments are really new variations on old ideas. This article describes one of these, the growing idea of a class of tools that I call Language Workbenches - examples of which include Intentional Software, JetBrains's Meta Programming System, and Microsoft's Software Factories. These tools take an old style of development - which I call language oriented programming and use IDE tooling in a bid to make language oriented programming a viable approach. Although I'm not enough of a prognosticator to say whether they will succeed in their ambition, I do think that these tools are some of the most interesting things on the horizon of software development. Interesting enough to write this essay to try to explain, at least in outline, how they work and the main issues around their future usefulness.

When I was learning to program, we simply called these things good programming...

Seriously, much as I like DSLs and am happy to see more people think about the role of language design in software design, I think it is important to stress that good sofware design comes from familiarity with a large set of techniques. Language oriented techniques are useuful, but they aren't a panacea. They deserve wider recognition, being almost totally unknown in the wider programming community compared to other techniques (e.g., patterns), but shouldn't promise more than they can deliver.

I vaguely remember a long "tutorial" we linked to a couple of years ago about becoming a professional programmer, which included language design along with other techniques one must master. If this rings any bells, please post the link since I don't remember any more deatils...

A Typed, Compositional Logic for a Stack-Based Abstract Machine

A Typed, Compositional Logic for a Stack-Based Abstract Machine. Nick Benton. MSR-TR-2005-84. June 2005.

We define a compositional program logic in the style of Floyd and Hoare for a simple, typed, stack-based abstract machine with unstructured control flow, global variables and mutually recursive procedure calls. Notable features of the logic include a careful treatment of auxiliary variables and quantification and the use of substructural typing to permit local, modular reasoning about program fragments. Semantic soundness is established using an interpretation of types and assertions defined by orthogonality with respect to sets of contexts.

Also related to PCC, TAL etc.

Hungarian Notation vs The Right Thing

I've just read one of Joel Spolsky's usual rants, this one on the joys and virtues of Hungarian notation. You can take the boy out of Microsoft …

His example is avoiding malicious user input on a web form by ensuring all unsafe input is always encoded before use. He suggests two coding conventions before settling on Hungarian Notation as the Right Thing.

Now I expect LtU readers (certainly this one) will be wondering how a flakey substitute for a type system ended up being Right Thing instead of the Real Thing we know and love (and at this point everyone should briefly murmur a prayer over their copy of TAPL). But any regular reader of Joel will know he is thoroughly pragmatic (or anti-academic, depending on your mood) and his solution fits his mindframe. So, leaving aside ranting and wailing about Joel's lack of PL education (because, frankly, I'm doing enough for everyone) let's talk instead about how one could change his mind. Specifically, implementing Hungarian is a few days of drudge-work. You're never going to get Joel to sit down with SICP, EOPL or PLAI, and TAPL, to get the necessary background to implement his own statically typed language, and if you tried he would rightly tell you it would take too long to learn. Instead, could you deliver a statically typed variant of Javascript that would catch these errors in a similar time period? If so, what tools would you use? What type systems? How practical can we make our theory?