string to pattern

Post your coolest Hexcasting creations here.

New topics are NOT for chatting or asking help, put those in the comments of a post or in a different forum.
User avatar
kristi fristi
Posts: 26
Joined: Mon Dec 12, 2022 7:23 am

string to pattern

Post by kristi fristi »

using string operations from moreiotas and pattern editing from hexbound this hex takes the last message you sent in chat and turns it into a pattern list

Code: Select all

//takes as input the text result of the /hex patterns command from the discord bot, sent as a chat message by the caster
//e.g.(without quotes) "SOUTH_EAST aqaaedweede, SOUTH_EAST aqaaedwd, NORTH_WEST wedew, SOUTH_EAST aqaaqawqqaaqa, NORTH_EAST waaw" EXACTLY AS WRITTEN
//can't handle single stroke patterns (e.g just "SOUTH_EAST" or any other direction)
//capable of generating any other reasonably-sized pattern, including patterns with the s direction or ones that loop in on themselves

Whisper Reflection
Spacing Reflection
Jester's Gambit
Concatenation Distillation
Comma Reflection
Separation Distillation //break the string into a list of patterns
{
  Huginn's Gambit
  Flock's Reflection
  Flock's Gambit
  Bookkeeper's Gambit: v //remove any junk to keep the thoth stack clean, means this can be used even if there are other iotas on the stack
  Muninn's Reflection
  Spacing Reflection
  Separation Distillation
  Flock's Disintegration
  Bookkeeper's Gambit: v--
  {
    Bookkeeper's Gambit: -      //if you want the patterns to have the correct orientation, this has to be EAST
  }
  Flock's Disintegration
  Rotation Gambit
  {
    //should contain "EAST 0,WEST 3,SOUTH_EAST 1,SOUTH_WEST 2,NORTH_WEST 4,NORTH_EAST 5"(without quotations) EXACTLY
  }
  Flock's Disintegration
  Gemini Decomposition
  Rotation Gambit
  Discoverer's Distillation
  Prospector's Gambit
  Length Distillation: Str
  Winnowing Distillation
  Comma Reflection
  Separation Distillation
  Numerical Reflection: 0
  Selection Distillation
  Spacing Reflection
  Separation Distillation
  Numerical Reflection: 1
  Selection Distillation
  Input Purification        
  Revolving Distillation        //starting direction set
  Gemini Decomposition          //this one's for rotating
  Rotation Gambit
  Blank Reflection
  Separation Distillation
  Gemini Decomposition
  Abacus Purification
  Numerical Reflection: 1
  Subtractive Distillation
  Numerical Reflection: 1       //the aqwed(s) code is seperated into a list of turns
  Jester's Gambit
  Selection Exaltation
  Gemini Decomposition
  Abacus Purification
  Huginn's Gambit
  {
    Speaker's Decomposition
    {
        //put "wedsaq" here (same as before)
    }
    Flock's Disintegration
    Jester's Gambit
    Discoverer's Distillation
    Rotation Gambit
    Jester's Gambit
    Revolving Distillation
    Gemini Decomposition        //keeps track of current rotation
    Numerical Reflection: 4
    Fisherman's Gambit
    Jester's Gambit
    Painter's Distillation
    Jester's Gambit
    Rotation Gambit         //iteration ends with /Hexpattern(partial pattern), Hexpattern(current direction), [turns it still has to do]
  }
  Muninn's Reflection
  Gemini Gambit
  {
    Combination Distillation
  }
  Flock's Disintegration
  Muninn's Reflection
  Numerical Reflection: 1
  Subtractive Distillation
  Gemini Gambit
  Muninn's Reflection
  Numerical Reflection: 1
  Subtractive Distillation
  Flock's Gambit
  Hermes' Gambit
  Hermes' Gambit
  Bookkeeper's Gambit: -vv
}
Jester's Gambit
Thoth's Gambit
//congrats! your chat message is now a pattern list on the stack!
because of the 256 character limit the most effective way to use this hex for assembling other hexes is to turn it into an everbook macro, send to chat a piece, use the macro, do this until you have all the pieces, then add it all together with combination.
User avatar
kristi fristi
Posts: 26
Joined: Mon Dec 12, 2022 7:23 am

Re: string to pattern

Post by kristi fristi »

here's a version that permits bookkeepers: - and is aided by the fact I remembered locator's distillation exists

Code: Select all

//takes as input the text result of the /hex patterns command from the discord bot, sent as a chat message by the caster
//e.g.(without quotes) "SOUTH_EAST aqaaedweede, SOUTH_EAST aqaaedwd, NORTH_WEST wedew, SOUTH_EAST aqaaqawqqaaqa, NORTH_EAST waaw" EXACTLY AS WRITTEN
//capable of generating any reasonably-sized pattern, including patterns with the s direction or ones that overlap themselves
//only succesfully generates bookkeeper's gambit:- as part of a list of patterns
//every other pattern can be generated on its own


Whisper Reflection
Spacing Reflection
Jester's Gambit
Concatenation Distillation
Comma Reflection
Separation Distillation
{
  Huginn's Gambit
  Flock's Reflection
  Flock's Gambit
  Bookkeeper's Gambit: v
  Muninn's Reflection
  Spacing Reflection
  Separation Distillation
  Flock's Disintegration
  Bookkeeper's Gambit: v--
  {
    Bookkeeper's Gambit: - //needs to go east for proper rotation of patterns
  }
  Flock's Disintegration
  Rotation Gambit
  {
    //"wedsaq" goes here EXACTLY AS WRITTEN
  }
  Jester's Gambit
  Locator's Distillation
  Revolving Distillation
  Gemini Decomposition
  Rotation Gambit
  Blank Reflection
  Separation Distillation
  Gemini Decomposition
  Abacus Purification
  Numerical Reflection: 1
  Subtractive Distillation
  Numerical Reflection: 1
  Jester's Gambit
  Selection Exaltation
  {
    Speaker's Decomposition
    {
      //"EAST", "SOUTH_EAST", "SOUTH_WEST", "WEST", "NORTH_WEST", "NORTH_EAST" goes here as part of the list, NOT  it's own list
      //this piece can be made by sending "EAST,SOUTH_EAST,SOUTH_WEST,WEST,NORTH_WEST,NORTH_EAST" to the chat then doing /Whisper Reflection, Comma Reflection, Separation Distillation
    }
    Flock's Disintegration
    Jester's Gambit
    Discoverer's Distillation
    Rotation Gambit
    Jester's Gambit
    Revolving Distillation
    Gemini Decomposition
    Numerical Reflection: 4
    Fisherman's Gambit
    Jester's Gambit
    Painter's Distillation
    Jester's Gambit
    Rotation Gambit
  }
  Prospector's Gambit
  Abacus Purification
  Gemini Decomposition
  Numerical Reflection: 1
  Subtractive Distillation
  Gemini Decomposition
  Numerical Reflection: 0
  Maximus Distillation
  Jester's Gambit
  Numerical Reflection: 0
  Augur's Exaltation
  Huginn's Gambit
  Gemini Gambit
  {
    Combination Distillation
  }
  Flock's Disintegration
  Muninn's Reflection
  Gemini Gambit
  Muninn's Reflection
  Flock's Gambit
  Hermes' Gambit
  Flock's Reflection
  Numerical Reflection: 4
  Equality Distillation
  Nullary Reflection
  Single's Purification
  Vacant Reflection
  Vacant Reflection
  Numerical Reflection: 2
  Flock's Gambit
  Augur's Exaltation
  Flock's Disintegration
  Bookkeeper's Gambit: v
  Hermes' Gambit
  Bookkeeper's Gambit: -vv
}
Jester's Gambit
Thoth's Gambit