Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread John Myles White
It’s fine to punt on things. You can either not include those methods at all or include them as skewness(d::HarryDist) = error(“Not yet implemented”) — John On Dec 30, 2013, at 2:15 PM, Harry Southworth wrote: > Thanks for the tip. > > Another question, and possibly one not best posted her

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread Harry Southworth
Thanks for the tip. Another question, and possibly one not best posted here: Is there a minimum required functionality for adding a distribution to the package? I ask because the package seems to want me to provide skewness and kurtosis functions, but I've never wanted to know those things, don

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread Kevin Squire
One slight shortcut (which I'm not sure is documented) is import Base: rand, mean, median, mode But you still need to include all names. Cheers, Kevin On Monday, December 30, 2013, John Myles White wrote: > That’s my workflow. But I tend to just do one load after writing all of > the basic func

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread John Myles White
That’s my workflow. But I tend to just do one load after writing all of the basic functions in a single pass, then start testing them. Every existing univariate distribution serves as a pretty easy-to-follow template for implementing a simple univariate distribution. — John On Dec 30, 2013, a

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread Harry Southworth
So the workflow should be to create a new branch inside harry/.julia/Distributions and to constantly unload and reload the package as I add functions. If so, I use reload("Distributions") to detach and reattach it. Does that sound about right? Thanks again. I appreciate your patience. Harry

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread John Myles White
You can import them all at once using importall Base, but I personally don’t like doing so since it lets you make mistakes you won’t catch for a long time. You might find it easier to implement your distribution inside of the main distributions package code, where all of the importing has alread

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread Harry Southworth
Thanks! import Base.rand worked. That appears to suggest that I also need to do import Base.mean and median, mode, and everything else. Which seems a bit clunky. Is there a simple way of importing them all at once, or is my workflow all wrong? Thanks again, Harry On Monday, 30 December 2013

Re: [julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread John Myles White
Hi Harry, Have you tried Base.rand? I think that’s sufficient and won’t raise this error. Welcome to Julia! — John On Dec 30, 2013, at 11:50 AM, Harry Southworth wrote: > Hello. > > I'm a total noob to Julia, so please be gentle. > > I'm attempting to add a new distribution to the Distrib

[julia-users] Random.rand must be explicitly imported to be extended

2013-12-30 Thread Harry Southworth
Hello. I'm a total noob to Julia, so please be gentle. I'm attempting to add a new distribution to the Distributions package. My intended workflow is to write the functions one by one and test them as I go along before attempting to build the package. When attempting to define rand for my new