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

Create a script to help conversion of 2pi #24

Open
waldyrious opened this issue May 19, 2017 · 2 comments
Open

Create a script to help conversion of 2pi #24

waldyrious opened this issue May 19, 2017 · 2 comments

Comments

@waldyrious
Copy link
Collaborator

From issue #22:

[Automatically converting 2pi to tau could actually be] counterproductive to the "tauist cause": if one chooses to use the Tau package, it would make sense for them to take the extra step to change their code to explicitly reflect their choice of circle constant, rather than leaving the 2pi's around.

With that in mind, though, I think it would be nice to provide some sort of warning for when a downstream package uses 2pi in its code -- which could be done by overriding *(2, pi), without changing its resulting type. I'm not sure if it's possible to distinguish code from a module from code from modules it imports (we wouldn't want to warn a user of instances of 2pi in packages they didn't author);

If that distinction is not possible (or the warning approach found too intrusive), then an alternative could be a helper script or method in this package that would process a given module or file and output a list of locations where 2pi could be replaced by tau. This is easy enough to do by hand, but depending on the search method, one could easily miss valid instances -- 2pi, 2*pi, 2 * pi, 2.0 * pi, pi*2, etc. -- so an automated process might be useful.

To which @giordano replied:

I don't have a strong opinion on this. In any case, I wouldn't make it part of the package itself, at least an extra script to be placed outside src directory.

So this issue it to track the implementation of such a script.

@cyborg1995
Copy link

@waldyrious is this issue still relevant?
I would like to work on it! I've understood the issue from the discussion and also the proposed solution of an extra script.
Could you help me get started?

@waldyrious
Copy link
Collaborator Author

Hey @cyborg1995 — thanks for the offer, and sorry for the late response. I am afraid I can't help much with the creation of the script at this point, since I haven't worked on this package (or any Julia code, for that matter) for a long time.

That said, if you have specific questions, I'd be happy to attempt to respond or help however I can.

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