Maxima Plugin - Messages
WroteWe really need a linux port
I agree. Maybe, just an adjustment of the command line for establishing the socket connection is required. Under Windows I use
maxima-installation-path/bin/maxima.bat -l sbcl -s
This requires
- the .net socket stuff and process control to work under mono,
- a unicode-proof lisp compiler to be installed (which accepts utf-8 socket encoding), under win the only one is steel bank common lisp (SBCL).
Also, I need to know the name of the maxima process for detection of active maxima processes via System.Diagnostics.Process.GetProcessesByName(name). This is required to identify the pid for later kill. Under windows this might be "maxima" or "lisp" or "sbcl". This has changed over the years and may be different under linux.
The plugin might work even as it is, if the maxima startup script is renamed to maxima.bat.
Any information from the linuxing SMatheers is welcome.
BTW, there is a maxima build for android as well...
EDIT: It would also help, if someone could explain me how to build and debug the plugin under Linux. Under Win, I use VS 2015 with the project as found in the SVN repository. Otherwise I need to blindly make changes under win and install and test under linux. This would be a huge drawback compared to the win-only workflow, where compiling and running SMath with the new build in the debugger is just a push of a single button...
install maxima, copy /usr/bin/maxima to /usr/bin/maxima.bat
Insert> maxima> settings: Path to maxima: /usr/bin
Then smath crashes with the following console output. Understanding this is beyond my experience level in c#.
X11 Error encountered:
Error: BadMatch (invalid parameter attributes)
Request: 12 (0)
Resource ID: 0x3A00096
Serial: 2593
Hwnd: Hwnd, Mapped:True ClientWindow:0x3A00097, WholeWindow:0x3A00096, Zombie=False, Parent:[
Control: System.Windows.Forms.Button, Text: at System.Environment.get_StackTrace () [0x00000] in
at System.Windows.Forms.XplatUIX11.HandleError (IntPtr display, System.Windows.Forms.XErrorEvent& error_event) [0x00000] in
at System.Windows.Forms.X11Keyboard.XCreateIC (IntPtr , System.String , XIMProperties , System.String , IntPtr , System.String , IntPtr , IntPtr ) [0x00000] in
at System.Windows.Forms.X11Keyboard.CreateXic (IntPtr window, IntPtr xim) [0x00000] in
at System.Windows.Forms.X11Keyboard.CreateXicForWindow (IntPtr window) [0x00000] in
at System.Windows.Forms.X11Keyboard.FocusIn (IntPtr window) [0x00000] in
at System.Windows.Forms.XplatUIX11.SetFocus (IntPtr handle) [0x00000] in
at System.Windows.Forms.XplatUI.SetFocus (IntPtr handle) [0x00000] in
at System.Windows.Forms.ContainerControl.SendControlFocus (System.Windows.Forms.Control c) [0x00000] in
at System.Windows.Forms.MdiClient.ActivateChild (System.Windows.Forms.Form form) [0x00000] in
at System.Windows.Forms.MdiWindowManager.FormVisibleChangedHandler (System.Object sender, System.EventArgs e) [0x00000] in
at System.Windows.Forms.Control.OnVisibleChanged (System.EventArgs e) [0x00000] in
at System.Windows.Forms.ScrollableControl.OnVisibleChanged (System.EventArgs e) [0x00000] in
at System.Windows.Forms.Form.OnVisibleChanged (System.EventArgs e) [0x00000] in
at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00000] in
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000] in
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000] in
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000] in
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000] in
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in
at .. (System.String[] ) [0x00000] in
System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/user/.config/SMath/extensions\plugins\44011c1e-5d0d-4533-8e68-e32b5badce41/maxima.xml".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x7fb8bb55d1f0 + 0x001f4> in
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) <0x7fb8bb55cf60 + 0x0004d> in
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) <0x7fb8bb55cf00 + 0x00051> in
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
at System.Xml.XmlWriterSettings.CreateWriter (System.String outputFileName) <0x417801b0 + 0x000af> in
WroteI just did some tests on a linux mint 17.2 virtual box with smath 6654:
System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/user/.config/SMath/extensions\plugins\44011c1e-5d0d-4533-8e68-e32b5badce41/maxima.xml".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x7fb8bb55d1f0 + 0x001f4> in:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) <0x7fb8bb55cf60 + 0x0004d> in:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) <0x7fb8bb55cf00 + 0x00051> in:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
at System.Xml.XmlWriterSettings.CreateWriter (System.String outputFileName) <0x417801b0 + 0x000af> in:0
[/SPOILER]
The path is a mix of windows and linux style: "/home/user/.config/SMath/extensions\plugins\44011c1e-5d0d-4533-8e68-e32b5badce41/maxima.xml" plugin should be use '/' instead '\'
Btw I suggest you to link maxima.bat to maxima instead of make a copy
sudo ln -s /usr/bin/maxima /usr/bin/maxima.bat
On linux an IDE similar to visual studio is "visual studio code" also by MS, you can use it with C# extension
Wrote
The path is a mix of windows and linux style: "/home/user/.config/SMath/extensions\plugins\44011c1e-5d0d-4533-8e68-e32b5badce41/maxima.xml" plugin should be use '/' instead '\'
Btw I suggest you to link maxima.bat to maxima instead of make a copysudo ln -s /usr/bin/maxima /usr/bin/maxima.bat
On linux an IDE similar to visual studio is "visual studio code" also by MS, you can use it with C# extension
Thanks for the comment. Seems that fixing the path separator might be a goot starting point. There must be something like SystemPathSeparator in C#, I shall find out...
Also, I shall get a more recent linux virtual box with enough space to install VS code.
WroteWrote
The path is a mix of windows and linux style: "/home/user/.config/SMath/extensions\plugins\44011c1e-5d0d-4533-8e68-e32b5badce41/maxima.xml" plugin should be use '/' instead '\'
Btw I suggest you to link maxima.bat to maxima instead of make a copysudo ln -s /usr/bin/maxima /usr/bin/maxima.bat
On linux an IDE similar to visual studio is "visual studio code" also by MS, you can use it with C# extension
Thanks for the comment. Seems that fixing the path separator might be a goot starting point. There must be something like SystemPathSeparator in C#, I shall find out...
Also, I shall get a more recent linux virtual box with enough space to install VS code.
If you public (is it already?) the code I can also give you an hand.
If you make a new virtual machine maybe is better that you use Ubuntu to develop that is ~more standard~
Wrote
If you public (is it already?) the code I can also give you an hand.
If you make a new virtual machine maybe is better that you use Ubuntu to develop that is ~more standard~
Third party SMath plugins are always open source. Here is the link for the Maxima plugin.
Feel free to play around with it. I guess one of the first steps will be to make the VS sln file fit for cross platform portability.
And we will need to set up a utf-8 maxima binary under linux. Under windows this is SBCL. It is available under linux as well but on my box this requires separate compilation.
BTW, Davide has offered help with streamlining the install procedure (automated maxima installation). I guess that the BTS issue SS-3562 is the right place for further discussion and co-ordination.
Ubuntu is fine for me.
Example Fit.sm (13 KiB) downloaded 102 time(s).
I tested it briefly with a larger data set and more than one dependent variable. At a first glance it seems that it works surprisingly fast. I might have forgotten but I think there is not yet a strictly numerical procedure in SMath (available via plugin) for nonlinear fitting a quite large data set to a function with multiple dependent variables.
Regards,
Radovan
lmCarlos.sm (57 KiB) downloaded 97 time(s).
Best regards.
Alvaro.
maximaproblem.sm (4 KiB) downloaded 71 time(s).
WrotePlugin updated. Please try.
I think it is all right now. Thank you.
Regards,
Radovan
WrotePlugin updated. Please try.
I confirm that the API issues seem to be resolved. Andrey, thank you very much, I might not have been able to fix that soon.
In the test suite (Plugin maxima test.sm in the interactive handbook) there is just a new issue with displaying svg images in the Maxima-Draw-Region and in the image region. PDF and PNG work fine though.
Best regards, Martin
-
New Posts
-
No New Posts