Skip to content

Advanced parenthesis patterns#1046

Open
Robotgiggle wants to merge 5 commits into
mainfrom
big-parens
Open

Advanced parenthesis patterns#1046
Robotgiggle wants to merge 5 commits into
mainfrom
big-parens

Conversation

@Robotgiggle
Copy link
Copy Markdown
Member

@Robotgiggle Robotgiggle commented May 13, 2026

NOTE: If/when #1047 gets merged, this will need a pretty substantial rewrite to make use of the new system.

Adds Meditation and Recollection, advanced versions of the standard intro/retro patterns.

  • Meditation pops an integer and opens a list to the specified parenthesis depth.
  • Recollection closes a list from any parenthesis depth, pushing the depth and the list.

Meditation is treated as a normal pattern when inside existing parentheses because there's no way to determine how many new layers it should open. This is kind of a janky solution given that every other pattern in this section of the book works even while nested, but the only alternative would be to prevent using it inside parens altogether.

Recollection pushes the list on top of the depth for convenience, since you're much more likely to need the list as an argument for something (saving it to a focus, adding something with Integration Distillation, etc) than the number.

Screenshot 2026-05-13 000048

@Real-Luxof
Copy link
Copy Markdown
Contributor

Real-Luxof commented May 13, 2026

Can they be named something cooler? Like Continue and Cessation/Cease?

@Robotgiggle
Copy link
Copy Markdown
Member Author

I'm definitely down to change the names to something better, but I feel like Resumption/Cessation (the names from Hexic) don't really have quite the same vibe as Introspection/Retrospection. Also, we probably shouldn't use Continuation to avoid confusion with jumps and the continuation frame system.

@Real-Luxof
Copy link
Copy Markdown
Contributor

Could be Meditation and Afterthought maybe

@Real-Luxof
Copy link
Copy Markdown
Contributor

There's no page for the nested big introspection mishap.

@Robotgiggle
Copy link
Copy Markdown
Member Author

Robotgiggle commented May 13, 2026

There's no page for the nested big introspection mishap.

Ah, good catch. I'll get that done shortly.

@Robotgiggle
Copy link
Copy Markdown
Member Author

Technically yes? But I think it's a little better from an organizational perspective to keep everything together, especially since making it an Action would require making a whole new subfolder in the actions folder or just leaving it awkwardly in the top level.

If more people think it should be an Action I can move it over, I just think it makes a little more sense this way.

pattern ?: HexPattern(HexDir.WEST),
HexAPI.instance().getRawHookI18n(HexAPI.modLoc(when (pattern?.angles) {
SpecialPatterns.RETROSPECTION.angles -> "close_paren"
SpecialPatterns.MEDITATION.angles -> "open_n_parens"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Meditation never throws now, so I think this part should be removed (correct me if I'm wrong)

Copy link
Copy Markdown
Member Author

@Robotgiggle Robotgiggle May 13, 2026

Choose a reason for hiding this comment

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

It still throws if you cast it without the proper number argument (see lines 310 and 311)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ic

Copy link
Copy Markdown
Contributor

@Real-Luxof Real-Luxof left a comment

Choose a reason for hiding this comment

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

  • lgtm
  • can't think of a reason why this shouldn't be in base hex

@c-Caelum
Copy link
Copy Markdown

This is neat. I like this. Maybe, though, Meditation could add some given list to the intro/retro that's made?

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

Labels

None yet

Projects

Status: 📋 Backlog

Development

Successfully merging this pull request may close these issues.

3 participants