From: Ian Price <ianprice90@googlemail.com>
To: Guile Mailing List <guile-devel@gnu.org>
Subject: Re: non-scheme scripts: proposed solutions and their pros/cons
Date: Tue, 20 Nov 2012 16:10:00 +0000 [thread overview]
Message-ID: <877gpgxnl3.fsf@googlemail.com> (raw)
In-Reply-To: <87boesxyfp.fsf@googlemail.com> (Ian Price's message of "Tue, 20 Nov 2012 12:15:38 +0000")
So, here's the "plan of attack" I'm envisioning for this.
Right now, questions of cross-language module referencing can be
ignored. I think it is mostly orthogonal to the current goal of running
non-scheme scripts.
First, I'm going to try and write a proof-of-concept guile-elisp
executable. This shouldn't be too hard, I think, and may shed some light
on expected difficulties.
Secondly, the more serious version. While I can't know all the details
till I've done the previous stage, here is what I think I need to do.
command-line parsing needs to be moved under the language/$lang
directories, and a command line parser field added to guile's language
objects. Languages that wish to customise it can add one, or we can have
a default one that mostly mimics guile's current interface, and allows
executing scripts, lines, etc.
We may also want to all language objects to specify one or a set of
allowed argv[0] names.
While I do not know if anyone actually uses it, we will probably need to
keep ice-9/command-line.scm functionally intact for backwards
compatibility.
With this additional layer of indirection[0], we now dispatch to the
correct command-line parser based on the argv[0] name, set the repl
language etc. etc.
One important issue with this is that it is likely to slow down the time
it takes guile to boot, however, is should accommodate any user-written
languages.
The other thing is, I'm not sure how this is going to affect the C code
for guile. It _might_ be possible to do this all in Scheme, but until
I've tried, I'm going to remain sceptical.
If you have a better suggestion please tell me :)
0. as we all know, "in computer science, every problem can be solved
with an additional layer of indirection"
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
next prev parent reply other threads:[~2012-11-20 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 12:15 non-scheme scripts: proposed solutions and their pros/cons Ian Price
2012-11-20 13:14 ` Noah Lavine
2012-11-25 16:22 ` Ian Price
2012-11-20 16:10 ` Ian Price [this message]
2012-11-25 16:06 ` Ian Price
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=877gpgxnl3.fsf@googlemail.com \
--to=ianprice90@googlemail.com \
--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).