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

Pythran version #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

serge-sans-paille
Copy link

No description provided.

@MasonProtter
Copy link

Nice! Is there a way to make this work with user-defined types? Ie. the equivalent of the Julia example with an Array of Point objects?

@SimonDanisch
Copy link
Owner

I'm guessing that this is work in progress, since there is still the actual n-dimensional, lazy broadcast implementation missing ;)

@serge-sans-paille
Copy link
Author

serge-sans-paille commented Sep 22, 2018

lazy broadcast implementation missing

It's all implemented within pythran, Is there any meaning of reproducing it here?

@serge-sans-paille
Copy link
Author

serge-sans-paille commented Sep 22, 2018

Ie. the equivalent of the Julia example with an Array of Point objects?

It works for any shape of ndarray, so I guess the answer is « only if your reprensent your array of Point as an ndarray. »

@SimonDanisch
Copy link
Owner

It's all implemented within pythran, Is there any meaning of reproducing it here?

yes, the one and only point of this challenge is to evaluate, how the implementation looks and how much effort it is to make it nice and see how flexible it is in its core - it's all to better evaluate how well the implementation can grow in the future and how easily new contributors can start working on it. I think there is a lot of development currently happening in machine learning, and flexible and easily maintainable array algorithms will be crucial to tackle that challenge

@MasonProtter
Copy link

MasonProtter commented Sep 22, 2018

It works for any shape of ndarray, so I guess the answer is « only if your reprensent your array of Point as an ndarray. »

Part of what makes Julia so wonderful (and I believe one of the things Simon was trying to point out with this challenge) is that Julia is nearly unique[1] in how easy it is to generalize an algorithm to work on any datatype without doing any violence to that datatype. Like for instance, sometimes one wants to broadcast over arrays of strings or arrays of dual numbers or arrays of a composite datatype containing a string, a float64, two different integers, a symbol and a matrix.

Because package designers can't always predict what their types and algorithms will be used for, it's important that they are maximally flexible. If you're looking for generality, ndarrays of Float64s are pretty far from optimally general.

[1] Though the Nim solution really impressed me! Clearly, such things are possible in Nim too (hence the 'nearly'.

@oxinabox
Copy link

Part of what makes Julia so wonderful (and I believe one of the things Simon was trying to point out with this challenge) is that Julia is nearly unique[1] in how easy it is to generalize an algorithm to work on any datatype without doing any violence to that datatype

Or rather: Julia programmers in general think that Julia is unique in this way.
And this challage is a chance to prove us wrong.

(I hope we are wrong, because I want thus awesome flexible code everywhere)

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

Successfully merging this pull request may close these issues.

4 participants