emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the status of ob-maxima.el? Is this a bug?


From: Fraga, Eric
Subject: Re: What is the status of ob-maxima.el? Is this a bug?
Date: Wed, 6 Dec 2023 14:15:06 +0000
User-agent: gnus (Emacs 30.0.50)

Hi Leo,

On Tuesday,  5 Dec 2023 at 20:18, Leo Butler wrote:
> I think it should be easy to provide this for a few data types (matrix,
> string, maybe list), but I think the conversion from a Lisp sexp to an
> ELisp sexp will need a lot of assumptions. E.g. how to convert the
> Maxima list:
>
> [[a,b],[c,d,[e,f]]]
>
> Or maybe such cases are not important?

Good question.  I am not sure what the best approach would be.  My own
use case often does involve results which are vectors of vectors of
values or expressions (solutions to system of equations).  I typically
simply output directly using either print or grind, as in

#+begin_src maxima :results output 
  for i: 1 thru length(solution[1])
  do grind(solution[1][i])$
#+end_src

where "solution" is the result of the computation in my (elided) example
and I only care about the first solution.  I haven't really thought
about how the final "value" should be output.  I'm happy to explore
alternatives.

> Also, what would we do with an arbitrary mathematical expression? Return
> a printed representation?

This might actually be the easiest, of course.

> Developing a working session for maxima would make it more feasible to
> use it directly in text, as you are using Calc.

It would indeed be more feasible but not necessarily a benefit (to me),
as such.

I use Calc for pedagogical aspects, showing step by step calculations,
and it has some benefits over Maxima for this, especially for
engineering topics because it "understands" units (e.g. kg, J, m^2).
Further, I have total control of the formatting by having defined my own
embedded Calc format, lines that start with #+calc: which I can
interpret during the export process in org.

I use maxima to solve more detailed problems so that students can see
the outcome of the algebra to compare with their own work.

And there's the psychological/philosophical benefit of doing everything
I can in Emacs itself! :-)

But, having said that, consistency in the tools used is beneficial so
doing step by step calculations with maxima instead of Calc could be a
good thing for the students.  It would be nice to have that option.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


reply via email to

[Prev in Thread] Current Thread [Next in Thread]