From: prj@po.cwru.edu (Paul Jarc)
Cc: guile-devel@gnu.org
Subject: Re: Scheme-defined smobs
Date: Mon, 03 Nov 2003 19:16:42 -0500 [thread overview]
Message-ID: <m365i156nz.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <87u15l0zue.fsf@raven.i.defaultvalue.org>
Rob Browning <rlb@defaultvalue.org> wrote:
> prj@po.cwru.edu (Paul Jarc) writes:
>> ... which shows me the output of "ls -a". So I can use Guile as a
>> shell with a bit less typing.
>
> Wow, that's really scary.
Quite. I do not claim that this was a good way to reach this goal.
It was just fun to do, and I can imagine that it might be genuinely
useful for other things, mostly for the user-defined equal?-ness.
Side note: my make-smob-type subr returns an applicable instance of a
statically-defined smob, because I didn't know how to create a lambda
in C, except in the top-level environment. Is there a way to do it
that would follow scope rules as if the lambda appeared in the
surrounding Scheme code? I suppose it shouldn't need to look up
anything in surrounding local scopes anyway, though.
> (let ((next (read)))
> (if (special-value? next)
> (lookup-and-do-special-thing-for next)
> (print (eval next (current-module)))))
That would certainly be cleaner. What would probably be more useful,
though, is some kind of read syntax, so I could say "ls -a", with the
space, and have it all read as one line, and constructed into the
appropriate Scheme code. Then, of course, I'd want to have some way
to pre-seed the readline buffer with the read-syntax prefix, so I
wouldn't have to type it manually. :)
paul
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2003-11-04 0:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-03 17:39 Scheme-defined smobs Paul Jarc
2003-11-03 23:58 ` Rob Browning
2003-11-04 0:16 ` Paul Jarc [this message]
2003-11-05 17:13 ` Marius Vollmer
2003-11-06 16:25 ` Paul Jarc
2003-11-13 19:24 ` Marius Vollmer
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=m365i156nz.fsf@multivac.cwru.edu \
--to=prj@po.cwru.edu \
--cc=guile-devel@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).