From: Chris Jones
Subject: machine translation CL -> Scheme (or CL in JVM)
Date: 
Message-ID: <bfe13516.0202251320.28aa6f8e@posting.google.com>
Is there such a thing as a program that will translate CL to Scheme? 
I have been unable to find such in my searches.

What I really want, BTW, is to run CL in a JVM.  (Yes, I know about
Allegro's Lisp<->Java communications; and no, I'm not interested.) 
There's an interesting array of Scheme-in-JVM implementations out
there, so I thought a CL-in-Scheme would complete the picture. 
Alternatively, of course, a CL-in-JVM program would work nicely; but I
couldn't find any such.

TIA for any help.

Chris

-- 
---------------------------------------------------- ·····@cjones.org
Chris Jones                                          Mad scientist at
large
From: Bruce Lewis
Subject: Re: machine translation CL -> Scheme (or CL in JVM)
Date: 
Message-ID: <nm9y9hgwbch.fsf@cathedral-seven.mit.edu>
········@cjones.org (Chris Jones) writes:

> Alternatively, of course, a CL-in-JVM program would work nicely; but I
> couldn't find any such.

You could pay Per Bothner to expand the CL support in Kawa.  Kawa Scheme
supports defmacro, format, keywords and equivalents of &rest, etc, so
obviously Per likes CL, even though he chose to implement Scheme first.

The test suite below passes, but there's a lot missing, e.g. defstruct.

To get a Kawa CL repl: java kawa.repl --clisp


(test-init "Common Lisp tests" 5)

(setq y 100)
(defun foo1 (x)
  (lambda (y)
    (/ x y)))
(defvar foo12 (foo1 12))
(test 4 'lexical-test-1 (apply foo12 '(3)))

(defvar xx 20)
(defun xx (a) (+ xx a))
(test 24 'separate-names-1 (xx 4))

;(test t 'eq-test-1 (eq t 't))

(test t 'equal-test-1 (equal "tt" "tt"))
(test nil 'equal-test-1 (equal "tt" "tt "))

(test "The octal value of 18 is 22,
   and the hex value is 12."
      'format-test-1
      (format "The octal value of ~d is ~o,
   and the hex value is ~x." 18 18 18))