Nim is a compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio. Nim's design focuses on efficiency, expressiveness, elegance (in the order of priority).
# draw/draw.nim
import EGGX/eggx
cDebug()
from nimterop prints:{.passC: "-I\"/home/kmodi/sandbox/systemverilog/dpi_c/systemverilog_dpi_now/user-interface/draw\"".}
getCurrentDir()
cInclude
too
b/bar.nim(2, 31) Error: undeclared identifier: 'currentSourcePath'
km²~/sandbox/:nim/paths> ls --tree 01/27 11:18pm
./
└── a/
├── b/
│ └── bar.nim
└── foo.nim
km²~/sandbox/:nim/paths> cat a/foo.nim 01/27 11:18pm
import b/bar
km²~/sandbox/:nim/paths> cat a/b/bar.nim 01/27 11:18pm
from macros import getProjectPath
from os import getCurrentDir, parentDir # doesn't work
const
sDir = currentSourcePath.parentDir()
pDir = getProjectPath()
let
cDir = getCurrentDir()
echo "Source path = ", sDir
echo "Project path = ", pDir
echo "Current path = ", cDir