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

Guide Tour/Combinators example use sqrt word without mentioning USE: math.functions #2932

Open
pierre-rouleau opened this issue Jan 10, 2024 · 5 comments

Comments

@pierre-rouleau
Copy link

pierre-rouleau commented Jan 10, 2024

The Factor Handbook / Guided tour of Factor / Combinators documentation page has an (executable) example about using the sqrt word (currently at line 284 of the basic/help/tour/tour.factor)

The example fails to mention that the math.functions vocabulary must first be installed with USE:.

Being able to use docs in Factor itself is quite nice. I think I could add the extra text, but I'm unsure about the overall documentation strategy for the tour:

  • Should all examples be executable? I'd guess they should be, given the fact that you can simply press on the highlighted example show in the Listener help window.
  • Is there a convention in introducing a required vocabulary in the tour?
@mrjbq7
Copy link
Member

mrjbq7 commented Jan 10, 2024 via email

@pierre-rouleau
Copy link
Author

The error handling pop-up does, yes. Is this the reason you don't mention it in the tour?

@mrjbq7
Copy link
Member

mrjbq7 commented Jan 10, 2024

It's partly why it's not always noticed -- some of the tour has for example USE: ranges blocks, that then make the following code example work immediately. But without that, the restart is a convenient way to allow the user to pick the correct dependency and then continue.

PRs welcome!

@razetime
Copy link
Member

in such small snippets i didn't think it would make sense to add a USE: in the snippet. One idea is we can add a note early on in the tour talking about missing vocab errors.

@pierre-rouleau
Copy link
Author

pierre-rouleau commented Jan 10, 2024

I agree with @razetime, and I would also think that a note describing the error handling, the pop-up window and the suggestion that comes up whenever a vocabulary is required and has not yet been loaded would help and be sufficient.

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

No branches or pull requests

3 participants