From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bill Schottstaedt Newsgroups: gmane.lisp.guile.user Subject: Re: Doc organization (Re: Around again, and docs lead role) Date: Wed, 14 May 2003 07:29:20 -0700 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <200305141429.HAA02633@cmn14.stanford.edu> References: <3E92E1B4002B0632@pop3.tiscalinet.es> <3EAFE4EC000D9733@pop1.tiscalinet.es> <87d6its93b.fsf@raven.i.defaultvalue.org> <200305091152.EAA26081@cmn14.stanford.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (NeXT Mail 3.3 v148.2.1) Content-Type: text/plain X-Trace: main.gmane.org 1052925091 31673 80.91.224.249 (14 May 2003 15:11:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 14 May 2003 15:11:31 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed May 14 17:11:27 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Fxmn-0007UC-00 for ; Wed, 14 May 2003 17:03:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Fxls-0003F8-0B for guile-user@m.gmane.org; Wed, 14 May 2003 11:02:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19Fxgg-0000ju-00 for guile-user@gnu.org; Wed, 14 May 2003 10:56:58 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19Fxd9-0008Kb-00 for guile-user@gnu.org; Wed, 14 May 2003 10:53:19 -0400 Original-Received: from cm-mail.stanford.edu ([171.64.197.135]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FxG1-0000Dv-00 for guile-user@gnu.org; Wed, 14 May 2003 10:29:26 -0400 Original-Received: from cmn14.stanford.edu (cmn14.stanford.edu [171.64.197.163]) by cm-mail.stanford.edu (8.11.6/8.11.6) with ESMTP id h4EETNE09778; Wed, 14 May 2003 07:29:23 -0700 Original-Received: (from bil@localhost) by cmn14.stanford.edu (8.9.3/8.9.3) id HAA02633; Wed, 14 May 2003 07:29:22 -0700 (PDT) In-Reply-To: X-Nextstep-Mailer: Mail 3.3 [m68k] (Enhance 2.2p2) Original-Received: by NeXT.Mailer (1.148.2.1) Original-To: Neil Jerram X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1949 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1949 > I still contend, though, that if the Guile docs had been clearer, more > complete and more "canonical" when you started writing Snd (or perhaps > adding Guile to Snd), you might naturally have written more of Snd in > Scheme and therefore created a more extensible, maintainable and > generally hackable program. What do you think? My original intention was to write the whole thing in Common Lisp (it's part of a package of CL programs developed over the last 30 years or so), but I didn't trust any of the CL-based GUI libraries, and didn't like tcl, so (this being the mid-90's on an SGI), I opted for C/Motif (and later added Gtk). Craig Borezsky told me about Guile; this was before version 1.3.4 -- Jim Blandy was the head of the group, and I liked the way he thought (I must say I miss his influence...). The code was the documentation, so I followed my nose. It's too late now to invert the entire Snd program (it's currently about 220000 lines of C and 75000 lines of Scheme), and I don't think it's needed anyway. My take on Guile (which seems to me to have stalled out over the last few years) is that the current developers think of it as an extended shell-based interpreter, whereas I think of it as a way of extending a C program -- I can't see any moral choice here. So it's a "vision thing" -- if I had time, I'd think about things like ratios, C-level continuations (these almost work already), error handling cleanups (Guile itself should never call exit or abort as a response to an error -- this is a serious bug!), some nice way to reach into the current scheme environment and pluck out scheme-level stuff (there's code for this in Snd's snd-run.c which works for nearly every case (not define* args), but it's not very pretty, and I wrote it only by laboriously working through all the kinds of environments I could find), an optimizer (snd-run.c easily beats Guile by factors of 10 or 20), etc. > Bill> -- the tricky part is good error handling which Guile flubs > Bill> miserably anyway). > > It does? Can you give more details here? It's a long story. Here's a short portion: if you try to piggy-back on the built-in error types, you are at the mercy of silly problems like the fact that simple_format exits if it gets an extra argument! And the error output is ugly. And it's hard to redirect it or add info -- and I'm still not sure about backtraces. > I think that one of Guile's current problems is managing API changes > between releases. If we can reasonably shrink the official API, it > makes the problem easier. Agreed, but I think this can be done without removing functionality. (This problem was the reason for the "xen" macros -- I almost never call any scm/gh thing directly -- once written, however, it made it easy to add Ruby). I complained earlier about the API changes only in the context of a heated exchange about scm_num2int, which I still think is broken. > I don't follow this. What is wrong with the following? > > In C: > scm_call_1 (scm_c_lookup ("my-func"), str); > In Scheme: > (define (my-func str) > (catch #t Leaving aside questions of speed and simplicity? (Snd is a sound editor which means I'm dealing with gobs of data -- no time to go through all the leisurely consing and unboxing and name lookups and whatnot that Scheme indulges in -- speed is essential in this context). But, I guess the basic problem is that I already have what I want in C, and I want a way to make it available programmatically at "run time"; I thought that was the whole idea of Guile. There are already plenty of scripting languages and Scheme interpreters. > Thanks for your input. (And please don't worry - everything I've said > is only suggestions - there are no plans to implement any of it yet > (if ever).) And I apologize for the loaded word "subvert" -- as soon as I clicked "send" I wished I had used "change" or something. If only I had the time, I'd write something about how I'm using Guile (there's a section in Snd's grfsnd.html, but it's only a tiny start) -- I think Guile is a great start on a C extension library. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user