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

parse: add @uv and @uw support #3

Merged
merged 3 commits into from
Jul 5, 2022
Merged

parse: add @uv and @uw support #3

merged 3 commits into from
Jul 5, 2022

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Jul 2, 2022

Also refactors their tests to match @da, and adds even larger test cases.

The dumb approach here of simply doing alphabet.indexOf seems plenty fast. Checking and adjusting the value of x.charAt(0) wasn't noticeably faster, and using a separate alphabet lookup table is actually a bit slower.

CI is giving red Xs on master also, so I'm ignoring it. (;

Also refactors their tests to match @da, and adds even larger test
cases.
@github-actions
Copy link

github-actions bot commented Jul 2, 2022

size-limit report 📦

Path Size
dist/aura.cjs.production.min.js 7.89 KB (+0.94% 🔺)
dist/aura.esm.js 8.06 KB (+0.81% 🔺)

Fang- added a commit to urbit/urbit that referenced this pull request Jul 4, 2022
Updates the channel logic to communicate using jammed nouns, instead of
json.

It has been tested to actually work, but the "how do clients supply &
handle nouns" story hasn't been fully fleshed out yet, so consider this
a partial implementation.

We hard-import nockjs, which has been extended with jso-to-noun
utilities that we re-export. Arguments are taken as js values/objects,
and passed through nockjs's dwim() function for conversion. This is
sufficiently comfortable in most cases, but also slightly misleading.

Nockjs should, sooner rather than later, be pulled out into its own
repository and proper npm package. We should consider the relations
between is, http-api, and aura-js.

Also depends on aura-js including urbit/aura-js#3.
format: accept strings in place of bignums
@Fang- Fang- merged commit 53f33e7 into master Jul 5, 2022
@Fang- Fang- deleted the m/parse-uw branch July 5, 2022 19:51
xiphiness pushed a commit to xiphiness/urbit that referenced this pull request Mar 14, 2023
Adds a "mode" to channels, which can be set to either %json (current
behavior) or %jam. For %jam channels, aside from the SSE framing, all
communication happens through @uw-encoded jammed nouns. This applies to
both outgoing channel events, as well as incoming channel requests.

We choose @uw-style encoding because raw bytestreams are fragile and
cannot work inside the SSE stream context.

Currently, a separate endpoint (/~/channel-jam/etc) is used to indicate
%jam as the desired mode for a channel. We will probably want to make
this a bit cleaner, not least because it's not currently implemented as
a formal standalone endpoint, but also to give it stronger aesthetic
equivalence with the existing channel endpoint. Putting the mode in the
file extension is a tempting option here, but semantically not quite
right.

Connecting to the same channel across multiple modes is currently
supported, but it's untested, and unclear whether this is desirable or
not.

http-api: use noun-based channels

Updates the channel logic to communicate using jammed nouns, instead of
json.

It has been tested to actually work, but the "how do clients supply &
handle nouns" story hasn't been fully fleshed out yet, so consider this
a partial implementation.

We hard-import nockjs, which has been extended with jso-to-noun
utilities that we re-export. Arguments are taken as js values/objects,
and passed through nockjs's dwim() function for conversion. This is
sufficiently comfortable in most cases, but also slightly misleading.

Nockjs should, sooner rather than later, be pulled out into its own
repository and proper npm package. We should consider the relations
between is, http-api, and aura-js.

Also depends on aura-js including urbit/aura-js#3.

webterm: update to work with noun-based channels

We import the enjs utilities from nockjs and use those to parse incoming
blits.

eyre: deduce channel mode from headers, not url
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

2 participants