These are chat archives for symengine/symengine

10th
May 2015
Abinash Meher
@abinashmeher999
May 10 2015 03:12
I did
cmake .
Ondřej Čertík
@certik
May 10 2015 03:12
@abinashmeher999 --- with regards to https://github.com/sympy/symengine/pull/414/files#r29997860, how did you install it?
Abinash Meher
@abinashmeher999
May 10 2015 03:12
and then make
Ondřej Čertík
@certik
May 10 2015 03:13
Are you on linux or mac?
Abinash Meher
@abinashmeher999
May 10 2015 03:13
linux
Ondřej Čertík
@certik
May 10 2015 03:14

I used 4b856f2955ec53d599c3cdaca6adc98ca6602cea, did:

cmake .
make

and I have:

$ ll src/libsymengine.a 
-rw-rw-r-- 1 ondrej ondrej 1750328 May  9 20:38 src/libsymengine.a
Abinash Meher
@abinashmeher999
May 10 2015 03:15
the src dir in the repo??
Ondřej Čertík
@certik
May 10 2015 03:15
Right.
Abinash Meher
@abinashmeher999
May 10 2015 03:15
I see it now.
Ondřej Čertík
@certik
May 10 2015 03:15
Then, if you install it (using make install), then it will be in lib/
however, don't install it into your /usr/lib (default)
Abinash Meher
@abinashmeher999
May 10 2015 03:16
Does that cause any problems?
Ondřej Čertík
@certik
May 10 2015 03:17
It doesn't, except that you need to use root privileges and it messes up your /usr. You should never touch that directory. Rather, use a cmake option -DCMAKE_INSTALL_PREFIX:PATH="/tmp/xx" and just install it somewhere else.
In Ruby, you would install it as gem.
Abinash Meher
@abinashmeher999
May 10 2015 03:18
What I was trying to do with the ruby wrappers is that I was checking if the user has the libraries installed?
Ondřej Čertík
@certik
May 10 2015 03:19
So there are two ways about this -- either we install symengine separately and then just the wrappers (then you indeed need to figure out where the user installed it), or you install the Ruby wrappers as part of the symengine installation (then you know where the library is installed)
Abinash Meher
@abinashmeher999
May 10 2015 03:19
Shall I include /lib to the list of paths or shall I install the whole symengine library if I don't find it there?
Ondřej Čertík
@certik
May 10 2015 03:19
Which of the two approaches did you want to do?
Abinash Meher
@abinashmeher999
May 10 2015 03:20
I was planning two things
If the user installs the gem from RubyGems.org, I would check if symengine is installed or not.
If the user installs symengine from source, he/she can install the ruby wrappers with an appropriate flag.
More or less what you suggested
Ondřej Čertík
@certik
May 10 2015 03:25
I see. For the RubyGems.org way, just look into the usual places (/usr/lib/, perhaps /usr/local/lib) and then allow the user to specify where it is installed as a command line option.
Don't lose too much time with the RubyGems.org, I would concentrate on the second way for now, to get started. Once we have something to test, we can try to fix any of these issues with RubyGems.org.
Abinash Meher
@abinashmeher999
May 10 2015 03:27
Yeah, I think that can be done. I will have to figure out a way to take in the input from command line.
Ok. I will concentrate on the cmake way for now then.
Ondřej Čertík
@certik
May 10 2015 03:27
As I said, I would do this later, once we have actual wrappers to install.
There will be more stuff --- you also need to link it properly (with all the libs that symengine links), you have to point to the Ruby C header files and so on.
With the symengine CMake, all this is already there (except the Ruby C header files, which we need to implement, just like the user can specify the Python C header files).
Abinash Meher
@abinashmeher999
May 10 2015 03:29
Makes sense. However, Carlos from Ruby Science Foundation had proposed that having a working gem early is a great way to get feedback. How should I go about it?
Ondřej Čertík
@certik
May 10 2015 03:30
So in Python, you can create a PyPi package, that installs the C++ library and the Python wrappers. Can a gem be created that does the same?
It's implemented here: https://github.com/sympy/symengine/blob/master/setup.py, as you can see, it just calls our cmake underneath, but hooks up into Python's distutils
Abinash Meher
@abinashmeher999
May 10 2015 03:31
I think that can be arranged. However, I don't know how to do that as of now. But still It would need checking if the library already exists.
Do multiple copies of the same library cause problems?
Ondřej Čertík
@certik
May 10 2015 03:32
Yes, they do.
Essentially, we need to figure out what the best way about distributing the Ruby wrappers is. Is it better as part of the symengine library, or separately?
Let's say we figure out how to create the gem --- people then still need to install symengine somehow.
Abinash Meher
@abinashmeher999
May 10 2015 03:35
The best part about a gem that there is not much fuss to install it. Only a single command. Just like pip install. It would be better to keep both the options. But we can't waste much time for that.
Ondřej Čertík
@certik
May 10 2015 03:35
I am a big proponent of source distributions like Conda or Hashdist, that install all this for you. In Conda or Hashdist, you just create a package symengine, and either install the wrappers as part of it, or create a separate package for the wrappers that depends on symengine and make things just work for the user.
Actually, pip install is a huge hassle if you are installing wrappers to a C++ library, because you need to tell it where the C++ library is installed and tons of other options typically.
Abinash Meher
@abinashmeher999
May 10 2015 03:37
I have no idea how close is RubyGems is to Conda and Hashdist. I see.
Isuru Fernando
@isuruf
May 10 2015 03:37
A solution is to install .pc file to a standard location and let pkg-config do the work for you
Ondřej Čertík
@certik
May 10 2015 03:37
I think RubyGems is like PyPi for Python, both inadequate.
Abinash Meher
@abinashmeher999
May 10 2015 03:38
I should concentrate more on developing the wrappers. The cmake option i.e. the option with flags to compile the wrappers.
Ondřej Čertík
@certik
May 10 2015 03:38
@isuruf yes, that's one option. We should definitely install the .pc file, so that people can use it.
Abinash Meher
@abinashmeher999
May 10 2015 03:38
@isuruf Where can I read more about it?
Ondřej Čertík
@certik
May 10 2015 03:38
Abinash Meher
@abinashmeher999
May 10 2015 03:39
Yeah looks like this will help.
While hooking it to cmake, how do I call rake? I came across execute_process
Is this the right way?
Ondřej Čertík
@certik
May 10 2015 03:42
However, I just want to point out that .pc files are not a full solution either. It's just one of the things that it is good if we use it, as it does simplify things if it works. But it doesn't allow you to specify rpath, without hacking it (which we do in Hashdist, we have a wrapper on top of pkg-config: https://github.com/hashdist/hashstack/blob/7df295459c311b599ab10d96884798d45c9ae254/pkgs/pkg-config/pkg-config-wrapper) etc. etc. It's quite complicated, and we don't want to go just one way and close all the other ways. We just want to provide .pc, among other things.
@abinashmeher999 yes, just get it working via CMake for now. We can ask people for feedback using it as well --- or ask for help to create some kind of a gem, that calls cmake internally, just like we currently do with Python's setup.py.
I think so, execute_process should do.
Abinash Meher
@abinashmeher999
May 10 2015 03:44
I am a bit confused here. Do I call cmake internally while the gem gets installed or do I install the gem internally from cmake?
Ondřej Čertík
@certik
May 10 2015 03:45
As a first step, get the wrappers working by calling cmake as the top level
Abinash Meher
@abinashmeher999
May 10 2015 03:45
Ok.
Ondřej Čertík
@certik
May 10 2015 03:46
inside cmake, do whatever is necessary to make the wrappers working with Ruby. There are two ways to do that --- either install the right files at the right locations by hand, that's what we currently do with Python. But you can also call some ruby calls to let Ruby install things itself, properly.
Once this works, then, as a second step, we can figure out how to create a gem file, that calls cmake and tells it to install the ruby wrappers.
As a third step, we can see, if we can take the ruby wrappers out of symengine, create a thin gem, that depends on symengine being installed.
Abinash Meher
@abinashmeher999
May 10 2015 03:48
This way the last two steps can be kept for later. When the wrappers are working. Thanks
Ondřej Čertík
@certik
May 10 2015 03:48
Step two and three might be quite technically difficult, and other people can help. The step 1 is technically very easy, the hard work is to actually write the wrappers. That's what you should spend your time on, rather than fiddling with technical issues.
We'll tackle step two and three later in the summer, but let's concentrate on actually writing the wrappers using step one, and testing it in Ruby.
Abinash Meher
@abinashmeher999
May 10 2015 03:49
Ok, and there is also integrating this with Travis.
Ondřej Čertík
@certik
May 10 2015 03:50
Right. Also trivial using step one.
I can help with that.
Abinash Meher
@abinashmeher999
May 10 2015 03:50
As in call cmake with all the possible flags i.e. once with the Ruby wrappers and once without them?
Ondřej Čertík
@certik
May 10 2015 03:51
Are you asking about how to add it to Travis? Just add one test, where you build symengine, and enable Ruby.
To put it another way --- concentrate on polishing the C wrapper for symengine if needed (src/cwrapper.h/cpp) and creating the Ruby wrappers, in src/ruby/some_files.h/cpp. Those files will always stay, somewhere, somehow, and that's the hard work. How they are actually installed is another thing, and there we will need some iterations, as we talked above, based also on feedback from the Ruby community --- there are many options, and I don't know at this moment which one is the best. But we'll figure it out eventually.
Abinash Meher
@abinashmeher999
May 10 2015 03:53
Got it. Actually I saw in some other repo where they had called the rake tasks from before_install option in travis.yml or something like that where the commands to build the wrappers were passed to travis.
Ondřej Čertík
@certik
May 10 2015 03:53
That would work.
Abinash Meher
@abinashmeher999
May 10 2015 03:55
Ok. I would go with the cmake method of integration with travis for now. If that is inefficient, we can add the commands in travis.yml
Ondřej Čertík
@certik
May 10 2015 03:55
The Travis tests will test that the src/ruby/some_files.h/cpp files actually work. Again, since we don't know yet what the best way is to install them in the end, we'll just use the step one to test it on Travis. As you just said.
Abinash Meher
@abinashmeher999
May 10 2015 03:56
Ok.
One more doubt that I had was if I should implement the wrapper for Basic class.
There is a workaround in ruby to implement abstract classes
I didn't see this class in the python wrappers. That's why I asked.
Ondřej Čertík
@certik
May 10 2015 03:58
In Python we have Basic
Abinash Meher
@abinashmeher999
May 10 2015 03:58
I might have missed it.
I'll have to go --- if you have more questions, feel free to ask, I'll get to them tomorrow.
Once the Ruby wrappers are sort of working, we'll move the Python wrappers, so that they conform to a similar directory structure as the Ruby wrappers.
Abinash Meher
@abinashmeher999
May 10 2015 04:01
Ok. Sure. Thanks for the guidance :smile:
Sumith Kulal
@Sumith1896
May 10 2015 05:21
Could anyone help me with the Jekyll setup? I am getting the following error report.
Thilina Rathnayake
@thilinarmtb
May 10 2015 05:55
Sorry guys, I didn't check gitter at all during past few days. I missed the meeting.
Sumith Kulal
@Sumith1896
May 10 2015 05:57
No problem. The discussion led to assigning of first task to us.
Thilina Rathnayake
@thilinarmtb
May 10 2015 05:57
Great !
I'll check with shivam.
Sumith Kulal
@Sumith1896
May 10 2015 13:21
Hi, finally got my blog working :smile: with help of @shivamvats and @aktech.
The feed is setup and have sent a PR to planet sympy sympy/planet.sympy.org#39.
But at planet python, I have not updated the link. How should I be doing that?
Sumith Kulal
@Sumith1896
May 10 2015 13:45
I mailed to Terri. If there is any other way, let me know!
Thilina Rathnayake
@thilinarmtb
May 10 2015 15:08
@Sumith1896 : I guess you can send a PR to the following repo: https://github.com/python/planet ?
This message was deleted