F.A.Q
What is Julia? How is it related to Dyad?
Dyad
is the high level modeling language, that allows you to express the equations of a system, declaratively. First released in 2025, it aspires to become the basis for the most modern suite of modeling and simulation tools. It gets transformed into Julia code, and you can interact with a Dyad model from both Dyad (via analyses) and Julia. All analyses also get run in Julia.
julia
is a dynamic, just in time compiled programming language/runtime/compiler that works great for mathematics and physics because it leverages all the new compiler technology to generate very fast code for math-like problems. You can read more about how it all started and dive into the documentation, but you don't need to be a julia
expert to get started.
Why is precompiling taking so long?
An important distinction between julia
and the other dynamic languages is that julia
ships an entire compiler toolchain with and really likes to use it. That means that any code you run is both optimized for your machine and for the other code you have loaded. This can feel like magic when you run a big simulation, but it also have a cost in increased compilation times. So if you get stuck at a REPL that says it's precompiling, just wait for a few minutes (may be tens of minutes on older CPUs). The result is worth it!
Julia package vocabulary
julia
has a built-in package manager called Pkg
. That means you don't need an external program (like pip
or npm
) to install packages. To access it, type ]
in the REPL. The list of packages you can add comes from a Registry.
When you get someone else's environment, you need to download the dependencies to your computer; to do that you need the ]instantiate
command.
If you face trouble because something changed (or you use a newer version of Julia) than the package author, you may need to ]resolve
before you can ]instantiate
.
When your environment is ready and julia
brought all packages locally (remember: julia
needs the source code; that's how it enables cross-package optimizations that make the code so fast!), it will automatically trigger a precompile
.
This may take from a few minutes to a few tens of minutes on older CPUs. If you are on Windows, set "Power Mode" to "Best Performance".
Most of the precompilation "cost" goes away the second time you run the same code. This is an advanced topic that the julialang compiler team is working on and is expected to get better in subsequent releases of julia (while keeping the speed).
Why do I need to login to juliahub.com?
The Julia General Registry only has general purpose, openly licensed packages. Dyad is released under a source-available but not open license, so JuliaHub distributes it via the closed DyadRegistry
, which is only available via juliahub.com.
👉🏽 Start julia with JULIA_PKG_SERVER=juliahub.com julia
to select juliahub.com as a registry provider.
👉🏽 Run ] registry add
to get all of juliahub.com
's registries locally and be able to get the dyad
packages
The juliahub extension refuses to log me in. What can I do?
If you face an issue with the authentication of the juliahub extension, try the following steps:
Open a new terminal
start
julia
type
using JuliaHub
respond yes to the prompt to install the package from General Registry
type
JuliaHub.authenticate("juliahub.com")
if you get a link, follow and click authenticate
if you see
JuliaHub.Authentication("https://juliahub.com", username, ***)
, all is set
After successful authentication, all new julia
programs will have access to the credentials. The credentials are stored by default in ~/.julia/servers/juliahub.com/auth.toml
.
You can also manually download a valid auth.toml
from here. Placing it to the path above will break you out of the login loop.
What is the root cause of the julia/juliahub extension not working properly?
The most common cause is that julia
is installed in a non-standard location and the juliahub extension can't find it. Set julia.executablePath
in your VSCode settings to help the julia extension find it. If you installed julia
with the juliaup
utility, you may need to see in the ~/.julia/juliaup/
directory.
If julia
works fine in the terminal, you can check its path with the following command:
julia -e 'println(joinpath(Sys.BINDIR, "julia"))'
Revise stopped working
Revise is a julia
library that tightly hooks into the compiler and automatically reruns compilation when you save a file that you have loaded in the live julia
session.
If your julia
session doesn't get updated when you save the files, it's recommended to exit and restart the session.
Is it ok to have autosave on?
Expect instabilities when using autosave. The Dyad Studio extension and Revise both monitor file changes to trigger recompilation (dyad
compiles dyad files to julia
and Revise
reloads these julia files). Using autosave means that it's highly likely to either:
save files that are not valid Dyad or Julia
trigger cascading file updates that may confuse Dyad, Revise or both
We recommend that you disable autosave when using the Dyad Studio extension and Revise.
You can do this by setting a workspace-specific setting in VSCode, or writing to your local .vscode/settings.json