Constants
The singleton instance of type , used by convention when there is no value to return (as in a C function) or when a variable or field holds no value.
See also: isnothing, , missing.
Base.PROGRAM_FILE — Constant
PROGRAM_FILE
A string containing the script name passed to Julia from the command line. Note that the script name remains unchanged from within included files. Alternatively see .
— Constant
ARGS
An array of the command line arguments passed to Julia, as strings.
— Constant
C_NULL
The C null pointer constant, sometimes used when calling external code.
— Constant
A VersionNumber object describing which version of Julia is in use. See also .
— Constant
DEPOT_PATH
~/.julia
where~
is the user home as appropriate on the system;- an architecture-specific shared system directory, e.g.
/usr/local/share/julia
; - an architecture-independent shared system directory, e.g.
/usr/share/julia
.
So DEPOT_PATH
might be:
[joinpath(homedir(), ".julia"), "/usr/local/share/julia", "/usr/share/julia"]
The first entry is the “user depot” and should be writable by and owned by the current user. The user depot is where: registries are cloned, new package versions are installed, named environments are created and updated, package repos are cloned, newly compiled package image files are saved, log files are written, development packages are checked out by default, and global configuration data is saved. Later entries in the depot path are treated as read-only and are appropriate for registries, packages, etc. installed and managed by system administrators.
DEPOT_PATH
is populated based on the JULIA_DEPOT_PATH environment variable if set.
DEPOT_PATH contents
Each entry in DEPOT_PATH
is a path to a directory which contains subdirectories used by Julia for various purposes. Here is an overview of some of the subdirectories that may exist in a depot:
clones
: Contains full clones of package repos. Maintained byPkg.jl
and used as a cache.dev
: Default directory forPkg.develop
. Maintained byPkg.jl
and the user.- : Default package environments. For instance the global environment for a specific julia version. Maintained by
Pkg.jl
. logs
: Contains logs ofPkg
andREPL
operations. Maintained byPkg.jl
andJulia
.packages
: Contains packages, some of which were explicitly installed and some which are implicit dependencies. Maintained byPkg.jl
.registries
: Contains package registries. By default onlyGeneral
. Maintained byPkg.jl
.
See also , and Code Loading.
Base.LOAD_PATH — Constant
LOAD_PATH
An array of paths for using
and import
statements to consider as project environments or package directories when loading code. It is populated based on the environment variable if set; otherwise it defaults to ["@", "@v#.#", "@stdlib"]
. Entries starting with @
have special meanings:
@
refers to the “current active environment”, the initial value of which is initially determined by the JULIA_PROJECT environment variable or the--project
command-line option.@stdlib
expands to the absolute path of the current Julia installation’s standard library directory.refers to a named environment, which are stored in depots (see ) under the
environments
subdirectory. The user’s named environments are stored in~/.julia/environments
so@name
would refer to the environment in~/.julia/environments/name
if it exists and contains aProject.toml
file. Ifname
contains#
characters, then they are replaced with the major, minor and patch components of the Julia version number. For example, if you are running Julia 1.2 then@v#.#
expands to@v1.2
and will look for an environment by that name, typically at~/.julia/environments/v1.2
.
The fully expanded value of LOAD_PATH
that is searched for projects and packages can be seen by calling the Base.load_path()
function.
See also JULIA_LOAD_PATH, , JULIA_DEPOT_PATH, and .
— Constant
— Constant
The number of logical CPU cores available in the system, i.e. the number of threads that the CPU can run concurrently. Note that this is not necessarily the number of CPU cores, for example, in the presence of hyper-threading.
See Hwloc.jl or CpuId.jl for extended information, including number of physical cores.
Base.Sys.WORD_SIZE — Constant
Sys.WORD_SIZE::Int
Standard word size on the current machine, in bits.
Base.Sys.KERNEL — Constant
Sys.KERNEL::Symbol
A symbol representing the name of the operating system, as returned by uname
of the build configuration.
Base.Sys.ARCH — Constant
A symbol representing the architecture of the build configuration.
Base.Sys.MACHINE — Constant
Sys.MACHINE::String
A string containing the build triple.
See also: