I found these instructions on importing modules in Julia, but I'm getting a somewhat strange behavior, and I was wondering if this was normal.
My files tst.jl
and Tmp.jl
are:
tst.jl
1 include("./Tmp.jl")
2 import Main.Tmp
3
4 Main.Tmp.greetings()
Tmp.jl
1 module Tmp
2 export greetings
3 function greetings()
4 println("Greetings Earthlings")
5 end
6 end
But my tst.jl
cannot see Tmp
unless its under Main
.
My LOAD_PATH
also looks kind of strange:
julia> LOAD_PATH
3-element Array{String,1}:
"@"
"@v#.#"
"@stdlib"
Is this normal, or could something be wrong with my installation?
I tried using JuliaBox and got
julia> LOAD_PATH
3-element Array{Any,1}:
"/opt/julia-0.6.2/local/share/julia/site/v0.6"
"/opt/julia-0.6.2/share/julia/site/v0.6"
"/home/jrun/.julia/v0.6"
However, thats v0.6, while I am using Julia v1.0.2 on OpenSUSE Tumbleweed.
I downloaded the binaries from https://julialang.org/downloads/ and manually moved libs and all into corresponding root directories.