Closed githubtomtom closed 4 years ago
Hi,
First of all, yacas is just a library which can be linked to any program, and the symbolic transformations then can be just called from the program. The yacas console is a small application which handles entering expressions from terminal and calls the library to produce results. You may want to have a look at how Ryacas is implemented, probably what you are after is quite similar. So probably https://docs.julialang.org/en/v1/manual/calling-c-and-fortran-code/ is a good place to start. Then you may want to look at cyacas\yacas\src\js_interface.cpp to see how the library can be called from plain C code.
Another thing is adding some yacas code so that the transformed expressions are returned directly in the language you want - there are already implementations for C, latex and R.
Cheers, Grzesiek
...calling in the library level is nice, yet it may be too hard for me initially.... Is there a “command line” version of Yacas such that I could do like:
prompt> yacas “some commands”
? Thanks
of course there is :)
mazur@murkwia:~$ yacas -c -i "[a:=2; Echo(D(x)Sin(a*x));]"
2*Cos(2*x)
Yeah thanks!
a few more questions:
the following command-line Yacas seems have no memory:
Thomass-iMac:bin Thomas$ yacas -c -i "[a:=2; Echo(D(x)Sin(a*x));]"
2*Cos(2*x)
Thomass-iMac:bin Thomas$ yacas -c -i "[Echo(a + 1);]"
a+1
Thomass-iMac:bin Thomas$ yacas -c -i "[a:=2; Echo(D(x)Sin(a*x)); Echo(a + 1);]"
2*Cos(2*x)
3
how could I keep the "internal states" between each calls of yacas -c -i
?
where/how could I find the documents of the command line parameters (i.e. those -i
, -c
)?
Mac binary only available up to version 1.6.1? I tried the sudo
for 1.9.1. but it shows:
Thomass-iMac:~ Thomas$ sudo add-apt-repository ppa:teoretyk/yacas
sudo: add-apt-repository: command not found
thanks!
Hi,
Actually, it'd be awesome if you built native yacas binary on mac and package it - I can try to help with it.
thanks
I would like to implement a Julia package that transforms Julia’s symbols and expressions into corresponding Yacas’ things. Is there any advise for a head start? e.g. how to communicate with a Yacas process without using the interactive environment? Thanks