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

Stethoscope console #4511

Merged
merged 56 commits into from
Jun 9, 2022
Merged

Stethoscope console #4511

merged 56 commits into from
Jun 9, 2022

Conversation

zeffii
Copy link
Collaborator

@zeffii zeffii commented Jun 4, 2022

  • will add nicer looking mode (for topology, arbitrary lists, even mixed list lengths)
    • possibly lame-lexer for arbitrary string content (something which doesn't expect syntax highlighting)
      The solution here might be to try/except a syntax-highlighter, and in the exception clause attempt a lame-lexer ( that handles explicit []/\[0-9]()|:-+=*&@#~;<>?, rather than lexing something that must be compilable - just focus on certain characters.
  • will increase speed of default text mode
  • hijack REPL to allow printing arbitrary data to, instead of stdout. with "console_print(.....)`
    from sverchok.utils.console_print import console_print
    console_print(V1, allow_repeats=True, pretty=True, rounding=4, compact=True)

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 5, 2022

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 5, 2022

image

at threshold 50 items, the array2string can show an abbreviation. This is a pretty slow implementation at the moment.

  • options to be added to the sv++ ui

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 5, 2022

image

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 5, 2022

image

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 5, 2022

with mixed polygon lengths, the array2string function does this..
image

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 6, 2022

this is now showing favourable speed increases vs the original blf / socket parsing.

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 7, 2022

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 7, 2022

image

not sure if the buffer can be persistent between updates.. i imagine it can be a once-off event..

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 7, 2022

caching a buffer makes sense if the size is static
image

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 8, 2022

this is a useful feature for debugging..

image

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 9, 2022

i see python tokenizer has changed again in recent pythons.. but that's a problem to fix in console_node

@zeffii zeffii marked this pull request as ready for review June 9, 2022 09:05
@zeffii
Copy link
Collaborator Author

zeffii commented Jun 9, 2022

if anyone wants to improve the chop_data function for more broad input, that would be great. but for now i think this will suffice for the most common input.

The docs will be updated shortly.

@zeffii zeffii merged commit 6da3a6e into master Jun 9, 2022
@zeffii zeffii deleted the stethoschope_console branch June 9, 2022 09:09
@zeffii
Copy link
Collaborator Author

zeffii commented Jun 9, 2022

interesting, but completely unrelated : https://pastebin.com/znbQ6tyh

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 9, 2022

more unrelated
image
from https://stackoverflow.com/a/33206814/1243487

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

Successfully merging this pull request may close these issues.

1 participant