From: Bill Schottstaedt <bil@ccrma.Stanford.EDU>
Cc: guile-user@gnu.org
Subject: Re: Doc organization (Re: Around again, and docs lead role)
Date: Wed, 14 May 2003 07:29:20 -0700 [thread overview]
Message-ID: <200305141429.HAA02633@cmn14.stanford.edu> (raw)
In-Reply-To: <m34r3yxxgv.fsf@laruns.ossau.uklinux.net>
> 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
next prev parent reply other threads:[~2003-05-14 14:29 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-26 7:33 Around again, and docs lead role Neil Jerram
2003-04-26 10:19 ` Thamer Al-Harbash
2003-04-27 20:56 ` Neil Jerram
[not found] ` <3E92E1B40021F4D7@pop3.tiscalinet.es>
2003-04-27 21:01 ` Neil Jerram
[not found] ` <3E92E1B4002B0632@pop3.tiscalinet.es>
2003-04-30 22:47 ` Neil Jerram
[not found] ` <3EAFE4EC000D9733@pop1.tiscalinet.es>
2003-05-07 21:06 ` Doc organization (Re: Around again, and docs lead role) Neil Jerram
2003-05-08 16:21 ` Rob Browning
2003-05-08 17:50 ` rm
2003-05-08 22:47 ` Neil Jerram
2003-10-28 16:09 ` Thien-Thi Nguyen
2003-05-08 22:36 ` Neil Jerram
2003-05-09 2:23 ` Rob Browning
2003-05-09 17:46 ` David Van Horn
2003-05-10 11:32 ` Neil Jerram
2003-05-15 16:02 ` Rob Browning
2003-05-15 16:33 ` Paul Jarc
2003-05-09 11:52 ` Bill Schottstaedt
2003-05-13 23:01 ` Neil Jerram
2003-05-14 1:07 ` Viktor Pavlenko
2003-05-14 14:29 ` Bill Schottstaedt [this message]
2003-05-15 7:55 ` Mikael Djurfeldt
2003-05-17 3:02 ` Max Techter
2003-05-09 8:15 ` tomas
2003-05-10 12:01 ` Neil Jerram
2003-05-12 11:40 ` tomas
2003-05-03 4:40 ` Around again, and docs lead role Robert Uhl
2003-05-03 11:34 ` rm
2003-05-03 22:21 ` Robert Uhl
2003-05-03 23:15 ` Thamer Al-Harbash
2003-05-04 8:40 ` David Allouche
2003-05-04 21:34 ` Robert Uhl
2003-05-04 19:47 ` rm
2003-05-04 21:42 ` Robert Uhl
2003-05-04 23:38 ` Thien-Thi Nguyen
2003-05-07 22:52 ` Neil Jerram
2003-05-08 22:32 ` State of Docs [was] " rm
2003-05-08 23:11 ` Neil Jerram
2003-05-10 0:47 ` State of Docs Kevin Ryde
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=200305141429.HAA02633@cmn14.stanford.edu \
--to=bil@ccrma.stanford.edu \
--cc=guile-user@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).