-
Notifications
You must be signed in to change notification settings - Fork 18
Not overloading Base functions #19
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
Comments
I prefer that we merge #17 first so we can develope it easier. PR to a PR isn't the best thing. |
Sure, such a change shouldn't be part of something else. But perhaps it should happen before tagging for 1.0. |
Originally posted by @Crown421 in #17 (comment)
I don't think this can be controlled by You could mess with convenience things. AppleAccelerate has a macro |
Yes, precisely, that is what I ran into as well and decided not to mess with it at the moment.
This seems like a very nice idea, I was thinking about something like this but had no idea how to do it nicely. |
However, I think we are missing this idea that broadcasting is something separate. I agree with having some macro that converts broadcasts to matrices operations, but at the same time, I think we need to have these simple matrix APIs. There is no harm in having functions that accept arrays. Many of such functions are found in the Base. |
I don't think the idea is to make broadcasts into calls to VML. In fact I would be against it, when using the broadcasting syntax the result should be broadcasting. Otherwise code gets less readable. I feel it is "julian" to extend base functions, as its explicitly a feature of the language (to my understanding). This is part of why I left it like that, instead defining everything as |
Yes I think a macro which goes looking for dots would be too much, not trivial to write, and confusing to use. Here's a first stab at the much simpler Crown421/VML.jl@master...mcabbott:nopiracy
|
Looks great. If I get to to it before the pull request gets approved I will try to add it. |
Yes, totally. My only objection is to having them as methods of |
Yes, will try to take a look later. Perhaps simplest that this be another PR to merge just after yours, before tagging (or registering?). My branch is based off yours. |
Actually, I think the change needed for the tests is not too bad, I had a version to that effect briefly. |
Oh, I see, so the whole point is to move it to a package and let the user call |
I thought |
I just had a look at your code, it looks great. |
I think we can close this. Thank you for your involvement! |
Uh oh!
There was an error while loading. Please reload this page.
This package currently overloads functions like
Base.exp
for the allocating version, while definingVML.exp!
for the in-place version. Which is piracy, right?I'd like to suggest not doing this. Other packages use
Yeppp.log
andAppleAccelerate.exp
by default don't. (And it's trivial to re-define the overloads for whichever functions you are actually using, in some script.)Now might be a good time to fix this, since presumably few people are using this on Julia >= 1.0 right now, the update is #17 in progress.
The text was updated successfully, but these errors were encountered: