Workflow Tips

    As already elaborated in , Julia’s REPL provides rich functionality that facilitates an efficient interactive workflow. Here are some tips that might further enhance your experience at the command line.

    The most basic Julia workflows involve using a text editor in conjunction with the command line. A common pattern includes the following elements:

    • Put code under development in a temporary module. Create a file, say Tmp.jl, and include within it

    • Lather. Rinse. Repeat. Explore ideas at the julia command prompt. Save good ideas in . To execute tst.jl after it has been changed, just include it again.

    It is also possible to interact with a Julia REPL in the browser via IJulia. See the package home for details.

    Whether you’re at the REPL or in IJulia, you can typically improve your development experience with . It is common to configure Revise to start whenever julia is started, as per the instructions in the Revise documentation. Once configured, Revise will track changes to files in any loaded modules, and to any files loaded in to the REPL with includet (but not with plain include); you can then edit the files and the changes take effect without restarting your julia session. A standard workflow is similar to the REPL-based workflow above, with the following modifications:

    1. Develop your package

      Before loading any code, make sure you’re running Revise: say using Revise or follow its documentation on configuring it to run automatically.

      You can iteratively modify the code in MyPkg in your editor and re-run the tests with include("runtests.jl"). You generally should not need to restart your Julia session to see the changes take effect (subject to a few limitations, see ).