Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use an external VectorSpace #13

Closed
turion opened this issue Nov 7, 2016 · 11 comments
Closed

Use an external VectorSpace #13

turion opened this issue Nov 7, 2016 · 11 comments
Assignees
Milestone

Comments

@turion
Copy link
Contributor

turion commented Nov 7, 2016

Following the philosophy that dunai has to be slim, VectorSpace should really be a dependency. If there is no slim package supplying us with vector spaces, we should fork one.

This is not an API change or API addition, and its not urgent.

@ivanperez-keera
Copy link
Owner

This is an API removal. It would impact the version major, and show go in release 0.3.

@ivanperez-keera
Copy link
Owner

By the way, this implementation of vector-space, which I wanted to use for Yampa in the past, also depends on void.

Of course there's linear, but that just depends on half the universe.

Are there any simpler alternatives? If not, I'm happy externalising dunai's vector-space and moving forward with this.

Since I'm not an expert in vector spaces, can I ask: what are the key differences between the two? If any of those differences actually "define" or are fundamental to this implementation, then they could help find a suitable name for this library.

@ivanperez-keera
Copy link
Owner

ivanperez-keera commented Dec 8, 2017

(Again, I'm happy depending on vector-space, so long as it does the job, is well maintained, and does not depend on TH.)

EDIT: Grammar

@turion
Copy link
Contributor Author

turion commented Dec 8, 2017

I think linear is not the right package for us. vector-space sounds good. It depends on template-haskell at some point though: vector-space -> void -> semigroups -> tagged -> template-haskell.

Then I propose to fork vector-space without the dependency on void, and to use that in Dunai.

@turion turion self-assigned this Dec 8, 2017
@turion
Copy link
Contributor Author

turion commented Dec 11, 2017

Looking into this further, void doesn't even depend on semigroups for GHC >= 7.9. So an even more elegant solution would be to deprecate GHC < 7.9 and use vector-space and void.

@ivanperez-keera
Copy link
Owner

Ok. So, we can then delay this until 7.8 can be deprecated, and then this will naturally fall into place.

@turion
Copy link
Contributor Author

turion commented Dec 12, 2017

What is needed to deprecate 7.8? Is there anything I can do? (E.g. porting existing apps to 7.10?) Should we open a separate issue?

@ivanperez-keera
Copy link
Owner

Unfortunately, no. But thanks. It's just a matter of patience.

@ivanperez-keera
Copy link
Owner

Following a discussion in http://mailman.cs.yale.edu/pipermail/yampa-users/2018-October/000478.html, it seems like we cannot depend on an existing vector-space/linear for now, but we can externalize Yampa's, find the common factor with dunai, and at least not have it in Dunai/Yampa.

See: https://github.com/ivanperez-keera/Yampa/tree/develop-externalvectorspace and https://github.com/ivanperez-keera/simple-affine-space

ivanperez-keera added a commit to ivanperez-keera/Yampa that referenced this issue Oct 28, 2018
This commit externalizes vector spaces and affine spaces, and two
obvious 2D and 3D instances, into a separate library. The new library
can be found at:
https://github.com/ivanperez-keera/simple-affine-space

This makes sense from a semantic standpoint, and it makes Yampa
much cleaner.

There are reasons why we cannot rely on an existing library for the time
being. In the (not-so-near) future, we might be able to simplify our own
library, but that effort can be followed separately now. Past
discussions can be found here:
http://mailman.cs.yale.edu/pipermail/yampa-users/2018-October/000478.html
ivanperez-keera/dunai#13

Closes #19.
@ivanperez-keera ivanperez-keera self-assigned this Oct 29, 2018
@ivanperez-keera
Copy link
Owner

I've been wanting to see this completed for a long time. I tried to tackle it a couple of times, but couldn't (that's why I suggested documenting it first).

The vector-spaces in Yampa have been externalized. If we could at least move whatever we have in Dunai that fits into simple-affine-spaces over there and remove our Data.VectorSpace module, that'd be great.

ivanperez-keera added a commit that referenced this issue Jan 21, 2020
Refs #172, #13.

The Data.VectorSpace module in dunai conflicts with the one in
simple-affine-space, which is used by Yampa. Ideally, bearriver would
use the same library, and apps written for Yampa would work out of the
box. This was not the case.

This change removes the module Data.VectorSpace from dunai completely,
and uses the definitions in simple-affine-space instead. As a
consequence of that:

- RModule no longer exists.
- Dunai needs a major version bump, and a new release.
- Bearriver needs a constraint on dunai's version number and a new release.
- Bearriver re-exports Data.VectorSpace from simple-affine-space, just
like Yampa does.
@ivanperez-keera
Copy link
Owner

This issue has been closed by picking one external package that was created from Yampa, and re-defining instances based on that.

The long term plan is still to use a different library, but I am unhappy about the use of TH in linear and vector-space. @Linearity is using linear, but @turion suggested vector-space. The former supports disabling TH, but then it depends on a lot of packages.

Therefore, and as a means to move forward, and to close another issue #172, I have picked. If things are really bad, we can always re-introduce what's missing (maybe re-introduce it in https://github.com/ivanperez-keera/simple-affine-space if possible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants