From: Tom Lord <lord@emf.net>
Cc: gnu-arch-users@gnu.org, guile-user@gnu.org, ttn@glug.org,
guile-devel@gnu.org
Subject: Re: ITLA
Date: Mon, 1 Mar 2004 18:50:23 -0800 (PST) [thread overview]
Message-ID: <200403020250.SAA21846@morrowfield.regexps.com> (raw)
In-Reply-To: <87fzcs3y6v.fsf@alice.rotty.yi.org> (message from Andreas Rottmann on Tue, 02 Mar 2004 01:11:20 +0100)
> From: Andreas Rottmann <a.rottmann@gmx.at>
> I also agree here, but IMO, this doesn't speak against using GOOPS as
> a "back end"; i.e. making the declarations create GOOPS instances, but
> not letting that shine thru at the surface.
[....]
> Sure, a clean seperation between surface syntax (for declarations) and
> the internal workings is, to say the least, desirable.
I basically agree with all of that but with a caveat. The
distinction between "interface" and "internals" in the command
processor of an extensible systems is bound to be fuzzy. I'm not
saying that the coder of the command processor has to support every
gross hack that anyone ever thinks of --- just that having a really
simple design that promises to be stable and that invites and rewards
"suprising" hacks on top of it is a good thing.
> > One way to avoid such disasters is the "lego approach to lisp
> > programming". [...]
> > Perhaps you are familiar with the famous debate between Jamie
> > Zawinski and RMS about whether events and keymaps should be built up
> > out of simple lisp types (RMS) or should be a special disjoint type
> > (jwz). RMS was, in effect, applying the "lego principle" and I
> > think his was the superior idea.
> Do you have any references to this discussion?
Oh, foo. Google around for Xemacs, and jwz, and rms until you get
bored. The way it's gotten "recorded in history" really obscures the
underlying technical issues and tends to come out as some kind of
clash of personalities. (But there's some funny, albeit ironic,
commentary around it.)
> For instance, I just find that generics are just too damn convienent
> for managing the namespace, so I don't really want to miss them: You
> get away with short names, since generics are mergable (should names
> ever collide) if you just keep prefixes for the classes. A short
> example out out the (itla tla) module is:
>
> (define-class <tla> ()
> (cwd #:init-thunk getcwd #:accessor working-directory)
> (flags #:init-value '() #:getter flags))
>
> (define-method (invoke (tla <tla>) (command <string>) (args <list>))
> "Returns the output of the tla command as a list of lines."
> (if (flag-set? tla 'verbose)
> (format #t "invoking tla: ~S ~S\n" command args))
> (let ((check (if (string= command "changes")
> (lambda (val) (<= 0 val 1))
> (lambda (val) (= 0 val)))))
> (if (flag-set? tla 'dry-run)
> '()
> (apply command-output/check check "tla" (cons command args)))))
>
> So you can just:
>
> (define *tla* (make <tla>))
>
> (invoke *tla* "get" '("--link" "foo--bar--1.0" "some-dir"))
>
> Without using GOOPS, this would probably look more like:
>
> (define *tla* (make-tla))
>
> (tla-invoke *tla* "get" '("--link" "foo--bar--1.0" "some-dir"))
>
> The tla- prefix in this case is not that inconvient, so this is a bad
> example, but there are types, for which no suitable
> (i.e. readable/easily recognicable) short prefixes can be found.
>
> Of course, this is just low-level stuff, and would never shine thru up
> to the "declarative level".
The last paragraph is probably the most important.
Keep in mind, too, that someone might want to write extensions that
crawl over the set of commands -- perhaps to format a help message or
perhaps to make some new kind of menu-driven interface. Keeping all
the relevent data in the simplest format (e.g., s-exps following an
extensible syntax over basic types) makes that easy.
For example, since you have the basic idea of a command processor of
the sort we're discussing, can you:
(a) imagine an implementation
(b) presume the implementation is built, has at least a CLI a
front-end and maybe a GUI front end.
(c) assume that lots of people have written code against this
implementation.
and then:
(d) imagine implementing something like:
http://segusoland.sourceforge.net
in a way that everybody's existing code "just works" with
the new input method?
-t
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2004-03-02 2:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-01 3:32 Extended -e syntax Clinton Ebadi
2004-03-01 5:04 ` Andreas Rottmann
2004-03-01 11:10 ` Thien-Thi Nguyen
2004-03-01 14:27 ` Arch and Guile Andreas Rottmann
2004-03-01 19:04 ` ITLA (was Re: Arch and Guile) Tom Lord
2004-03-01 19:14 ` ITLA Andreas Rottmann
2004-03-01 21:55 ` ITLA Tom Lord
2004-03-02 0:11 ` ITLA Andreas Rottmann
2004-03-02 2:50 ` Tom Lord [this message]
2004-03-02 14:04 ` ITLA Andreas Rottmann
2004-03-02 3:26 ` ITLA Miles Bader
2004-03-03 11:22 ` ITLA Neil Jerram
2004-03-03 11:55 ` ITLA Andreas Rottmann
2004-03-04 13:55 ` Archive of library modules for Guile Andreas Rottmann
2004-03-04 20:49 ` Neil Jerram
2004-03-04 23:00 ` Andreas Rottmann
2004-03-07 17:33 ` Thamer Al-Harbash
2004-03-07 18:17 ` Thien-Thi Nguyen
2004-03-01 23:07 ` Arch and Guile Thien-Thi Nguyen
2004-03-02 0:23 ` Andreas Rottmann
2004-03-03 13:01 ` Thien-Thi Nguyen
2004-03-01 11:21 ` Extended -e syntax Thien-Thi Nguyen
2004-03-01 20:20 ` Christopher Cramer
2004-03-02 4:55 ` Clinton Ebadi
2004-03-06 15:47 ` ttn's build system [was: Extended -e syntax] Andreas Rottmann
2004-03-10 18:59 ` ttn's build system Andreas Rottmann
2004-03-10 22:28 ` ttn's build system [was: Extended -e syntax] Clinton Ebadi
2004-03-10 23:22 ` Tom Lord
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=200403020250.SAA21846@morrowfield.regexps.com \
--to=lord@emf.net \
--cc=gnu-arch-users@gnu.org \
--cc=guile-devel@gnu.org \
--cc=guile-user@gnu.org \
--cc=ttn@glug.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).