[sympy] Re: GSOC 2017: SymPy Live and SymPy Gamma (on Google App Engine)

2017-03-31 Thread David Li
Hi Bhautik,

Quick thoughts:

NLP: How will your tagger, stemmer, and lemmatizer deal with mathematical 
input? Is there any guarantee they won't trip over or mangle math 
expressions? Will the lemmatizer deal with things like oo, inf, infinity, 
unicode symbols, etc? I'm also not sure how regexes will convert the 
sentence to a mathematical form. I don't imagine that user queries will 
necessarily be a regular language. What happens when user input doesn't 
match the SymPy function name? IHMO, an NLP proposal is going to need a lot 
more detail - also remember that most of us are not familiar with NLP and 
won't necessarily know how these things work.

Parsing: Can you clarify what you mean by a regular expression syntax tree? 
I'm also not sure how precedence levels would help with the example of 
parsing "sinx" to "sin x".

Symbol keyboard - looks good

Graphing: how do you plan to integrate IPython Notebook? Is it even 
hostable on App Engine? 

Support button: I'm not sure of the value of this, especially as we don't 
have the manpower to run this. Isn't our Gitter a better place for such 
discussion?

Design: do you have a mockup or specific improvements in mind? I'm wary of 
just adding a CSS framework for the sake of it, especially as I see 
Bootstrap and Materialize.css listed - these look and function quite 
differently.

Pandas: I'm not sure how Pandas helps us with pickling. IIRC, Pandas has 
efficient serialization to certain binary formats where the on-disk and 
in-memory representation are similar to each other/the same. SymPy's issue 
is that many objects simply do not pickle. I also doubt that SymPy Live 
sessions count as big data.

Further functionality:

I'm not sure why a Gamma user would want different SymPy versions. I think 
this would be much more useful for Live, and in that case would be one of 
the highest-impact tasks you can do out of all of these - having SymPy Live 
versions in sync with the documentation would be great. 

IIRC, Django is basically only used for routing. It would be nice to make 
Gamma more portable, but again, I think it would be more useful to have 
SymPy Live be easier to deploy and more embeddable.

Let me know if you have any additional questions.

Best,
David

On Friday, March 31, 2017 at 3:40:41 PM UTC-4, mvnnn wrote:
>
> Hi David,
>
> My GSOC proposal : 
> https://docs.google.com/document/d/1v0N6Fe84Yfo_h5Pip38N9LCAkyXBJP4-6XVYPzjBlrs/edit?usp=sharing
>
> Any suggestion regarding to this project that's really helps me.
>
> Thanks,
> Bhautik
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/1543e68c-c0c6-418c-9f91-90f1df6cc577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: GSOC 2017: SymPy Live and SymPy Gamma (on Google App Engine)

2017-03-28 Thread David Li
Hi Bhautik,

I would look at the issues list for SymPy Live[1] and SymPy Gamma[2].

For SymPy Live, I would say the biggest problem is how it is implemented - 
it tries to preserve a user session by pickling all globals, but this does 
not always work, and so it falls back to re-evaluating statements. This is 
slow, and causes confusing behavior when one of the statements is not 
completely deterministic. The other problem is that we would like to have 
different versions of SymPy available for the live shell in the docs, so 
that we can make sure the docs and the shell line up.

For SymPy Gamma, I feel the implementation is not quite flexible enough. 
There are quite a few improvements that could be made and this is more up 
to you to decide what can be done.

Please feel free to ping me with questions, since I'm probably the 
developer who most recently worked with either codebase (and admittedly I 
haven't been as active as I would have liked these past few years).

[1]: https://github.com/sympy/sympy-live/issues
[2]: https://github.com/sympy/sympy_gamma/issues

Best,
David

On Friday, March 17, 2017 at 7:58:52 PM UTC-4, mvnnn wrote:
>
> Hi,
>
> How should i search for a mentor of SymPy Live and SymPy Gamma (on Google 
> App Engine) project?
>
> Regards,
> Bhautik
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/c23c238a-efef-4426-acf6-135f4abe0517%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] SymPy Live Maintainer

2017-03-28 Thread David Li
Yes, please ping me on Github or email me if there's anything in the code
that isn't clear.

Long term I'm hoping WebAssembly will mean we can run sessions in-browser,
though having to download the Python stdlib would make this not ideal for
people on slow/metered connections.

There is a PR to add a message for the docs, which I will merge soon.

David

On Tue, Mar 28, 2017 at 9:17 PM, Aaron Meurer <asmeu...@gmail.com> wrote:

> That's great. SymPy Live is in need of some maintainence. I'm CCing
> David Li, who has written most of the code.
>
> I think the biggest issue with SymPy Live is the way it does
> evaluation. Because it runs on the App Engine, which only allows
> persistence for 60 seconds, commands are re-executed (I don't know the
> exact behavior, but I think there's also some pickling involved).
>
> Honestly, it would be better to run it on something more advanced than
> the App Engine. SymPy Live was originally written before things like
> Docker and "cloud computing" existed as they do today. It would be
> nicer if it just ran on a more persistent session, akin to something
> like tmpnb.
>
> That's a large undertaking, though. Shorter term there are a lot of
> smaller fixes that would be nice to make, for instance, to improve the
> behavior on the docs site. You can see the issue tracker for things
> that need to be fixed.
>
> Another big thing that confuses people a lot is when the behavior in
> the Live shell differs because it is a different SymPy version. Maybe
> it would be helpful had a bigger message on docs pages other than
> "latest" that the shell may have different results because it is
> running version 1.0.
>
> Aaron Meurer
>
>
> On Tue, Mar 28, 2017 at 8:55 PM, Ivan Savov <ivan.sa...@gmail.com> wrote:
> > Hello everyone,
> >
> >
> > My name is Ivan Savov and I'm a long time SymPy user, especially SymPy
> live.
> > The SymPy Live shell is doing well, but there hasn't been much updates
> > recently.
> > I wanted to let everyone know that I'm available to contribute by fixing
> > bugs and keeping the project up to date.
> >
> > I don't think the project needs any specific updates right now, but it
> might
> > be a good idea to keep updating it to use recent version of sympy.
> >
> > If anyone has suggestions about more long term improvements and features
> > that I could work on, I'd like to hear too.
> > For now my plan is to add some tests to the project and setup TravisCI
> (like
> > the sympy_gamma repo) so every pull request will get checked
> automatically.
> >
> >
> > Best,
> >
> >   Ivan
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to sympy+unsubscr...@googlegroups.com.
> > To post to this group, send email to sympy@googlegroups.com.
> > Visit this group at https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/sympy/38960604-3890-
> 4409-a40f-636833e4f4fe%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CADr7h-cuXFhLnVHMxviCRV6VV1_n%2BTEMH-G6xEgoUPj3rwVnUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Bug in parse expression

2015-02-23 Thread David Li
For Aaron's case the expression is turned into

sin (Symbol )**(Integer (2 )('x' ))*Symbol ('x' )

For the original case the expression is turned into

Integer (10 )*sin (Symbol )**(Integer (120 )('x' ))*Symbol ('x' )**Integer 
(2 )+Integer (3 )*Symbol ('x' )*Symbol ('y' )*Symbol ('z' )+tan (Symbol 
('theta' ))

so the exponent/argument is not being properly captured. IIRC because this 
works at the token level it only handles the case where the exponent is 
something simple like just a symbol or integer, and not a product of 
symbols and integers. This might make sense to reimplement as an AST 
transformation instead, or otherwise the transformation would have to do 
some actual parsing of the tokens.

David

On Thursday, February 19, 2015 at 10:35:21 PM UTC-5, Aaron Meurer wrote:

 A simpler example is sin**(2*x) x. 

 Aaron Meurer 

 On Thu, Feb 19, 2015 at 1:44 AM, Paul Royik distan...@gmail.com 
 javascript: wrote: 
  Just noticed, that official example works: 
  from sympy.parsing.sympy_parser import (parse_expr, 
  standard_transformations, implicit_multiplication_application) 
  parse_expr(10sin**2 x**2 + 3xyz + tan 
  theta,transformations=(standard_transformations 
  +(implicit_multiplication_application,))) 
  
  But 
  parse_expr(10sin**(120*x) x**2 + 3xyz + tan 
  theta,transformations=(standard_transformations 
  +(implicit_multiplication_application,))) 
  raises exception (see sine exponent): 
  
  TypeError: unbound method could_extract_minus_sign() must be called with 
  Symbol instance as first argument (got nothing instead) 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  sympy group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to sympy+un...@googlegroups.com javascript:. 
  To post to this group, send email to sy...@googlegroups.com 
 javascript:. 
  Visit this group at http://groups.google.com/group/sympy. 
  To view this discussion on the web visit 
  
 https://groups.google.com/d/msgid/sympy/b88049b4-502a-4f00-9796-506188245ebe%40googlegroups.com.
  

  For more options, visit https://groups.google.com/d/optout. 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/37134ee3-dcc2-4ec2-aca4-6893af066d5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Helping people contribute to SymPy at Cornell

2014-11-16 Thread David Li
Just wanted to follow up: we ended up spending most of the time teaching 
Git+Github. I walked a few people through what SymPy is, but didn't get any 
interest in contributing...we are thinking about a longer workshop in the 
spring, hopefully there will be more interest then.

David

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/dbf2341e-bc80-43ee-ac01-3a245787bc65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Helping people contribute to SymPy at Cornell

2014-11-12 Thread David Li
Hello all,

This is a bit late notice, but at Cornell we're having an open-source 
workshop on Saturday, and the organizers are interested in introducing 
people to contributing to SymPy. I was thinking the Easy to Fix and 
Documentation (and perhaps Needs Review) labels in the issue tracker would 
be the best starting place? Are there any other suggestions for what people 
could do? The students would have anything from a semester's experience 
with Python to potentially several years. Introducing and explaining SymPy 
itself would be important - I think the tutorial + Gamma would be good ways 
to do this. The organizers are teaching IRC/Git/Github beforehand.

Thanks,
David

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/e34e0fe4-26f2-44a4-825c-43bd8112f35e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Question about SymPy live function def

2014-05-02 Thread David Li
Hello,

Could you please be more specific about the 'complaint'? If the input 
method is set to 'enter', then 'shift-enter' will create a newline without 
submitting the expression.

For the second part of your question: as I understand, your documentation 
contains a function definition, but when 'Run code block in SymPy Live' is 
pressed, it comes up with an error? In the documentation there are examples 
of functions being defined that work just fine (e.g. 
http://docs.sympy.org/latest/tutorial/simplification.html#example-continued-fractions)
 
- perhaps you could see how that example is formatted. Without the error 
message I'm not quite sure what is wrong.

David

On Thursday, May 1, 2014 5:13:07 PM UTC-7, Comer wrote:

 Today I tried defining a function while in the SympyLive shell.  That is 
 something like:

 def f(x):
   return x

 But when entered, I got a complaint.  So I changed the input method to 
 shift-enter and got it to work (ie got the def to work). When using it with 
 such as f(1) it returned the correct answer.  However, I am now writing 
 some documentation on my local machine and when it is made it has no 
 errors.  When I view the html of the new stuff I am writing which includes 
 some example code with a def f(x):
 in it, when executed in SymPy  Live from the html display of the new doc, 
 I get a failure just when the new function is defined. So it does not parse 
 the requested code as I want. It seem that when executing the doc code on 
 SymPy Live the apparently needed shift-enter rather than the default enter 
 is what is encountered. So for the unsuspecting user who reads the 
 documentation and just wants to run it, there is a problem.  How to enable 
 the correct behavior so the user will get the code executed properly and 
 will not have to discover the workaround. I just want the code to work with 
 no further bother from the user.  Can someone please clue me in?

 Thanks.

 Comer


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/f9a23e78-8a1e-4e03-bc44-6770a0999c00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Automatic deployment of SymPy Live/Gamma

2014-04-20 Thread David Li
Okay. So we have some other options:


   - Google provides Push to 
Deployhttps://developers.google.com/appengine/docs/push-to-deploy, 
   which automatically deploys a linked repository whenever it is pushed to. 
   Unfortunately this doesn't work with submodules and Google refuses to 
   support 
themhttps://code.google.com/p/googleappengine/issues/detail?id=9676. 
   They suggest using git-subtree instead, so we would have to convert our 
   submodules into subtrees.
   - Travis-CI provides a deploy step; the SDK would have to be downloaded 
   as part of this.

Which option would be best?

David

On Tuesday, March 11, 2014 1:26:52 PM UTC-7, David Li wrote:

 Hello all,

 Based on Paul Kinlan's blog 
 posthttp://paul.kinlan.me/Using-the-Github-API-to-optimise-your-workflow/ I 
 have forked and updated the Github-Auto-Deploy server to deploy SymPy 
 Live/SymPy Gamma. My fork is at 
 https://github.com/lidavidm/Github-Auto-Deploy; it uses Python 3 and has 
 some other changes detailed below.

 How it works:

- The server is configured with the location of the local repository, 
the deploy scripts, etc. (see the configuration 
 filehttps://github.com/lidavidm/Github-Auto-Deploy/blob/master/sympy_auto_deploy.conf.json
)
- On the repository a webhook is set up to point to the server.
- Any commit will be sent as a POST request to the server.
- The server (this is different from the original) filters for a 
commit message matching Bump version to [0-9]+ (specified in the 
configuration file), at which point it pulls changes from remote.
- The deploy script uses the App Engine SDK to deploy.
   - This uses OAuth so we only have to sign in once.
   - The deploy script has access to environment variables set by the 
   server/configuration so we don't have to hardcode the SDK location in 
 the 
   script.

 Some work is still needed: the server doesn't verify that the request is 
 from 
 Githubhttps://help.github.com/articles/what-ip-addresses-does-github-use-that-i-should-whitelist.
  
 Also, the project has no license, so it's unclear if we can use it or not.

 The server can be tested locally with instructions from 
 Githubhttp://developer.github.com/webhooks/configuring/: 
 run the server, then use ngrok to expose the local server to the Internet. 
 On Github's webhook page (in the repository settings), add the ngrok URL as 
 a webhook and set the payload version to JSON (this also differs from the 
 original server)

 David


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/f7823618-98b7-41ae-b7a0-d39b5fdd5b1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Widgets in SymPyGaama

2014-03-27 Thread David Li
Do we need all of Bootstrap and/or jQuery UI just for a modal dialog? Also, 
the graph card already has some code for an expanded view.

For providing the result as plain text/some other format, some places in 
the code have hardcoded the LaTeX printer, you'd need to work around that 
somehow...

David

On Thursday, March 27, 2014 9:48:43 AM UTC-7, SAHIL SHEKHAWAT wrote:

 I wanted to ask that which one among the jQuery UI and Bootstrap 3 will be 
 best for the separate dialog box. 
 modal window provided by bootstrap 3 is really nice. 

 On Wednesday, March 26, 2014 7:03:33 PM UTC+5:30, SAHIL SHEKHAWAT wrote:

 I want to add widgets in SymPyGamma so that user can:
 1)  Share a particular card or the entire result by creating a GIST as 
 IPython Notebook.
  I have already done significant work on this issue, ( which i left 
 in the middle due to my gsoc proposal ). So, i need to finish that so that 
 it can be included in this part.
  As Gamma uses JavaScript for the calculating the JSON  of the result 
 card i will create a new view which will calculate card JSON using 
 python so that it can be 
  converted  to IPython Notebook. This will result in recalculations 
 but Any better solution???
 2)  Copy the result as plain text.
 Using the view created for calculations of card Json, i can also add 
 functionality to copy the result text as plain text. I will just need to 
 parse that json which i am 
 already doing for ipython notebook.
 3)  Zoom the result card.
Currently we do support enlarging the result which i will integrate 
 into the widgets.
 4)  Downloading the results
We can provide the option to download the result as Latex ,IPython 
 notebook, SymPy Codes and HTML. We already calculate 3/4 things in Gamma, 
 why not give it as an
option to the user??

 I will use jQuery UI for the widgets!
 Any suggestion???



-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/fe0209db-f78f-4980-85fe-ef07ff832bba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] [GSoC] D3.js and Three.js backend for our plotting module

2014-03-19 Thread David Li


 And I can focus more on creating a python base which will make the JSON 
 rather than concentrating on graphs and animations (Three.js)


Doesn't SymPy already essentially have this? E.g.

 from sympy import *
 from sympy.plotting.plot import SurfaceOver2DRangeSeries
 x, y = symbols('x y')
 series = SurfaceOver2DRangeSeries(x + y, (x, -1, 1), (y, -1, 1))
 series.get_meshes()
(array([[-1., -0.95918367, -0.91836735, ...,  0.91836735,
 0.95918367,  1.],
...

All that would be left is converting the NumPy arrays to JSON. (This is 
what Gamma does.)

David
 


 On Thu, Mar 20, 2014 at 8:09 AM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.comjavascript:
  wrote:

 Yeah! That will be nice!


 On Thu, Mar 20, 2014 at 8:02 AM, Jason Moore moore...@gmail.comjavascript:
  wrote:

 Is there any reason not to use MathBox.js? Seems like you'll have to 
 write very similar code to what is already implemented there.


 Jason
 moorepants.info
 +01 530-601-9791


 On Wed, Mar 19, 2014 at 9:07 PM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.comjavascript:
  wrote:

 Aaron,
 But i have proposed something different, without using any library 
 other than three.js. 
 can you please take a look at 
 https://github.com/sympy/sympy/wiki/GSoC-2014-Application-Sahil-Shekhawat%3A-Three.js-backend-for-SymPy%27s-plotting-module
 . 
 I just want to user three.js and create a browser/web based backend 
 which will work locally ( on the browsers) as well as on the Gamma and 
 Live.


 On Thu, Mar 20, 2014 at 6:04 AM, Aaron Meurer 
 asme...@gmail.comjavascript:
  wrote:

 SymPy is also copyrighted. The important thing is the license, which
 is BSD (the same as SymPy), which basically says you can take the
 source code and do whatever you want with it (read it, it's quite
 short).

 The dependencies make it not suitable for the App Engine (though we
 don't *have* to stick with the App Engine). My hope is that
 Continuum's Wakari platform will develop into something that will be a
 much better replacement for the App Engine for SymPy Live and SymPy
 Gamma.

 (by the way, I work for Continuum, so if you have any questions about
 Bokeh or Wakari, just let me know and I can pass them on)

 Aaron Meurer

 On Tue, Mar 18, 2014 at 4:20 AM, SAHIL SHEKHAWAT
 sahilshe...@gmail.com javascript: wrote:
  Its been copyrighted by Continuum Analytics, Inc.. will that be 
 problem?
  But it looks good!
 
 
  On Tue, Mar 18, 2014 at 2:45 PM, Christophe Bal 
  proj...@gmail.comjavascript: 
 wrote:
 
  Hello,
  you can also look at Bokeh.
 
  Christophe BAL
 
 
  2014-03-18 8:50 GMT+01:00 SAHIL SHEKHAWAT 
  sahilshe...@gmail.comjavascript:
 :
 
  I have been working on a proposal to implement 3D plotting in 
 SymPyGamma,
  and  Jason pointed me to the importance of d3.js and Three.js 
 backend in the
  Sympy itself. so, i want to discuss the idea.As only four days are 
 left
  please reply.
  My motivation is
  
 https://groups.google.com/forum/#!searchin/sympy/plotting$20module/sympy/q3kOnJfRXdw/JAEL6AyJnZQJ
  by Stefan Krastanov . SymPyGamma's plotting is based on D3.js and 
 does not
  used SymPy's plotting module which limits the plots that can be 
 produced by
  Gamma BUT if i can implement a D3.js backend for 2D plotting and 
 Three.js
  backend for 3D plotting in SymPy itself which can be directly used 
 in Gamma
  as done by Stefan .here:
  
 http://blog.krastanov.org/2013/05/14/sympy-plots-with-d3-in-ipyhtonwill it
  be more beneficial than implementing Three.js in Gamma only?
  Also, the point about the python execution time limit on App 
 engine we
  can use Ajax to separate the execution into multiple python 
 executuion as
  suggested by Stefan in the discussion and also we can export the 
 results as
  Gist and Query them which will reduce the execution time 
 significantly, i
  have done significant work in my PR
  https://github.com/sympy/sympy_gamma/pull/32.
 
  Please tell me is it any good? should i change my proposal? I can 
 do this
  if everyone think that this is good!
 
  --
  You received this message because you are subscribed to the Google 
 Groups
  sympy group.
  To unsubscribe from this group and stop receiving emails from it, 
 send an
  email to sympy+un...@googlegroups.com javascript:.
  To post to this group, send email to 
  sy...@googlegroups.comjavascript:
 .
  Visit this group at http://groups.google.com/group/sympy.
  To view this discussion on the web visit
  
 https://groups.google.com/d/msgid/sympy/d2d0fc0b-187a-4a16-bf5b-d2ffdc6da826%40googlegroups.com
 .
  For more options, visit https://groups.google.com/d/optout.
 
 
  --
  You received this message because you are subscribed to the Google 
 Groups
  sympy group.
  To unsubscribe from this group and stop receiving emails from it, 
 send an
  email to sympy+un...@googlegroups.com javascript:.
  To post to this group, send email to 
  sy...@googlegroups.comjavascript:
 .
  Visit this group at http://groups.google.com/group/sympy.
  To view this discussion 

Re: [sympy] [GSoC] D3.js and Three.js backend for our plotting module

2014-03-19 Thread David Li
Sahil,

I was just unsure what else exactly was needed on the Python end - I didn't 
account for the lighting, etc.

David

On Wednesday, March 19, 2014 7:56:44 PM UTC-7, SAHIL SHEKHAWAT wrote:

 David,
 Then what you suggest i should do to intoduce 3D plotting in Sympy or 
 Gamma/Live


 On Thu, Mar 20, 2014 at 8:23 AM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.comjavascript:
  wrote:

 I completely agree with you david but
 1.we still need the cameras, lights, canvas,
 2.we are using mathbox.js, I guess that json for it will be different.
 3.Creating a server for the local users which will render the static 
 files and javascript like Bokeh

 Thanks for pointing out that we also have numpy arrays which i can use..


 On Thu, Mar 20, 2014 at 8:17 AM, David Li li.da...@gmail.comjavascript:
  wrote:

 And I can focus more on creating a python base which will make the JSON 
 rather than concentrating on graphs and animations (Three.js)


 Doesn't SymPy already essentially have this? E.g.

  from sympy import *
  from sympy.plotting.plot import SurfaceOver2DRangeSeries
  x, y = symbols('x y')
  series = SurfaceOver2DRangeSeries(x + y, (x, -1, 1), (y, -1, 1))
  series.get_meshes()
 (array([[-1., -0.95918367, -0.91836735, ...,  0.91836735,
  0.95918367,  1.],
 ...

 All that would be left is converting the NumPy arrays to JSON. (This is 
 what Gamma does.)

 David
  


 On Thu, Mar 20, 2014 at 8:09 AM, SAHIL SHEKHAWAT sahilshe...@gmail.com
  wrote:

 Yeah! That will be nice!


  On Thu, Mar 20, 2014 at 8:02 AM, Jason Moore moore...@gmail.comwrote:

 Is there any reason not to use MathBox.js? Seems like you'll have to 
 write very similar code to what is already implemented there.


 Jason
 moorepants.info
 +01 530-601-9791


 On Wed, Mar 19, 2014 at 9:07 PM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.com wrote:

 Aaron,
 But i have proposed something different, without using any library 
 other than three.js. 
 can you please take a look at https://github.com/sympy/
 sympy/wiki/GSoC-2014-Application-Sahil-Shekhawat%
 3A-Three.js-backend-for-SymPy%27s-plotting-module. 
 I just want to user three.js and create a browser/web based backend 
 which will work locally ( on the browsers) as well as on the Gamma and 
 Live.


 On Thu, Mar 20, 2014 at 6:04 AM, Aaron Meurer asme...@gmail.comwrote:

 SymPy is also copyrighted. The important thing is the license, which
 is BSD (the same as SymPy), which basically says you can take the
 source code and do whatever you want with it (read it, it's quite
 short).

 The dependencies make it not suitable for the App Engine (though we
 don't *have* to stick with the App Engine). My hope is that
 Continuum's Wakari platform will develop into something that will 
 be a
 much better replacement for the App Engine for SymPy Live and SymPy
 Gamma.

 (by the way, I work for Continuum, so if you have any questions 
 about
 Bokeh or Wakari, just let me know and I can pass them on)

 Aaron Meurer

 On Tue, Mar 18, 2014 at 4:20 AM, SAHIL SHEKHAWAT
 sahilshe...@gmail.com wrote:
  Its been copyrighted by Continuum Analytics, Inc.. will that be 
 problem?
  But it looks good!
 
 
  On Tue, Mar 18, 2014 at 2:45 PM, Christophe Bal 
 proj...@gmail.com wrote:
 
  Hello,
  you can also look at Bokeh.
 
  Christophe BAL
 
 
  2014-03-18 8:50 GMT+01:00 SAHIL SHEKHAWAT sahilshe...@gmail.com
 :

 
  I have been working on a proposal to implement 3D plotting in 
 SymPyGamma,
  and  Jason pointed me to the importance of d3.js and Three.js 
 backend in the
  Sympy itself. so, i want to discuss the idea.As only four days 
 are left
  please reply.
  My motivation is
  https://groups.google.com/forum/#!searchin/sympy/
 plotting$20module/sympy/q3kOnJfRXdw/JAEL6AyJnZQJ
  by Stefan Krastanov . SymPyGamma's plotting is based on D3.js 
 and does not
  used SymPy's plotting module which limits the plots that can be 
 produced by
  Gamma BUT if i can implement a D3.js backend for 2D plotting 
 and Three.js
  backend for 3D plotting in SymPy itself which can be directly 
 used in Gamma
  as done by Stefan .here:
  http://blog.krastanov.org/2013/05/14/sympy-plots-with-
 d3-in-ipyhton will it
  be more beneficial than implementing Three.js in Gamma only?
  Also, the point about the python execution time limit on App 
 engine we
  can use Ajax to separate the execution into multiple python 
 executuion as
  suggested by Stefan in the discussion and also we can export 
 the results as
  Gist and Query them which will reduce the execution time 
 significantly, i
  have done significant work in my PR
  https://github.com/sympy/sympy_gamma/pull/32.
 
  Please tell me is it any good? should i change my proposal? I 
 can do this
  if everyone think that this is good!
 
  --
  You received this message because you are subscribed to the 
 Google Groups
  sympy group.
  To unsubscribe from this group and stop receiving emails from 
 it, send an
  email to sympy+un...@googlegroups.com.
  To post to this group, send

Re: [sympy] [GSoC] D3.js and Three.js backend for our plotting module

2014-03-19 Thread David Li
One concern I have - does this mean we are bundling a copy of
Three.js/MathBox with SymPy now? Or are we going to rely on a third party
CDN?

David

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CADr7h-ev8cABKfLdSttcTKwwPJDSYAazVkW_tEZAmmVD5nbHqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] [GSoC] D3.js and Three.js backend for our plotting module

2014-03-18 Thread David Li
Just some thoughts:

   - I agree with Jason that ultimately, integrating a library specifically 
   focused on Python and web plotting is the best course for SymPy and 
   Gamma/Live in general.
  - Gamma/Live's problem is that it runs on App Engine - anything that 
  requires a server won't work. (I think Bokeh/WebAgg fall into this 
  category, but I'm not sure. WebAgg also isn't available on App Engine yet 
  anyways.)
 - WebAgg seems to render the plot on the server and send frames to 
 the client. Locally it ran at an acceptable (but slow) rate; I'm not 
sure 
 how well this would hold up on App Engine.
  - One of the reasons that Gamma uses its own plotting is because it 
  lets the user pan the plot and load more of the plot on demand.
   - On mpld3: it would be nice to integrate just to support more plots, 
   but for 3D specifically it won't 
helphttps://github.com/jakevdp/mpld3/issues/69#issuecomment-34880654
   .
   - On passing JSON data to the browser to render: this is what we do 
   
alreadyhttps://github.com/sympy/sympy_gamma/blob/master/app/logic/resultsets.py#L583
   .

David

On Tuesday, March 18, 2014 8:47:50 AM UTC-7, SAHIL SHEKHAWAT wrote:

 That exactly what i was looking for!
 I think i will go by this concept only...its awesome!
 about using Json mathics guys also use json to render 3D plotting for 
 Three.js, Its good enough and works.
 Thanks again. :)


 On Tue, Mar 18, 2014 at 8:52 PM, Jason Moore moore...@gmail.comjavascript:
  wrote:

 https://github.com/pydy/pydy-viz

 We basically generate data on the python side, then write a json file to 
 disk, then we have a generic html/js/css template that uses three.js to 
 load in all the data from the json file and create a scene. The json file 
 is the communication between python and js. This is rudimentary, but works 
 and I think it would work for your idea too.


 Jason
 moorepants.info
 +01 530-601-9791


 On Tue, Mar 18, 2014 at 11:19 AM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.comjavascript:
  wrote:

 can you please point me out the direction where i can learn how PyDy 
 works?


 On Tue, Mar 18, 2014 at 8:28 PM, Jason Moore 
 moore...@gmail.comjavascript:
  wrote:

 But even if you implement something with Mathbox.js then it would be 
 nice if users can use it locally or through Live/Gamma. That is the 
 approach with took with pydy-viz. Right now we can run them locally and if 
 you want embed it in a website you can.


 Jason
 moorepants.info
 +01 530-601-9791
  

 On Tue, Mar 18, 2014 at 10:57 AM, Jason Moore 
 moore...@gmail.comjavascript:
  wrote:

 If we already use matplotlib for 3D plotting, then a long term 
 solution to this is to add three.js to the web backend of any one of the 
 new plotting libraries that are popping up (bokeh, mpld3, matplotlib's 
 webagg backend). Then you can simply use the library for the backend to 
 the 
 matplotlib calls. Now, that route is more arduous and may not be the 
 fastest course to having 3D plotting in Gamma. You can certainly 
 implement 
 a custom 3D web based plotter for SymPy Gamma that only works for SymPy 
 Gamma, but as soon as these aforementioned libraries mature we will most 
 certainly use them as the backend for SymPy plotting. I'm not involved in 
 the SymPy plotting package so I don't know the roadmap for it or what 
 people really want. But people that are doing plotting want what these 
 new 
 libraries are creating and one or more of them will become a de facto web 
 plotting library for 3D graphics. But also having a working 3D plot in 
 Gamma by the end of the summer will be cool, regardless if we use the 
 more 
 established libs in the future. If you want to go the fast and dirty 
 route, 
 then the Mathbox.js looks like a good choice.


 Jason
 moorepants.info
 +01 530-601-9791
  

 On Tue, Mar 18, 2014 at 10:32 AM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.com javascript: wrote:

 But we do support 3D plotting by matplotlib and also you mentioned 
 that a lot of people are working on making it browser compatible.
 Sorry if i am irritating but i just want to clarify.


 On Tue, Mar 18, 2014 at 7:55 PM, Jason Moore 
 moore...@gmail.comjavascript:
  wrote:

 My suggestion on melange was just to mention that if you only focus 
 on 3D plotting for SymPy Gamma then we are missing the majority of 
 SymPy 
 users. My hunch is that 99% of people who use SymPy use it locally, not 
 from SymPy live or SymPy Gamma. If we currently don't support 3D 
 plotting 
 locally, then the effort may be more fruitful adding 3D plotting to 
 SymPy 
 for local use. If 3D plotting for SymPy were implemented in such a way 
 that 
 it is web compatible, then the plotting for SymPy Live and SymPy Gamma 
 will 
 be gained almost for free.


 Jason
 moorepants.info
 +01 530-601-9791
  

 On Tue, Mar 18, 2014 at 9:15 AM, SAHIL SHEKHAWAT 
 sahilshe...@gmail.com javascript: wrote:

 sorry for the slang but if a lot of people are working on the 
 

[sympy] Re: SymPy Gamma: hand-written input

2014-03-12 Thread David Li
Hello,

This sounds like a great idea for Gamma. How familiar are you with web 
development? In particular, do you have any experience with JavaScript?

I would also encourage you to look at the application 
templatehttps://github.com/sympy/sympy/wiki/GSoC-2014-Application-Template 
and 
also perhaps contribute to SymPy if you haven't already (as it is a 
requirement).

David

On Tuesday, March 11, 2014 5:48:21 PM UTC-7, Fedor Morozov wrote:

 Hello.
 My name is Fedor Morozov, I'm a third year CS student at Moscow State 
 University specializing in computer vision.

 Since touchscreen devices are highly popular nowadays, there are lots of 
 cases when it's easier to handwrite a formula then to enter it using a 
 keyboard.
 State-of-the arts computer vision approaches achieve good results in 
 formula recognition, so it is possible to implement such a feature for 
 SymPy Gamma.
 Along with NLP parsing this would provide a very powerful user input 
 capabilities.
 There are already some similar 3rd-party applications for Wolfram Alpha, 
 you can see an example here http://webdemo.visionobjects.com.
 A more challenging task would be formula recognition from photos, but 
 that's not necessary right now, I guess.

 So the proposed project is to implement formula recognition capabilities 
 for SymPy Gamma, it would also be great to make some interface for 
 touchscreen input (web/mobile app?).
 I've recently read a few articles on the topic, if you believe that the 
 project if useful, I'll come up with a full-fledged proposal and algorithms 
 review.
 The easiest (conceptually) approach would be to select some of the recent 
 articles and code up the algorithm.
 Than some improvements can be made, for example it would be cool to use 
 SymPy resources for formula correctness checking.

 As stated above, I specialize in computer vision, so I'm familiar with 
 basic algorithms in the area.
 Now I'm researching feature descriptors, so I have some experience with 
 shape recognition (for example, shape context), a year ago I worked on a 
 car plate recognition task.
 Also last year I participated in GSoC with computational photography 
 project for opencv library.

 Thanks for your attention, hope to hear some comments soon.


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/2516a06d-7860-4e4d-ac0f-5679b04e3a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Automatic deployment of SymPy Live/Gamma

2014-03-11 Thread David Li
Hello all,

Based on Paul Kinlan's blog 
posthttp://paul.kinlan.me/Using-the-Github-API-to-optimise-your-workflow/ I 
have forked and updated the Github-Auto-Deploy server to deploy SymPy 
Live/SymPy Gamma. My fork is at 
https://github.com/lidavidm/Github-Auto-Deploy; it uses Python 3 and has 
some other changes detailed below.

How it works:

   - The server is configured with the location of the local repository, 
   the deploy scripts, etc. (see the configuration 
filehttps://github.com/lidavidm/Github-Auto-Deploy/blob/master/sympy_auto_deploy.conf.json
   )
   - On the repository a webhook is set up to point to the server.
   - Any commit will be sent as a POST request to the server.
   - The server (this is different from the original) filters for a commit 
   message matching Bump version to [0-9]+ (specified in the configuration 
   file), at which point it pulls changes from remote.
   - The deploy script uses the App Engine SDK to deploy.
  - This uses OAuth so we only have to sign in once.
  - The deploy script has access to environment variables set by the 
  server/configuration so we don't have to hardcode the SDK location in the 
  script.
   
Some work is still needed: the server doesn't verify that the request is 
from 
Githubhttps://help.github.com/articles/what-ip-addresses-does-github-use-that-i-should-whitelist.
 
Also, the project has no license, so it's unclear if we can use it or not.

The server can be tested locally with instructions from 
Githubhttp://developer.github.com/webhooks/configuring/: 
run the server, then use ngrok to expose the local server to the Internet. 
On Github's webhook page (in the repository settings), add the ngrok URL as 
a webhook and set the payload version to JSON (this also differs from the 
original server)

David

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/ee8ae420-56ce-4c61-b3a8-588afb4fe6e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: UI: Mobile Applications

2014-03-11 Thread David Li
Hello,

Which mobile application are you referring to? Currently SymPy has no 
official native mobile app, only the web applications. Also, while sympy is 
contained in Sage, sympy by itself differs greatly from Sage - I don't 
think the Sage tutorial applies (and SymPy has its own tutorial: 
http://docs.sympy.org/latest/tutorial/index.html)

David

On Sunday, March 9, 2014 4:35:23 AM UTC-7, Nosakhare Kingsmentor Belvi 
wrote:

 I name is Nosakhare Belvi Osamudiamen, a computer science student of the 
 University of Nigeria, Nsukka. I love programming, have coded in java, 
 python, c-like languages and also an android developer. I find the sympy 
 project an interesting one and i have an interest in working on the 
 project. I will like to work on the UI of the android mobile application. 
 The way i plan on improving on the current UI design includes:
 Making the app to fit screen of any android device.
 The use of a Navigation Drawer: a better alternative to actionbars
 readily available slides on the application.
 Also, i also plan on adding the PDFs of the sage tutorial to the android 
 package or better still, the ability for the use to access the tutorials 
 and other information in the app. This is because the ideal of redirecting 
 a user from one's app to another  app to complete certain action is usually 
 not the best option (in most cases, the user finish your app operation in 
 the other app and continue to other activity). i am ready to send a sketch 
 or prototype of the design plan i have in mind if required to do so.
 One of my android work include : Bible WaZoBia http://nexva.com/32100




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/417d7258-cc87-44b6-afb9-a2440e5437a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Issue migration from Google Code to GitHub

2014-03-04 Thread David Li
My email address is the same on Google Code and 
Github: li.david...@gmail.com

David

On Tuesday, March 4, 2014 1:20:32 PM UTC-7, Aaron Meurer wrote:

 My understanding was that it could be fixed after import if the user 
 adds that email to their account. But let's just canonicalize those 
 four users on their know GitHub emails. 

 Raoul, David, Jason, Sachin, can you tell us which emails you have on 
 your GitHub account and which one(s) you have on Google Code? 

 Aaron Meurer 


 On Tue, Mar 4, 2014 at 12:31 PM, Sergey B Kirpichev 
 skirp...@gmail.com javascript: wrote: 
  On Tue, Mar 04, 2014 at 10:59:40AM -0600, Aaron Meurer wrote: 
  I agree. Unless there are known major issues, we should do the final 
  import. Let me know when you want me to freeze the Google Code issues. 
  
  I think, it's important to fix contacts first.  Wery unlikely 
  if we can do this after import. 
  
   BTW, there is no references in the imported issues to 
   these people from the team: 
   https://github.com/tjl 
   https://github.com/moorepants 
   https://github.com/lidavidm 
   https://github.com/raoulb 
   https://github.com/srjoglekar246 
   Perhaps, their contacts differs for googlecode and github. 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups sympy group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an email to sympy+un...@googlegroups.com javascript:. 
  To post to this group, send email to sy...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/sympy. 
  To view this discussion on the web visit 
 https://groups.google.com/d/msgid/sympy/20140304183106.GA13901%40darkstar.order.hcn-strela.ru.
  

  For more options, visit https://groups.google.com/groups/opt_out. 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/fd62a44a-aaaf-4b05-bbf7-c4bef10fe558%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: GSOC - Improving SymPyGamma

2014-03-02 Thread David Li
Why GIF? It 

   - uses a lot of bandwidth
   - is rather low-quality
   - would have to be generated server-side, or
   - if done client-side, is completely redundant vs. canvas, SVG, WebGL, 
   or any of the other client-side technologies for animation/rendering.

What animations are you talking about?

D3 definitely supports interactivity - the current graph on Gamma is done 
with D3!

We don't want a plugin, either - nobody would install it and we don't need 
such plugins, the browser is more than capable of animation/rendering now.

David

On Saturday, March 1, 2014 9:34:48 PM UTC-7, SAHIL SHEKHAWAT wrote:

 sorry the link is actually http://rubentd.com/gifplayer/ and their github 
 repo is at https://github.com/darthrubens/gifplayer it has MIT License so 
 i guess it will not be a problem.

 On Sunday, March 2, 2014 10:02:31 AM UTC+5:30, SAHIL SHEKHAWAT wrote:

 For animation i will be using GIF plugin for jquery see 
 http://rubentd.com/gifplayer/..and i can create something which works 
 just like the CDF plugin for browser of WOLFRAMAPLHA for the interactivity 
 like changing the scale and parameters. Threee.js seems like really nice 
 idea for 3-D plotting.
 Natural Language Processing Quepy is good enough, it will parse the input 
 and them search the databases of indexes from the Documentation to find the 
 related outputs. Also, I will write codes which will separate expression 
 and variables to be given as input for the expression.

 On Saturday, March 1, 2014 10:48:47 AM UTC+5:30, SAHIL SHEKHAWAT wrote:

 I have been working with sympygamma from last 2-3 months and would like 
 to improve it. But there are about three big issues which alone don't make 
 up to a summer's work but together they will improve sympy-gamma to a great 
 extent.
 *Plotting* is a main issue as D3.js which don't support 3-D plots and 
 it also lacks interactivity also unfortunately matplotlib only has 
 experimental support in appengine which does not support *Rasterisation*, 
 so instead of that can we include matplotlib also as a submodule?? or as a 
 workaround we need to include that experimental matplotlib support with 
 javascript that fills the *interactivity issue *which will give user 
 the  ability to change the parametes ,zoom, download as image or text.
 *Natural language queries *is also of very prime importance, i know 
 there is a separate project on parsing but i think that natural language 
 queries feature will be different for Gamma and should be done separately. 
 For this i can include TAGS in documentation and search the documentation 
 for most related output. this way even if the input is not clear it can 
 show some results which he can filter further by next thing i will include.
 *Improving the Result-Sets *should be done because the result produced 
 by gamma are limited to an extent (for example: gamma always show series 
 expansion around 0 which can be None whereas series expansion around* 
 'e'* and '*1/e' *can be of importance). I am already working on 
 downloading complete Result set as IPython notebook, see 
 https://github.com/sympy/sympy_gamma/pull/32;. i will also imporve the 
 cards by making the input of each card editable. 
 The list of such small improvements is endless which together will make 
 sympy gamma awesome.
 Please suggest what you think?



-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/59b5e347-30e9-451c-ae56-06d7783242c6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: GSOC - Improving SymPyGamma

2014-03-01 Thread David Li
The only way to use matplotlib on App Engine is through whatever Google 
provides. There isn't much documentation on what it's capable of, so you'd 
have to look into that.

For 3D plots I would suggest something using Three.js, like what Mathics 
has.

For natural language: I found QuePy, which seems very interesting if we can 
make it work on App Engine (it requires NLTK) and adapt it to our needs.

The documentation generated by Sphinx already includes an index, you'd just 
need to parse that index. (Tagging every part of SymPy's documentation 
seems like a bad idea.)

About the series: SymPy and Gamma are correct. Look at the documentation; 
SymPy's definition of a series differs from what you expect. 
http://docs.sympy.org/latest/modules/core.html?highlight=series#sympy.core.expr.Expr.series

Adding more results is always a nice improvement.

David

On Friday, February 28, 2014 10:18:47 PM UTC-7, SAHIL SHEKHAWAT wrote:

 I have been working with sympygamma from last 2-3 months and would like to 
 improve it. But there are about three big issues which alone don't make up 
 to a summer's work but together they will improve sympy-gamma to a great 
 extent.
 *Plotting* is a main issue as D3.js which don't support 3-D plots and it 
 also lacks interactivity also unfortunately matplotlib only has 
 experimental support in appengine which does not support *Rasterisation*, 
 so instead of that can we include matplotlib also as a submodule?? or as a 
 workaround we need to include that experimental matplotlib support with 
 javascript that fills the *interactivity issue *which will give user the 
  ability to change the parametes ,zoom, download as image or text.
 *Natural language queries *is also of very prime importance, i know there 
 is a separate project on parsing but i think that natural language queries 
 feature will be different for Gamma and should be done separately. For this 
 i can include TAGS in documentation and search the documentation for most 
 related output. this way even if the input is not clear it can show some 
 results which he can filter further by next thing i will include.
 *Improving the Result-Sets *should be done because the result produced by 
 gamma are limited to an extent (for example: gamma always show series 
 expansion around 0 which can be None whereas series expansion around* 'e'*and 
 '*1/e' 
 *can be of importance). I am already working on downloading complete 
 Result set as IPython notebook, see 
 https://github.com/sympy/sympy_gamma/pull/32;. i will also imporve the 
 cards by making the input of each card editable. 
 The list of such small improvements is endless which together will make 
 sympy gamma awesome.
 Please suggest what you think?


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/9c5e9f7c-1454-4960-a93b-cf681b4cac04%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread David Li
Hey Sahil,

If I understand correctly, you want the MathJax output to appear correctly 
to the user on the page (e.g. so that it is copy-pastable into a LaTeX 
document)? Django has 'filters' to control if/how the content is escaped in 
the template. For instance, you might have '{{ my_variable|safe }}' to tell 
Django not to escape/sanitize the output in any way, or '{{ my_variable | 
escape }}' to tell Django to HTML-escape (e.g.  becomes amp;) the 
variable.

David

On Friday, February 14, 2014 4:20:30 PM UTC-7, SAHIL SHEKHAWAT wrote:

 please help me out!
 i am passing mathjax generated from result set of sympy_gamma as json to 
 template of django which include escape sequences and i want python( or 
 django) to interpret it but json.dumps return a string so it is getting 
 passed as it is. ( e.g. double backslash instead of single one)
 If passed as variable it is rendered correctly but as json it doesn't.
 have two ways but they are not very efficient and i have doubts with both.
 1) replace the double backslash with single. ( but '\n' can also come and 
 its is not predictable but all cases can be included and 
 my_string.replace('','\\') is not working)
 2) passing the values as variables and then after rendering adding them as 
 strings.( but we want double quotes instead of single so have to dump to 
 json in JS somehow)
 thanks




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: GSOC Idea : Sympy live android app

2014-02-14 Thread David Li
A Python interpreter can definitely be run in a native Android app. See 
SL4Ahttps://github.com/damonkohler/sl4a, 
for instance; I believe the project even has code to include in an app that 
will set up a Python interpreter for use. There are some other 
(closed-source?) apps floating around that run SymPy on Android using this 
approach.

If the Android app is to be web-based, how would it differ from the SymPy 
Live mobile website?

David

On Friday, February 14, 2014 3:29:39 AM UTC-7, Varun Sharma wrote:

 Hi,
 I would like to suggest a very interesting gsoc idea : A web based 
 sympy-live android application. It will send the post requests to sympy web 
 server and the response will be printed as result of the query. The layout 
 of the app will be exactly like a python console (like we have on sympy web 
 application). I think it will help sympy to be accessible to a lot more 
 users.
 I have started working on the prototype of the this app. Firstly, i was 
 considering a native android app but i am not sure whether it is possible 
 to run nginx and python interpreter in android app. I need some suggestions 
 from the community on this.

 Thanks
 Varun


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: Ipython Notebook in Sympy_Gamma

2014-02-14 Thread David Li
What about 
.decode('string_escape')? 
http://stackoverflow.com/questions/1885181/how-do-i-un-escape-a-backslash-escaped-string-in-python

David

On Friday, February 14, 2014 4:53:48 PM UTC-7, SAHIL SHEKHAWAT wrote:

 I have already used escape filter but it only escapes ,,..etc but not 
 backslash..
 due to escape filter i was able to get the html string to be displayed 
 into my json output...but now i want to remove all the escaping(extra) 
 backslashes..

 On Saturday, February 15, 2014 4:50:30 AM UTC+5:30, SAHIL SHEKHAWAT wrote:

 please help me out!
 i am passing mathjax generated from result set of sympy_gamma as json to 
 template of django which include escape sequences and i want python( or 
 django) to interpret it but json.dumps return a string so it is getting 
 passed as it is. ( e.g. double backslash instead of single one)
 If passed as variable it is rendered correctly but as json it doesn't.
 have two ways but they are not very efficient and i have doubts with both.
 1) replace the double backslash with single. ( but '\n' can also come and 
 its is not predictable but all cases can be included and 
 my_string.replace('','\\') is not working)
 2) passing the values as variables and then after rendering adding them 
 as strings.( but we want double quotes instead of single so have to dump to 
 json in JS somehow)
 thanks




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: problem in django while implementing ipython notebook to sympy_gamma

2014-02-05 Thread David Li
First off, having your code in a pull request would be extremely helpful.

The problems with '%number' are due to URL encoding, you'll have to 
decode the data in app.views.json_creator (not a Django problem, this is a 
feature of URLs) or use base64 as Ondrej suggests (you would still need to 
encode/decode in that case).

You could also use Github's Gist API http://developer.github.com/v3/gists/ 
and 
store the notebook JSON there, then redirect to nbviewer with that URL.

David

On Monday, February 3, 2014 8:32:51 AM UTC-7, SAHIL SHEKHAWAT wrote:

 hey friends,
 for some time now i have been working on implementing ipython notebook to 
 sympy_gamma.the main problem of ipython's json format is solved but i have 
 problem in using django!! please suggest!

 I am using the 'r' variable from the views.input view and rendering json 
 after parsing it to another url after the user click on the notebook's link 
 which then redirect to nbviewer
 But as both views.input and json creator are both different views i am 
 having difficulty passing the variable between them. i have passed the 
 result from the result.html template using 
   
   a href={% url app.views.json_creator %}?result={{ 
 result|safe }}

 to json_creator. it is working ( to some extend) but it is getting passed 
 in some weird format...this dictionary which is getting passed is full of 
 %some number and \\ something like mathjax when the view is 
 receiving. and thus my view is not able to parse it because it is not a 
 python dictionary anymore..it will be nice if some django developer could 
 suggest somethings.
 besides using GET request i know that i can create an invisible form and 
 get the 'r' from POST or i can use app engine datastore..
 with datastore it is very easy but storing and deleting datastore is not 
 free on app engine so i am preferring GET method else..
 Furthermore, i know that maximum length if url is somewhere around 2000 
 characters but i dont think that json could be larger than that so thats 
 why i think this method is appropriate..
 Thanks.


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sympy] Sympy gamma on hacker news

2014-01-29 Thread David Li
We were posted on 
r/pythonhttp://www.reddit.com/r/Python/comments/1whmjy/sympy_gamma_an_opensource_pythonbased_alternative/as
 well, and now we've reached our quota.

David

On Wednesday, January 29, 2014 6:05:01 PM UTC-7, Aaron Meurer wrote:

 Thanks for the heads up. We'll have to check the logs later to see if 
 it resulted in any noticeable spike. 

 Aaron Meurer 

 On Wed, Jan 29, 2014 at 3:19 PM,  hac...@gmail.com javascript: wrote: 
  Just a heads up: sympy gamma is on the front page if hacker news right 
 now: https://news.ycombinator.com/item?id=7145219 
  
  If some of the core devs are available to respond to some comments 
 there, it might be a visibility boost for the project and obviously for 
 sympy by association. 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups sympy group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an email to sympy+un...@googlegroups.com javascript:. 
  To post to this group, send email to sy...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/sympy. 
  For more options, visit https://groups.google.com/groups/opt_out. 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sympy] Sympy gamma on hacker news

2014-01-29 Thread David Li
It is, but we hit the cap on daily cost.

David
On Jan 29, 2014 9:52 PM, Aaron Meurer asmeu...@gmail.com wrote:

 I didn't realize it wasn't on a paid plan. I'll talk to Ondřej.

 Aaron Meurer


 On Jan 29, 2014, at 9:06 PM, David Li li.david...@gmail.com wrote:

 We were posted on 
 r/pythonhttp://www.reddit.com/r/Python/comments/1whmjy/sympy_gamma_an_opensource_pythonbased_alternative/as
  well, and now we've reached our quota.

 David

 On Wednesday, January 29, 2014 6:05:01 PM UTC-7, Aaron Meurer wrote:

 Thanks for the heads up. We'll have to check the logs later to see if
 it resulted in any noticeable spike.

 Aaron Meurer

 On Wed, Jan 29, 2014 at 3:19 PM,  hac...@gmail.com wrote:
  Just a heads up: sympy gamma is on the front page if hacker news right
 now: https://news.ycombinator.com/item?id=7145219
 
  If some of the core devs are available to respond to some comments
 there, it might be a visibility boost for the project and obviously for
 sympy by association.
 
  --
  You received this message because you are subscribed to the Google
 Groups sympy group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to sympy+un...@googlegroups.com.
  To post to this group, send email to sy...@googlegroups.com.
  Visit this group at http://groups.google.com/group/sympy.
  For more options, visit https://groups.google.com/groups/opt_out.

  --
 You received this message because you are subscribed to the Google Groups
 sympy group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to sympy+unsubscr...@googlegroups.com.
 To post to this group, send email to sympy@googlegroups.com.
 Visit this group at http://groups.google.com/group/sympy.
 For more options, visit https://groups.google.com/groups/opt_out.

  --
 You received this message because you are subscribed to a topic in the
 Google Groups sympy group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/sympy/jTbnoMx262Y/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 sympy+unsubscr...@googlegroups.com.
 To post to this group, send email to sympy@googlegroups.com.
 Visit this group at http://groups.google.com/group/sympy.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sympy] Re: sympy gamma

2014-01-17 Thread David Li
Gamma uses its own plotting code based on d3.js, which is all rendered 
client-side and does not support all types of plots (particularly 3D 
plots). Matplotlib would allow us to support that in Gamma. We wouldn't 
necessarily be writing code using matplotlib, but instead trying to get 
matplotlib working with SymPy on App Engine and then rendering and sending 
a graph to the browser. For that matter, console access isn't exactly 
available on App Engine, so the user wouldn't be able to interact with the 
plot without additional code...

David

On Friday, January 17, 2014 7:35:55 PM UTC-7, Nitin Agarwal wrote:

 Since you mentioned to make use of mathplotlib from 
 https://developers.google.com/appengine/docs/python/tools/libraries27 but 
 here its been mentioned that its a library used for 2D plotting. After 
 going though the plotting documentation of sympy, its been mentioned that 
 mathplotlib is alreadly been used and for plotting both 2D and 3D plots. 
 Link http://docs.sympy.org/latest/modules/plotting.html
 Pyglet module is being used for 2D and 3D plots that can be controlled by 
 console commands as well as keyboard and mouse.
 What else needs to be done in this plotting module for sympy and sympy 
 gamma. after working with some of the equations on sympy gamma, I can see 
 the plots being drawn for the equations.

 -- 


 *Nitin Agarwal*


 On Wed, Jan 15, 2014 at 3:30 AM, David Li li.da...@gmail.comjavascript:
  wrote:

 Google's documentation talks about the extent of support for matplotlib 
 on App Engine: 
 https://developers.google.com/appengine/docs/python/tools/libraries27. 
 You will need some way to get matplotlib working on the development server 
 included with the SDK; I believe if you search around you will find a way 
 to do this. As for the purpose of this, currently Gamma doesn't support 
 plots such as 3D plots. You could also create result types to plot 
 statistical graphs, etc. or anything that matplotlib+SymPy is capable of 
 plotting. There aren't any plans for the support, other than that it would 
 be useful; I would recommend reading the SymPy documentation and seeing 
 what kinds of objects can be plotted.

 David


 On Monday, January 13, 2014 11:49:11 PM UTC-7, Nitin Agarwal wrote:

 Hi David,

 As you had pointed out that Google App Engine, which Gamma runs on, has 
 experimental matplotlib support, which you could try to integrate into 
 Gamma. I would like to know about the google app engine experimental 
 matplotlib support. I would like to integrate into gamma. Could you specify 
 in somewhat detail. 

 Since Sympy has a lot of improvement which needs to be done, I wish to 
 discuss about the new ideas which I could start off with and integrate with 
 the Sympy gamma. We would have to besides the current features, we would 
 have to develop some new features in comparison to what wolframalpha 
 currently offers to the users.







 On Tue, Dec 31, 2013 at 11:42 PM, David Li li.da...@gmail.com wrote:

 You could look at the issues lists on Github: https://github.com/
 sympy/sympy_gamma/issues and on Google Code: https://code.google.com/
 p/sympy/issues/list?can=2q=label%3AGamma, as well as the GSoC ideas 
 list: https://github.com/sympy/sympy/wiki/GSoC-2014-Ideas. Google App 
 Engine, which Gamma runs on, has experimental matplotlib support, which 
 you 
 could try to integrate into Gamma. Additionally, you could work on 
 implementing 3D plotting, either by using a library like Three.js or 
 trying 
 to integrate what Mathics has, for instance. Parsing, which is part of 
 SymPy, could also use work (issues: https://code.google.
 com/p/sympy/issues/list?can=2q=label%3AParsing).

 As for an Android app, I it's been discussed here before. Mathstep (
 https://play.google.com/store/apps/details?id=nl.vertinode.mathstep) 
 would be an example of one that uses SymPy (but not Gamma) and runs Python 
 on Android; it's nicest feature, in my opinion, is the equation editor, 
 which could also be useful for Gamma on the web. Libraries that implement 
 this already exist (e.g. MathQuill, though we would have to be careful 
 about it's licence).

 David


 On Sunday, December 29, 2013 11:13:26 PM UTC-7, SAHIL SHEKHAWAT wrote:

 @Aaron Meurer : Can you please give me an idea about what the 
 community wants  in sympy_gamma or what are the future plans.

 On Sunday, December 29, 2013 2:46:33 PM UTC+5:30, SAHIL SHEKHAWAT 
 wrote:

 Hi guys!
 I am new to the sympy community but i really like the idea of sympy 
 gamma.
 I think its really cool to develop something similar to wolfram alpha 
 but because i am new i want
 to know what are the future plans of the community for this project.
 Its true that i dont have much experience but i am really excited and 
 i think i can develop it further.
 please also give your advice about an android app for sympy gamma 
 which will be really awesome against the paid app
 of wolframalpha.

  -- 
 You received this message because you

Re: [sympy] Re: sympy gamma

2014-01-17 Thread David Li
A console wouldn't be appropriate for Gamma, I just wanted to point out
that the interactivity currently present with SymPy plots wouldn't work by
default on App Engine.

You would need to get matplotlib working on the development server, then
create a new card for matplotlib plots that renders the plot, serializes it
to PNG or some image format, and then sends that as the result. You will
likely want to look through logic.py and resultsets.py to get a sense of
how Gamma works. If you have any specific questions, feel free to ask me.

David
On Jan 17, 2014 7:44 PM, Nitin Agarwal nitinagarwal3...@gmail.com wrote:

 Right, console access is not available for the user to interact with the
 plot. In the sympy documentation it's been mentioned that the plotting
 module supports both 2D and 3D plots.
 http://docs.sympy.org/latest/modules/plotting.html

 Also what type of console would you like to have and how to start working
 on this to get this done.




 On Sat, Jan 18, 2014 at 7:39 AM, David Li li.david...@gmail.com wrote:

 Gamma uses its own plotting code based on d3.js, which is all rendered
 client-side and does not support all types of plots (particularly 3D
 plots). Matplotlib would allow us to support that in Gamma. We wouldn't
 necessarily be writing code using matplotlib, but instead trying to get
 matplotlib working with SymPy on App Engine and then rendering and sending
 a graph to the browser. For that matter, console access isn't exactly
 available on App Engine, so the user wouldn't be able to interact with the
 plot without additional code...

 David


 On Friday, January 17, 2014 7:35:55 PM UTC-7, Nitin Agarwal wrote:

 Since you mentioned to make use of mathplotlib from
 https://developers.google.com/appengine/docs/python/tools/libraries27but 
 here its been mentioned that its a library used for 2D plotting. After
 going though the plotting documentation of sympy, its been mentioned that
 mathplotlib is alreadly been used and for plotting both 2D and 3D plots.
 Link http://docs.sympy.org/latest/modules/plotting.html
 Pyglet module is being used for 2D and 3D plots that can be controlled
 by console commands as well as keyboard and mouse.
 What else needs to be done in this plotting module for sympy and sympy
 gamma. after working with some of the equations on sympy gamma, I can see
 the plots being drawn for the equations.

 --


 *Nitin Agarwal*


 On Wed, Jan 15, 2014 at 3:30 AM, David Li li.da...@gmail.com wrote:

 Google's documentation talks about the extent of support for matplotlib
 on App Engine: https://developers.google.com/appengine/docs/
 python/tools/libraries27. You will need some way to get matplotlib
 working on the development server included with the SDK; I believe if you
 search around you will find a way to do this. As for the purpose of this,
 currently Gamma doesn't support plots such as 3D plots. You could also
 create result types to plot statistical graphs, etc. or anything that
 matplotlib+SymPy is capable of plotting. There aren't any plans for the
 support, other than that it would be useful; I would recommend reading the
 SymPy documentation and seeing what kinds of objects can be plotted.

 David


 On Monday, January 13, 2014 11:49:11 PM UTC-7, Nitin Agarwal wrote:

 Hi David,

 As you had pointed out that Google App Engine, which Gamma runs on,
 has experimental matplotlib support, which you could try to integrate into
 Gamma. I would like to know about the google app engine experimental
 matplotlib support. I would like to integrate into gamma. Could you 
 specify
 in somewhat detail.

 Since Sympy has a lot of improvement which needs to be done, I wish to
 discuss about the new ideas which I could start off with and integrate 
 with
 the Sympy gamma. We would have to besides the current features, we would
 have to develop some new features in comparison to what wolframalpha
 currently offers to the users.







 On Tue, Dec 31, 2013 at 11:42 PM, David Li li.da...@gmail.com wrote:

 You could look at the issues lists on Github: https://github.com/sym
 py/sympy_gamma/issues and on Google Code: https://code.google.com/
 p/sympy/issues/list?can=2q=label%3AGamma, as well as the GSoC ideas
 list: https://github.com/sympy/sympy/wiki/GSoC-2014-Ideas. Google
 App Engine, which Gamma runs on, has experimental matplotlib support, 
 which
 you could try to integrate into Gamma. Additionally, you could work on
 implementing 3D plotting, either by using a library like Three.js or 
 trying
 to integrate what Mathics has, for instance. Parsing, which is part of
 SymPy, could also use work (issues: https://code.google.c
 om/p/sympy/issues/list?can=2q=label%3AParsing).

 As for an Android app, I it's been discussed here before. Mathstep (
 https://play.google.com/store/apps/details?id=nl.vertinode.mathstep)
 would be an example of one that uses SymPy (but not Gamma) and runs 
 Python
 on Android; it's nicest feature, in my opinion, is the equation editor,
 which could also

Re: [sympy] Re: sympy gamma

2014-01-17 Thread David Li
This is not matplotlib, this is d3.js as I mentioned. For an example of
what doesn't work, try x^2 - y^2.
On Jan 17, 2014 8:02 PM, Nitin Agarwal nitinagarwal3...@gmail.com wrote:

 So if I consider the plot of log(x) on Sympy gamma ie.
 http://www.sympygamma.com/input/?i=log%28x%29 then how is this working.
 Its also using mathplotlib. Am I right?  If mathplotlib is not working on
 the development server, how the plotting is being done currently.

 I had seen the logic.py and resultsets.py, got some idea and the working
 of Sympy Gamma.

 I would like to know some example of 2D and 3D which is not working.


 On Sat, Jan 18, 2014 at 7:51 AM, David Li li.david...@gmail.com wrote:

 A console wouldn't be appropriate for Gamma, I just wanted to point out
 that the interactivity currently present with SymPy plots wouldn't work by
 default on App Engine.

 You would need to get matplotlib working on the development server, then
 create a new card for matplotlib plots that renders the plot, serializes it
 to PNG or some image format, and then sends that as the result. You will
 likely want to look through logic.py and resultsets.py to get a sense of
 how Gamma works. If you have any specific questions, feel free to ask me.

 David
 On Jan 17, 2014 7:44 PM, Nitin Agarwal nitinagarwal3...@gmail.com
 wrote:

 Right, console access is not available for the user to interact with the
 plot. In the sympy documentation it's been mentioned that the plotting
 module supports both 2D and 3D plots.
 http://docs.sympy.org/latest/modules/plotting.html

 Also what type of console would you like to have and how to start
 working on this to get this done.




 On Sat, Jan 18, 2014 at 7:39 AM, David Li li.david...@gmail.com wrote:

 Gamma uses its own plotting code based on d3.js, which is all rendered
 client-side and does not support all types of plots (particularly 3D
 plots). Matplotlib would allow us to support that in Gamma. We wouldn't
 necessarily be writing code using matplotlib, but instead trying to get
 matplotlib working with SymPy on App Engine and then rendering and sending
 a graph to the browser. For that matter, console access isn't exactly
 available on App Engine, so the user wouldn't be able to interact with the
 plot without additional code...

 David


 On Friday, January 17, 2014 7:35:55 PM UTC-7, Nitin Agarwal wrote:

 Since you mentioned to make use of mathplotlib from
 https://developers.google.com/appengine/docs/python/tools/libraries27but 
 here its been mentioned that its a library used for 2D plotting. After
 going though the plotting documentation of sympy, its been mentioned that
 mathplotlib is alreadly been used and for plotting both 2D and 3D plots.
 Link http://docs.sympy.org/latest/modules/plotting.html
 Pyglet module is being used for 2D and 3D plots that can be controlled
 by console commands as well as keyboard and mouse.
 What else needs to be done in this plotting module for sympy and sympy
 gamma. after working with some of the equations on sympy gamma, I can see
 the plots being drawn for the equations.

 --


 *Nitin Agarwal*


 On Wed, Jan 15, 2014 at 3:30 AM, David Li li.da...@gmail.com wrote:

 Google's documentation talks about the extent of support for
 matplotlib on App Engine: https://developers.
 google.com/appengine/docs/python/tools/libraries27. You will need
 some way to get matplotlib working on the development server included 
 with
 the SDK; I believe if you search around you will find a way to do this. 
 As
 for the purpose of this, currently Gamma doesn't support plots such as 3D
 plots. You could also create result types to plot statistical graphs, 
 etc.
 or anything that matplotlib+SymPy is capable of plotting. There aren't 
 any
 plans for the support, other than that it would be useful; I would
 recommend reading the SymPy documentation and seeing what kinds of 
 objects
 can be plotted.

 David


 On Monday, January 13, 2014 11:49:11 PM UTC-7, Nitin Agarwal wrote:

 Hi David,

 As you had pointed out that Google App Engine, which Gamma runs on,
 has experimental matplotlib support, which you could try to integrate 
 into
 Gamma. I would like to know about the google app engine experimental
 matplotlib support. I would like to integrate into gamma. Could you 
 specify
 in somewhat detail.

 Since Sympy has a lot of improvement which needs to be done, I wish
 to discuss about the new ideas which I could start off with and 
 integrate
 with the Sympy gamma. We would have to besides the current features, we
 would have to develop some new features in comparison to what 
 wolframalpha
 currently offers to the users.







 On Tue, Dec 31, 2013 at 11:42 PM, David Li li.da...@gmail.comwrote:

 You could look at the issues lists on Github: https://github.com/
 sympy/sympy_gamma/issues and on Google Code:
 https://code.google.com/p/sympy/issues/list?can=2q=label%3AGamma,
 as well as the GSoC ideas list: https://github.com/sympy
 /sympy/wiki/GSoC-2014-Ideas. Google App

Re: [sympy] Re: sympy gamma

2014-01-17 Thread David Li
On Jan 17, 2014 8:10 PM, Nitin Agarwal nitinagarwal3...@gmail.com wrote:

 Does d3.js plots both 2D and 3D plots as mentioned in the tutorial.
http://docs.sympy.org/latest/modules/plotting.html#module-sympy.plotting.pygletplot

No. D3 is completely separate from SymPy, the  documentation for SymPy does
not apply to Gamma's plotting at all.


 Also its been mentioned in the documentation that Presently the plots
are rendered using matplotlib as a backend.

Again, this is only true for SymPy and not for Gamma.


 So let me try to make mathplotlib working on the server app engine.

 One query about mathplotlib. Since previously you had mentioned that
d3.js, which is all rendered client-side and does not support all types of
plots (particularly 3D plots) and trying to get matplotlib working with
SymPy on App Engine will help us in getting the 3D plots.

Sorry, but I don't see the question here, could you clarify?




 On Sat, Jan 18, 2014 at 8:03 AM, David Li li.david...@gmail.com wrote:

 This is not matplotlib, this is d3.js as I mentioned. For an example of
what doesn't work, try x^2 - y^2.

 On Jan 17, 2014 8:02 PM, Nitin Agarwal nitinagarwal3...@gmail.com
wrote:

 So if I consider the plot of log(x) on Sympy gamma ie.
http://www.sympygamma.com/input/?i=log%28x%29 then how is this working. Its
also using mathplotlib. Am I right?  If mathplotlib is not working on the
development server, how the plotting is being done currently.

 I had seen the logic.py and resultsets.py, got some idea and the
working of Sympy Gamma.

 I would like to know some example of 2D and 3D which is not working.


 On Sat, Jan 18, 2014 at 7:51 AM, David Li li.david...@gmail.com wrote:

 A console wouldn't be appropriate for Gamma, I just wanted to point
out that the interactivity currently present with SymPy plots wouldn't work
by default on App Engine.

 You would need to get matplotlib working on the development server,
then create a new card for matplotlib plots that renders the plot,
serializes it to PNG or some image format, and then sends that as the
result. You will likely want to look through logic.py and resultsets.py to
get a sense of how Gamma works. If you have any specific questions, feel
free to ask me.

 David

 On Jan 17, 2014 7:44 PM, Nitin Agarwal nitinagarwal3...@gmail.com
wrote:

 Right, console access is not available for the user to interact with
the plot. In the sympy documentation it's been mentioned that the plotting
module supports both 2D and 3D plots.
http://docs.sympy.org/latest/modules/plotting.html

 Also what type of console would you like to have and how to start
working on this to get this done.




 On Sat, Jan 18, 2014 at 7:39 AM, David Li li.david...@gmail.com
wrote:

 Gamma uses its own plotting code based on d3.js, which is all
rendered client-side and does not support all types of plots (particularly
3D plots). Matplotlib would allow us to support that in Gamma. We wouldn't
necessarily be writing code using matplotlib, but instead trying to get
matplotlib working with SymPy on App Engine and then rendering and sending
a graph to the browser. For that matter, console access isn't exactly
available on App Engine, so the user wouldn't be able to interact with the
plot without additional code...

 David


 On Friday, January 17, 2014 7:35:55 PM UTC-7, Nitin Agarwal wrote:

 Since you mentioned to make use of mathplotlib from
https://developers.google.com/appengine/docs/python/tools/libraries27 but
here its been mentioned that its a library used for 2D plotting. After
going though the plotting documentation of sympy, its been mentioned that
mathplotlib is alreadly been used and for plotting both 2D and 3D plots.
Link http://docs.sympy.org/latest/modules/plotting.html
 Pyglet module is being used for 2D and 3D plots that can be
controlled by console commands as well as keyboard and mouse.
 What else needs to be done in this plotting module for sympy and
sympy gamma. after working with some of the equations on sympy gamma, I can
see the plots being drawn for the equations.

 --

 Nitin Agarwal


 On Wed, Jan 15, 2014 at 3:30 AM, David Li li.da...@gmail.com
wrote:

 Google's documentation talks about the extent of support for
matplotlib on App Engine:
https://developers.google.com/appengine/docs/python/tools/libraries27. You
will need some way to get matplotlib working on the development server
included with the SDK; I believe if you search around you will find a way
to do this. As for the purpose of this, currently Gamma doesn't support
plots such as 3D plots. You could also create result types to plot
statistical graphs, etc. or anything that matplotlib+SymPy is capable of
plotting. There aren't any plans for the support, other than that it would
be useful; I would recommend reading the SymPy documentation and seeing
what kinds of objects can be plotted.

 David


 On Monday, January 13, 2014 11:49:11 PM UTC-7, Nitin Agarwal wrote:

 Hi David,

 As you had pointed out that Google App Engine, which

Re: [sympy] Re: sympy gamma

2014-01-17 Thread David Li
That would be the question you're answering :) It should work, but you'll
have to figure out how to properly configure matplotlib for App Engine and
how to serialize the plot.
On Jan 17, 2014 8:37 PM, Nitin Agarwal nitinagarwal3...@gmail.com wrote:

 Question here is after getting mathplotlib working on the app engine,
 Whether we would be able to draw 3D plots or not?


 On Sat, Jan 18, 2014 at 8:34 AM, David Li li.david...@gmail.com wrote:


 On Jan 17, 2014 8:10 PM, Nitin Agarwal nitinagarwal3...@gmail.com
 wrote:
 
  Does d3.js plots both 2D and 3D plots as mentioned in the tutorial.
 http://docs.sympy.org/latest/modules/plotting.html#module-sympy.plotting.pygletplot

 No. D3 is completely separate from SymPy, the  documentation for SymPy
 does not apply to Gamma's plotting at all.

 
  Also its been mentioned in the documentation that Presently the plots
 are rendered using matplotlib as a backend.

 Again, this is only true for SymPy and not for Gamma.

 
  So let me try to make mathplotlib working on the server app engine.
 
  One query about mathplotlib. Since previously you had mentioned that
 d3.js, which is all rendered client-side and does not support all types of
 plots (particularly 3D plots) and trying to get matplotlib working with
 SymPy on App Engine will help us in getting the 3D plots.

 Sorry, but I don't see the question here, could you clarify?

 
 
 
  On Sat, Jan 18, 2014 at 8:03 AM, David Li li.david...@gmail.com
 wrote:
 
  This is not matplotlib, this is d3.js as I mentioned. For an example
 of what doesn't work, try x^2 - y^2.
 
  On Jan 17, 2014 8:02 PM, Nitin Agarwal nitinagarwal3...@gmail.com
 wrote:
 
  So if I consider the plot of log(x) on Sympy gamma ie.
 http://www.sympygamma.com/input/?i=log%28x%29 then how is this working.
 Its also using mathplotlib. Am I right?  If mathplotlib is not working on
 the development server, how the plotting is being done currently.
 
  I had seen the logic.py and resultsets.py, got some idea and the
 working of Sympy Gamma.
 
  I would like to know some example of 2D and 3D which is not working.
 
 
  On Sat, Jan 18, 2014 at 7:51 AM, David Li li.david...@gmail.com
 wrote:
 
  A console wouldn't be appropriate for Gamma, I just wanted to point
 out that the interactivity currently present with SymPy plots wouldn't work
 by default on App Engine.
 
  You would need to get matplotlib working on the development server,
 then create a new card for matplotlib plots that renders the plot,
 serializes it to PNG or some image format, and then sends that as the
 result. You will likely want to look through logic.py and resultsets.py to
 get a sense of how Gamma works. If you have any specific questions, feel
 free to ask me.
 
  David
 
  On Jan 17, 2014 7:44 PM, Nitin Agarwal nitinagarwal3...@gmail.com
 wrote:
 
  Right, console access is not available for the user to interact
 with the plot. In the sympy documentation it's been mentioned that the
 plotting module supports both 2D and 3D plots.
 http://docs.sympy.org/latest/modules/plotting.html
 
  Also what type of console would you like to have and how to start
 working on this to get this done.
 
 
 
 
  On Sat, Jan 18, 2014 at 7:39 AM, David Li li.david...@gmail.com
 wrote:
 
  Gamma uses its own plotting code based on d3.js, which is all
 rendered client-side and does not support all types of plots (particularly
 3D plots). Matplotlib would allow us to support that in Gamma. We wouldn't
 necessarily be writing code using matplotlib, but instead trying to get
 matplotlib working with SymPy on App Engine and then rendering and sending
 a graph to the browser. For that matter, console access isn't exactly
 available on App Engine, so the user wouldn't be able to interact with the
 plot without additional code...
 
  David
 
 
  On Friday, January 17, 2014 7:35:55 PM UTC-7, Nitin Agarwal wrote:
 
  Since you mentioned to make use of mathplotlib from
 https://developers.google.com/appengine/docs/python/tools/libraries27but 
 here its been mentioned that its a library used for 2D plotting. After
 going though the plotting documentation of sympy, its been mentioned that
 mathplotlib is alreadly been used and for plotting both 2D and 3D plots.
 Link http://docs.sympy.org/latest/modules/plotting.html
  Pyglet module is being used for 2D and 3D plots that can be
 controlled by console commands as well as keyboard and mouse.
  What else needs to be done in this plotting module for sympy and
 sympy gamma. after working with some of the equations on sympy gamma, I can
 see the plots being drawn for the equations.
 
  --
 
  Nitin Agarwal
 
 
  On Wed, Jan 15, 2014 at 3:30 AM, David Li li.da...@gmail.com
 wrote:
 
  Google's documentation talks about the extent of support for
 matplotlib on App Engine:
 https://developers.google.com/appengine/docs/python/tools/libraries27.
 You will need some way to get matplotlib working on the development server
 included with the SDK; I believe if you search around

Re: [sympy] Re: sympy gamma

2014-01-17 Thread David Li
App Engine is on 1.2, so I don't think WebAgg is supported yet,
unfortunately.
On Jan 17, 2014 9:32 PM, Aaron Meurer asmeu...@gmail.com wrote:

 How new is the matplotlib on the App Engine? Does it have the new webagg
 stuff?

 Aaron Meurer

 On Fri, Jan 17, 2014 at 9:42 PM, David Li li.david...@gmail.com wrote:
  That would be the question you're answering :) It should work, but you'll
  have to figure out how to properly configure matplotlib for App Engine
 and
  how to serialize the plot.
 
  On Jan 17, 2014 8:37 PM, Nitin Agarwal nitinagarwal3...@gmail.com
 wrote:
 
  Question here is after getting mathplotlib working on the app engine,
  Whether we would be able to draw 3D plots or not?
 
 
  On Sat, Jan 18, 2014 at 8:34 AM, David Li li.david...@gmail.com
 wrote:
 
 
  On Jan 17, 2014 8:10 PM, Nitin Agarwal nitinagarwal3...@gmail.com
  wrote:
  
   Does d3.js plots both 2D and 3D plots as mentioned in the tutorial.
  
 http://docs.sympy.org/latest/modules/plotting.html#module-sympy.plotting.pygletplot
 
  No. D3 is completely separate from SymPy, the  documentation for SymPy
  does not apply to Gamma's plotting at all.
 
  
   Also its been mentioned in the documentation that Presently the
 plots
   are rendered using matplotlib as a backend.
 
  Again, this is only true for SymPy and not for Gamma.
 
  
   So let me try to make mathplotlib working on the server app engine.
  
   One query about mathplotlib. Since previously you had mentioned that
   d3.js, which is all rendered client-side and does not support all
 types of
   plots (particularly 3D plots) and trying to get matplotlib working
 with
   SymPy on App Engine will help us in getting the 3D plots.
 
  Sorry, but I don't see the question here, could you clarify?
 
  
  
  
   On Sat, Jan 18, 2014 at 8:03 AM, David Li li.david...@gmail.com
   wrote:
  
   This is not matplotlib, this is d3.js as I mentioned. For an example
   of what doesn't work, try x^2 - y^2.
  
   On Jan 17, 2014 8:02 PM, Nitin Agarwal 
 nitinagarwal3...@gmail.com
   wrote:
  
   So if I consider the plot of log(x) on Sympy gamma ie.
   http://www.sympygamma.com/input/?i=log%28x%29 then how is this
 working. Its
   also using mathplotlib. Am I right?  If mathplotlib is not working
 on the
   development server, how the plotting is being done currently.
  
   I had seen the logic.py and resultsets.py, got some idea and the
   working of Sympy Gamma.
  
   I would like to know some example of 2D and 3D which is not
 working.
  
  
   On Sat, Jan 18, 2014 at 7:51 AM, David Li li.david...@gmail.com
   wrote:
  
   A console wouldn't be appropriate for Gamma, I just wanted to
 point
   out that the interactivity currently present with SymPy plots
 wouldn't work
   by default on App Engine.
  
   You would need to get matplotlib working on the development
 server,
   then create a new card for matplotlib plots that renders the plot,
   serializes it to PNG or some image format, and then sends that as
 the
   result. You will likely want to look through logic.py and
 resultsets.py to
   get a sense of how Gamma works. If you have any specific
 questions, feel
   free to ask me.
  
   David
  
   On Jan 17, 2014 7:44 PM, Nitin Agarwal
   nitinagarwal3...@gmail.com wrote:
  
   Right, console access is not available for the user to interact
   with the plot. In the sympy documentation it's been mentioned
 that the
   plotting module supports both 2D and 3D plots.
   http://docs.sympy.org/latest/modules/plotting.html
  
   Also what type of console would you like to have and how to start
   working on this to get this done.
  
  
  
  
   On Sat, Jan 18, 2014 at 7:39 AM, David Li li.david...@gmail.com
 
   wrote:
  
   Gamma uses its own plotting code based on d3.js, which is all
   rendered client-side and does not support all types of plots
 (particularly
   3D plots). Matplotlib would allow us to support that in Gamma.
 We wouldn't
   necessarily be writing code using matplotlib, but instead
 trying to get
   matplotlib working with SymPy on App Engine and then rendering
 and sending a
   graph to the browser. For that matter, console access isn't
 exactly
   available on App Engine, so the user wouldn't be able to
 interact with the
   plot without additional code...
  
   David
  
  
   On Friday, January 17, 2014 7:35:55 PM UTC-7, Nitin Agarwal
 wrote:
  
   Since you mentioned to make use of mathplotlib from
  
 https://developers.google.com/appengine/docs/python/tools/libraries27 but
   here its been mentioned that its a library used for 2D
 plotting. After going
   though the plotting documentation of sympy, its been mentioned
 that
   mathplotlib is alreadly been used and for plotting both 2D and
 3D plots.
   Link http://docs.sympy.org/latest/modules/plotting.html
   Pyglet module is being used for 2D and 3D plots that can be
   controlled by console commands as well as keyboard and mouse.
   What else needs to be done in this plotting module for sympy
 and
   sympy

Re: [sympy] Re: sympy gamma

2014-01-14 Thread David Li
Google's documentation talks about the extent of support for matplotlib on 
App Engine: 
https://developers.google.com/appengine/docs/python/tools/libraries27. You 
will need some way to get matplotlib working on the development server 
included with the SDK; I believe if you search around you will find a way 
to do this. As for the purpose of this, currently Gamma doesn't support 
plots such as 3D plots. You could also create result types to plot 
statistical graphs, etc. or anything that matplotlib+SymPy is capable of 
plotting. There aren't any plans for the support, other than that it would 
be useful; I would recommend reading the SymPy documentation and seeing 
what kinds of objects can be plotted.

David

On Monday, January 13, 2014 11:49:11 PM UTC-7, Nitin Agarwal wrote:

 Hi David,

 As you had pointed out that Google App Engine, which Gamma runs on, has 
 experimental matplotlib support, which you could try to integrate into 
 Gamma. I would like to know about the google app engine experimental 
 matplotlib support. I would like to integrate into gamma. Could you specify 
 in somewhat detail. 

 Since Sympy has a lot of improvement which needs to be done, I wish to 
 discuss about the new ideas which I could start off with and integrate with 
 the Sympy gamma. We would have to besides the current features, we would 
 have to develop some new features in comparison to what wolframalpha 
 currently offers to the users.







 On Tue, Dec 31, 2013 at 11:42 PM, David Li li.da...@gmail.comjavascript:
  wrote:

 You could look at the issues lists on Github: 
 https://github.com/sympy/sympy_gamma/issues and on Google Code: 
 https://code.google.com/p/sympy/issues/list?can=2q=label%3AGamma, as 
 well as the GSoC ideas list: 
 https://github.com/sympy/sympy/wiki/GSoC-2014-Ideas. Google App Engine, 
 which Gamma runs on, has experimental matplotlib support, which you could 
 try to integrate into Gamma. Additionally, you could work on implementing 
 3D plotting, either by using a library like Three.js or trying to integrate 
 what Mathics has, for instance. Parsing, which is part of SymPy, could also 
 use work (issues: 
 https://code.google.com/p/sympy/issues/list?can=2q=label%3AParsing).

 As for an Android app, I it's been discussed here before. Mathstep (
 https://play.google.com/store/apps/details?id=nl.vertinode.mathstep) 
 would be an example of one that uses SymPy (but not Gamma) and runs Python 
 on Android; it's nicest feature, in my opinion, is the equation editor, 
 which could also be useful for Gamma on the web. Libraries that implement 
 this already exist (e.g. MathQuill, though we would have to be careful 
 about it's licence).

 David


 On Sunday, December 29, 2013 11:13:26 PM UTC-7, SAHIL SHEKHAWAT wrote:

 @Aaron Meurer : Can you please give me an idea about what the community 
 wants  in sympy_gamma or what are the future plans.

 On Sunday, December 29, 2013 2:46:33 PM UTC+5:30, SAHIL SHEKHAWAT wrote:

 Hi guys!
 I am new to the sympy community but i really like the idea of sympy 
 gamma.
 I think its really cool to develop something similar to wolfram alpha 
 but because i am new i want
 to know what are the future plans of the community for this project.
 Its true that i dont have much experience but i am really excited and i 
 think i can develop it further.
 please also give your advice about an android app for sympy gamma which 
 will be really awesome against the paid app
 of wolframalpha.

  -- 
 You received this message because you are subscribed to the Google Groups 
 sympy group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to sympy+un...@googlegroups.com javascript:.
 To post to this group, send email to sy...@googlegroups.com javascript:
 .
 Visit this group at http://groups.google.com/group/sympy.
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 *Nitin Agarwal*
 Website : www.nitinagarwal.in
 Github : 
 *https://github.com/NitinAgarwal https://github.com/NitinAgarwal *IRC : 
 nitinagarwal3006

  

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sympy] Re: Convert sympy to javascript

2014-01-10 Thread David Li
I think the asm.js optimizations do make a difference when used; see a 
benchmark of a physics engine ported with Emscripten: 
http://josephg.com/blog/chipmunkjs-and-emscripten (though it's a bit 
outdated). Regardless, if Emscripten is too slow in Chrome we can fall back 
on Native Client (and actually, there's a project called pepper.js that 
compiles Native Client modules into JavaScript with Emscripten), and just 
getting it running in the browser would be a great accomplishment.

@F.B. have you managed to compile Python using Emscripten? I tried but 
could not get the interpreter working, it just hung/crashed if I tried to 
bundle the standard library and complained about site.py otherwise.

David

On Friday, January 10, 2014 6:13:38 PM UTC-7, Aaron Meurer wrote:

 On Fri, Jan 10, 2014 at 2:57 PM, F. B. franz@gmail.com javascript: 
 wrote: 
  
  On Sunday, November 17, 2013 8:04:49 PM UTC+1, David Li wrote: 
  
  There's also the more speculative ideas of using Emscripten (example: 
  http://repl.it/M4w) or Portable Native Client to compile the Python 
  interpreter to JavaScript, then using that to run SymPy. 
  
  
  I came across this project and, yes, I believe this is the right 
 solution to 
  run sympy in a browser (I didn't try but it's very promising as a 
 project). 
  
  Let me explain a bit. Emscripten is a tool to be used along with clang 
  compiler to compile C/C++ code to Javascript. The Javascript code 
 generated 
  is very strange, there are only arrays and integers as variables. That 
 kind 
  of javascript follows the ASM.js standard, and is meant to resemble a 
  low-level language such as assembler rather than a high-level language 
 such 
  as javascript. 
  
  The code is likely to run on most browser. The point is that Firefox can 
  detect when the code follows the AMS.js standard, and in such cases the 
  javascript source code is not processed by the standard javascript 
  interpreter, rather it is translated back to machine code, resulting in 
 a 
  compiled program to some degree similar to what a C/C++ compiler would 
 have 
  output. Performance is slightly less than by using a C/C++ compiler. 
  
  This fast mode is currently supported by Firefox only, other browsers 
 will 
  still run AMS.js-compliant code, but will rely on their standard 
 javascript 
  interpreter, thus being slower. Google Chrome and Opera are currently 
  working to introduce this feature into their browsers. 
  
  The point is, that it is possible to compile CPython into Javascript, so 
 as 
  to have a 100% python compatible interpreter inside the browser. The 
 link 
  pointed out by David Li (http://repl.it/M4w) is CPython running inside 
 the 
  browser as javascript code. I would recommend to use Firefox, as other 
  browsers will probably be very slow executing such an enormous amount of 
  javascript with their standard interpreters. 

 Are you sure about that? I did the following test on my Mac (Chrome 
 32.0.1700.72 beta, Firefox 26.0): 

 def sieve(n): 
 primes = range(2, n+1) 
 for i in range(2, n+1): 
 for j in primes[:]: 
 if not j % i and j != i: 
 primes.remove(j) 
 return primes 

 import time 

 t = time.time();sieve(1000);print(time.time() - t) 

 (yes I know it's inefficient; my point was just to find something that 
 did something nontrivial that took a reasonable but nontrivial amount 
 of time to complete). 

 In Chrome, I get 0.55566757; in Firefox I get 2.4737711. I 
 also tried Safai 7.0.1 (I get 4.6381144) and Opera because you 
 mentioned it (version 12.16, I get 4.4440572). 

 So maybe Chrome beta already has some of the ASM stuff in it, but 
 whatever it is, it's clearly the fastest here. 

 For reference, when I run it in IPython in my terminal I get 
 0.0159571170807. So it's still 30 times slower. 

 Aaron Meurer 

  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  sympy group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to sympy+un...@googlegroups.com javascript:. 
  To post to this group, send email to sy...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/sympy. 
  For more options, visit https://groups.google.com/groups/opt_out. 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


[sympy] Re: sympy gamma

2013-12-31 Thread David Li
You could look at the issues lists on Github: 
https://github.com/sympy/sympy_gamma/issues and on Google Code: 
https://code.google.com/p/sympy/issues/list?can=2q=label%3AGamma, as well 
as the GSoC ideas list: https://github.com/sympy/sympy/wiki/GSoC-2014-Ideas. 
Google App Engine, which Gamma runs on, has experimental matplotlib 
support, which you could try to integrate into Gamma. Additionally, you 
could work on implementing 3D plotting, either by using a library like 
Three.js or trying to integrate what Mathics has, for instance. Parsing, 
which is part of SymPy, could also use work (issues: 
https://code.google.com/p/sympy/issues/list?can=2q=label%3AParsing).

As for an Android app, I it's been discussed here before. Mathstep (
https://play.google.com/store/apps/details?id=nl.vertinode.mathstep) would 
be an example of one that uses SymPy (but not Gamma) and runs Python on 
Android; it's nicest feature, in my opinion, is the equation editor, which 
could also be useful for Gamma on the web. Libraries that implement this 
already exist (e.g. MathQuill, though we would have to be careful about 
it's licence).

David

On Sunday, December 29, 2013 11:13:26 PM UTC-7, SAHIL SHEKHAWAT wrote:

 @Aaron Meurer : Can you please give me an idea about what the community 
 wants  in sympy_gamma or what are the future plans.

 On Sunday, December 29, 2013 2:46:33 PM UTC+5:30, SAHIL SHEKHAWAT wrote:

 Hi guys!
 I am new to the sympy community but i really like the idea of sympy gamma.
 I think its really cool to develop something similar to wolfram alpha but 
 because i am new i want
 to know what are the future plans of the community for this project.
 Its true that i dont have much experience but i am really excited and i 
 think i can develop it further.
 please also give your advice about an android app for sympy gamma which 
 will be really awesome against the paid app
 of wolframalpha.



-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sympy] Re: Convert sympy to javascript

2013-11-17 Thread David Li
There's also the more speculative ideas of using Emscripten (example: 
http://repl.it/M4w) or Portable Native Client to compile the Python 
interpreter to JavaScript, then using that to run SymPy.

David

On Wednesday, November 13, 2013 11:45:04 AM UTC-7, Aaron Meurer wrote:

 Unless there is a *complete* Python to Javascript converter, or a 
 *full* Python interpreter in JS (I know of neither, but I don't do 
 much with Javascript), I wouldn't hold out much hope. I put complete 
 and full in stars, because SymPy really uses every corner of the 
 Python language. Anything that only handles a subset probably won't be 
 able to handle the everything that SymPy uses. 

 That isn't to say it isn't possible, though. Is there some object 
 oriented stack built on top of Javascript, preferably one similar to 
 Python? If so, you may be able to convert the basic core concepts from 
 SymPy. Also take a look at https://github.com/certik/sympyx and 
 https://github.com/certik/csympy to see what more stripped down 
 versions of the core might look like.  Beyond that, the more 
 algorithms you need, the more work that's cut out for you. Building a 
 CAS is hard work. There's a reason there aren't too many of them. 

 Aaron Meurer 

 On Wed, Nov 13, 2013 at 11:10 AM, Buck Shlegeris 
 bshle...@gmail.comjavascript: 
 wrote: 
  So how much effort and time do you think it would take to make this 
  conversion work? I'd really like to use SymPy for a JS project -- 
 currently, 
  there's no Javascript CAS worth the name. If a few hours would possibly 
 be 
  able to get this to work, my team would have a go. 
  
  Buck 
  
  
  On Monday, May 13, 2013 5:16:00 AM UTC-7, dennis wrote: 
  
  I am sorry, I do not have the original / converted source code anymore. 
  
  On Monday, May 13, 2013 1:55:35 PM UTC+2, Antony Shaleynikov wrote: 
  
  Dennis, is it possible to take a look at the result you get? 
  I'm pretty interested in SymPy running at browser as well. 
  
  Antony 
  
  воскресенье, 12 мая 2013 г., 19:21:12 UTC+3 пользователь dennis 
 написал: 
  
  Hi James 
  
  I did succeed in converting sympy to javascript. I ended up having 
 some 
  of the sympy core converted and loaded in the browser without syntax 
 errors, 
  but it did not work properly. 
  
  On Friday, May 10, 2013 11:05:51 AM UTC+2, James wrote: 
  
  Hi Dennis 
  
  Sorry to revive an old thread, but I am also looking into compiling 
  sympy to javascript (also only the basic math) -  did you have 
 success? 
  
  
  On Saturday, September 24, 2011 4:48:57 PM UTC+3, dennis wrote: 
  
  You are right, I don't need to convert the whole project. What I 
 need 
  for my current project is some school math 
 (deriving/integrating/solving 
  functions like x^2, x^3-3x+2, sin(x), log(x) etc.). I don't 
 need 
  most of the other code e.g. plotting. 
  
  So before refactoring the code I should probably check which 
 modules I 
  need to convert. 
  
  I forked sympy at github (I hope that I have done that right, I 
 have 
  never worked with it before...) and created a branch sympy2js where 
 I sorted 
  out some modules like plotting/benchmark. 
  
  Then I created a file runmin.py which contains: 
  
  from sympy.core.symbol import Symbol 
  print Symbol('x') 
  
  So I now want to sort out all modules that are not needed for this 
  simple code and then try to refactor only the needed modules. 
  
  But when I for example delete the tensors folder I get some errors 
  because it is included in many other modules. How should I find out 
 which 
  modules I can delete and which not? Do you have a list of the 
 minimum 
  required modules? 
  
  I don't think that eval() is supported by pyjamas. For example 
 print 
  eval('4*4') compiles fine but gives an error at runtime in the 
 browser. 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  sympy group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to sympy+un...@googlegroups.com javascript:. 
  To post to this group, send email to sy...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/sympy. 
  
  For more options, visit https://groups.google.com/groups/opt_out. 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sympy] Docs padding

2013-07-03 Thread David Li
For hyphenation, CSS3 has experimental support and I believe there is a 
JavaScript library that can do this as well. 

Also, I think it'd be nice if the Sphinx extension could dock to the right and 
collapse the left sidebar - that way it wouldn't cover the docs. 

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy] SymPy Android app

2013-03-22 Thread David Li
Nope, it isn't stated anywhere in the app or on the website.
On Mar 21, 2013 7:23 PM, Aaron Meurer asmeu...@gmail.com wrote:

 Actually there are a handful of apps both on Android and iOS (and also
 some of the other ones) using SymPy.  We should start a wiki page
 listing them all.

 I don't have an Android phone, and BlueStacks doesn't seem to support
 OAuth Google sign-in, so I can't test this. Any idea what SymPy
 version it is using?

 Aaron Meurer

 On Thu, Mar 21, 2013 at 8:00 PM, David Li li.david...@gmail.com wrote:
  I don't know if any of the developers are aware of this (it's not
 mentioned
  on this mailing list), but it looks like someone's made an Android app
 using
  SymPy:
 
  https://play.google.com/store/apps/details?id=nl.vertinode.mathstep
  (developer says it uses SymPy at https://www.vertinode.nl/projects)
 
  The visual design of the app is really nice. It also gives hints on
 how to
  perform operations like differentiation, though it seems to only be able
 to
  give one step (and for sin(x) it says to use the chain rule?). It's
 limited
  compared to Gamma, but has a nice keyboard and is very smooth.
 Unfortunately
  it uses a server to perform actual computations. None of it seems to be
  open-source, either. I'm not sure what it uses for math rendering either.
 
  --
  You received this message because you are subscribed to the Google Groups
  sympy group.
  To unsubscribe from this group and stop receiving emails from it, send an
  email to sympy+unsubscr...@googlegroups.com.
  To post to this group, send email to sympy@googlegroups.com.
  Visit this group at http://groups.google.com/group/sympy?hl=en.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 

 --
 You received this message because you are subscribed to a topic in the
 Google Groups sympy group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/sympy/So8awjcpQq8/unsubscribe?hl=en.
 To unsubscribe from this group and all its topics, send an email to
 sympy+unsubscr...@googlegroups.com.
 To post to this group, send email to sympy@googlegroups.com.
 Visit this group at http://groups.google.com/group/sympy?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy] SymPy Android app

2013-03-22 Thread David Li
If you're interested in functionality for explanations of derivatives and
integrals, there is some code at https://github.com/sympy/sympy_gamma/pull/8.
I'm currently working on integrating the integral functionality into the
core SymPy project.
On Mar 22, 2013 11:49 AM, Alexander Overvoorde overv...@gmail.com wrote:

 Op vrijdag 22 maart 2013 18:00:57 UTC+1 schreef Aaron Meurer het volgende:


 I'm actually personally more curious what the server code looks like, as
 that's the code that actually calls SymPy.


 You can find the server code here:

 http://privatepaste.com/897af10e52

 It's fairly straight forward with some caveats, like the conversion from
 my app's expression syntax to sympy's.
 The syntax differs because I was originally working on my own CAS that
 actually provided detailed explanations.


 So the rendering is done client side?


 Yep, it's drawn with Bitmap and Canvas objects in Java.

 --
 You received this message because you are subscribed to a topic in the
 Google Groups sympy group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/sympy/So8awjcpQq8/unsubscribe?hl=en.
 To unsubscribe from this group and all its topics, send an email to
 sympy+unsubscr...@googlegroups.com.
 To post to this group, send email to sympy@googlegroups.com.
 Visit this group at http://groups.google.com/group/sympy?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sympy] SymPy Android app

2013-03-21 Thread David Li
I don't know if any of the developers are aware of this (it's not mentioned 
on this mailing list), but it looks like someone's made an Android app 
using SymPy:

https://play.google.com/store/apps/details?id=nl.vertinode.mathstep
(developer says it uses SymPy at https://www.vertinode.nl/projects)

The visual design of the app is really nice. It also gives hints on how 
to perform operations like differentiation, though it seems to only be able 
to give one step (and for sin(x) it says to use the chain rule?). It's 
limited compared to Gamma, but has a nice keyboard and is very smooth. 
Unfortunately it uses a server to perform actual computations. None of it 
seems to be open-source, either. I'm not sure what it uses for math 
rendering either.

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-16 Thread David Li
Okay, I'll start on that once I manage to get the integration algorithm to 
handle most problems that a high-school/freshman college student would 
encounter. (Currently it won't handle any trig integrands involving more 
than a u-substitution, and does not use integration by parts.)

Perhaps the derivative implementation doesn't need to be in SymPy? I 
haven't seen a case yet where it provides a better result (usually it is 
less simplified, especially when trigonometry is involved). 

On Saturday, March 16, 2013 7:57:12 PM UTC-7, Aaron Meurer wrote:

 This is something SymPy wants. It's even on the GSoC ideas list. 

 I would put the integration stuff in the integration module. As I 
 pointed out on the pull request, what you really have here is a new 
 integration heuristic, which can (should) be integrated with 
 integrate() itself.  It is already giving better results than 
 integrate() for some integrals (namely the one you posted as your 
 example). 

 The diff code I'm not sure. I guess it could go in the same file for 
 now. If you derive the rules automatically, then the code will be 
 short (it will only consist of special cases like Add and Mul). 

 In general, there are a lot of things that this could be applied to 
 beyond diff() and integrate(): solve(), simplify(), the core (like x + 
 x = 2*x).  For some, the code could naturally live very close to the 
 code that currently does the work. For others, the way that the 
 algorithm works and the way it works by hand are much different. 

 To be clear, the symbolic manipulation should go in SymPy. The part 
 about the text now make the u substitution u = exp(x) or the css 
 formatting should go in SymPy Gamma. The SymPy objects should be easy 
 to parse into those things, but they should be intended for machine 
 consumption more than human consumption. 

 Aaron Meurer 

 On Sat, Mar 16, 2013 at 8:47 PM, David Li li.da...@gmail.comjavascript: 
 wrote: 
  Alright, thank you for pointing out that typo. I've fixed it. 
  
  I have finished porting; the code is still at the same place, 
  https://github.com/sympy/sympy_gamma/pull/8. If this is something SymPy 
  would want, how best should be integrated? Which module(s) does it 
 belong in 
  and what should the API be? 
  
  On Saturday, March 16, 2013 6:34:22 AM UTC-7, Ramana Venkata wrote: 
  
  Hi David, 
  
  Great work. Just wanted to point you out one small thing in 
  
 http://sympy-gamma-li.appspot.com/input/?i=integrate%28exp%28x%29%20/%20%281%20%2B%20exp%282x%29%29%29
  
  In the first step after Let u = e^x; then let du = e^x ... But I 
 think 
  it be some thing like this then du = e^x dx ... 
  
  
  On Thursday, March 14, 2013 8:52:25 PM UTC+5:30, David Li wrote: 
  
  Hello all, 
  
  I have implemented a module giving steps for most derivatives and some 
  integrals for SymPy Gamma. However, it was suggested that at least 
 some of 
  this functionality should be added to SymPy itself. If so, what 
  functionality should be added and how should it be integrated into 
 SymPy? 
  
  The pull request is at https://github.com/sympy/sympy_gamma/pull/8. 
 There 
  is still some work left to do, which is listed in the pull request. In 
  particular, integral forms involving the application of trigonometric 
  identities need to be implemented. 
  
  Examples: 
  
  Integral involving arctangent and exponentiation: 
  
 http://sympy-gamma-li.appspot.com/input/?i=integrate%28exp%28x%29%20/%20%281%20%2B%20exp%282x%29%29%29
  
  Trig integral involving u-substitution: 
  
 http://sympy-gamma-li.appspot.com/input/?i=integrate%28sin%28sin+x%29cos+x%29 
  Trig derivative: 
  http://sympy-gamma-li.appspot.com/input/?i=diff%28cot+sin+x%29 
  
  Implementation: 
  
  The module builds a tree of rules to apply, with the first rule on the 
  top of the tree. Examples of rules would be AddRule, ChainRule, 
 RewriteRule, 
  AlternativeRule (in case multiple methods exist), and so on. Separate 
  functions apply the rules and return the resulting derivative or 
 integral 
  (currently derivatives and integrals are separate functions). A set of 
  classes walks the tree and generates steps for the rules; there is no 
  translation support but multiple output formats should work (currently 
 only 
  plaintext and HTML+LaTeX are implemented). 
  
  The code makes use of context managers, which would need to be 
 replaced 
  in order to maintain Python 2.5 compatibility. 
  
  Thank you, 
  David Li 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  sympy group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to sympy+un...@googlegroups.com javascript:. 
  To post to this group, send email to sy...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/sympy?hl=en. 
  For more options, visit https://groups.google.com/groups/opt_out. 
  
  


-- 
You received this message because you are subscribed

[sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-15 Thread David Li
Okay, so I'd just like to make sure I'm using strategies/rules correctly. I 
have the gist of the derivative implementation at 
https://gist.github.com/lidavidm/5171100.

   - The rules convert the function to be differentiated into a namedtuple 
   corresponding to the derivative rule to be applied.
   - Two strategies are used: one is an identity (I'll replace it with the 
   identity strategy in SymPy) and the other evaluates the rule.
   - The switch strategy is used to determine which rule to apply.
   - The rules all operate on Derivative objects so as to keep the function 
   and the variable of differentiation together as one object. (Perhaps just 
   using a namedtuple would be clearer, though.)

This separates the decision of which rule to use, the processing of the 
input, and the evaluation of the derivative.

If this an idiomatic use of strategies then I'll convert the rest of the 
code.

On Thursday, March 14, 2013 8:22:25 AM UTC-7, David Li wrote:

 Hello all,

 I have implemented a module giving steps for most derivatives and some 
 integrals for SymPy Gamma. However, it was suggested that at least some of 
 this functionality should be added to SymPy itself. If so, what 
 functionality should be added and how should it be integrated into SymPy?

 The pull request is at https://github.com/sympy/sympy_gamma/pull/8. There 
 is still some work left to do, which is listed in the pull request. In 
 particular, integral forms involving the application of trigonometric 
 identities need to be implemented.

 Examples:

- Integral involving arctangent and exponentiation: 

 http://sympy-gamma-li.appspot.com/input/?i=integrate%28exp%28x%29%20/%20%281%20%2B%20exp%282x%29%29%29
- Trig integral involving u-substitution: 

 http://sympy-gamma-li.appspot.com/input/?i=integrate%28sin%28sin+x%29cos+x%29
- Trig derivative: 
http://sympy-gamma-li.appspot.com/input/?i=diff%28cot+sin+x%29

 Implementation:

 The module builds a tree of rules to apply, with the first rule on the top 
 of the tree. Examples of rules would be AddRule, ChainRule, RewriteRule, 
 AlternativeRule (in case multiple methods exist), and so on. Separate 
 functions apply the rules and return the resulting derivative or integral 
 (currently derivatives and integrals are separate functions). A set of 
 classes walks the tree and generates steps for the rules; there is no 
 translation support but multiple output formats should work (currently only 
 plaintext and HTML+LaTeX are implemented).

 The code makes use of context managers, which would need to be replaced in 
 order to maintain Python 2.5 compatibility. 

 Thank you,
 David Li


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-15 Thread David Li
That would be a good idea. Looking at the code, everything has an
_eval_derivative method which should work. My only concern is that, for
instance, in Pow it combines the power, chain, and exponential rules into
one expression.

In any case, most of the code I added was related to printing and
formatting, which would need minimal modification.
On Mar 15, 2013 10:05 AM, Matthew Rocklin mrock...@gmail.com wrote:


 I don't know if it's idiomatic, but one suggestion is to derive the
 derivative rules automatically from diff. At the very least use a fallback
 so it works for functions you don't have rules for.


 I agree that it'd be unfortunate to rewrite all of the differentiation
 logic.  Maybe there is a way to subtly refactor diff to provide the
 functions you need?

 --
 You received this message because you are subscribed to a topic in the
 Google Groups sympy group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/sympy/nLRxBzEyWcs/unsubscribe?hl=en.
 To unsubscribe from this group and all its topics, send an email to
 sympy+unsubscr...@googlegroups.com.
 To post to this group, send email to sympy@googlegroups.com.
 Visit this group at http://groups.google.com/group/sympy?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sympy] Implementation of derivative and integral steps in Gamma

2013-03-14 Thread David Li
Hello all,

I have implemented a module giving steps for most derivatives and some 
integrals for SymPy Gamma. However, it was suggested that at least some of 
this functionality should be added to SymPy itself. If so, what 
functionality should be added and how should it be integrated into SymPy?

The pull request is at https://github.com/sympy/sympy_gamma/pull/8. There 
is still some work left to do, which is listed in the pull request. In 
particular, integral forms involving the application of trigonometric 
identities need to be implemented.

Examples:

   - Integral involving arctangent and exponentiation: 
   
http://sympy-gamma-li.appspot.com/input/?i=integrate%28exp%28x%29%20/%20%281%20%2B%20exp%282x%29%29%29
   - Trig integral involving u-substitution: 
   http://sympy-gamma-li.appspot.com/input/?i=integrate%28sin%28sin+x%29cos+x%29
   - Trig derivative: 
   http://sympy-gamma-li.appspot.com/input/?i=diff%28cot+sin+x%29

Implementation:

The module builds a tree of rules to apply, with the first rule on the top 
of the tree. Examples of rules would be AddRule, ChainRule, RewriteRule, 
AlternativeRule (in case multiple methods exist), and so on. Separate 
functions apply the rules and return the resulting derivative or integral 
(currently derivatives and integrals are separate functions). A set of 
classes walks the tree and generates steps for the rules; there is no 
translation support but multiple output formats should work (currently only 
plaintext and HTML+LaTeX are implemented).

The code makes use of context managers, which would need to be replaced in 
order to maintain Python 2.5 compatibility. 

Thank you,
David Li

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-14 Thread David Li
Alright, thank you all for the feedback!

I just started looking at the strategies module, I think I could map my 
rules to rules in the strategies module and have intsteps/diffsteps be a 
strategy; I'll look into this some more. I can get rid of the format 
function easily, I'm not really using its features/%-interpolation will be 
fine.

Also - I have a question about trig simplification. Is there any 
functionality for applying identities to obtain alternate (not necessarily 
simpler) forms of an expression? trigsimp doesn't do what I need; the Fu 
algorithm from https://github.com/sympy/sympy/pull/1737 looks interesting, 
but it also seems to be aimed mostly at pure simplification. Or would this 
be another application of rewrite rules? (For instance, I need cos^2(x) = 
(1+cos(2x)/2.) 

So I'll try to refactor/rewrite using strategies and perhaps resubmit to 
the main SymPy project.

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy] Refactoring/API for parsing

2012-11-23 Thread David Li

On Friday, November 23, 2012 2:41:36 AM UTC-7, Aaron Meurer wrote:

 On Thu, Nov 22, 2012 at 6:28 PM, David Li li.da...@gmail.comjavascript:
  wrote:

 What exactly was the tuple before?


  The tuple before was (auto_symbol, auto_number, factorial_notation). 
 The new function that replaces the tuple iterates through those functions 
 internally and applies each of them.


 I like the API the way it currently is.  You are adding transformers to 
 the standard transformers.  If you want, you can modify the standard 
 transformers.  This cannot be done with your suggested change.
  


Alright, I'll revert that change.
 


  

 Did you also fix comment 3 of 2663?


 I added those cases as tests, actually. 


 Can you make your fix generalized to an API?  I need this exact same fix 
 to change isympy -a to use parsing.


 Can you clarify? So you want the fix refactored by itself? I'm not sure 
 if that warrants a separate function, the change is simply (while iterating 
 through the tokens)

 if (# Don't convert attribute access
 (prevTok[0] == OP and prevTok[1] == '.') or
 # Don't convert keyword arguments
 (prevTok[0] == OP and prevTok[1] in ('(', ',')
  and nextTokNum == OP and nextTokVal == '=')):


 Does that also include things like += ?


I thought sympify didn't handle statements, only expressions?

David
 

  

 # Don't insert call to Symbol
 else:
 # Insert call to Symbol


 Actually, I guess it won't be that simple, because I have to do it with 
 ast, not tokenize.  See https://github.com/ipython/ipython/pull/2301 (and 
 my work so far at https://github.com/asmeurer/sympy/tree/ast).  If you 
 play with that branch, you'll see that isympy -a is broken, because it 
 tries to transform stuff to Symbol() that it shouldn't.

 But I guess there are just these three cases where a name cannot be 
 wrapped in Symbol(): The name is the left-hand side of an assignment, the 
 name is a attribute, or the name is a keyword argument (this is assuming 
 that we already know from the parser that it is indeed a name and not a 
 literal or a keyword).  We might want to examine the grammer specification 
 to convince ourselves that these are indeed the only cases.

 Aaron Meurer
   


 I'll put up a pull request soon.

 David

 -- 
 You received this message because you are subscribed to the Google Groups 
 sympy group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/sympy/-/HRg1zva3LesJ.

 To post to this group, send email to sy...@googlegroups.com javascript:
 .
 To unsubscribe from this group, send email to 
 sympy+un...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/sympy?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/YJYyUzsxj20J.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



[sympy] Refactoring/API for parsing

2012-11-22 Thread David Li
Hello,

I have been working on the API for parse_expr after having implemented
implicit multiplication, and would like your thoughts on my proposed
changes. Currently in a local branch I have this:

   - stringify_expr parses the input and returns a string (this will be
   useful for Gamma)
   - eval_expr evaluates the input
   - parse_expr combines the two for convenience/compatibility

The first two functions require a dictionary of globals; after seeing the
discussion at PR 1648 https://github.com/sympy/sympy/pull/1648, would it
be a good idea to add that option to parse_expr as well?

I have also changed the usage of implicit multiplication/other
transformations to make it more convenient. Before the usage was

transformations = standard_transformations + (convert_xor,
implicit_multiplication_application)

and now it is

transformations = (standard_transformations, convert_xor,
implicit_multiplication_application)

as I have changed standard_transformations from being a tuple of functions
to apply to a function. This doesn't save much typing, but it is cleaner.

sympify's API is not changed at all - as this is much more used, I don't
want to break compatibility.

Some examples can be found in the tests of
sympy_parserhttps://github.com/lidavidm/sympy/blob/sympify_issues_and_refactoring/sympy/parsing/tests/test_sympy_parser.pyand
implicit
multiplicationhttps://github.com/lidavidm/sympy/blob/sympify_issues_and_refactoring/sympy/parsing/tests/test_implicit_multiplication_application.pyand
in the docstring
for 
parse_exprhttps://github.com/lidavidm/sympy/blob/sympify_issues_and_refactoring/sympy/parsing/sympy_parser.py#L569
.

Additionally, I have fixed
#2663https://code.google.com/p/sympy/issues/detail?id=2663and
#3423 https://code.google.com/p/sympy/issues/detail?id=3423. Both were
due to the automatic conversion of variables into symbols without taking
into account context.

Are these changes acceptable? Also, does anyone have other ideas?

Thank you,
David

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



Re: [sympy] Refactoring/API for parsing

2012-11-22 Thread David Li


 What exactly was the tuple before?


The tuple before was (auto_symbol, auto_number, factorial_notation). The 
new function that replaces the tuple iterates through those functions 
internally and applies each of them.
 

 Did you also fix comment 3 of 2663?


I added those cases as tests, actually. 


 Can you make your fix generalized to an API?  I need this exact same fix 
 to change isympy -a to use parsing.


Can you clarify? So you want the fix refactored by itself? I'm not sure if 
that warrants a separate function, the change is simply (while iterating 
through the tokens)

if (# Don't convert attribute access
(prevTok[0] == OP and prevTok[1] == '.') or
# Don't convert keyword arguments
(prevTok[0] == OP and prevTok[1] in ('(', ',')
 and nextTokNum == OP and nextTokVal == '=')):
# Don't insert call to Symbol
else:
# Insert call to Symbol

I'll put up a pull request soon.

David

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/HRg1zva3LesJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



[sympy] Re: SymPy project ideas?

2012-09-09 Thread David Li
Alright, so for the SymPy changes, I'll better document the code. Also, I 
was planning on using namedtuples instead of the plain tuples that I 
currently am using just to make it clearer what the data represents.

For Gamma, should I remove the notebook? It doesn't work anymore (I don't 
think it did when I first checked out the code, either) and I think it 
overlaps with SymPy Live.

As for the error with sin(x), I didn't import that function - that's why. I 
think the error with x+y is being caused by Gamma since it parses just fine 
in SymPy. I'll look into those and make a pull request.

David Li

On Monday, September 3, 2012 11:31:35 AM UTC-7, David Li wrote:

 Hello all,

 As a high school student, I am encouraged to conduct a science fair 
 experiment each year. I became interested in contributing to SymPy through 
 the 2011 Google Code-In project, and for this year, I am interested in 
 somehow working on SymPy for science fair. I reviewed the GSoC 2012 
 Ideashttps://github.com/sympy/sympy/wiki/GSoC-2012-Ideas and 
 believe I could work on a few of those ideas, in particular, implementing 
 by-hand differentiation/integration in order to show steps or working on 
 some sort of natural-language input for SymPy Gamma/sympify. My question 
 is, are these projects desirable for SymPy, and are there other project 
 ideas (that you think would be approachable)?

 I saw the discussion on SymPy Gamma at 
 https://groups.google.com/forum/?fromgroups=#!topic/sympy/YJNc_MoccYg; 
 however, there seems to have been little development since then. Is this 
 still a project SymPy would like to pursue? For a project, I could 
 investigate natural-language input, perhaps by integrating 
 NLTKhttp://nltk.org/. 
 After playing with NLTK, I think some areas of research could involve 
 improving the tokenizer to handle math expressions (for instance, currently 
 'tan(x)' gets parsed as ['tan', '(', 'x', ')']), and of course, actually 
 interpreting the input. A different project would involve 
 investigating/implementing by-hand differentiation/integration methods so 
 that SymPy could show steps.

 To give some background about my learning, I am currently taking 
 Multivariable Calculus/Differential Equations. I have completed AP Calculus 
 BC; I have basic knowledge of logic and set theory, but that is the extent 
 of my mathematical knowledge.

 Thank you,
 David Li


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/C3EX0EYIuRUJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



[sympy] Re: SymPy project ideas?

2012-09-08 Thread David Li
Okay, so I've worked a bit on implicit multiplication and implicit function 
application for sympify. A demo of SymPy Gamma with the changes is at 
http://sympy-gamma-li.appspot.com/ (+ a visual overhaul, update to Python 
2.7 runtime, new Django version). Expressions like 
'2xhttp://sympy-gamma-li.appspot.com/input/?i=2x', 
'ln x http://sympy-gamma-li.appspot.com/input/?i=ln+x', and 
'5exp(x^2)http://sympy-gamma-li.appspot.com/input/?i=5exp%28x%5E2%29' 
should work now.

The SymPy branch is at 
https://github.com/lidavidm/sympy/tree/sympify_implicit_mul_and_apply. I am 
still working on making sure the implicit application doesn't apply to 
None, True, False, and other constants, making sure I haven't broken 
anything/missed an edge case, and cleaning up the code. Also, I would like 
to add tests for the Python parser. In fact, I found a bug as I was writing 
this - (x+2)(x+3) doesn't get correctly parsed.

Implementation: in 
sympy_parser.pyhttps://github.com/lidavidm/sympy/blob/sympify_implicit_mul_and_apply/sympy/parsing/sympy_parser.py
 I 
simply loop over the tokens several times and apply a variety of 
transformations. I haven't benchmarked this to see how much of a 
performance impact the loops have. I also check for NAME tokens and split 
them up if they don't turn out to be in the global scope or something like 
that, so 'xy' gets parsed as 'x y'.

David Li

On Monday, September 3, 2012 11:31:35 AM UTC-7, David Li wrote:

 Hello all,

 As a high school student, I am encouraged to conduct a science fair 
 experiment each year. I became interested in contributing to SymPy through 
 the 2011 Google Code-In project, and for this year, I am interested in 
 somehow working on SymPy for science fair. I reviewed the GSoC 2012 
 Ideashttps://github.com/sympy/sympy/wiki/GSoC-2012-Ideas and 
 believe I could work on a few of those ideas, in particular, implementing 
 by-hand differentiation/integration in order to show steps or working on 
 some sort of natural-language input for SymPy Gamma/sympify. My question 
 is, are these projects desirable for SymPy, and are there other project 
 ideas (that you think would be approachable)?

 I saw the discussion on SymPy Gamma at 
 https://groups.google.com/forum/?fromgroups=#!topic/sympy/YJNc_MoccYg; 
 however, there seems to have been little development since then. Is this 
 still a project SymPy would like to pursue? For a project, I could 
 investigate natural-language input, perhaps by integrating 
 NLTKhttp://nltk.org/. 
 After playing with NLTK, I think some areas of research could involve 
 improving the tokenizer to handle math expressions (for instance, currently 
 'tan(x)' gets parsed as ['tan', '(', 'x', ')']), and of course, actually 
 interpreting the input. A different project would involve 
 investigating/implementing by-hand differentiation/integration methods so 
 that SymPy could show steps.

 To give some background about my learning, I am currently taking 
 Multivariable Calculus/Differential Equations. I have completed AP Calculus 
 BC; I have basic knowledge of logic and set theory, but that is the extent 
 of my mathematical knowledge.

 Thank you,
 David Li


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/SBll6sBsNuoJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



Re: [sympy] SymPy project ideas?

2012-09-04 Thread David Li
Okay, some bad news - this might not qualify as a science fair project 
since it doesn't really have an experiment. My teacher will double-check, 
but he wasn't too sure. However, I would still like to pursue this project 
as it interests me.

On Tuesday, September 4, 2012 11:19:11 AM UTC-7, Aaron Meurer wrote:

 Another thing you could look at is what should be done at the parsing 
 stage and what should be done after the parsing.  For example, 2 x, 
 x y, and tan x are all the same syntax as far as the parser is 
 concerned (unless you want to put all predefined names in the grammar 
 itself), but the first two are implicit multiplication and the second 
 is implicit calling.  So maybe those should be parsed to the same 
 object and then differentiated in software somehow. Then comes 
 questions of how to interpret things like tan x y (tan(x)*y or 
 tan(x*y), or fail). 


Yes, what I was thinking is that there would be a whitespace expansion 
step (probably after tokenization) that would convert statements like 2xy 
into 2 x y and then tokenize again, and then differentiate between those 
syntaxes when constructing some sort of AST.

Another interesting example that I thought of is something like 
 sin^2(x) for sin(x)**2 (the former is common notation for this, and 
 indeed SymPy even pretty prints it that way).  To parse the one like 
 the other would require changing the precedence order, as it normally 
 would be parsed as sin^(2(x)).  So you might think of ways to make 
 that work, and whether those ways work at the parsing stage, the 
 post-parsing stage, or both. 


Okay, so that's another thing to keep in mind - I'll have to compile a list 
of allowed syntactical elements sometime.

So what I would do is try things in order of easiest to hardest (and 
 natural language heuristics are one of the hardest), and stop working 
 when you either run out of time or feel that you've done enough. You 
 almost certainly won't get to do it all, but it's not clear just how 
 far you will get, so set yourself up to do as much as you can. 

 By the way, the standard library tokenize module is exactly the same 
 as the parser in SymPy, except we've extended ours to do some other 
 stuff (e.g., parse x! as factorial(x), wrap all undefined names in 
 Symbol, wrap all number literals in Integer or Float, etc.).  So for 
 the parts that are just extending tokenize, you should put it there. 
 For the rest, it should go in the parsing module (another good thing 
 to think about by the way is a good way of organizing the parsing 
 code; that was discussed a little bit on that other thread). 


Alright, I'll keep this in mind as I work on an API.

David Li
 


 Aaron Meurer 

 On Tue, Sep 4, 2012 at 3:29 AM, Joachim Durchholz 
 j...@durchholz.orgjavascript: 
 wrote: 
  Am 04.09.2012 00:11, schrieb David Li: 
  
  So perhaps some heuristic for differentiating 
  between various input languages and then interpreting them as Python 
  (Python, TeX, English-like, etc.) could also be an interesting task. 
  
  
  Heh. That's simple: 
  - Have a grammar for each syntax that we have, 
  - run the input through all grammars, 
  - use the grammar that doesn't return an error. 
  
  The fun begins when considering the following cases: 
  1) No grammar matches. 
  2) More than one grammar matches. 
  
  For (1), you'd want to somehow rank the grammars according to how close 
 the 
  input is to each grammar, and assume the user really meant the closest 
 one. 
  
  For (2), you'd want to check if the different grammars all really mean 
 the 
  same. E.g. 1*1 should parse the same for all math grammars. Just 
 continue 
  processing. 
  Otherwise, you'll have to ask the user. Or randomly guess one and let 
 the 
  user explicitly select grammars. 
  
  There's also a slight complication for case (2): You may get different 
 parse 
  trees but they'd boil down to the same operations. For examples, 
 grammars 
  with different numbers of precedence levels tend to end up that way; 1*2 
  could end as 
  
  op: * 
int: 1 
int: 2 
  
  or as 
  
  op: * 
literal 
  int: 1 
literal 
  int: 1 
  
  where the second grammar would for some reason differentiate between 
  literals, names, and other representations, where the first does not. 
  
  You'll either need a pass that normalizes grammars, or require that 
  commonalities between grammars are handled by identical rules. 
  The first approach probably requires less work because SymPy already has 
  routines for simplifying expressions; however, that makes error 
 reporting 
  more difficult because the transformations aren't built for keeping 
 track of 
  input line/column numbers. 
  
  You see, there's enough to do :-) 
  
  Not all aspects need to be addressed on the first round though. Just 
 choose 
  how much of this all you want to deal with, and code in a way that the 
 rest 
  can be added later without rewriting everything. 
  
  
  Since Gamma only

Re: [sympy] SymPy project ideas?

2012-09-04 Thread David Li
Alright, that seems like a good approach. Actually, playing around with the 
parser, it already seems to parse (but won't evaluate) expressions like 2x: 
if I add a print statement to show the final list of tokens,

 sympy.parsing.sympy_parser.parse_expr(2 x y)
[(1, 'Integer'), (51, '('), (2, '2'), (51, ')'), (1, 'Symbol'), (51, '('), 
(1, 'x'), (51, ')'), (1, 'Symbol'), (51, '('), (1, 'y'), (51, ')'), (0, 
'')]
Traceback (most recent call last):
  File stdin, line 1, in module
  File sympy/parsing/sympy_parser.py, line 182, in parse_expr
expr = eval(code, global_dict, local_dict) # take local objects in 
preference
  File string, line 1
Integer (2 )Symbol ('x' )Symbol ('y' )
 ^
SyntaxError: invalid syntax

So it's already parsing it almost correctly, it just needs to recognize 
that the two are being multiplied (so a '*' needs to be inserted in there)

David

On Tuesday, September 4, 2012 6:52:16 PM UTC-7, Joachim Durchholz wrote:

 Am 05.09.2012 02:14, schrieb David Li: 
  Yes, what I was thinking is that there would be a whitespace expansion 
  step (probably after tokenization) that would convert statements like 
 2xy 
  into 2 x y and then tokenize again 

 Multiple tokenization steps are usually not worth it. 
 Make it so that there's a token boundary between 2 and xy. 

 Splitting xy would be one of those things that need to be 
 syntax-dependent. 
 SymPy allows defining variable names, so if there's an x and a y, 
 you can split, and if there's an xy, you wouldn't want to split. 
 If there are all three of x, y, and xy, you have an ambiguous 
 parse; report that as something that the user needs to decide (ambiguous 
 parses are a fact of life for ad-hoc grammars, and in fact we need to 
 deal with these for other reasons anyway). 

 If SymPy provides you with a variable named xy, add a temporary 
 grammar rule 
xy ::= x y 
 and make each letter a separate token. (Temporary grammar rules and 
 ambiguities are anathema in the parser generators used for programming 
 languages, but they are no problem in the parser generators used for 
 natural languages. Different parsing technology.) 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/-eSPx8E3CDcJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



[sympy] SymPy project ideas?

2012-09-03 Thread David Li
Hello all,

As a high school student, I am encouraged to conduct a science fair 
experiment each year. I became interested in contributing to SymPy through 
the 2011 Google Code-In project, and for this year, I am interested in 
somehow working on SymPy for science fair. I reviewed the GSoC 2012 
Ideashttps://github.com/sympy/sympy/wiki/GSoC-2012-Ideas and 
believe I could work on a few of those ideas, in particular, implementing 
by-hand differentiation/integration in order to show steps or working on 
some sort of natural-language input for SymPy Gamma/sympify. My question 
is, are these projects desirable for SymPy, and are there other project 
ideas (that you think would be approachable)?

I saw the discussion on SymPy Gamma at 
https://groups.google.com/forum/?fromgroups=#!topic/sympy/YJNc_MoccYg; 
however, there seems to have been little development since then. Is this 
still a project SymPy would like to pursue? For a project, I could 
investigate natural-language input, perhaps by integrating 
NLTKhttp://nltk.org/. 
After playing with NLTK, I think some areas of research could involve 
improving the tokenizer to handle math expressions (for instance, currently 
'tan(x)' gets parsed as ['tan', '(', 'x', ')']), and of course, actually 
interpreting the input. A different project would involve 
investigating/implementing by-hand differentiation/integration methods so 
that SymPy could show steps.

To give some background about my learning, I am currently taking 
Multivariable Calculus/Differential Equations. I have completed AP Calculus 
BC; I have basic knowledge of logic and set theory, but that is the extent 
of my mathematical knowledge.

Thank you,
David Li

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/Ww56mnNfXdgJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



Re: [sympy] SymPy project ideas?

2012-09-03 Thread David Li
Alright, thanks for that other thread. I'll review this and discuss with my 
teacher to come up with a more specific plan.

The tokenize module is quite interesting - I guess how Gamma would 
eventually work is to try to process non-Python syntax but also accept 
Python expressions? Or perhaps some sort of relaxed/non-strict Python 
grammar could be implemented (with some processing to allow integrate, 
integral of, etc.) so that tan x, 3x, e^x are accepted as well as tan(x), 
3*x, and exp(x).

On Monday, September 3, 2012 1:21:27 PM UTC-7, Joachim Durchholz wrote:

 We would not want to add an entire natural language processing toolkit; 
 SymPy has a rather strict no external dependencies policy because it 
 needs to be installable in installer-unfriendly environments 
 (non-administrator accounts, mobile devices). 


Alright, I wasn't aware of that requirement. Thanks for pointing that out. 
NLTK would have been too onerous of a dependency in any case, as it 
requires a total of 800 MB of corpus data to run its various algorithms.
 


 However, it would be extremely useful if we could steal the parser 
 engine from such a toolkit. 
 Most if not all of these engines accept arbitrary context-free grammars. 
 With such an engine, we could just write down the BNF of some grammar 
 (Mathematica, Latex, natural language, whatever), and experiment with it 
 until it works satisfactorily. 


I think this was another of the ideas listed on the wiki - I guess it falls 
under a similar category too. So perhaps some heuristic for differentiating 
between various input languages and then interpreting them as Python 
(Python, TeX, English-like, etc.) could also be an interesting task. 
 


 A general remark: Natural language is notoriously hard to parse. Either 
 it's intuitive, then it's too ambiguous to be useful in a context like 
 that of symbolic math; or it's precise, in which case it isn't natural 
 language anymore. Finding the right trade-off for such things is an 
 ongoing research topic. And after that, you get into the *really* 
 interesting problems... 
 My advice would be to avoid natural language if it's just a means to an 
 end; natural language processing just isn't explored well enough for 
 that, and you'll likely get more problems than the approach can solve. 
 If, on the other hand, natural language processing is your primary 
 interest, by all means continue with it, there's a lot of PhD material 
 in there :-) 


Since Gamma only deals with mathematical expressions (which is more limited 
than Wolfram|Alpha) I believe at least some basic English-like queries can 
be interpreted. I should've been more specific about that. I thought that 
natural language could help somewhat with the task, or at least point me 
towards algorithms and ideas, which is why I mentioned it. Given how 
difficult it is, though, I guess just being able to interpret 2x, sin x, 
and integral of x^2 would be a nice step up in functionality.

Thanks for all your help and suggestions!

David Li

-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/euHGwxuSH84J.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



[sympy] Re: The new Live sphinx extension seems to confuse URL bookmarks

2012-08-30 Thread David Li
Okay, I see the problem with page position. I'll look into it.

In Firefox 14 and 15, there seems to be no position problem, but the run 
button doesn't show up as described - there seems to be a minor difference 
in the DOM. I'll look into this as well.

David Li

On Thursday, August 30, 2012 12:15:20 AM UTC-7, Ondřej Čertík wrote:

 Hi, 

 I noticed, that if I click on this link in my Chrome: 

 http://docs.sympy.org/dev/tutorial.html#algebra 

 then it brings me to the Algebra section momentarily (for about 1/4 
 s or so), and then moves up. 
 I think it's because of the new javascript buttons which say Run code 
 block in SymPy Live. 
 They somehow seem to confuse the browser. 

 Does this happen to you too? Any ideas how to fix this? 

 Ondrej 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/iMXOzkRGqDMJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



Re: [sympy] Re: The new Live sphinx extension seems to confuse URL bookmarks

2012-08-30 Thread David Li
Okay, I fixed the Firefox problems. The buttons show up, clicking on a line 
works, and the settings are below the prompt. I will change the CSS to 
close the box by default and then work on the scroll problem. I'll set up a 
pull request when possible.

David

On Thursday, August 30, 2012 4:54:45 PM UTC-7, Aaron Meurer wrote:

 Also, the settings appear below the prompt in Chrome and above it in 
 Firefox.  Assumedly you intended for it to be below? 

 And by the way, clicking on a line to execute doesn't work in Firefox 
 either. 

 But the biggest issue is the live box starting out open, because 
 that's really annoying. 

 Aaron Meurer 

 On Thu, Aug 30, 2012 at 5:27 PM, David Li li.da...@gmail.comjavascript: 
 wrote: 
  Okay, I see the problem with page position. I'll look into it. 
  
  In Firefox 14 and 15, there seems to be no position problem, but the run 
  button doesn't show up as described - there seems to be a minor 
 difference 
  in the DOM. I'll look into this as well. 
  
  David Li 
  
  
  On Thursday, August 30, 2012 12:15:20 AM UTC-7, Ondřej Čertík wrote: 
  
  Hi, 
  
  I noticed, that if I click on this link in my Chrome: 
  
  http://docs.sympy.org/dev/tutorial.html#algebra 
  
  then it brings me to the Algebra section momentarily (for about 1/4 
  s or so), and then moves up. 
  I think it's because of the new javascript buttons which say Run code 
  block in SymPy Live. 
  They somehow seem to confuse the browser. 
  
  Does this happen to you too? Any ideas how to fix this? 
  
  Ondrej 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  sympy group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/sympy/-/iMXOzkRGqDMJ. 
  
  To post to this group, send email to sy...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  sympy+un...@googlegroups.com javascript:. 
  For more options, visit this group at 
  http://groups.google.com/group/sympy?hl=en. 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/Z-ek0GJtTgEJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



[sympy] Re: The new Live sphinx extension seems to confuse URL bookmarks

2012-08-30 Thread David Li
Okay, pull request at https://github.com/sympy/sympy-live/pull/61

For some reason, I can't reproduce the scroll problem anymore.

David Li

On Thursday, August 30, 2012 12:15:20 AM UTC-7, Ondřej Čertík wrote:

 Hi, 

 I noticed, that if I click on this link in my Chrome: 

 http://docs.sympy.org/dev/tutorial.html#algebra 

 then it brings me to the Algebra section momentarily (for about 1/4 
 s or so), and then moves up. 
 I think it's because of the new javascript buttons which say Run code 
 block in SymPy Live. 
 They somehow seem to confuse the browser. 

 Does this happen to you too? Any ideas how to fix this? 

 Ondrej 


-- 
You received this message because you are subscribed to the Google Groups 
sympy group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/6_tFLCLXTxkJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.



Re: [sympy-live] SymPy Live Sphinx extension (#59)

2012-08-08 Thread David Li
I will work on the individual-statement highlighting when I next get a chance.

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59#issuecomment-7582813

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy-live] SymPy Live Sphinx extension (#59)

2012-08-08 Thread David Li
Alright, now you can click a line to execute. I am deploying it to the test 
server.

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59#issuecomment-7602291

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy-live] SymPy Live Sphinx extension (#59)

2012-08-08 Thread David Li
Yes, I think that would be due to the extension. I will refactor the
code a bit next chance I get and make those changes/fix those bugs.

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59#issuecomment-7603357

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy-live] SymPy Live Sphinx extension (#59)

2012-08-07 Thread David Li
Okay, I've reverted to the old backend and changed the Sphinx frontend. I am 
pushing the changes...

Also, there seems to be a bug in the normal backend: the code

 c, d = var('c d')
 print c
c
 print d
d
 def ctimesd():
... 
... This function returns whatever c is times whatever d is.
... 
... return c*d
...
 ctimesd()
c*d
 c = 2
 print c
2
 ctimesd()
2*d

results in a `NameError` even when typed in manually.

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59#issuecomment-7570757

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy-live] SymPy Live Sphinx extension (#59)

2012-08-06 Thread David Li
Okay, now it should print each prompt interspersed with the results. I've 
pushed the changes to the server.

Also, I fixed the bug where preexecs weren't getting evaluated...turns out I 
was overwriting a variable.

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59#issuecomment-7541984

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sympy-live] SymPy Live Sphinx extension (#59)

2012-08-06 Thread David Li
Sorry, fixed.

Still some issues:

- Code like

 def ctimesd():
... 
... This function returns whatever c is times whatever d is.
... 
... return c*d

  isn't getting executed properly.
  
- Tracebacks don't show the original prompt

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59#issuecomment-7542038

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[sympy-live] SymPy Live Sphinx extension (#59)

2012-08-04 Thread David Li
- Adds a Show/Hide SymPy Live Shell button to the bottom-right corner of the 
docs.
- Clicking it shows a shell that takes up about 600x500px of space.
- The Fullscreen button normally in SymPy Live now redirects to SymPy 
Live.
- Settings are in a dropdown under the shell.
- Hovering over Python code blocks reveals a run code in SymPy Live link in 
the top-right corner.

This code is required for the Sphinx extension to work. It is based somewhat 
off of the implementation at https://github.com/mattpap/scipy-2011-tutorial 
which does not work anymore due to changes in SymPy Live.

Fixes [Google Code issue 
#2871](http://code.google.com/p/sympy/issues/detail?id=2871)

I will be pushing a testing version soon.

You can merge this Pull Request by running:

  git pull https://github.com/lidavidm/sympy-live live_sphinx_extension

Or you can view, comment on it, or merge it online at:

  https://github.com/sympy/sympy-live/pull/59

-- Commit Summary --

* Don't focus the prompt when enabling it
* Add the Sphinx extension files
* Allow autocompletion
* Make toolbar align properly
* Change fullscreen so it redirects to main site

-- File Changes --

M shell.py (21)
M static/live-autocomplete.js (1)
M static/live-core.css (5)
M static/live-core.js (4)
M static/live-sphinx.css (131)
M static/live-sphinx.js (421)

-- Patch Links --

  https://github.com/sympy/sympy-live/pull/59.patch
  https://github.com/sympy/sympy-live/pull/59.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy-live/pull/59

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[sympy] SymPy Live Sphinx extension (#1465)

2012-08-04 Thread David Li
- Adds a Show/Hide SymPy Live Shell button to the bottom-right corner of the 
docs.
- Clicking it shows a shell that takes up about 600x500px of space.
- The Fullscreen button normally in SymPy Live now redirects to SymPy 
Live.
- Settings are in a dropdown under the shell.
- Hovering over Python code blocks reveals a run code in SymPy Live link in 
the top-right corner.

This code requires SymPy Live to be updated first. It is based somewhat off of 
the implementation at https://github.com/mattpap/scipy-2011-tutorial which does 
not work anymore due to changes in SymPy Live.

Fixes [Google Code issue 
#2871](http://code.google.com/p/sympy/issues/detail?id=2871)

To test locally,

#. Set `sympylive_url` in doc/ext/sympylive.py to `http://localhost:8080`
#. Get the Google App Engine SDK and extract it.
#. Check out [sympy-live:59](https://github.com/sympy/sympy-live/pull/59) into 
a subdirectory of the SDK.
#. Run `./dev_appserver.py sympy-live/`
#. Build the docs. The extension should add all the necessary files.

You can merge this Pull Request by running:

  git pull https://github.com/lidavidm/sympy live_sphinx_extension

Or you can view, comment on it, or merge it online at:

  https://github.com/sympy/sympy/pull/1465

-- Commit Summary --

* Add SymPy Live Sphinx extension
* Update the SymPy Live URL

-- File Changes --

A doc/ext/sympylive.py (36)
M doc/src/conf.py (2)

-- Patch Links --

  https://github.com/sympy/sympy/pull/1465.patch
  https://github.com/sympy/sympy/pull/1465.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy/pull/1465

-- 
You received this message because you are subscribed to the Google Groups 
sympy-patches group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.