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

Clean up Monte Carlo example #100

Merged
merged 1 commit into from
Nov 26, 2015
Merged

Clean up Monte Carlo example #100

merged 1 commit into from
Nov 26, 2015

Conversation

eschnett
Copy link
Contributor

Rename implementation source file.
Use Int instead of Float64 in various places.
Increase number of iterations.

Rename implementation source file.
Use Int instead of Float64 in various places.
Increase number of iterations.
eschnett added a commit that referenced this pull request Nov 26, 2015
@eschnett eschnett merged commit a787cea into master Nov 26, 2015
@eschnett eschnett deleted the eschnett/montecarlo branch November 26, 2015 05:42
@mcreel
Copy link
Contributor

mcreel commented Nov 26, 2015

That wasn't much time for comments! I think that renaming montecarlo.jl is not a good idea, as montecarlo.jl has nothing to do with the implementation of computing pi - it is a general purpose function that will perform Monte Carlo of any user specified function, and will monitor the results in the way the user specifies. Calling it 07-pi-impl.jl is does not describe what the function does, in any way, and it makes it very unlikely that a user who might find the function useful will ever discover its existence.

As an example of the general purpose nature of montecarlo.jl, see https://github.com/mcreel/QuantileIV.jl/blob/master/QIVMC.jl

@andreasnoack
Copy link
Member

Yes. I agree in both points made here by @mcreel. Please wait 24 hours before merging a pr unless it is a very simple bugfix.

@eschnett
Copy link
Contributor Author

@mcreel Thanks for your comment. I didn't think this part of my change was controversial, otherwise I would have waited. I mainly tried to follow the naming conventions of the other files in the directory, and I tried to indicate that this file (montecarlo.jl) can't be run on its own, but rather requires a driver.

What about renaming 07-pi-impl.jl (the previous montecarlo.jl) to 07-montecarlo-impl.jl, and 07-pi.jl to 07-pi-montecarlo.jl?

@mcreel
Copy link
Contributor

mcreel commented Nov 26, 2015

Hi Erik,
No problem. I think that the name montecarlo.jl is better. The numbers
serve to indicate what's an example. The file under discussion is not an
example. Perhaps the examples directory is not the best place for it, but I
think that the name is appropriate. The more complicated name with a number
makes it less likely that a user will discover a potentially useful
function. I don't have any preferences regarding the name of the other file.
Cheers,
M.

On Thu, Nov 26, 2015 at 2:49 PM, Erik Schnetter [email protected]
wrote:

@mcreel https://github.com/mcreel Thanks for your comment. I didn't
think this part of my change was controversial, otherwise I would have
waited. I mainly tried to follow the naming conventions of the other files
in the directory, and I tried to indicate that this file (montecarlo.jl)
can't be run on its own, but rather requires a driver.

What about renaming 07-pi-impl.jl (the previous montecarlo.jl) to
07-montecarlo-impl.jl, and 07-pi.jl to 07-pi-montecarlo.jl?


Reply to this email directly or view it on GitHub
#100 (comment).

@eschnett
Copy link
Contributor Author

This is now PR #102.

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.

3 participants