Skip to content

Spin Hint#771

Merged
pkova merged 32 commits into
next/kelvin/409from
mw/slow-hint
May 23, 2025
Merged

Spin Hint#771
pkova merged 32 commits into
next/kelvin/409from
mw/slow-hint

Conversation

@mopfel-winrux

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

Copy link
Copy Markdown
Collaborator

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

Comment thread pkg/noun/nock.c Outdated
Comment thread pkg/vere/io/http.c
@Fang- Fang- self-requested a review March 4, 2025 19:28
Comment thread pkg/noun/nock.h Outdated
Comment thread pkg/noun/nock.c Outdated
@mopfel-winrux

mopfel-winrux commented Mar 6, 2025

Copy link
Copy Markdown
Collaborator 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

@mopfel-winrux

Copy link
Copy Markdown
Collaborator 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

@Fang- Fang- left a comment

Copy link
Copy Markdown
Member

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.

Comment thread pkg/noun/nock.c Outdated
Comment thread pkg/noun/nock.c Outdated
Comment thread pkg/vere/io/http.c
Comment thread pkg/vere/io/http.c
Comment thread pkg/vere/io/http.c

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

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).

Comment thread pkg/noun/nock.c Outdated
Comment thread pkg/noun/nock.c Outdated
Comment thread pkg/noun/nock.c Outdated
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/io/http.c
Comment thread pkg/noun/manage.c Outdated
Comment thread pkg/noun/manage.c

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A few nits:

Comment thread pkg/vere/io/http.c
Comment thread pkg/vere/io/http.c
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/serf.c Outdated
Comment thread pkg/vere/io/http.c
@mopfel-winrux mopfel-winrux changed the base branch from develop to next/kelvin/409 May 6, 2025 16:49

@mopfel-winrux mopfel-winrux left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Quick notes from core blitz

Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/io/http.c
Comment thread pkg/noun/trace.c
Comment thread pkg/noun/trace.c
Comment thread pkg/noun/trace.c Outdated
Comment thread pkg/noun/trace.c
Comment thread pkg/noun/trace.c
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/vere/io/http.c
Comment thread pkg/noun/manage.c Outdated

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These changes look good. A couple style nits:

Comment thread pkg/vere/io/http.c
Comment thread pkg/vere/io/http.c Outdated
Comment thread pkg/noun/trace.c Outdated

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this will do

@pkova pkova merged commit 7a84d49 into next/kelvin/409 May 23, 2025
2 checks passed
@pkova pkova deleted the mw/slow-hint branch May 23, 2025 15:36
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.

4 participants