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

Fix errors in the parsing docs #135

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

johnhyde
Copy link

Here are corrections to some small errors I found in the parsing docs.

There's another issue I haven't addressed here which I'd like to get feedback on. In an actual edge, q.edg is a unit, meaning all the references in the docs to q.q.q.edg (the remaining tape to be parsed) should actually be q.q.u.q.edg.

So my question is, should I go through and update all the references and dojo outputs in these pages to accurately reflect this u face in the unit, or just leave it as it is (which might be more readable)?

If we're going to update the faces, it should probably be in this PR, I would think.

Copy link

vercel bot commented Oct 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-urbit-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 1:25pm

@johnhyde
Copy link
Author

@tinnus-napbus @sigilante @tamlut-modnys
Tagging you guys specifically for your input, if you have any

@tamlut-modnys
Copy link
Contributor

I'm not the most familiar with the parsing docs. If something is incorrect it would seem that the right move is to fix it. That being said we should definitely get confirmation from ~tinnus or ~lagrev.

Thanks for the PR by the way!

Copy link
Contributor

@tinnus-napbus tinnus-napbus left a comment

Choose a reason for hiding this comment

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

a couple of minor changes

content/courses/hoon-school/Q2-parsing.md Outdated Show resolved Hide resolved
content/language/hoon/guides/parsing.md Outdated Show resolved Hide resolved
content/language/hoon/guides/parsing.md Outdated Show resolved Hide resolved
content/language/hoon/guides/parsing.md Outdated Show resolved Hide resolved
@tinnus-napbus
Copy link
Contributor

So my question is, should I go through and update all the references and dojo outputs in these pages to accurately reflect this u face in the unit, or just leave it as it is (which might be more readable)?

If the unit is omitted in explanations or something that should be corrected but I wouldn't worry about dojo outputs. I would assume the dojo examples missing the u face or w/e is cos the actual function forgets to add it. Parsers are wetter than wet and you can't cast them without destroying type information so it can be a bit hit-or-miss with the faces & whatever

@johnhyde
Copy link
Author

johnhyde commented Nov 1, 2024

I would assume the dojo examples missing the u face or w/e is cos the actual function forgets to add it.

I did some digging and discovered that actually the u face is probably always needed, but it's not always shown in dojo. In the case of ++cold, the unit is known to be not null, so the type knows the face is there, and it appears in dojo outputs. In other cases, the unit's nullness is unknown, and the u face won't be displayed until the unit is shown to be not null. I guess technically the u face can't exist on a unit whose type is still a fork of ~ and [~ u=*]... although somehow all the ps and qs under that are still shown.

@johnhyde
Copy link
Author

johnhyde commented Nov 1, 2024

This is a bit off-topic, but it would be cool if the pretty printer could indicate boundaries in the noun where we have to do a type refinement to access the data through faces. Currently it can easily happen that it shows you a noun and it looks like you should be able to access a property with a certain wing, but actually there's a unit in there you need to deal with first, which will also add another limb to your wing.

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.

3 participants