Julia – 99 – variabili d’ambiente

Continuo da qui, copio qui.

Julia may be configured with a number of environment variables, either in the usual way of the operating system, or in a portable way from within Julia. Suppose you want to set the environment variable JULIA_EDITOR to vim, then either type ENV["JULIA_EDITOR"] = "vim" for instance in the REPL to make this change on a case by case basis, or add the same to the user configuration file .juliarc.jl in the user’s home directory to have a permanent effect. The current value of the same environment variable is determined by evaluating ENV["JULIA_EDITOR"].

The environment variables that Julia uses generally start with JULIA. If Base.versioninfo is called with verbose equal to true, then the output will list defined environment variables relevant for Julia, including those for which JULIA appears in the name.

File locations
non so tradurlo 😐

JULIA_HOME
The absolute path of the directory containing the Julia executable, which sets the global variable Base.JULIA_HOME. If $JULIA_HOME is not set, then Julia determines the value Base.JULIA_HOME at run-time.

Nota per me: se si è curiosi nella REPL si scrive eval("$JULIA_HOME").

The executable itself is one of

$JULIA_HOME/julia
$JULIA_HOME/julia-debug

by default.

The global variable Base.DATAROOTDIR determines a relative path from Base.JULIA_HOME to the data directory associated with Julia. Then the path $JULIA_HOME/$DATAROOTDIR/julia/base determines the directory in which Julia initially searches for source files (via Base.find_source_file()).

Likewise, the global variable Base.SYSCONFDIR determines a relative path to the configuration file directory. Then Julia searches for a juliarc.jl file at

$JULIA_HOME/$SYSCONFDIR/julia/juliarc.jl
$JULIA_HOME/../etc/julia/juliarc.jl

by default (via Base.load_juliarc()).

For example, a Linux installation with a Julia executable located at /bin/julia, a DATAROOTDIR of ../share, and a SYSCONFDIR of ../etc will have JULIA_HOME set to /bin, a source-file search path of /share/julia/base and a global configuration search path of /etc/julia/juliarc.jl.

Uh! mi sa che salto anche se ci sarebbero le variabili JULIA_LOAD_PATH, JULIA_PKGDIR, JULIA_HISTORY e JULIA_PKGRESOLVE_ACCURACY.

Applicazioni esterne
JULIA_SHELL
The absolute path of the shell with which Julia should execute external commands (via Base.repl_cmd()). Defaults to the environment variable $SHELL, and falls back to /bin/sh if $SHELL is unset, come da me.

Note: On Windows, this environment variable is ignored, and external commands are executed directly.

Salto le variabili che non m’interessano: JULIA_EDITOR (non definito per me), JULIA_CPU_CORES, JULIA_WORKER_TIMEOUT, JULIA_NUM_THREADS, JULIA_THREAD_SLEEP_THRESHOLD e JULIA_EXCLUSIVE.

Formattazione della REPL
Environment variables that determine how REPL output should be formatted at the terminal. Generally, these variables should be set to ANSI terminal escape sequences. Julia provides a high-level interface with much of the same functionality: see the section on Interacting With Julia.

Ci sono JULIA_ERROR_COLOR, JULIA_WARN_COLOR, JULIA_INFO_COLOR, JULIA_INPUT_COLOR, JULIA_ANSWER_COLOR, JULIA_STACKFRAME_LINEINFO_COLOR e JULIA_STACKFRAME_FUNCTION_COLOR, da me nessuna è settata.

Mi lascio travolgere (è lunedì) e ignoro debugging e profiling.

Il capitolo successivo Embedding Julia: As we have seen in Calling C and Fortran Code, Julia has a simple and efficient way to call functions written in C. But there are situations where the opposite is needed: calling Julia function from C code. This can be used to integrate Julia code into a larger C/C++ project, without the need to rewrite everything in C/C++. Julia has a C API to make this possible. As almost all programming languages have some way to call C functions, the Julia C API can also be used to build further language bridges (e.g. calling Julia from Python or C#).

Uh! salto nche questo. Troppo specialistico.

🤢

Annunci
Post a comment or leave a trackback: Trackback URL.

Trackbacks

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: