Fork me on GitHub
#cursive
<
2017-04-04
>
wilkerlucio00:04:50

good question, IMO I think it should retain the last namespace where it was executed, I think this most likely what user wants, I find hard to find a case where I want the same command to run in a different NS that it ran before

cfleming00:04:52

@wilkerlucio Makes sense, thanks!

wilkerlucio00:04:40

you'r welcome, thank you for taking the time to improve that πŸ™‚

cfleming00:04:37

No worries, that will be in the next build

puzzler19:04:23

@wilkerlucio A common situation: I type an expression at the REPL and realize I'm in the wrong namespace because it doesn't work as expected. I switch namespaces and re-evaluate the expression from the history. So this is a concrete example where you don't want the namespace stored with the command.

wilkerlucio19:04:08

ok, fair enough, but you think this is more common than switching the namespace and still want to run the same command on the new one?

wilkerlucio19:04:02

to be honest, I don't care much about this scenario, I usually run commands from inside (comment) blocks on my code, so I rarely run then on the wrong namespace

wilkerlucio19:04:32

but still, in the case you mentioned, you would only have to go to REPL and use up, return to rerun on the current one, and from then you could use the Run Last REPL command, sounds reasonable?

puzzler19:04:54

I use arrow keys in the REPL to access history, not Run Last REPL command, so as long as arrow keys aren't causing commands to run in some other namespace than the one implied by the context of the REPL, that's what matters to me.

puzzler19:04:21

It would be confusing to access an old command and not know what namespace it is going to run in.

wilkerlucio19:04:46

we can confirm with @cfleming , but on my understanding this change would only affect the Run Last REPL Command thing, nothing about running from the REPL input should change

wilkerlucio19:04:40

I agree if that changes would be confusing

kenny22:04:02

How do you guys work with a project that contains multiple sub-projects? For example, take the below directory structure:

.
β”œβ”€β”€ project1
β”œβ”€β”€ project2
└── project3
I can create a bunch of modules for each sub-project but that doesn’t work too well when all the sources are stored in a single Git repo. What is the suggested way to deal with this problem?