Prism Metaprogramming Tool released

Laurent Martelli
25 Oct 1999 16:33:49 +0200

>>>>> "Jim" == Jim Little <> writes:

  >> OIL is not reflexive yet, so it's nothing more than a lisp
  >> machine for the moment. But once it is reflexive, we'll be able
  >> to build new UIs, new syntaxes. But the core semantics of the
  >> interpretor will be the same. Adding new semantics is achieved by
  >> adding new services. If you create a special UI for some special
  >> services, you'll somehow have a new language.

  Jim> Hmm, it appears that OIL and Prism aren't as similar as I first
  Jim> thought.  :) I'm now rather confused as to what OIL is
  Jim> for... your website says "an open interpreter that will support
  Jim> AOP," but I don't see how "services" and "UI" relate to that.

I'll add meta-programming services when I start implementing an OIL
interpretor in OIL. When I first started with tcl, I introduced a
service to control memoization (caching services result). I'm not
doing it right now since I'll be reimplementing everything in OIL. So
it would would just a waste of time. I'll do it only if I face severe
performance issues again. 

  Jim> What are your goals for OIL?  What will it do when it's fully
  Jim> functional?  Assuming it were fully functional, how might I use
  Jim> it in a typical day?

A casual user would just use it as if it were Linux or Windows. He
wouldn't see the difference, excepted that it should be more
consistent and easier to use.

A programmer would start his day defining new services. When it say
`defining', I'm talking about specifications; what the service is
supposed to do. He will be able to this thanks high level services
enabling him to manipulate high level concepts. 

Once this step is done, he would probably run some benchmark
tests. And if the results are not satisfying, he would start
meta-programming, ie adding new optimisation rules to the interpretor
so that his new service runs with acceptable performances. 

He would also probably add new UI features to support his new

Let's take the exemple of integer arithmetics. He'd probably state the
natural integers are isomorphic to lists of `0' and `1'. And he'd
define predecessor and successor operators in terms of binary
representation. He'd then define addition with 

        x + y = succ(x) + pred(y)
        for all x, x + 0 = x

He'd then define some "selectors" than convert binary lists to
integers and vice-versa. 

He'd then realize that performances really suck. So he'd say that on a
IA32 architecture, binary lists with lenght<32 can be represented by
32bits values. Add that succ, pred add + have trivial implementations
in machine language. 

He'd then introduce other UI features so that users can use their
prefered 10 base notation, and operator `+' with the syntax that they

Laurent Martelli