How to get Name and Value from Variable for macro/template

2021-06-30 Thread Niminem
I've got that code to compile and "work", as in no errors, but it seems like if the stdout has nothing the stream gets stuck or in a loop or something. I'm able to type in the terminal for some reason when this happens, that's an indicator for me that the outputstream is like.. stuck. Any ideas?

How to get Name and Value from Variable for macro/template

2021-06-30 Thread sdmcallister
Is there any plan for `nim secret` to be less secretive?

How to get Name and Value from Variable for macro/template

2021-06-30 Thread Araq
I did this way for NimEdit,

How to get Name and Value from Variable for macro/template

2021-06-30 Thread Niminem
`inim` is great, I'm ok with using either. My problem is really having no clue how to handle stdin/stdout for receiving and sending data with either lol

How to get Name and Value from Variable for macro/template

2021-06-30 Thread Clonk
isn't `inim` is a better REPL these days ?

How to get Name and Value from Variable for macro/template

2021-06-29 Thread Niminem
Thanks for the feedback guys, ever since I started playing with `nim secret` I know this is the route I want to go and it doesn't need exporting of symbols... it's a REPL!

How to get Name and Value from Variable for macro/template

2021-06-29 Thread Niminem
I'd like to use `nim secret` as the REPL for the IDE but I get stuck trying to print out the output stream (the process is called via startProcess and I have two variables- 1 for the input stream 1 for the output) Is there a good source for handling like... sending and receiving messages to/fro

How to get Name and Value from Variable for macro/template

2021-06-29 Thread dsrw
Personally, I'd say that only exported symbols are usable in future cells, and then I'd load each cell in its own module and have each module automatically import all previous modules/cells. Advantages: * Very easy. * Works without any parsing or macros. * You get cell/module local variab

How to get Name and Value from Variable for macro/template

2021-06-29 Thread ynfle
Why don't you just have a macro that marks the variable as exported?

How to get Name and Value from Variable for macro/template

2021-06-29 Thread ynfle
Simple macro to get symbol name. macro getSymbolName(x: untyped): string = x.toStrLit Run I'm not sure if I get what you want for getting the latest value.

How to get Name and Value from Variable for macro/template

2021-06-29 Thread Niminem
Awesome thanks for some direction, I'll continue my research from here

How to get Name and Value from Variable for macro/template

2021-06-29 Thread timothee
see * `tests/compilerapi/tcompilerapi.nim` which might be what you want * `nim secret` seems relevant * `moduleSymbols` () which allows getting all symbols (private or not) from a module, including variables

How to get Name and Value from Variable for macro/template

2021-06-29 Thread Niminem
Thanks, I wasn't clear enough though. I need to do this programmatically. I have a [Jupyter Notebook-like IDE](https://github.com/Niminem/NimNotebook) I'm building. It uses embedded nimscript, passing data (module1 scenario) to the backend for execution. What I'm trying to include now is the ab

How to get Name and Value from Variable for macro/template

2021-06-29 Thread timothee
# module1: var name* = "Leon" name = "Blane" # module2: from moduel1 import nil var name = moduel1.name Run

How to get Name and Value from Variable for macro/template

2021-06-29 Thread Niminem
Hey guys, I'm trying to get the name and latest value from a variable, and write a variable declaration in a new file with this information. Like so: `module1.nim` `var name = "Leon"` `name = "Blane" # I want this value, not the value it was instantiated with` `module2.nim` `var name = "Blane"