LtU Forum

Learning Programming with Erlang

"The only concept to perform things several times, is recursion, which has a intuitive, simple semantics. Most students are able to implement backtracking on their first day!"

"With this knowledge and Erlang’s simple concept for concurrent and distributed programming, we were able to address a more interesting topic as the final project: we implemented a distributed chat in groups of 4 or 5 pupils."

Learning Programming with Erlang or Learning Erlang with Ladybirds pdf

grammars as a shared executable specification for language processing tools

Parsers written using our library are remarkably similar to BNF; they are almost entirely free of solutionspace (i.e., programming language) artifacts. Our system allows the grammar to be specified as a separate class or mixin, independent of tools that rely upon it such as parsers, syntax colorizers etc. Thus, our grammars serve as a shared executable specification for a variety of language processing tools. This motivates our use of the term executable grammar. We discuss the language features that enable these pleasing results, and, in contrast, the challenge our library poses for static type systems.

Executable Grammars in Newspeak (pdf) Gilad Bracha

Executable Grammars in Newspeak JAOO 2007 slides (pdf)

Morphic in your Browser

Sun Labs has rewritten the Morphic user interface from Self and Squeak to run under Javascript in web browsers with strong SVG support.

Branded, Lively Kernel, the system features:

  • Small web programming environment and computing kernel, written entirely with JavaScript. In addition to its application execution capabilities, the platform can also function as an integrated development environment (IDE), making the whole system self-contained and able to improve and extend itself on the fly.
  • Programmatic access to the user interface. Our system provides programmatic access from JavaScript to the user interface via the Morphic user interface framework. The user interface is built around an event-based programming model familiar to most web developers.
  • Asynchronous networking. As in Ajax, you can use asynchronous HTTP to perform all the network operations asynchronously, without blocking the user interface.

Object level unification

Hi

I'm quite new to logic programming and I'm in the process of understanding logical frameworks. Do logical frameworks allow us to use the same unification algorithm at both object and meta levels? If so, what benefits are there? I'm looking for a HO language that supports HOAS; is Twelf and lambda prolog (though it is no longer maintained) the best candidates? How about a language called HiLog? Any other info will be much appreciated.

Examples of large-scale functional language projects

Could anyone point to me to real-world examples of large-scale projects (10+ developers, multi-year, 1M+ lines of code etc.) that have been developed in a functional programming language? A frequent argument that I hear is that while imperative languages are more verbose, less elegant etc., they have some intrinsic merit for the development of large projects. The argument goes that this verbosity in some way makes for code that is more maintainable / shareable amongst large groups of developers. I'd be interested in practical examples that point to the success of functional languages for similar large projects. I'm aware of some of the Erlang success stories; can anyone else share relevant ones for languages like ML, Lisp, Haskell etc?

Functional Programming - A Secret Weapon for Software Testing - John Hughes

47:47 Why aren't we using Haskell? Well one ... is we had a customer who wanted to use Erlang - I cannot overemphasize the importance of that for a company ... [laughter] ... But actually the choice of Erlang has turned out rather well and the reason is we don't have that pesky type system to get in the way ... [laughter] ...
Functional Programming - A Secret Weapon for Software Testing (video 59mins)

Previously on LtU Testing Telecoms Software with Quviq QuickCheck

Google Tech Talk on the CMU Natural Programming Project

This is a talk given by Brad Myers describing a series of studies and projects related to programming, both by professionals and "end-user programmers", conducted at CMU HCI lab.

Abstract:

The Natural Programming Project is working on making programming languages and environments easier to learn, more effective, and less error prone. We are taking a human-centered approach, by first studying how people perform their tasks, and then designing languages and environments that take into account people's natural tendencies. We focus on all kinds of programmers: professional programmers, novice programmers who are trying to learn to be experts, and "end-user programmers" who are people who program because they must to achieve their "real jobs." This talk will update my talk to Google from October 27, 2005, and cover the exciting progress we have made since then. After briefly reviewing our old work on designing languages for novices, our new systems and studies will be presented. We have a new version of the the Whyline tool, which allows programmers to directly ask "why" and "why not" questions of their Java programs and get a visualization of the answers. The previous version for Alice decreased debugging time by a factor of 8 and increased programmer productivity by 40%, and pilot studies of the new version suggest a factor of two improvement in time. Other new work helps programmers keep track of their "working sets," since our research showed that programmers spend about 38% of their time navigating around code. Most of coding today is making use of APIs, and we have evaluated a number of APIs and design patterns using HCI techniques, to reveal how to make their easier to use for programmers. We also have a brand new study of the practices and problems for Interaction Designers working on interactive behaviors.

Some of the experiments in development environments and HCI results wrt API patterns can be of interest to PL research.

Computing is a Natural Science

In another thread the idea of computing as a "natural science" came up. I decided to see if I could find anything and came up with this from "Communications of the ACM". The idea has more currency than I realized.
Edit: also referenced in the paper: Great Principles of Computing.

Introducing the XQVM programming language.

I've implemented a new programming language. This is a new language and a new implementation: only one serious application has been built so far. The language is, I think, unusual and perhaps clever.

All currently published information is on one big page. (There are some commercial offers on that page but all of the code is available free of charge under open source licenses.)

XQVM is an XML and XQuery-based programming language. All XQVM source code is written as XML with embedded XQuery programs.

XQVM is lisp-like in that code and data have the same types and co-mingle at run-time. In lisp, code and data are represented as "cons pairs" and "symbols". In XQVM, being XML based, code and data are represented as DOM objects. XQVM's lisp-like nature runs deep: syntactic abstraction (defining new specialized sub-languages for your application) is an effective technique for writing XQVM code.

XQVM is forth-like in that, if an XQuery interpreter is already provided, XQVM's procedural evaluation rule can be implemented in but a few lines of code -- a simple loop. XQVM is also forth-like in that procedural steps do not accept named arguments: arguments to a step are found implicitly in the dynamic environment of the running program. (Unlike forth, XQVM is not "stack based" except in-so-far as applications may choose to define stacks and use them that way.)

XQVM is Scheme-like and Actors-like in the way that flow of control is handled. The lowest levels of "core XQVM" require programs to be written in an explicit (albeit unusual) continuation passing style. Each primitive step is, in part, responsible for computing its own continuation. In practice, XQVM is more Actors-like than Scheme-like: programs frequently construct a continuation rather than forward one that they received as an argument.

XQVM is fully reflective. For example, a program can capture it's entire state as an XML document and return that as a reply to a web request. The recipient could resume the program.

I hope you find it interesting.

COLA and Open, extensible object models

For those of you who want some context around the OMeta paper, there is some exciting work being done right now by Ian Piumarta as a member of the Viewpoints Research Institute led by Alan Kay:

cola (aka Idst, Jolt, the SODA langauges [sic], &c.) is an ongoing project to create a springboard for investigating new computing paradigms. Everything in it is late-bound, the intention being that any paradigm (existing or yet to be invented, formal complexity notwithstanding) be easily and efficiently mapped to it and made available to the user. It is a small part (the implementation vehicle) of the reinventing computing project.

An interesting and extremely beautiful place to start understanding the system is to see how it is bootstrapped, as described in Open, extensible object models (Ian Piumarta and Alessandro Warth, 2007):

Programming languages often hide their implementation at a level of abstraction that is inaccessible to programmers. Decisions and tradeoffs made by the language designer at this level (single vs. multiple inheritance, mixins vs. Traits, dynamic dispatch vs. static case analysis, etc.) cannot be repaired easily by the programmer when they prove inconvenient or inadequate. The artificial distinction between implementation language and end-user language can be eliminated by implementing the language using only end-user objects and messages, making the implementation accessible for arbitrary modification by programmers. We show that three object types and five methods are sufficient to bootstrap an extensible object model and messaging semantics that are described entirely in terms of those same objects and messages. Raising the implementation to the programmers' level lets them design and control their own implementation mechanisms in which to express concise solutions and frees the original language designer from ever having to say "I’m sorry".

XML feed