|
From: Paul W. <pw...@sn...> - 2020-12-16 17:46:30
|
I now have maxima running on Ubuntu via WSL 2 (Windows Subsystem for Linux) and also on the same Ubuntu running in a VMware virtual machine, both using LispWorks Personal, in addition to LispWorks on Windows 10. The fixes included here allow all flavors to use PLOT2D to output to Gnuplot. One issue was function maxima-parse-dirstring. I don't know the purpose of this function found in init-cl.lisp but the side effect of the current version in the repository is to remove the :host slot from a lisp pathname. This so far only happens on WIndows because Lispworks uses the :host slot for the Windows drive letter. The result is that if a fully qualified pathname like #P"C:/<path to tempfile>/" was passed into maxima-parse-dirstring when cl:*default-pathname-defaults* used a different drive letter then maxima would fail to locate that temp direcory. I offer this replacement. (defun maxima-parse-dirstring (str) (flet ((fix (thing) (if (consp thing) (setf thing (first thing))) (if (and thing (not (eq thing :unspecific)) (not (string= thing ""))) (concatenate 'string (string-right-trim ":" thing) ":") ""))) (let ((sep "/")) (if (position (character "\\") str) (setq sep "\\")) (setf str (concatenate 'string (string-right-trim sep str) sep)) (let ((dev (pathname-device str)) (host (pathname-host str))) (concatenate 'string (fix host) (fix dev) "/" (apply #'combine-path (rest (pathname-directory str)))))))) One other small change in file plot.lisp. In function start-gnuplot-process, add :direction :io to open-pipe-path #+lispworks (setq *gnuplot-stream* (system:open-pipe path :direction :io)) Paul |