Skip to content

Conversation

@byorgey
Copy link
Member

@byorgey byorgey commented Oct 30, 2025

  • Various minor tutorial improvements
  • Move conditional tutorial after world101 (world101 does not require conditionals)
  • Add new loops tutorial after conditionals and before farming, which prompts you to implement a while loop using recursion.

Copy link
Member

@xsebek xsebek left a comment

Choose a reason for hiding this comment

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

Looks good to me, I like the loops tutorial. 👍

- |
Some kind of `while`{=snippet} loop would obviously come in
handy here. However, the Swarm language does not have loops,
only recursion, which is enabled by the `strange loop`{=entity}
Copy link
Member

Choose a reason for hiding this comment

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

I noticed that the strange loop is not installed if you write the while definition outside the build command. Is it worth calling out strange loop, if its description is mysterious and does not add anything?

Copy link
Member Author

@byorgey byorgey Nov 1, 2025

Choose a reason for hiding this comment

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

I noticed that the strange loop is not installed if you write the while definition outside the build command.

Oh, hmm, really? I would say that is a bug. (Filed #2627.)

I called out strange loop because later when the player starts the classic mode game, they will want to know that they need to craft one in order to be able to use recursive functions. Of course they can also discover this through the error message that happens when they try to run a recursive function without one; but IMO it's better if their reaction at that point is "oh, right, I remember that. I wonder how I can craft one?" rather than "wait, what's a strange loop?". But I could be convinced otherwise.

@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Nov 1, 2025
@mergify mergify bot added the queued label Nov 1, 2025
mergify bot added a commit that referenced this pull request Nov 1, 2025
@mergify mergify bot merged commit 436efdb into main Nov 1, 2025
16 checks passed
@mergify mergify bot deleted the feature/byorgey/tutorial-updates branch November 1, 2025 22:43
@mergify mergify bot removed the queued label Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Trigger the merge process of the Pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants