These are chat archives for symengine/symengine

8th
May 2015
Sumith Kulal
@Sumith1896
May 08 2015 08:18
Looks like I can't open the CSymPy gitter log. Could anyone paste any important recent info put up there to this group.
Sumith Kulal
@Sumith1896
May 08 2015 12:25
Could anybody help me with rendering the jekyll pages locally?
Previously I used to push to GitHub to test them, but now this doesn't seem to be an option as it will be linked with the feed.
Sushant Hiray
@sushant-hiray
May 08 2015 12:40
@Sumith1896 I can help you with that, we can shift that offline
Sumith Kulal
@Sumith1896
May 08 2015 12:41
Given my github-pages repo how to get it to render in localhost?
Amit Kumar
@aktech
May 08 2015 13:44

@Sumith1896
Have you tried this?

$ cd into/blog/directory
$ jekyll serve

It should be rendered here: http://localhost:4000/

Shivam Vats
@shivamvats
May 08 2015 14:13
@certik Did you mean Friday or 10th May (for the meeting) ?
Sumith Kulal
@Sumith1896
May 08 2015 14:13
Thanks @aktech
I'll try it and brb.
Sumith Kulal
@Sumith1896
May 08 2015 14:24
@certik Why does it say Friday and 10 May? It's a bit confusing.
Ondřej Čertík
@certik
May 08 2015 15:12
@Sumith1896 , @shivamvats I meant right now
can you call me on G+
I called @shivamvats but you didn't pick it up.
Sumith Kulal
@Sumith1896
May 08 2015 15:14
I'm on! Let me try.
Ondřej Čertík
@certik
May 08 2015 15:17
@Sumith1896 waiting.
Shivam Vats
@shivamvats
May 08 2015 15:20
@certik I'm sorry. I was confused by 10. Can I join now?
Ondřej Čertík
@certik
May 08 2015 15:20
Yes
Shivam Vats
@shivamvats
May 08 2015 15:22
I am getting network error
Are you able to connect? @Sumith1896
Ondřej Čertík
@certik
May 08 2015 15:25
The connection was bad
Sumith Kulal
@Sumith1896
May 08 2015 15:25
I was but the quality is not satisfactory
Ondřej Čertík
@certik
May 08 2015 15:25
So there are couple things that need to be done with regards the polynomials and series
Sumith Kulal
@Sumith1896
May 08 2015 15:25
We can try again sometime later, I think it was a problem on my side.
For now let's continue here.
Ondřej Čertík
@certik
May 08 2015 15:26
and any one of you are welcome to work on any of that. Here are some of the bigger tasks, as I see it:
  • in SymPy, finish up the ring series based series expansion
  • code up efficient polynomials in C++. One of your proposals has all the details (i.e. efficient Integer class, hash table, Kronecker substitution....)
  • code something like the ring series in sympy on top of these fast polynomials in symengine
  • implement series expansion using this ring series in symengine
I think those are the 4 big tasks.
What do you think?
Shivam Vats
@shivamvats
May 08 2015 15:29
I've started work on the first point (you've already seen the PR). I am currently writing tests for the code.
In my opinion, the task is mainly of porting code (from pernici's PR)
Ondřej Čertík
@certik
May 08 2015 15:29
Right
I think that would be a nice first step for your work @shivamvats, to finish this up.
Shivam Vats
@shivamvats
May 08 2015 15:30
Sure.
Sumith Kulal
@Sumith1896
May 08 2015 15:31
I was mostly looking into the fast polynomials during the proposal period and planning to work on that.
Ondřej Čertík
@certik
May 08 2015 15:32
@shivamvats once it is done, we can talk again about the second step, i.e. it will depend on where we stand with symengine and how long it takes to finish the first step.
@Sumith1896 right. Do you want to start implementing the fast polys in C++ as the first step?
Sumith Kulal
@Sumith1896
May 08 2015 15:32
Yes
Shivam Vats
@shivamvats
May 08 2015 15:34
@certik Do you want to get done with ring_series based series in Sympy first?
Ondřej Čertík
@certik
May 08 2015 15:34
@Sumith1896 excellent. Based on your research of this, do you know how to proceed, or do you want to discuss the details?
@shivamvats I think so
That way sympy has fast series based on fast polynomials, and it will allow us to see what issues it involves, before doing the same in symengine in C++
Let me know what you think.
Sumith Kulal
@Sumith1896
May 08 2015 15:36
Firstly, I can implement basic polynomial structure first with regular ints and Kronecker substitution.
Ondřej Čertík
@certik
May 08 2015 15:36
@Sumith1896 yes.
Sumith Kulal
@Sumith1896
May 08 2015 15:36
Parallel to that we need the small integer and faster hashtable, etc
which I think, I won't be able to do myself.
Then use these for the polynomial structure with proper tweaking.
Ondřej Čertík
@certik
May 08 2015 15:37
Yes. Ideally we would be able to just swap those int and hastable classes for faster ones
Shivam Vats
@shivamvats
May 08 2015 15:37
We should be able to work on Polynomials in symengine and on ring_series, in parallel
Ondřej Čertík
@certik
May 08 2015 15:38
Yes, I think so.
Shivam Vats
@shivamvats
May 08 2015 15:38
I can help @Sumith1896 with the fast hashtable.
Ondřej Čertík
@certik
May 08 2015 15:39
@Sumith1896 right. I think you can start crafting a PR, just do polynomial addition, multiplication, subtraction. Don't worry about division for now.
Sumith Kulal
@Sumith1896
May 08 2015 15:39
Cool
Okay
I'll work taking the PR @shivamvats sent as reference.
Ondřej Čertík
@certik
May 08 2015 15:39
Try to implement the kronecker trick in some way so that it is clean, but fast.
Sumith Kulal
@Sumith1896
May 08 2015 15:40
Okay
Shivam Vats
@shivamvats
May 08 2015 15:40
@Sumith1896 Great
Ondřej Čertík
@certik
May 08 2015 15:40
@Sumith1896 which PR did he sent?
Shivam Vats
@shivamvats
May 08 2015 15:40
I think he's talking about sympy/symengine#406
Sumith Kulal
@Sumith1896
May 08 2015 15:41
Yes
Ondřej Čertík
@certik
May 08 2015 15:41
I see, yes.
Shivam Vats
@shivamvats
May 08 2015 15:41
It's quite slow, as you'd pointed out.
Ondřej Čertík
@certik
May 08 2015 15:41
Right.
Don't be afraid to post code even if you know it's not ideal. This will be an iterative process
Shivam Vats
@shivamvats
May 08 2015 15:42
Thanks!
Sumith Kulal
@Sumith1896
May 08 2015 15:43
Agreed
Ondřej Čertík
@certik
May 08 2015 15:43
any other questions or feedback?
Shivam Vats
@shivamvats
May 08 2015 15:44
Should we start with the hashtable or the outer structure?
as in, the Polynomial class
Ondřej Čertík
@certik
May 08 2015 15:44
I would start with std::unordered_map as the hash table, at first.
So I guess the Polynomial class
Shivam Vats
@shivamvats
May 08 2015 15:45
Okay
Sumith Kulal
@Sumith1896
May 08 2015 15:45
Is there a need for a separate subtract method?
Ondřej Čertík
@certik
May 08 2015 15:46
as opposed to a method in the Polynomial class?
Sumith Kulal
@Sumith1896
May 08 2015 15:47
In the Polynomial class, should there be add as well as subtract method?
Ondřej Čertík
@certik
May 08 2015 15:47
Ah. I think so.
Unless you have some argument not to.
Sumith Kulal
@Sumith1896
May 08 2015 15:48
No, I was just confirming.
Ondřej Čertík
@certik
May 08 2015 15:50
Cool. I think once you start implementing it, there will be a lot more questions, probably the best to discuss on a given PR, once we can see the code.
Sumith Kulal
@Sumith1896
May 08 2015 15:50
Yeah
Ondřej Čertík
@certik
May 08 2015 15:50
Don't be afraid if you'll have to rewrite some code couple times.
Sumith Kulal
@Sumith1896
May 08 2015 15:51
Yes
Does the structure of Polynomial in that PR look fine? Before implementing methods is some clean up there required?
Ondřej Čertík
@certik
May 08 2015 15:51
Let me check.
Well, the map_uint_integer is inefficient, you don't want to use RCP there
just mpz_class directly
Sumith Kulal
@Sumith1896
May 08 2015 15:54
Let's revive the comment section of that PR, we'll clean it there.
Ondřej Čertík
@certik
May 08 2015 15:55
Shivam Vats
@shivamvats
May 08 2015 15:56
Right. We'll mainly be using this class as a wrapper.
Ondřej Čertík
@certik
May 08 2015 15:57
Btw, I've been thinking hard about passing around RCP, because it's not very efficient. Ideally we should be passing around just Ptr, and let Teuchos check it at Debug time, so that it never becomes dangling. We also need a class UniquePtr, which automatically deallocates the object, but it doesn't have reference counting, thus it is as fast as manual allocation/deallocation, just safe. I started implementing it into Trilinos: certik/trilinos#1, but it's not done yet. Not directly related to the above, but otherwise related to everything.
Shivam Vats
@shivamvats
May 08 2015 15:59
Great!
Ondřej Čertík
@certik
May 08 2015 15:59
The standard library has std::unique_ptr, but it is not checked at Debug time, and so it will segfault if you make a mistake. Only Teuchos has the proper Debug time checking. In fact, only recently I realized that our RCP also doesn't check everything, i.e. if you get a Ptr out of RCP, then deallocate RCP, then Ptr becomes dangling and it will segfault in Debug mode with our implementation, but you get a nice exception if Teuchos is used. Anyway, just so you know what I've been working on.
I have to go --- thanks @shivamvats and @Sumith1896 for your time. Don't hesitate to email me if you have any questions. And good luck! I am excited about your projects.
Shivam Vats
@shivamvats
May 08 2015 16:00
Thanks a lot @certik for the discussion!
Sumith Kulal
@Sumith1896
May 08 2015 16:01
Thanks
Shivam Vats
@shivamvats
May 08 2015 16:01
I think we both are clearer on how to proceed now.
Sumith Kulal
@Sumith1896
May 08 2015 16:02
Just summarising my first task I have to
  • Clean up the necessary in PR sympy/symengine#406.
  • Implement subtract and multiply methods.
Shivam Vats
@shivamvats
May 08 2015 16:03
And mine:
  • Finish ring_series
Ondřej Čertík
@certik
May 08 2015 16:06
Yes to both. Thanks