another batch/pipe question... input.mac | maxima fails...
Subject: another batch/pipe question... input.mac | maxima fails...
From: steve at horne.homelinux.net
Date: Thu, 12 Jan 2006 17:49:43 -0500
Robert, Ray, thanks for your help...
I tried input.mac | maxima, plus variants of
maxima <&n a16_1.mc
for various n; none did the right thing...
I would argue that the current behavior is broken, in that it violates
a basic unix rule -- read from standard input, write to standard output -
There could be good reasons for violating the rule -- maybe for
some applications where maxima is used as an engine, interactively,
from another application --
but I'd argue that there should exist _some_ mechanism to enforce standard
unix behavior.
> Robert> (i don't know how it could have worked in the past.)
I used this -- when it worked -- in a consulting job,
where the deliverables were not only some answers, but functional code to generate
the answers... it was straightforward for the customer to tweak the files
to customize the calculation, without having to really know how to use maxima.
I recently tried to recycle some of the files (you know how consulting works -- write
once, sell many) and became stuck...
> Robert> a still larger question is whether asksign should be invoked in
> Robert> a noninteractive mode. i believe the answer is no. i don't have
> Robert> any replacement yet, though.
Thee may be arguments in favor of either side of this question --
but the current situation seems uniquely perverse.
In the meantime I'll try "assume"ing ....
Thanks,
Steve
On Thu, Jan 12, 2006 at 01:23:45PM -0500, Raymond Toy wrote:
> >>>>> "Robert" == Robert Dodier <robert.dodier at gmail.com> writes:
>
> Robert> asksign eventually calls RETRIEVE, which reads *QUERY-IO*,
> Robert> which is a synonym stream for *TERMINAL-IO*.
> Robert> so i guess the reason that maxima < input.mac
> Robert> doesn't work is that the file input stream is different from *QUERY-IO*.
> Robert> (i don't know how it could have worked in the past.)
>
> Robert> you might try cat input.mac | maxima ,
> Robert> i believe that hides the fact that the input is coming from a file;
> Robert> that might make the input come through *TERMINAL-IO*.
> Robert> just a guess -- i didn't try it.
>
> Robert> a larger question is whether RETRIEVE should read *QUERY-IO*.
> Robert> at the moment i'm not seeing a motivation to read a stream other
> Robert> than the one the input is coming from.
>
> Robert> a still larger question is whether asksign should be invoked in
> Robert> a noninteractive mode. i believe the answer is no. i don't have
> Robert> any replacement yet, though.
>
> However, when creating new tests for the testsuite, I sometimes forget
> to put an appropriate assume somewhere, and then the testsuite just
> stops running at some random point, waiting for input. I know this
> used to work (pre 5.6?) and you could answer some of the queries.
> There used to be a prompt, and you could enter the answer. No there's
> nothing.
>
> I've gotten used to this finally, but it's really annoying.
>
> Ray
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima