On Tue, May 03, 2022 at 11:28:58PM +0200, Ralf Hemmecke wrote:
> I am currently working on the jfricas interface.
> Unfortunately, there are some rather unsafe elements in it,
> I must patch the functions |mathprintWithNumber| and OBEY
> 
> https://github.com/hemmecke/jfricas/blob/master/jfricas/webspad.lisp#L84
> 
> ;;; Override a FriCAS function in order to remove the equation number.
> (DEFUN |mathprintWithNumber| (|x|)
>   (PROG ()
>     (RETURN
>      (PROGN
>       ;(|ioHook| '|startAlgebraOutput|)
>       (|saySpadMsg| '|--FORMAT:BEG:Algebra|)
>       (|maprin| (|outputTran2| |x|))
>       (|saySpadMsg| '|--FORMAT:END:Algebra|)
>       ;(|ioHook| '|endOfAlgebraOutput|)
>       ))))

I do not see why you are doing this.  If you want to call
'saySpadMsg' appropriate io hook should be enough.  For
skipping line numbers setting '$IOindex' to NIL should
be enough.

> 
> (defun OBEY (S)
>       (sb-ext::process-exit-code
>        (sb-ext::run-program "/bin/sh" (list "-c" S) :input t
>         :output *standard-output* :error *standard-output*)))
> 
> and would be somehow happy if I wouldn't have to do this.

That looks reasonable.  Currently we have 't' which means
'*termianl-io*'.  Usualy termial IO is the same as standard
output, but sometimes sbcl is doing crazy things with it.
AFAICS we _never_ want sbcl '*termianl-io*'.

> I do not know whether it's a good idea to integrate jfricas (in for sbcl)
> into the FriCAS sources. That would require to ask to include the
> hunchentoot webserver (or a nice and simple way possible without root
> access) to install hunchentoot at the start of jfricas.

If we can:
- integrate it into build system so that FriCAS builds when using
  other lisp (so hunchentoot would be built conditionaly)
- actually works on reasonably large subset of Linux distributions
- does not break/interfere with users Lisp setup,
then this would be reasonable.

OTOH it is not clear what you _really_ need.  Simple web server
is few hundred lines.  Do you need any fancy features?  I would
guess that you do not need TLS/SSL (for local use this adds essentially
no extra security).  Can hunchentoot be stripped of unneeded
parts?

-- 
                              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/20220504012344.GC22656%40fricas.math.uni.wroc.pl.

Reply via email to