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

Spin Hint #771

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open

Spin Hint #771

wants to merge 28 commits into from

Conversation

mopfel-winrux
Copy link
Contributor

@mopfel-winrux mopfel-winrux commented Mar 4, 2025

This PR adds a %spin hint to vere. This hint provides a labeled compute stack in shared memory. It also includes an SSE endpoint located at /~_~/spin which will push the current non-empty stack to the SSE endpoint as a comma separated value string. The endpoint is set to sample the spin stack at 10kHz (0.1 ms).

To test this:

  • boot a fake ship
  • login to the webui
  • navigate to /~_~/spin
  • in dojo enter
=g |=  l=(list @)
  ~>  %spin.[(scot %ud (lent l))]
  (turn l |=(a=@ ~>(%spin.[(scot %ud a)] (met 3 (jam .)))))
  • run (g ~[1 2 3 4 5 6 7 8 9 10]) in dojo.
  • On the website you should see:
    image

@Fang- Fang- self-requested a review March 4, 2025 19:28
@mopfel-winrux
Copy link
Contributor Author

mopfel-winrux commented Mar 6, 2025

As per @joemfb, we want to push the current pointer onto the road system and if the inner road bails, restore it to the previous one

As per @frodwith, the timer should only go off iff something is connected

@mopfel-winrux
Copy link
Contributor Author

As per @joemfb, we want to push the current pointer onto the road system and if the inner road bails, restore it to the previous one

As per @frodwith, the timer should only go off iff something is connected

Both of these are done. Going to mark this draft as ready for review

@mopfel-winrux mopfel-winrux marked this pull request as ready for review March 7, 2025 20:12
@mopfel-winrux mopfel-winrux requested a review from a team as a code owner March 7, 2025 20:12
Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits and a concern about potential timer doubling.

Copy link
Collaborator

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I have a few nits about code organization. It'd be great to try it out in term.c at some point. And we should probably add some spin-stack entries for top-level ipc messages (snapshot save, &c).

Copy link
Collaborator

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits:

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.

None yet

4 participants