[Top][All Lists]

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

Re: eval

From: Keisuke Nishida
Subject: Re: eval
Date: Tue, 06 Feb 2001 02:49:07 -0500
User-agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.96 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

Just a quick response.

At Mon, 5 Feb 2001 01:09:52 +0100 (MET),
Dirk Herrmann wrote:
> We could provide the ,foo syntax for guile, and provide all those ",foo"
> commands in a similar way as with read-hash-extend, for example as a
> read-comma-extend command.  Your code would then simply be changed to:
> to provide a command ",module <some module>".  It looks as this would
> be easy to implement, although I admit that I have never taken a close
> look into the reader...

I like this.  This is something I'm working on these days:

  % guile
  Guile 1.4.1 Standard Scheme (R5RS) interpreter 0.0

  Type `,help' for help.
  address@hidden> ,help

  Meta commands (shortcut):

   ,help              [,h] - Display help
   ,describe OBJ      [,d] - Show documentation
   ,apropos REGEXP    [,a] - Show matched bindings
   ,language LANGUAGE [,l] - Change languages
   ,module MODULE     [,m] - Move to module
   ,use MODULE        [,u] - Use module
   ,quit              [^D] - Quit the language

   ,expand FORM       [,e] - Syntax expansion
   ,translate FORM    [,t] - Translate into GSIL
   ,compile FORM      [,c] - Compile into assembly
   ,profile FORM      [,p] - Profile execution
   ,trace [-v] FROM   [,r] - Trace execution
   ,step FORM         [,s] - Step execution

  address@hidden> ,e (define (foo) 1)
  (begin (void) (define foo (lambda () (quote 1))))
  address@hidden> ,t (define (foo) 1)
  (@begin (@void) (@define foo (@lambda () (@quote 1))))
  address@hidden> (define (foo) 1)
  address@hidden> (foo)
  $1 = 1
  address@hidden> ,l elisp
  Guile 1.4.1 Emacs Lisp interpreter 0.0

  Type `,help' for help.
  address@hidden> ,t (defun foo () 2)
  (@begin (@define foo (@lambda () 2)) (@quote foo))
  address@hidden> (defun foo () 2)
  $2 = foo
  address@hidden> (foo)
  $3 = 2

Everything is a quick hack, though.  I'll continue.


reply via email to

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