Maxima Plugin

Maxima Plugin - Messages

#61 Posted: 2/11/2014 6:03:08 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I do not complain about changes in the Plugin interface. My impression was that the required changes were inextensive and well documented. We had to apply them because we use the insert menu as launcher for the control windows.

There were major changes under the hood of the Maxima plugin, which by end of last year reached the stability and maintainability of "a house of cards" (in Kay's words). Still the design is based on string translations using regular expressions. I wish we had the resources to shift that towards a better performing strategy.

Just let us consider the Maxima Plugin as concept demonstration for how it would feel if SMath was a computer algebra system with a versatile plot function and a smart document concept (the last already given). For real life applications it is too slow (try plotting a matrix of more than some hundred data points with Draw2D).

I'd be happy to see the plugin obsolete some day, when there is reliable internal implementations of these features.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#62 Posted: 2/11/2014 6:55:05 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: Super Administrator

Wrote

I might trade it against hints on how to use the modeller region ;-)


Please check: http://en.smath.info/forum/yaf_postst2339_Modeller-Region.aspx.

Regards.
#63 Posted: 2/12/2014 8:57:30 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Can the maxima plugin be used in Linux? I have maxima installed, but the maxima control window crashes when I try to open it


We have never testet this (I do not have a working linux environment at hand).
If the problems are just due to the control windows, we might be able to generate a windows-free version.

As a first test I recommend that you replace the current maxima directory under extensions/plugin with the contents of the attached zip file. This is an early version without control windows but with other bugs than the current version. Tested under Windows with 0.96.4909 but might work with the current version as well.

If that works than it might be possible to provide a linux version. But we definitely would need patient testers.
44011c1e-5d0d-4533-8e68-e32b5badce41.zip (55 KiB) downloaded 100 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#64 Posted: 2/24/2014 1:04:54 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Plugin updated.

Changes:
- Functions Draw2D() and Draw3D() do not need a filename any more (automatically generated temporary files are used)
- improved translation of derivatives
- Special characters can be conveyed to Gnuplot. You might need to add a line user_preamble="set encoding ..."


Update10.sm (35 KiB) downloaded 140 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
Radovan Omorjan 2/24/2014 4:04:00 PM, Davide Carpi 2/24/2014 5:43:00 PM
#65 Posted: 2/24/2014 7:00:39 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Martin,

Nice thing with the plot files naming. Thank you

By the way I realized that Maxima(Solver..) will not recalculate like Maxima(Solve...) if we change something in the region. Actually, MaximaControl(restart) should be in front of Maxima(load(Solver)...I figured out then that enabling-disabling MaximaControl(restart) will force Solver to recalculate - see this video please.

By the way, I can not understand how Solve() worked in your example. I should use Maxima(Solve(...

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#66 Posted: 2/24/2014 7:36:32 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

By the way I realized that Maxima(Solver..) will not recalculate like Maxima(Solve...) if we change something in the region. Actually, MaximaControl(restart) should be in front of Maxima(load(Solver)...I figured out then that enabling-disabling MaximaControl(restart) will force Solver to recalculate - see this video please.


The problem is due to the command MaximaControl("restart" ) further downstream in the file. This removes the package from Maxima's namespace. If you then want to recalculate the Solver call, then you first have to reload the package (or remove the restart).

Wrote

By the way, I can not understand how Solve() worked in your example. I should use Maxima(Solve(...


Doesn't the dynamic assistant show the Solve() function? It should work without wrapping it in the generic interface function Maxima(). In fact, Solve() is an SMath function defined in the Maxima plugin which does nothing but call transpose(sys2mat.1(Maxima(solve(...)))).
Maxima(Solve()) calls Solve() in the process of preprocessing the Maxima() function and then drives the result to Maxima and vice versa, just to prove that the translation process is robust enough ;-)



solver1.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#67 Posted: 2/25/2014 2:32:07 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Thank you Martin,

I think you just confirmed what I was thinking about. This will be - If you use some package with Maxima(load..., than using MaximaControl(restart) downstream will cause the package to be removed and can not be used anymore. I just used your file, and if the recalculation did not happen after editing Maxima(Solver... region, the remedy will be just to do few times the appropriate enable-disable Maxima(load... region.

About Solve(..., - my mistake. I did not check the optimization after opening your file. It was set to Numeric but I did not change a thing (strange!). Never mind, I should have checked that, sorry.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#68 Posted: 2/25/2014 3:13:38 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

Hi Martin,
I am using your Portable distribution on Win7-64bit.
Update10.sm doesn't work for some strange reason.
I can see that Maxima Plugin returns valid filename: p="C:\Users\iskarine\Downloads\sys(300,150,2,1).svg",
but doesn't create the .svg file.
And I see some puzzling discrepancy in using windows and linux path separators.
The Plugin always reports a mixture of them, sometimes "/", sometimes "\".
Which one is valid, "\" or "/".
When I replaced all "\" to "/" in the maxima.xml file, it seems getting better.(A bit less errors).
Best regards,
Igor
#69 Posted: 2/25/2014 4:26:38 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Hi Martin,
I can see that Maxima Plugin returns valid filename: p="C:\Users\iskarine\Downloads\sys(300,150,2,1).svg",

Seems that you need to update the plugin. The previous version always expected a file name as second argument of Draw2D/3D.

With the path separators I never had a problem. In Maxima, both types should work. If there are problems, please give examples including the log contents (Insert> Maxima> Log)
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#70 Posted: 2/25/2014 5:15:38 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

After updating plugin I see:
p="C:\util\smath\extensions\plugins\44011c1e-5d0d-4533-8e68-e32b5badce41\gnuplotTmp\01kn1030.aij.svg"
But the .svg file was not created and the place-holder of the graph remained empty.
But I see that empty directory ...\gnuplotTmp\ has been created.
#71 Posted: 2/25/2014 5:24:28 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Can you try the attached example file? You can remove the snapshot regions. Some of the plots do not work here either.

See the german pdf handbook for what the plots should look like (extension manager-> handbooks)
Draw2D3D.sm (120 KiB) downloaded 121 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#72 Posted: 2/27/2014 10:52:14 AM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

Hi Martin,
I'm sending a screenshot for the test, you provided.
Regards
maxima_test.png
#73 Posted: 2/27/2014 2:16:28 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Hi Igor,
the first two plots shown should in principle work, the third plot shows the same error message as on my system. There is some problem with the function polar() in the interface.

The log message for the second plot looks fine, there should be a file of the name specified in your system. Try to search for it.

Maybe, there is a path issue? Try to add CurrentDirectory(DocumentDirectory(""))= to the sheet. Or try to launch it by clicking the sm file and alternatively, opening the file from a running system. Any differences?
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#74 Posted: 3/3/2014 4:29:31 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

Hi Martin,
Unfortunately, it is not a path issue.
Whatever I try, the result was the same - empty graphics place-holders.
Looks like Maxima can't create picture files on my file system (Win7-64b, administrator).
Regards,
Igor
#75 Posted: 3/3/2014 5:10:45 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Can you please send the log file contents? (Insert> Maxima> Log)
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#76 Posted: 3/5/2014 12:42:30 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

Hi Martin,
Please look at the log files in attachment.
It looks like my problem is the same on WinXP and Win7.
Regards
MaximaLogs.7z (15 KiB) downloaded 85 time(s).
#77 Posted: 3/5/2014 3:35:01 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

You need to use Maxima 5.31.1-1. That is the most recent version where the draw package works from within the Maxima plugin. I shall add that hint to the topic starter post and to the interactive book.

Also when switching Maxima versions, you need to clear the binary-gcl directory (in your user directory, search for the dir name), because the object files are not compatible between Maxima versions but share the same location and names.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
Davide Carpi 3/5/2014 4:19:00 PM, Igor Skarine 3/5/2014 4:27:00 PM
#78 Posted: 3/5/2014 5:31:07 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

Martin,
Quote

You need to use Maxima 5.31.1-1.


What's wrong with using 5.31.2 ? That's what I do.
Igor
#79 Posted: 3/5/2014 6:58:19 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

What's wrong with using 5.31.2 ? That's what I do.
Igor


Currently there is no alternative. Either you switch to 5.31.1-1 or you can't use the draw package via SMath.

I cannot reproduce the problem in wxmaxima, thus obviously it is related to the plugin rather than to Maxima. I once asked in the maxima forum if they have an idea what changes from 5.31.1-1 to 5.31.2 could cause compilation problems when loading the draw package via socket connection, but got no answer. May be, some future version will work again, just by chance. Perhaps one has to be able to make a windows built of Maxima in order to identify the cause fo the problem. This currently is beyond my ambitions.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#80 Posted: 3/11/2014 4:01:56 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Am I missing something here? Maxima prime operator diff(1) does not give the correct answer.

Regards,
Radovan


primeop.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Martin Kraska 3/11/2014 4:56:00 PM
  • New Posts New Posts
  • No New Posts No New Posts