From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.devel Subject: Re: Scheme-defined smobs Date: Mon, 03 Nov 2003 19:16:42 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87u15l0zue.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1067906167 22354 80.91.224.253 (4 Nov 2003 00:36:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2003 00:36:07 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Nov 04 01:36:04 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AGpAy-0001Ww-00 for ; Tue, 04 Nov 2003 01:36:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AGpAj-0002TS-7I for guile-devel@m.gmane.org; Mon, 03 Nov 2003 19:35:49 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AGow8-0002Fg-55 for guile-devel@gnu.org; Mon, 03 Nov 2003 19:20:44 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AGova-00022n-7X for guile-devel@gnu.org; Mon, 03 Nov 2003 19:20:41 -0500 Original-Received: from [129.22.104.63] (helo=harris.CNS.CWRU.Edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AGosG-0000jL-Qw for guile-devel@gnu.org; Mon, 03 Nov 2003 19:16:44 -0500 Original-Received: from conversion-daemon.smtp-a.cwru.edu by smtp-a.cwru.edu (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) id <0HNS00601WP0B1@smtp-a.cwru.edu> for guile-devel@gnu.org; Mon, 03 Nov 2003 19:16:43 -0500 (EST) Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by smtp-a.cwru.edu (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HNS0001WWRVXE@smtp-a.cwru.edu> for guile-devel@gnu.org; Mon, 03 Nov 2003 19:16:43 -0500 (EST) Original-Received: (qmail 2445 invoked by uid 500); Tue, 04 Nov 2003 00:17:05 +0000 In-reply-to: <87u15l0zue.fsf@raven.i.defaultvalue.org> Original-To: Rob Browning Mail-followup-to: Rob Browning , guile-devel@gnu.org Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Original-Lines: 32 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2972 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2972 Rob Browning 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