[plt-scheme] Lispish system in Scheme

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Jun 22 09:31:21 EDT 2006

You may want to look at

  -> http://www.ccs.neu.edu/home/dalev/acl2-drscheme/index.html

It is an embedding of Applicative Common Lisp (with A Computational  
Logic, aka ACL2). The "Logic" part is probably irrelevant to you and  
can be ignored.

-- Matthias


On Jun 22, 2006, at 7:56 AM, Ivanyi Peter wrote:

> Hi,
>
> Is there any simple implementation of Lisp in Scheme? I have
> tried
> to do that but it does not seem to be too straightforward.
> For example I would like to achieve that every variable has
> a default
> value, for example the empty list. I tried the following:
>
> (define orig-eval (current-eval))
> (define (lisp expr)
>   (cond
>     ((identifier? expr)
>      (orig-eval (namespace-variable-value (syntax-e expr) #t
> (lambda () '() )))
>     )
>     (else
>       (orig-eval expr)
>     )
>   )
> )
> (current-eval lisp)
>
> If I try this in DrScheme it works if I simply type a
> symbol. However it
> does not work in an expression like: (cons 1 anything)
> I suspect the lisp evaluator is not called recursively.
> Moreover I got it
> work only as above, where expr is "maybe" a syntax object or
> similar.
> (Maybe I did not understand the documentation but something
> else is
> said there.) I also did not manage to "get into" this syntax
> object, for
> example to examine whether it is a list, if it is whether
> the first element
> in the list is a symbol and whether it is a function. (What
> I would need
> to write my own interpreter.)
>
> I would appreciate any help, explanation, sample
> implementation or
> more detailed documentation.
>
> (As I use DrScheme more and more and try to use new features
> in it,
> I have realised that I a really miss very simple demo programs.
> I always have to search collects directory, and somtimes it
> helps,
> sometimes I found too complicated pieces of codes which I
> cannot use,
> etc. I know there is HtDP and a tons of other, but I mainly
> work
> offline and if I do not have them on the machine I cannot
> access them.
> I would prefer to have these in the PLTScheme docs.
> Sorry for rambling, just a suggestion.)
>
> Thanks for any help,
>
> Peter Ivanyi
>
>
>
>
> _______________________________________________________________________ 
> ________
> Focivébé helyett: csajos filmek egy kattintásra!
> http://teka.t-online.hu/
>
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.