Re: [sympy] CSymPy and mobile programming

2013-11-03 Thread Joachim Durchholz
In general, I do not think that extending the language is going to help SymPy. 1) Extending a programming language is a huge amount of work. 2) Getting all the bugs and interactions with existing language features out is even more work. 3) Making a new feature work as intended is often difficult

Re: [sympy] CSymPy and mobile programming

2013-11-03 Thread F. B.
On Sunday, November 3, 2013 9:46:43 AM UTC+1, Marduk wrote: > > Just for the record. With the help of Rubi I just solved an integral for > which both Mathematica and Maxima gave a rather ugly answer. Rubi provided > the same result that appears in a book. Based on this experience I > definitel

Re: [sympy] CSymPy and mobile programming

2013-11-03 Thread Marduk
Just for the record. With the help of Rubi I just solved an integral for which both Mathematica and Maxima gave a rather ugly answer. Rubi provided the same result that appears in a book. Based on this experience I definitely recommend, and if I can find the time I will collaborate, to work on

Re: [sympy] CSymPy and mobile programming

2013-11-03 Thread Joachim Durchholz
Am 03.11.2013 09:46, schrieb Marduk: Just for the record. With the help of Rubi I just solved an integral for which both Mathematica and Maxima gave a rather ugly answer. Rubi provided the same result that appears in a book. Based on this experience I definitely recommend, and if I can find the t

Re: [sympy] CSymPy and mobile programming

2013-11-03 Thread Marduk
Sorry, Google Groups newbie here. I intended to reply to your original message about the announcement but accidentally sent you a private message. Thanks for replying here so that others know about it. -- You received this message because you are subscribed to the Google Groups "sympy" group.

Re: [sympy] CSymPy and mobile programming

2013-11-02 Thread Ondřej Čertík
Hi Marduk, On Sat, Nov 2, 2013 at 6:03 PM, Marduk wrote: > It might help to take a look at SymbolicC++. Thanks for the suggestion. I have in fact looked at SymbolicC++ when I was benchmarking CSymPy --- I implemented the simple benchmark in my "expand" branch here: https://github.com/certik/Sym

Re: [sympy] CSymPy and mobile programming

2013-11-02 Thread Marduk
It might help to take a look at SymbolicC++ . -- 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...@googlegrou

Re: [sympy] CSymPy and mobile programming

2013-10-08 Thread Ondřej Čertík
On Tue, Oct 8, 2013 at 11:27 AM, F. B. wrote: > It seems that someone is already porting SymPy to Julia, though just via > PyCall linking: > > https://github.com/jverzani/SymPy.jl Yes, I've seen this before. There is also this: https://github.com/johnmyleswhite/Calculus.jl Ondrej -- You recei

Re: [sympy] CSymPy and mobile programming

2013-10-08 Thread F. B.
It seems that someone is already porting SymPy to Julia, though just via PyCall linking: https://github.com/jverzani/SymPy.jl -- 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 em

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread Ondřej Čertík
On Mon, Oct 7, 2013 at 2:09 PM, Joachim Durchholz wrote: > Am 07.10.2013 21:06, schrieb F. B.: >> >> >> >> On Monday, October 7, 2013 8:28:04 PM UTC+2, Joachim Durchholz wrote: >>> >>> >>> Am 07.10.2013 20:07, schrieb F. B.: I just had a look at the Julia project http://julialang.org/ >>

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread Joachim Durchholz
Am 07.10.2013 21:06, schrieb F. B.: On Monday, October 7, 2013 8:28:04 PM UTC+2, Joachim Durchholz wrote: Am 07.10.2013 20:07, schrieb F. B.: I just had a look at the Julia project http://julialang.org/ Have a look at how they manage operator overloading: I just did and shuddered. Unrestr

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread F. B.
On Monday, October 7, 2013 8:28:04 PM UTC+2, Joachim Durchholz wrote: > > Am 07.10.2013 20:07, schrieb F. B.: > > I just had a look at the Julia project http://julialang.org/ > > > > Have a look at how they manage operator overloading: > > I just did and shuddered. > Unrestrained multple dis

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread Joachim Durchholz
Am 07.10.2013 20:07, schrieb F. B.: I just had a look at the Julia project http://julialang.org/ Have a look at how they manage operator overloading: I just did and shuddered. Unrestrained multple dispatch runs into modularity issues. It's one of those mistakes that language designers make ov

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread Ondřej Čertík
On Mon, Oct 7, 2013 at 12:07 PM, F. B. wrote: > I just had a look at the Julia project http://julialang.org/ > > Have a look at how they manage operator overloading: > > https://github.com/JuliaLang/julia/blob/master/examples/quaternion.jl > > That is a great idea, it would keep code clear and rea

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread F. B.
I just had a look at the Julia project http://julialang.org/ Have a look at how they manage operator overloading: https://github.com/JuliaLang/julia/blob/master/examples/quaternion.jl That is a great idea, it would keep code clear and readable, and avoid the need of all those *if isinstance( )

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread F. B.
I just had a look at the Julia project http://julialang.org/ Have a look at how they manage operator overloading: https://github.com/JuliaLang/julia/blob/master/examples/quaternion.jl That is a great idea, it would keep code clear and readable, and avoid the need of all those *if isinstance( )

Re: [sympy] CSymPy and mobile programming

2013-10-07 Thread Ondřej Čertík
On Sat, Oct 5, 2013 at 5:03 AM, Joachim Durchholz wrote: > Am 04.10.2013 19:37, schrieb Ondřej Čertík: > >> On Thu, Oct 3, 2013 at 12:40 PM, Joachim Durchholz >> wrote: >>> >>> Am 03.10.2013 17:04, schrieb Ondřej Čertík: On Thu, Oct 3, 2013 at 1:50 AM, Joachim Durchholz wrote

Re: [sympy] CSymPy and mobile programming

2013-10-05 Thread Joachim Durchholz
Am 04.10.2013 19:37, schrieb Ondřej Čertík: On Thu, Oct 3, 2013 at 12:40 PM, Joachim Durchholz wrote: Am 03.10.2013 17:04, schrieb Ondřej Čertík: On Thu, Oct 3, 2013 at 1:50 AM, Joachim Durchholz wrote: Am 03.10.2013 07:46, schrieb Ondřej Čertík: [...] Garbage management is a real issu

Re: [sympy] CSymPy and mobile programming

2013-10-04 Thread Ondřej Čertík
On Thu, Oct 3, 2013 at 12:40 PM, Joachim Durchholz wrote: > Am 03.10.2013 17:04, schrieb Ondřej Čertík: >> >> On Thu, Oct 3, 2013 at 1:50 AM, Joachim Durchholz >> wrote: >>> >>> Am 03.10.2013 07:46, schrieb Ondřej Čertík: >> >> [...] > > Garbage management is a real issue in C++. >>>

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread Björn Dahlgren
On Thursday, 3 October 2013 18:40:26 UTC+1, F. B. wrote: > > > > On Thursday, October 3, 2013 9:50:05 AM UTC+2, Joachim Durchholz wrote: >> >> >> ... that's giving me a thought though: Maybe it's a good idea to make a >> Sympy-to-whatever-language translation. On Jython, a C++ library just >> d

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread Joachim Durchholz
Am 03.10.2013 17:04, schrieb Ondřej Čertík: On Thu, Oct 3, 2013 at 1:50 AM, Joachim Durchholz wrote: Am 03.10.2013 07:46, schrieb Ondřej Čertík: [...] Garbage management is a real issue in C++. Currently I use reference counting. I don't see any issue --- can you elaborate on what you mean?

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread Joachim Durchholz
Am 03.10.2013 19:40, schrieb F. B.: On Thursday, October 3, 2013 9:50:05 AM UTC+2, Joachim Durchholz wrote: ... that's giving me a thought though: Maybe it's a good idea to make a Sympy-to-whatever-language translation. On Jython, a C++ library just doesn't make sense, but it would allow exp

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread F. B.
On Thursday, October 3, 2013 9:50:05 AM UTC+2, Joachim Durchholz wrote: > > > ... that's giving me a thought though: Maybe it's a good idea to make a > Sympy-to-whatever-language translation. On Jython, a C++ library just > doesn't make sense, but it would allow experimentation with different

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread Ondřej Čertík
On Thu, Oct 3, 2013 at 1:50 AM, Joachim Durchholz wrote: > Am 03.10.2013 07:46, schrieb Ondřej Čertík: [...] >>> Garbage management is a real issue in C++. >> >> >> Currently I use reference counting. I don't see any issue --- can you >> elaborate >> on what you mean? > > > See http://www.hpl.hp.c

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread Joachim Durchholz
Am 03.10.2013 07:46, schrieb Ondřej Čertík: Try the Boehm-Demers-Weiser collector and see what that brings. Use really long-running tasks to benchmark it, it has a relatively high fixed space overhead. I'll give it a shot, thanks for the tip. If nothing, it would be good to know the performance

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Ondřej Čertík
On Wed, Oct 2, 2013 at 5:07 PM, Joachim Durchholz wrote: > Am 02.10.2013 23:48, schrieb Ondřej Čertík: > >> On Wed, Oct 2, 2013 at 1:47 PM, Joachim Durchholz >> wrote: >>> >>> Am 02.10.2013 20:26, schrieb Ondřej Čertík: >>> The reason is that to truly nail the speed, one needs to use special

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Stefan Krastanov
On 2 October 2013 13:29, F. B. wrote: > > > On Tuesday, October 1, 2013 11:39:36 PM UTC+2, Stefan Krastanov wrote: >> >> @Franz, while I do not have an opinion on what is discussed here, I would >> like to correct an error that was repeated a few times: The Pypy >> interpreter for Python2.7 does

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Joachim Durchholz
Am 02.10.2013 23:48, schrieb Ondřej Čertík: On Wed, Oct 2, 2013 at 1:47 PM, Joachim Durchholz wrote: Am 02.10.2013 20:26, schrieb Ondřej Čertík: The reason is that to truly nail the speed, one needs to use special dictionary implementation, tweak hashing functions, reference counting, memory

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Ondřej Čertík
On Wed, Oct 2, 2013 at 12:53 PM, F. B. wrote: > > On Wednesday, October 2, 2013 8:26:59 PM UTC+2, Ondřej Čertík wrote: >> >> The problem with Cython is that I am not able to make it as fast as >> CSymPy in C++, >> and I tried: >> >> https://github.com/certik/sympyx/blob/master/sympy_pyx.pyx >> >>

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Ondřej Čertík
On Wed, Oct 2, 2013 at 1:47 PM, Joachim Durchholz wrote: > Am 02.10.2013 20:26, schrieb Ondřej Čertík: > >> The reason is that to truly nail the speed, one needs to use special >> dictionary implementation, >> tweak hashing functions, reference counting, memory allocators etc. > > > Reference coun

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Joachim Durchholz
Am 02.10.2013 20:26, schrieb Ondřej Čertík: The reason is that to truly nail the speed, one needs to use special dictionary implementation, tweak hashing functions, reference counting, memory allocators etc. Reference counting can improve latency, but it will actually decrease throughput. At

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread F. B.
On Wednesday, October 2, 2013 8:26:59 PM UTC+2, Ondřej Čertík wrote: > > The problem with Cython is that I am not able to make it as fast as > CSymPy in C++, > and I tried: > > https://github.com/certik/sympyx/blob/master/sympy_pyx.pyx > > The reason is that to truly nail the speed, one needs

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Ondřej Čertík
On Wed, Oct 2, 2013 at 11:50 AM, F. B. wrote: > > > On Wednesday, October 2, 2013 10:53:10 AM UTC+2, Björn Dahlgren wrote: >> >> I've played around with Cython, Nuitka, shedskin etc. I would not >> recommend Nuitka (see Stefan Behnels blog post on the topic) - furthermore: >> it produces huge bina

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread F. B.
On Wednesday, October 2, 2013 10:53:10 AM UTC+2, Björn Dahlgren wrote: > > I've played around with Cython, Nuitka, shedskin etc. I would not > recommend Nuitka (see Stefan Behnels blog post on the topic) - furthermore: > it produces huge binaries. > Maybe you're right, but I would keep an eye

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread F. B.
On Tuesday, October 1, 2013 11:39:36 PM UTC+2, Stefan Krastanov wrote: > > @Franz, while I do not have an opinion on what is discussed here, I would > like to correct an error that was repeated a few times: The Pypy > interpreter for Python2.7 does *not* restrict what you can do - it is a > *f

Re: [sympy] CSymPy and mobile programming

2013-10-02 Thread Björn Dahlgren
On Tuesday, 1 October 2013 18:52:18 UTC+1, F. B. wrote: > > Anyone ever heard of Nuitka? I discovered this project today, and it looks > very promising. > I've played around with Cython, Nuitka, shedskin etc. I would not recommend Nuitka (see Stefan Behnels blog post on the topic) - furthermore:

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread Joachim Durchholz
Am 01.10.2013 23:19, schrieb F. B.: In any case, regarding a possible construction of our own translator, I would suggest to use Nuitka still, then compile its C++ result to XML using *gccxml*, applying transformation rules to the XML-equivalent C++ code, and then transforming back to C++. That

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread Stefan Krastanov
@Franz, while I do not have an opinion on what is discussed here, I would like to correct an error that was repeated a few times: The Pypy interpreter for Python2.7 does *not* restrict what you can do - it is a *fully* compliant python interpreter. You are probably thinking about the RPython langu

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread F. B.
On Tuesday, October 1, 2013 8:15:21 PM UTC+2, Joachim Durchholz wrote: > > That's a good thing, though they'd still have to upgrade the system with > each new Python version, so it's not buying the project THAT much. > Well, that's partially true. Compared to PyPy, Jython, IronPython and Cyth

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread Joachim Durchholz
Am 01.10.2013 19:52, schrieb F. B.: Unlike other things like that, such as PyPy, Cython, ShedSkin, they aim to be 100% compatible with CPython syntax. Nuitka does not create its own implementation of the Python language, rather it uses the ast package. of CPython to parse code, which could be a s

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread F. B.
Anyone ever heard of Nuitka? I discovered this project today, and it looks very promising. It's a compiler for Python, which basically translates Python to C++ and then compiles it to machine code. It could be used for translating purposes as well. Unlike other things like that, such as PyPy,

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread Aaron Meurer
On Sep 30, 2013, at 6:16 PM, Joachim Durchholz wrote: > > Am 30.09.2013 23:07, schrieb F. B.: >> >> By the way, what about trying to force static typing in sympy's core >> through the usage of decorators? > > Can any IDE make use of that? > > > Or maybe even try to define a standard to >> write Py

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread Aaron Meurer
On Sep 30, 2013, at 5:04 PM, "F. B." wrote: > @is_cpp_translatable > class SomeClass(Basic): > @staticvars({'a': 'int', 'b': 'int', 'c': 'double'}) > def simple_method(a, b): > c = a // 2 + b // 3 > return c > > Such decorators could undergo a first phase of testing, i.e.

Re: [sympy] CSymPy and mobile programming

2013-10-01 Thread Aaron Meurer
> On Sep 30, 2013, at 1:09 PM, someone wrote: > > Hi, > > >> CSymPy is written in C++, so my goal is for the pattern matching to >> be as fast as in Mathematica. > > Oh, maybe my formulation was misleading and confused two things. > > First is python vs C++ or any interpreted vs compiled language.

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread F. B.
I believe that once static typing has been forced on the Python code, high optimization will come out naturally after transition to C++. The main problem of Python is that. Translation could occur only once in the future, as soon as the Python code is deemed mature and stable. After that develo

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Ondřej Čertík
On Mon, Sep 30, 2013 at 3:07 PM, F. B. wrote: > > > On Monday, September 30, 2013 9:21:44 PM UTC+2, Matthew wrote: >> >> Sophisticated algorithms for pattern matching against a large collection >> of potentially associative-commutative terms can be both very >> involved/challenging and also be vas

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Ronan Lamy
Le 01/10/13 01:30, Matthew Rocklin a écrit : I like Joachim's suggestion of de-dynamizing the codebase. I suspect it would help not only with future attempts at translation, but also with Cython or PyPy ports. It would probably even help the pure Python implementation (which remains my top prio

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Matthew Rocklin
In short, I'm trying to find a way to direct the ideas and enthusiasm generated in this thread back onto the core before launching off in experimental directions. On Mon, Sep 30, 2013 at 5:30 PM, Matthew Rocklin wrote: > I like Joachim's suggestion of de-dynamizing the codebase. I suspect it >

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Matthew Rocklin
I like Joachim's suggestion of de-dynamizing the codebase. I suspect it would help not only with future attempts at translation, but also with Cython or PyPy ports. It would probably even help the pure Python implementation (which remains my top priority) and encourage growth. Efforts to remove

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Joachim Durchholz
Am 30.09.2013 23:07, schrieb F. B.: By the way, what about trying to force static typing in sympy's core through the usage of decorators? Can any IDE make use of that? > Or maybe even try to define a standard to write Python code in order to make it easy to translate it to C++ through code g

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread F. B.
> > > @is_cpp_translatable > class SomeClass(Basic): > @staticvars({'a': 'int', 'b': 'int', 'c': 'double'}) > def simple_method(a, b): > c = a // 2 + b // 3 > return c > > Such decorators could undergo a first phase of testing, i.e. checking during the execution of the tes

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread F. B.
On Tuesday, October 1, 2013 12:07:07 AM UTC+2, Jason Moore wrote: > > "Or maybe even try to define a standard to write Python code in order to > make it easy to translate it to C++ through code generators?" > > Doesn't Cython already do this? > In cython, if you don't use *cdef*, all variables

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Jason Moore
"Or maybe even try to define a standard to write Python code in order to make it easy to translate it to C++ through code generators?" Doesn't Cython already do this? Jason moorepants.info +01 530-601-9791 On Mon, Sep 30, 2013 at 5:07 PM, F. B. wrote: > > > On Monday, September 30, 2013 9:21

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread F. B.
On Monday, September 30, 2013 9:21:44 PM UTC+2, Matthew wrote: > > Sophisticated algorithms for pattern matching against a large collection > of potentially associative-commutative terms can be both very > involved/challenging and also be vastly more efficient than naive > algorithms. > > Opti

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Matthew Rocklin
Sophisticated algorithms for pattern matching against a large collection of potentially associative-commutative terms can be both very involved/challenging and also be vastly more efficient than naive algorithms. Optimization on this problem over algorithms is more effective than optimization over

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread someone
Hi, > CSymPy is written in C++, so my goal is for the pattern matching to > be as fast as in Mathematica. Oh, maybe my formulation was misleading and confused two things. First is python vs C++ or any interpreted vs compiled language. I don't want to start another discussion on pros and cons he

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Aaron Meurer
On Mon, Sep 30, 2013 at 11:03 AM, F. B. wrote: > Python is normally easier to write code than C++, but I think there is a > main exception, i.e. cases of complex class-structure. In C++ there is the > possibility of using IDEs with autocompletion enabled, which can any time > tell you which type a

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Ondřej Čertík
On Mon, Sep 30, 2013 at 11:03 AM, F. B. wrote: > Python is normally easier to write code than C++, but I think there is a > main exception, i.e. cases of complex class-structure. In C++ there is the > possibility of using IDEs with autocompletion enabled, which can any time > tell you which type a

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread F. B.
Python is normally easier to write code than C++, but I think there is a main exception, i.e. cases of complex class-structure. In C++ there is the possibility of using IDEs with autocompletion enabled, which can any time tell you which type a variable is, a great advantage of statically typed

Re: [sympy] CSymPy and mobile programming

2013-09-30 Thread Ondřej Čertík
On Sun, Sep 29, 2013 at 4:15 AM, someone wrote: > Hi, > >> If we can get this pattern matching API sorted out we could translate >> the Rubi rules > > Improving our pattern matching and reimplementing Rubi > on top of Sympy will be a GSOC project for next year.

Re: [sympy] CSymPy and mobile programming

2013-09-29 Thread someone
Hi, > If we can get this pattern matching API sorted out we could translate > the Rubi rules Improving our pattern matching and reimplementing Rubi on top of Sympy will be a GSOC project for next year. (I wanted to make the proposal already for this time but n

Re: [sympy] CSymPy and mobile programming

2013-09-29 Thread Angus Griffith
> > I would be interested in CSymPy with working "integrate", for example. > > It would be cool. Though unfortunately integrate() happens to be the > most difficult part, > as it depends on many modules, so it will take some time. However, if > we choose to implement another version of > int

Re: [sympy] CSymPy and mobile programming

2013-09-27 Thread Ondřej Čertík
Hi Roberto, On Fri, Sep 27, 2013 at 7:51 AM, Roberto Colistete Jr. wrote: > Em 17-09-2013 19:09, Ondřej Čertík escreveu: >> >> Hi, >> >> I'd like to announce CSymPy: >> >> https://github.com/certik/csympy >> >> a fast symbolic manipulation library written in C++. >> The goal is to eventually be t

[sympy] CSymPy and mobile programming

2013-09-27 Thread Roberto Colistete Jr.
Em 17-09-2013 19:09, Ondřej Čertík escreveu: Hi, I'd like to announce CSymPy: https://github.com/certik/csympy a fast symbolic manipulation library written in C++. The goal is to eventually be the fastest symbolic manipulation library. ... I am now looking for people who suffer because SymPy i