Very nice! Great to have more simple tutorials out there in the world. One thing I noticed: in your package code, you have the exports at the end of the module. I think conventionally they go right after the module is declared.
Of course both work, but I think it would be good to have idiomatic code in beginner tutorials as much as possible.
I second @kevbonham. I believe it is OK to go the idiomatic way and explain that in your blog. A beginner will read your tutorial and be even more confused because you do it differently than done elsewhere. At least I would.
Thanks, this is a very useful page! I created my first package with these instructions.
Most likely, our custom packages will have dependencies. Could you also add instructions for adding a dependency, and how to update Project.toml and Manifest.toml accordingly?
Additionally, if you want to show-off your shiny new package to others, how would you ensure that the package compiles only once and doesn’t recompile every time? AFAIK it does not re-compile if Manifest.toml stays the same. But this info would be very important from day-to-day use of our package.
I use Google Analytics for that, but any other similar service will do. You just need to own the web page to put Google Analytics on it.
I’m very glad for this!
Added to the post, please check it out.
Manifest.toml shouldn’t be manually edited. I think you are right about re-compiling, but I’d need confirmation for that info from someone more experienced. If someone is up to it, they could actually write a post about compiling in Julia.
Edit: for anyone wondering about the same issue, there is a thread about it: Is it correct that it recompiles packages every time a new REPL is opened?.
This was really useful. Thanks. How about extending it to putting the package up on github and adding automatic testing? (I’ll see if I can figure it out myself…)