Change Package directory in Julia

Julia-v0.6 and before one can change julia’s package directory by following these steps: run export JULIA_PKGDIR=/your/directory in shell(or manually add a new environment variable JULIA_PKGDIR on windows) run Pkg.init() in julia to initialize a new package system copy REQUIRE from old directory to the new one run Pkg.resolve() in julia Julia-v0.7+ The “Package directory” in … Read more

Julia compiles the script every time?

Keno’s answer is spot on, but maybe I can give a little more detail on what’s going on and what we’re planning to do about it. Currently there is only an LLVM JIT mode: There’s a very trivial interpreter for some simple top-level statements. All other code is jitted into machine code before execution. The … Read more

What is a “symbol” in Julia?

Symbols in Julia are the same as in Lisp, Scheme or Ruby. However, the answers to those related questions are not really satisfactory, in my opinion. If you read those answers, it seems that the reason a symbol is different than a string is that strings are mutable while symbols are immutable, and symbols are … Read more

Creating copies in Julia with = operator

The confusion stems from this: assignment and mutation are not the same thing. Assignment. Assignment looks like x = … – what’s left of the = is an identifier, i.e. a variable name. Assignment changes which object the variable x refers to (this is called a variable binding). It does not mutate any objects at … Read more