LtU Forum

muSE - an embeddable scheme dialect

Hi all,

My pleasure to announce that my company has allowed me to publish muSE - an embeddable Scheme-like scripting engine we use - under a liberal open-source license. The first place I could think of was LtU, so here it is.

Code is available here.
I'm documenting it gradually in this blog.

From a language design perspective, nothing very dramatic, though some lisp afficionados might be interested in some novel/experimental features like -

  • (Sort of) first class macros
  • Ability to choose dynamic or lexical scoping for functions/closures.
  • Use of pattern-matching bind in let, case and fn (read "lambda").

Enjoy!

[EDIT] Code hosting site and blog site address have changed.

Parser that allow syntax extensions

Hi,
I'm projecting writing a compiler that would allow syntax extensions (some kind of compile-time metaprogramming). I don't want to have a very powerful system, so I've thought about just having:

{syntax: while (condition) do code}
while (condition, code) => // actual execution

and replace every pattern that matches the syntax with a call to the function.
However, I don't know where to start to get the lexer and parser running, because usual tools such as Flex/Bison or ANTLR (I would like to write the compiler in C#) don't seem to allow this.
Could you provide me any direction on where to go next? I've also read that Scheme or Haskell could be better languages to achieve this task. And of course, I'm open to any suggestion about the actual idea to implement them.

linux vs windows which is more compatible

i just what to know which os is more compatible either that is linux or windows

Rewriting Haskell Strings

This paper caught my eye, and it turned out to be really great. Unlike what the abstract might suggest their approach actually generalizes to any data type that can be faithfully converted to and from streams.

Rewriting Haskell Strings
by Duncan Coutts, Don Stewart, and Roman Leshchinskiy

Abstract:
The Haskell String type is notoriously inefficient. We introduce
a new data type, ByteString, based on lazy lists of byte arrays, combining
the speed benefits of strict arrays with lazy evaluation. Equational
transformations based on term rewriting are used to deforest intermediate
ByteStrings automatically. We describe novel fusion combinators
with improved expressiveness and performance over previous functional
array fusion strategies. A library for ByteStrings is implemented, providing
a purely functional interface, which approaches the speed of low-level
mutable arrays in C.

Available from http://www.cse.unsw.edu.au/~dons/papers/fusion.pdf

OOPSLA 2006 Call for Participation

OOPSLA 2006 will be held October 22-26 in historic Portland, Oregon (USA). You can learn all about OOPSLA at www.oopsla.org, and/or download the Advance Program PDF at http://www.oopsla.org/2006//program/oopsla_06_advance_program.pdf .

OOPSLA is the premier gathering of professionals from industry and academia, all sharing their experiences with today’s object technologies and its offshoots. OOPSLA appeals to practitioners, researchers, students, educators, and managers, all of whom discover a wealth of information and the chance to meet others with similar interests and varied experiences and knowledge.

You can mold your own OOPSLA experience, attending your choices of technical papers, practitioner reports, expert panels, demonstrations, essays, lightning talks, formal and informal educator symposia, workshops, and diverse tutorials and certificate courses from world-class experts.

Our invited speakers this year include:

* Dr. Brenda Laurel (Chair and graduate faculty member of the graduate Media Design
Program at the Art Center College of Design in Pasadena, California)

* Dr. Guy Steele (A Sun Fellow and researcher for Sun Microsystems Laboratories)

* Dr. Philip Wadler (Professor of Theoretical Computer Science at the University
of Edinburgh.)

* Joshua Bloch (Chief Java Architect at Google)

Please see http://www.oopsla.org/2006/program/sessions/invited_speakers.html for more background on our invited speakers.

OOPSLA provides nearly 70 tutorials to choose from! OOPSLA gathers the world’s finest educators covering the full breadth of classic and cutting-edge topics. Our presenters not only have world-class expertise, they’re also successful presenters who know how to share their hard-won knowledge with you. Visit www.oopsla.org/2006/submission/tutorials/introduction_to_tutorials.html .

There will also be nearly 20 workshops at OOPSLA. They’re fun! These workshops are highly interactive events, where groups of technologists meet to surface, discuss, and attempt to solve challenging problems. You learn a lot when you share your ideas and experiences with others in the field, and build relationships that are an essential part of the OOPSLA experience. Check out http://www.oopsla.org/2006/submission/workshops/introduction_to_workshops.html .

The popular Onward! track presents out-of-the-box thinking at the frontiers of computing. Posters discuss late-breaking results, culminating in the ACM Student Research Competition. Try your hand at solving the DesignFest® design challenge. And of course there are plenty of social opportunities for mingling and professional networking.

In addition to all the great offerings at OOPSLA, four other conferences are collocated this year, including:

* Generative Programming and Component Engineering (GPCE'06)
* Pattern Languages of Programming (PLoP'06)
* Dynamic Languages Symposium

You can find links to more information about these collocated conferences at OOPSLA’s main page, www.oopsla.org . It’s important to register soon, to reserve your place at OOPSLA 2006. Before you register, you should partially plan your week, deciding which tutorials, symposia, and collocated conferences you’d like to attend. Then you can register at https://regmaster2.com/cgi-bin/OOP06/on1/RMSs.cgi .

Go to the web (www.oopsla.org) today to reserve your place at OOPSLA ’06. See you in Portland!

Small Value Set Types

I want to use a kind of dependent type, which I am calling a small value set (SVS) for the time being. An SVS type is a finite set of values of a given type, and is a subtype of that type. One usage of the SVS type is for performing optimization passes (full and partial computations of constant expressions).

Using the concatenative language Cat as an example, given the following function f:

define f { 30 12 + } 

The inferred type is

() -> (42) 

Which means it consumes no values from the stack, and produces a single value of the simple dependent type 42.

Given the function g:

define g { [42] [13] if } 

The inferred type would be:

(bool) -> (42|13)

Which means that the function consumes a single boolean value from the stack and produces a value of the SVS type containing the values 42 and 13. In other words the union of the simple dependent types 42 and 13.

Am I just renaming something else here?

FringeDC- New Washington DC Organization for Fringe Programming Languages

Our group is for folks interested in Lisp, Scheme, Prolog, Samlltalk, Haskell, or any other fringe programming language- Our first meeting will be on 9/9.

Here's our official website if you're interested:
http://www.lisperati.com/fringedc.html

-Conrad Barski, M.D.

Constant Values as Types

This is probably one of those naive I should first finish the Pierce book kind of questions, but here goes anyway:

Are there languages where a constant value, such as 42, can act is its own type?

So putting this in real-world terms, in the Cat language I can write the following function with a type annotation:

define the_answer : ()->(int) 
{ 
  42 
}

However, it seems that I am being too general by saying it returns an int in the type annotation because it always returns 42 (edit: which we could say is a subtype of int). So ... shouldn't the type annotation be:

define the_answer : ()->(42) 
{
  42
}

So the more general question is: what is good / bad about this?

Dynamic Semantics

In a search of Ltu there are many occurrences of the expression "dynamic semantics" usually in discussions of static and dynamic typing. It is easy enough to imagine what this might mean but I wonder if there is an accepted formal definition in computer science similar to the definitions of axiomatic, denotation, and operational semantics. I found one suggestive paper "Representing Action and Change in Logic Programs" but this doesn't directly answer the question. Does anyone know of anything? Thanks.

Joe Armstrong's Blog

There has been some interest lately about Erlang on meta-sites like reddit and digg. I thought I was reading another blog entry from someone who was praising Erlang's concepts without actually writing any working Erlang systems. Then I noticed the name seemed a little familiar:

http://armstrongonsoftware.blogspot.com/

So far there's an easy going description of some of the key concepts behind Erlang. It won't be anything new for those who have read his thesis, but it is a consise high level intro to concurrency.

I'm looking forward to future entries.

[EDIT: corrected the thesis link. Thanks falcon]

XML feed