Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve the last execution result #33

Open
zhuyuecai opened this issue Dec 9, 2016 · 4 comments
Open

Retrieve the last execution result #33

zhuyuecai opened this issue Dec 9, 2016 · 4 comments

Comments

@zhuyuecai
Copy link

@wrathematics , For an R server, we have a requirement that they want to get back their last result, like the .Last.result in R. But with remoter, this variable will always be null.
Can you include two log file, one store the last executed command history and their result?

Thanks

@snoweye
Copy link
Member

snoweye commented Dec 10, 2016

  • History recall has been implemented except for a client run by Rstudio which has its own feature.
  • .Last.result is a very bad idea that can waste a lot of memory ...

@wrathematics
Copy link
Member

Thanks for the questions.

The log problem doesn't work with RStudio because of a bug, which we've reported to them. It may have been fixed already (I'm honestly not sure), but we can turn that feature on as soon as the bug is fixed.

The .Last.value question is interesting. I do agree that there are performance concerns. It's difficult to think of a good way to handle this. I'm not opposed to having an optional server argument to turn something like this on/off, but I'll have to think about how to handle it exactly.

@zhuyuecai
Copy link
Author

Currently I changed the server repl function to log the command result to the logfile as well.
Such that clients can use the showlog function to get back the result.
This works with Rstudio.

But the output result is printed with the server log result together which makes it look messy.
And the management of server log and result log should be different.

@snoweye
Copy link
Member

snoweye commented Dec 12, 2016

  • Or, only visible objects to the client console can be assigned to the .Last.value. There is no need to assign those invisible objects or those already knew the destination ...
  • An optional argument is ideal, but probably no need when the above can be compromised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants