Re: Import module by name / absolute path

2018-02-22 Thread Udiknedormin
@guibar Thank you, guibar, I forgot I need a static[T] to change macros' semantics. I haven't used that for some time now.

Re: Import module by name / absolute path

2018-02-20 Thread guibar
@Udiknedormin Here you can use `static` types that passes data to macros instead of a `NimNode` import macros const module {.strdefine.}: string = "math" macro importconst(name: static[string]): untyped = #let value = name.symbol.getImpl #echo "variable

Re: Import module by name / absolute path

2018-02-20 Thread Udiknedormin
@Araq How can I do it with macros? getImpl returns the const's default value, not the strdefined one: import macros const module {.strdefine.}: string = "math" macro importconst(name: string): untyped = let value = name.symbol.getImpl echo "variable nam

Re: Import module by name / absolute path

2018-02-15 Thread c0ntribut0r
That's why I like nim! Got a reply on my questions in 5 minutes from Araq! Thank you

Re: Import module by name / absolute path

2018-02-14 Thread Araq
1. `import "/tmp/math_superfast"` (with the quotes) works. 2. You can use a macro for that, yes. 3. Certainly. 4. register at gravatar