On Tue, Jan 16, 2024 at 08:58:46PM +0800, Qian Yun wrote:
> The problem is to differentiate which options are passed
> to the underlying Lisp and which options are passed to FriCAS.
>
> Add an option like "-lisp-args" in "fricas" shell script would work.
In the past there were proposal to use '--' in sman to separate
options passed to main executable (that is FRICASsys) and
options handled by sman. I am not sure if this particular way
is the best way, but we can easily add apropriate code to sman so
that it would know which options are meant for FRICASsys.
Then fricas script could pass option in appropriate way.
In the past there were troubles with clearly specifying what
this mechanizm should do. Namely, some options are really
meant for Lisp implementation, the rest would be for FriCAS
itself. So logically we have 3 groups of options:
1 -- options for Lisp
2 -- options for FriCAS
3 -- options handled by sman or fricas script
I bundled options handled by sman and by fricas script into
one group because clearly both must be developed together and
must coordinate use of options.
There is some trouble with the first two groups of options.
Options for Lisp are outside our control and potentially in
the future there can appear ne ones. And each Lisp has its
own peculiar set of options. So it would be nice to treat
this in open ended way, that is allowing arbitrary options.
Similarly, in case of FRICASsys in principle users could take
advantage of options so again it would be nice to allow
arbitrary options.
Currently we fake passing options to FRICASsys by use of environment
variables, but this has some disadvantages compared to options.
Supportiong arbitrary options (and options with arbitrary arguments!)
requires some way of escaping. This could make fricas command
potentially quite complicated.
Anyway, we could do one of the two:
- design escaping rules which "always" work
- limit option handling to single option, that is
'--dynamic-space-size xxx' for sbcl
The second looks easier, but once there is one option it is
likely that somebody will want sencond one and so on. So
we may end up with bunch of special purpose hacks, which
together in the long run may be more problematic than general
solution.
--
Waldek Hebisch