Can someone explain the nature of the algorithm library (or the nim compiler) that causes the nim interactive shell to behave like this? I've looked through the source code but all it seems to do is define procs.
>>> var x = @[1,2,3]
>>> echo x
@[1, 2, 3]
>>> import algorithm
Hint: algorithm [Processing]
>>> echo x
stdin(4, 5) Error: cannot evaluate at compile time: x
Hi. I'm the maintainer of nrpl (https://github.com/wheineman/nrpl). It does many of the things you want to do. You can save the current session invoking the immediate command
:s[ave] filename
and reload it later with either
:l[oad] filename
or
:a[ppend] filename
You can list all that's been defined previously with the immediate command
:h[istory]
I'm always looking to make improvements so feel free to list any issues or make a pull request.
Also this:
$ nrpl
> var x = @[1, 2, 3]
-
> echo x
@[1, 2, 3]
> import algorithm
> echo x
@[1, 2, 3]
>