[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-scheme scripts: proposed solutions and their pros/cons

From: Ian Price
Subject: Re: non-scheme scripts: proposed solutions and their pros/cons
Date: Tue, 20 Nov 2012 16:10:00 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

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

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

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 --

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]