On Mon, Jun 26, 2023 at 11:43:10PM +0200, Ralf Hemmecke wrote:
> > > The definition of |interpret-block| would also be a nice addition to 
> > > FriCAS,
> > > since it allows multi-line strings to be interpreted as if coming from a
> > > file (with intendation working correctly).
> > > 
> > > https://github.com/hemmecke/jfricas/blob/master/jfricas/webspad.lisp#L102
> > 
> > Yes, it can go in.
> 
> Hmmmm... not so easy for me. Long time ago that I did this. I think, I took
> most stuff from here.
> 
> https://github.com/fricas/fricas/blob/master/src/interp/int-top.boot#L144
> 
> So |interpret-block| should probably live in int-top.boot.
> 
> But to translate my code back into .boot format without making erros is
> currently out of scope. Waldek, may I ask for your help.

AFACS in Boot this is:

interpret_block(code) ==
    $newcompErrorCount : local := 0
    $inclAssertions : local := []
    $ncMsgList : local := []
    $erMsgToss : local := false
    $lastPos : local := $nopos
    $EchoLines : local := false
    st := MAKE_-STRING_-INPUT_-STREAM(code)
    intloopInclude0(st, 'webspad, 0)

Both Lisp version and the above behave rather badly when called
from command line (the same is true for parseAndEvalStr).
Namely, after calling it interpreter is apparently waiting
for more input from the string, but none is coming.  So
command line is effectively blocked.  Probably does not
matter for server style use, but definitely it is not "universal"
function.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZJohrulSMq3/ZpfZ%40fricas.math.uni.wroc.pl.

Reply via email to