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

Limit output if it gets out of hand #97

Open
v0dro opened this issue Jun 3, 2016 · 2 comments
Open

Limit output if it gets out of hand #97

v0dro opened this issue Jun 3, 2016 · 2 comments

Comments

@v0dro
Copy link
Member

v0dro commented Jun 3, 2016

If you try to put something like NMatrix.new([1600,1600], [1]*1600*1600) into iruby, it usually crashes on my computer.

Limiting the output of exponentially large to print objects might prove beneficial. We can have some kind of an option with which users can toggle this behavior.

@kylekyle
Copy link
Collaborator

kylekyle commented Jun 3, 2016

Could we wrap NMatrix output in an IRuby::Table? By default, a table will only display the first and last n rows.

I'm not really sure how to limit output in a general way. My only thought is to wrap all output in a Javascript that hides output after n bytes or lines with a "More output" button that displays a further n bytes or lines when you click it. That might help a lot since your browser can usually hold all the output in memory no problem, it just struggles to render it.

@v0dro
Copy link
Member Author

v0dro commented Jun 3, 2016

Ah if it's just a rendering issue then I'd go with the 'more output' option. That way it can universally apply to all sorts of objects.

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

No branches or pull requests

3 participants