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

Break in kcode / pause knitting #21

Open
kausalyamahadevan opened this issue Feb 22, 2021 · 5 comments
Open

Break in kcode / pause knitting #21

kausalyamahadevan opened this issue Feb 22, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@kausalyamahadevan
Copy link
Collaborator

Adding this as a separate issue in case this feature is supposed to already exist!
we tried " ;kniterate yarns in " and it did not work.

It would also be nice to be able to add a line directly to kcode that's not a comment (without //). That would translate to a break in knitting and message on the kniterate screen and allow for on-machine debugging

Originally posted by @kausalyamahadevan in #14 (comment)

@ixchow ixchow added the enhancement New feature or request label Feb 22, 2021
@ixchow
Copy link
Member

ixchow commented Feb 22, 2021

Proposed extension:
x-raw-kcode ...
prints anything after x-raw-kcode to the output kcode file.

To resolve:

  • does this also break the current pass? (Probably: yes, because otherwise the message could end up in a confusing place relative to the other knitout code in the file.)
  • what happens if this does something that changes the machine state? (Probably: the kcode file no longer works properly.)
  • should this instead be called x-message because it might be useful in other backends? (Probably: not yet.)

@gabrielle-ohlson
Copy link
Collaborator

gabrielle-ohlson commented Feb 23, 2021

this is the method that kniterate officially uses as a "pause" command (with any line of code with unsupported text pausing the machine and then display that text as a message on the screen).

we could use the pre-existing x-pause extension and adapt it to be x-pause(‘some text’) maybe, and just have the backend interpret that as pause = true; let message = ‘some text’ and then insert: \n${message}\n

regarding interrupting the pass and starting a new one, I think that is probably the best way to go about it since it doesn't make much sense to insert a pause in the middle of the representation of a pass in k-code (the line of underscores and dashes), so the machine would just carry on with whatever is next as a new pass (code-wise) when the user resumes.

@gabrielle-ohlson
Copy link
Collaborator

i am partial to keeping this separate from knitout ;comments though (but maybe we could eventually have the backend convert those into kcode //comments too if that feels worthwhile?)

@kausalyamahadevan
Copy link
Collaborator Author

Yes, I think that "x-message pause here" should be separate from knitout ;comments but I think that sending those to kcode could help with debugging as well!

@ixchow
Copy link
Member

ixchow commented Mar 4, 2021

The knitout specification does include a pause command, though it doesn't have any parameters. We could re-specify this to display a message (if the machine supports it).

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

No branches or pull requests

3 participants