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

Lagoon IEEE 754 floats #6971

Open
wants to merge 67 commits into
base: next/kelvin/410
Choose a base branch
from
Open

Conversation

sigilante
Copy link
Contributor

Pursuant to draft UIP at https://github.com/urbit/UIPs/blob/sigilante/lagoon-reals/UIPS.

Should be released alongside corresponding Vere code.

Fang- and others added 30 commits March 25, 2024 19:39
Adds a new endpoint to the verb wrapper library that gives more detail
about events happening to agents. This includes sequence numbers,
timestamps, source ship, mug hashes for incoming data, and a summary of
the resulting effects.
A utility agent that can be told to watch agents. Doing so will make it
subscribe to that agent's "verb plus" events. Verb-logger buffers those,
and flushes them to unix disk in a json format periodically.

Tools for viewing these logs still in development...
Include the mug for poke data, mark for facts, separate out the on-agent
sign explicitly.
Using the timestamp of the first event, instead of the start of the time
block.

Also narrow the time block down from a day to an hour, for faster log
writes. Further experimentation needed here.
Needs usability improvements for event details, range selection, among
other things.
And lets you click events to make their details sticky.

Also improves date rendering in some places.
Also prefixes marks with %, mugs with 0x, always.
Forget flavor-of-the-month, gulp expired _years_ ago.
New verb watching button added next to the existing one. Instead of
rendering logs to text in the apps view, adds events into the logs view.
Lossy, but if the original ms timestamp came out of an urbit, it was
already lossy anyway.
It doesn't contain anything by default, so is easier to scroll
past/doesn't need to be collapsed to get to the verb buttons.
Not sure why this one was added in.
in the thread-calling http interface.

Specifying a content-type header of application/x-urb-jam will make the
request body be interpreted as a uw-encoded jammed noun, rather than
json.

Specifying an accept header of application/x-urb-jam will make the
thread result in the response body be rendered as a uw-encoded jammed
noun, rather than json.

For the latter, the output mark becomes unused, since we can just
"render" the resulting noun directly, without needing to explicitly
convert it. (This assumes that converting any mark to %noun will always
result in the same noun, which isn't guaranteed in theory, but is always
the case in practice.)

This prepares spider for use in a nouns-based version of js-http-api.
This brings it in line with the serialization found in /mar/noun.

The `@uw`-encoding was carried over from Eyre, who uses it for channels.
In that context, outgoing jam bytes must be encoded, because newline
characters (`0a` bytes) would break up the SSE data field. Because
they're essentially part of the same protocol, Eyre mirrors this for
incoming nouns. Even though PUT requests can carry arbitrary bytes just
fine, the symmetry and protocol-wide consistency seems important.

Here, we are dealing strictly with plain HTTP requests, and strictly
with requests that have indicated support for the
`application/x-urb-jam` mime type to boot. We should have no qualms
about raw jam bytes. They're more compact/efficient, too.
@sigilante
Copy link
Contributor Author

de-ray fixed.

Tests fixed.

@sigilante
Copy link
Contributor Author

test-urbit> clay: read-at-tako fail [desk=�se care=%a case=[� p=~2024.5.2..20.40.45..de52] path=/gen/tx/hoon]
test-urbit> [%file-not-found-mist /tests/lib/naive/hoon]
test-urbit> [%error-validating /tests/lib/naive/hoon]
test-urbit> [%error-building /tests/lib/naive/hoon]
test-urbit> [%error-building /gen/tx/hoon]
test-urbit> clay: %a build failed [�se 0v1o.trqdf.gvsr6.07kka.joa89.97t9h.btt65.4a3b2.m0q1g.tgj1n.koh9e /gen/tx/hoon]
test-urbit> FAILED  /gen/tx/hoon

AFAICT nothing to do with Lagoon.

@sigilante
Copy link
Contributor Author

Thanks. Guess things are getting moved around.

test-urbit> clay: read-at-tako fail [desk=�se care=%a case=[� p=~2024.5.3..16.15.42..287f] path=/ted/ph/tend/hoon]
test-urbit> [%file-not-found-mist /tests/app/tend/hoon]
test-urbit> [%error-validating /tests/app/tend/hoon]
test-urbit> [%error-casting-path /tests/app/tend/hoon ~.hoon %hoon]
test-urbit> [%error-building /ted/ph/tend/hoon]
test-urbit> clay: %a build failed [�se 0v1o.trqdf.gvsr6.07kka.joa89.97t9h.btt65.4a3b2.m0q1g.tgj1n.koh9e /ted/ph/tend/hoon]
test-urbit> FAILED  /ted/ph/tend/hoon
test-urbit> %some-threads-failed

test-urbit> clay: read-at-tako fail [desk=�se care=%c case=[� p=~2024.5.3..16.16.10..f350] path=/noun/mass]
test-urbit> clay: no files match /mar/mass/hoon
test-urbit> [%error-building-cast %noun %mass]
test-urbit> [%error-building-tube %noun %mass]

@sigilante
Copy link
Contributor Author

sigilante commented Jul 19, 2024

  • add overflow checks to lagoon.c
  • make a file of failed tests
  • run tests against jetted and unjetted

@sigilante
Copy link
Contributor Author

This is ready for review.

@sigilante
Copy link
Contributor Author

When the tests pass here on that last commit, then this is ready to merge. @joemfb @pkova @belisarius222 @jalehman

@sigilante
Copy link
Contributor Author

For posterity, the original PR (prior to refactoring several times) was #3536.

@sigilante
Copy link
Contributor Author

sigilante commented Sep 5, 2024

  • fix ^pow

@sigilante
Copy link
Contributor Author

Looks like the failure has nothing to do with Lagoon tests which all passed.

@sigilante
Copy link
Contributor Author

cc @pkova

Kiitos.

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

Successfully merging this pull request may close these issues.

6 participants