On Wed, Mar 23, 2016 at 11:50 AM, Ondřej Čertík <
ondrej...@gmail.com> wrote:
> Hi Nico,
>
> On Tue, Mar 22, 2016 at 6:44 PM, Nicolas Jimenez <
nicodj...@gmail.com> wrote:
>> Hi all,
>>
>> Ondrej and I have been discussing changes for sympy gamma that would make
>> the project more useable for the Mathpix project (
http://mathpix.com/). Our
>> main issues with the software are the following:
>
> Thanks a lot for posting the feedback here.
>
>>
>> 1. Evaluation of Sympy expressions is string based and uses 'eval'. This
>> is problematic for us as we are using a Latex parser which directly
>> generates a Sympy object:
>>
https://github.com/augustt198/latex2sympy/tree/master.
>
> I think it should be possible to make sympy gamma to take a latex input as well.
>
>>
>> 2. Plotting is done server side and is not robust. Computing the points
>> should be done client side in javascript for greater responsiveness.
>
> This could be implemented by extending sympy's code generation to also
> generate JavaScript (we already do C and Fortran). Then we would need
> to use some JavaScript library that implements the mathematical
> functions. It might not be easy to do for some special functions that
> do not (yet) have a JavaScript implementation, but for most elementary
> functions this should work great, and it should allow the plot to be a
> lot more responsive. I think that's a good idea.
There is jscode(). It may need to be improved, but the work is already
started there.
>
>>
>> 3. Too much display logic in templates and server side code. For example,
>> all the code in
>>
https://github.com/sympy/sympy_gamma/blob/master/templates/card.html could
>> be distilled into a single ReactJS component. Moving as much of the code as
>> possible into Javascript would go a long way into making the code easier to
>> embed in people's web app. There is too much dependence on Django and the
>> Google App Engine. Porting the app to using Flask should be
>> straightforward, but this is far from being the case. If SympyGamma was a
>> thin API to Sympy it would be much easier to use / maintain.
>
> Yes, we should probably move to Flask or some other lightweight
> framework. I also heard good things about ReactJS (which was not
> available when I started sympy gamma).
>
>
> Mvnnn, if you are interested, I think the above would be very useful
> improvements to sympy gamma.
>
> Ondrej
IMHO we should also consider moving away from the app engine. There
are better alternatives these days. Consider for instance
tmpnb.org,
which runs a full Python instance (no timers) and you can install any
module you want. The whole thing runs in a Docker container (which
didn't even exist when we started Gamma).
We would need someone with relative expertise in this area to do this,
which I don't know if any core SymPy developers have. But perhaps one
of the GSoC students has it.
Aaron Meurer
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CADDwiVAxrxLR%2BjeMJTTUqZxMcHePaXRTKVqRBm4dpNTRgBET5A%40mail.gmail.com.