[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Boot

From: Gabriel Dos Reis
Subject: RE: [Axiom-developer] Boot
Date: Sun, 26 Nov 2006 08:51:27 -0600 (CST)

On Tue, 21 Nov 2006, Page, Bill wrote:

| Gaby,
| If you plan to go ahead with the proposed documentation of
| "new boot" (aka. SHOE) I would be delighted to help. Perhaps
| you have said before, but could you please explain how to
| call SHOE from the command line?

The current document script uses bootsys (the translator for
SHOE).  Currently, we do not install bootsys, nor is it
part of AXIOMsys.  Ideally, I would like to see bootsys replace
the old Boot translator.

As an intermediate solution, we could install bootsys, then
you would translate foo.boot with either

  document --tag=boot --mode=translaye bootsys foo.boot

and that will produce foo.clisp in the same directory, or
you can say directly

   echo '(boottran::boottocl "foo.boot")' | bootsys

If you say

   echo '(boottran::boottoclc "foo.boot")' | bootsys

then the Boot code is included as comment -- but this is is
wiki stuff, who cares?

| What I would like to do is to provide a environment in the
| Axiom Wiki, e.g.
|   \begin{shoe}
|   ....
|   \end{shoe}
| where we can compile examples of SHOE code. There is already
| such an environment for boot
|   \begin{boot}
|   ....
|   \end{boot}
| See

That is very interesting.

| I am very interested in your comment about the relationship
| between SHOE and Haskell.

Basically, SHOE provides a way to define algebraic datatype and way to
deconstruct values of such type.  (There is no type-checking at the
moment, but it would not be hard to implement).  Unlike Haskell,
Shoe does not support (yet) function definition by separate
equations: you have to use a single case expression (which is morally
what Core Haskell does).

   structure BinTree ==
       Nil                         -- the null node
       Node(Val, BinTree, BinTree) -- or a value and a pair of
                                   -- binary tree

   depth x ==
      case x of
          Nil => 0
          Node(x, l, r) => 1 + MAX(depth l, depth r)

   depth Node(Nil, Node(2, Nil, Nil), Nil)

Notice how the compilation of the body of the structure BinTree
is almost like one would have expected (from a naive translation
point of view).  If properly augmented, Shoe can serve as a good
support for a class on implementation of function languages along the
lines of the now classic "The Implementation of Functional
Proramming Languages" (out of print, but you can download it from the

-- Gaby

reply via email to

[Prev in Thread] Current Thread [Next in Thread]