Documentation and Plugin like system
Math Processor is a general purpose programable math engine.
Brought to you by:
digioz,
kashifimran
Hi Kashif,
I have looked into code, but it seems that code is not documented, and I can't
understand whole concept.
What do you think about plugin system for math processor? I mean - Math
Processor have API, other developers are implementing that and developing
'feature plugin'.
Also I think it will be good to have also coding tutorials for Math Processor.
For example adding new function or something like that.
Thanks,
Tigran
Hi,
Thanks for your suggestions.
I know it was foolish of me not to comment the code. In fact when I coded the
initial versions of MP, I did not know I was going to release it. I was just
experimenting in preparation to write a tutorial on parsing math expressions.
In the end, instead of writing the tutorial I released MP!
Now I am trying to compensate. I have started a blog just for the purpose you
mentioned
http://mprocessor.wordpress.com/. I will
be blogging how more functionality can be added to the application.
The capability to define run-time functions is already available through the
special construct 'ufunc'. Although it is clumsy and less flexible to
define functions using 'ufunc', the functions created thus are just as good
(though little less efficient) as any regular functions.
The same method of "ufunc" combined with the "Run/Load File" menu can be used
to create a collection of functions at run time. For example a whole
statistics kit can be created in a text file and loaded using the "Run/Load
File" menu.
As for the API, I am doing some experimentation on different ways to implement
it. I expect it will be the next thing implemented after the initial matrix
support is made available in v.1.0.6.
I should have mentioned that there is a file "Functions\Testbed.cs" in the
latest SVN release. This file is what the name suggests - Testbed for your
experiments. Download the source and open that file. It shows how to add more
functions to MP that are available from the command line.
First build the source and try to call functions: primes(), primeat() and
isprime(). Now you know these are the functions that are lacking
implementation. The MP part of code has already been done in Testbed.cs. Now
you only have to implement the plain algorithm.
Hopefully Testbes.cs will be a very convenient beginning.
OK. A simple Add-In system has been created. The standard MP Add-Ins will
reside in the "extensions" folder. But MP will load only the "official" Add-
Ins at load time. For other non-official Add-Ins, the main MP menu provides
the "Run/Load Library (dll)" menu, which can be used to load non-official
dll's at run time. MP can also be configured to load non-official dll's by
providing a "configdll.txt" file in the same folder the .exe resides. The
configdll.txt" should contain the names of the dll's which are desired to be
loaded at load time.
I will talk more on this soon on MP blog at :
http://mprocessor.wordpress.com/
I hope this will let everyone to create functions callable from command line
without ever touching or learning about the MP Core Engine!