LtU Forum

Real-World Haskell, the book

Don Stewart, John Goerzen and I are excited to announce that we're working on a book for O'Reilly, the title of which is "Real-World Haskell". We hope that the book will be useful for getting people quickly bootstrapped into applying Haskell to real problems, and shedding the language's undeserved "academic only" aura. We're delighted that O'Reilly has agreed to publish the book under a Creative Commons license, so we'll be able to make it available to as many people as possible.

For more information, see our web site.

function overriding workaround in dynamically typed languages

hi,
i had a chance to make my hand dirty with ruby. IMHO untypedness of these dynamically typed language is more a nuisance than as a help. define a class, and if you want your behaviour different depending upon the type of object, only option left is check if it is one of the kind of object you are interested and then work accordingly..

def fun(inobj)
if inobj.kind_of?(obj1)
do something..
elsif inobj.kindof?(obj2)
do something.
endif

except these switch cases, is there any better way of handling the situation, where overridden function would have been helpful (in pure OO sense)

regards
chinmay

[ANN] Cat v0.14 and MetaCat Programming Languages

I've just released a major new version of the Cat programming language, and an extension called MetaCat. The most recent release can be downloaded through Google code hosting.

Cat is a statically typed functional stack-based language, based on the Joy programming language. Cat was designed primarily as a high-level intermediate language for the translation, verification, and optimization of programs written in multi-paradigm languages. Cat also is intended for use as a language for teaching core computer science and programming concepts.

The MetaCat language extends Cat with a term rewriting system which was based on Manfred von Thun's paper A Rewriting System for Joy and is similar to the
GHC Rewrite Rules.

Cat has the following features:

  • strongly typed - all expressions have a well-defined type
  • side-effect labeling - functions with side-effects are typed differently from pure function
  • purity - the level 0, level 1, and level 2, of the Cat specification are entirely with side-effects. Side-effects in the rest of the Cat language are managed by the type system.
  • minimal syntactic constructs - apart from function and macro definition syntax, the only syntactic constructs with predefined meaning are the quotation operators "[" and "]"
  • point-free form - the core language has no named parameters or variables
  • polymorphic variants - the "var" type allows dynamic dispatching based on type
  • type inference - type annotations are optional
  • typed exceptions - exceptions can be thrown and caught in a type safe manner

Features of the release:

A big thank you to the many members of the Lambda-the-Ultimate community whose constributions and insights have been instrumental in the development of the Cat language. Any questions, comments, or requests would be much appreciated.

Functional Programs as Linked Data

This paper by Josh Shinavier presents Ripple, a concatenative, multivalued, pipeline language for RDF metaprogramming.

From the Abstract:

The idea of linked programs, or procedural RDF metadata, has not been deeply explored. This paper introduces a dedicated scripting language for linked data, called Ripple, whose programs both operate upon and reside in RDF graphs. Ripple is a variation on the concatenative theme of functional, stack-oriented languages such as Joy and Factor, and takes a multivalued, pipeline approach to query composition. The Java implementation includes a query API, an extensible library of primitive functions, and an interactive command-line interpreter.

What is a "domain specific language"?

What is the relationship between a "language" and a "domain" in the term DSL? I suspect we curently apply just a subjective ontology: some languages are intended to cover a specific domain and are therefore domain specific. But aren't Erlang, C and Perl also domain specific in this respect ( telecommunication networks, operating systems and text processors )? We are just widening and narrowing abstractions and also domains and unless we don't simply focus on surface syntax ( what almost any author inevitably does who is talking about DSLs ) it's pretty hard to designate a domain specific language. For instance we could replace this ugly line noise that regular expressions are by a combinator library without changing the underlying semantics. Do we have a language only in the first case but not the last?

Delegating Responsibility in Digital Systems: Horton's "Who Done It?"

Jed Donnelley, Alan Karp, and I would like your comments on our draft paper

Delegating Responsibility in Digital Systems:
Horton's "Who Done It?"

Programs do good things, but also do bad,
making software security more than a fad.
The authority of programs, we do need to tame.
But bad things still happen. Who do we blame?

From the very beginnings of access control:
Should we be safe by construction,
or should we patrol?
Horton shows how, in an elegant way,
we can simply do both, and so save the day.

with apologies to Dr. Seuss

We plan to submit it to USENIX HotSec 07 (Hot Topics in Security) which has a five page limit. Submission deadline is 6/1/2007. We think this paper is important. Your comments and suggestions will be greatly appreciated. Thanks!

What's in a name: eval vs apply.

Compositional functional languages like Cat and Joy require an explicit function application operation. I was calling the function application operation in Cat "eval", as in evaluate function, but this carries with it the stigma of the "eval" operation in JavaScript and other languages that operates on strings. So what's a language designer to do? Joy uses "i" which I dislike intensely. Someone suggested "exec" but that for me sounds too imperative. I am currently leaning towards "app" as a mnemonic for "apply".

Any thoughts on what the function application operator should be called?

Offline discussions

From time to time, and for various reasons, it makes sense to move certain discussions off LtU. This happens when the discussion becomes to specific (say about the design of a particular project), too chaotic, or fails to confrom to the LtU policy.

Many LtU readers have personal websites, such as blogs, that they can use to host such discussions. Others may be motivitated enough to set something up for the purpose of a specific discussion (setting up a blog is can be free and easy, on one of several blog hosting providers). email can also be used for discussions between a select group of indvidulas.

However, it sometimes makes sense to have a shared discussion space, and yet setting up a site would be overkill. In these situations, I recommend QuickTopic. It is easy to use, and robust.

The only thing you need to do to allow others to join a quicktopic discussion space is to share the URL with them (the urls are randomly generated, so if you keep the url secret probably only you and your friends will be able to find the discussion). If you decide to use quicktopic to take a LtU discussion offline, due to the reasons I outlined above, feel free to post the url in the relevant LtU thread, so other members can join you on quicktopic if they wish.

[ANN] AsyncObjects Framework (Java)

I would like to announce the AsyncObjects Framework. The framework provides class library that allows relatively easy creation of asynchronous programs in Java. The framework makes a heavy use of Java inner classes and reflection to provide higher-level constructs over event loops.

In this framework, I have tried to replicate core ideas from E programming language (home page) in pure-Java in as usable form as possible. E is obviously more usable, but it have luxury of not being restricted by Java syntax. Feedback on further improvements is welcome.

I think that the result is more usable than what have been discussed here.

See developer's guide, javadoc, and samples for more details.

Two lectures at the British Computer Society in Covent Garden on Friday 18 May

Embedded domain-specific languages

Two lectures at the British Computer Society in Covent Garden on Friday 18 May.

Embedding a DSL in a programming language is a low-cost strategy that doesn't sacrifice the power or generality of the programming language. Call this the agile approach to DSLs; an approach more suitable for some languages than others.

iPod – iTunes – iDyalog

"If music be the food of love…" John Daintree leaps into action with a DSL for iTunes so he can summon his date's favourite tune as soon as he gets her home. (Show us your moves, John.)

Go Fish!

Morten Kromberg previews an open-session workshop prepared for XP2007 in Como this summer and tested earlier this year in Gothenburg.

The workshop seeks a DSL to play Go Fish! and explores solutions embedded in Python, Ruby and Dyalog APL. For domain-driven design, much turns out to depend on the level of semantic density achievable. Morten shows us in Dyalog just how much you can get done with nothing but the PL.

details
5.30-7.30pm Fri 18 May
British Computer Society
Wilkes Room
5 Southampton Street
London WC2E 7HA

RSVP essential: ray_cannon@compuserve.com

The British APL Association is a Specialist Group of the British Computer Society.

XML feed