Skip to content

Runtime binding options #535

Open
Open
@andrewfstratton

Description

Parameters can be bound at 3 different points:

  1. Generation - e.g. the module and api names
  2. Early runtime - this is run once only when setting up the api call. e.g. a constant text to be shown or filename
  3. Late runtime - this may be updated every invocation, e.g. val/txt parameters

Note: Generation could even be done at Early runtime to simplify things.

Simple option:

  • separate the late runtime parameters into an overriding list of parameter=source mappings
    • i.e. mappings are split into early and late binding, e.g. media.say({early},{late})
      • e.g. media.say({speed=100, voice="female", interrupt=false}, {text=txt, pitch=val})

Note that containment of callbacks is likely by:

  • following with {(\naction)*\n}, e.g.
media.whenHear(word="hello"){
  media.say(text="Hi")
}

A more complex example, picking at random a response, would include:

pick.random(type="Reorder"){
  media.say(text="Hi")
  media.say(text="Hello")
  media.say(text="G'day")
}

Note how pick random now has an early runtime implied storing of the callback actions and a late runtime choosing of which action to execute

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions