unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Cc: help-zile@gnu.org
Subject: Re: Guile on Zile, module questions
Date: Mon, 05 Dec 2011 18:11:53 +0100	[thread overview]
Message-ID: <87obvnhrja.fsf@gnu.org> (raw)
In-Reply-To: 1322690970.58961.YahooMailNeo@web37905.mail.mud.yahoo.com

Hi Mike!

Mike Gran <spk121@yahoo.com> skribis:

> Over the USA holiday I started looking at the last C version of
> Zile, which has its own toy Lisp interpreter.  (Zile also
> comes in a new Lua version!)  I looks like it would be simple to
> strip out that Zile Lisp and replace it with Guile Scheme. 
> But I don't think anyone has tried it.

This sounds great!  Another competitor for Gano and Guile-Emacs!  ;-)

Where’s the source?  :-)

> Zile has two scopes.
> 1) a Zile scope
> 2) a buffer-specific scope

You might want to check the crazy things BT Templeton did to handle
that:

  http://www.gnu.org/ghm/2011/paris/slides/bt-templeton-guile-emacs.pdf

(You might need additional input from him, though.  ;-))

> As far as I can tell, I should use 'module-obarray' to get
> all the bindings for the buffer-specific module and I should
> look at '%module-public-interface' to get the list of exported
> functions and vars in the top Zile module.

Note that you should use ‘module-public-interface’ instead of referring
to the ‘%module-public-interface’ binding.

Here’s an example:

  (hash-fold (lambda (k v r) (cons k r))
             '()
             (module-obarray (module-public-interface the-root-module)))

There’s also ‘module-for-each’:

  (module-for-each (lambda (b v)
                     (format #t "variable `~a' has value `~a'~%" b
                             (variable-ref v)))
                   (resolve-interface '(ice-9 q)))

Looking forward to using this new Zile.  :-)

Ludo’.




  parent reply	other threads:[~2011-12-05 17:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 22:09 Guile on Zile, module questions Mike Gran
     [not found] ` <1322690970.58961.YahooMailNeo-K7NgfNXsWCyvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2011-12-03  9:04   ` Reuben Thomas
2011-12-05 17:11 ` Ludovic Courtès [this message]
     [not found]   ` <87obvnhrja.fsf-mXXj517/zsQ@public.gmane.org>
2011-12-28  4:57     ` Mike Gran
2012-01-01 21:07       ` [Help-zile] " Reuben Thomas
2012-01-03 22:58       ` Ludovic Courtès
2012-01-04 19:01         ` Guile on Zile Mike Gran
2011-12-28  4:59   ` Guile on Zile, module questions Mike Gran
2011-12-28 11:06     ` Klaus Schilling
2011-12-28 16:27       ` Guile on Zile Mike Gran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obvnhrja.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=help-zile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).