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

Support meta-nodes #20

Open
16 of 17 tasks
jkomoros opened this issue Jul 1, 2023 · 0 comments
Open
16 of 17 tasks

Support meta-nodes #20

jkomoros opened this issue Jul 1, 2023 · 0 comments

Comments

@jkomoros
Copy link
Owner

jkomoros commented Jul 1, 2023

Maybe meta-nodes should be seed packets, with a defined '' entrypoint

This can be covered (mostly) by having a let with a seed-reference to the sub-seed, and then the sub-seed uses var within. But that's confusing about ways to use it and which variables it expects to be set.

Perhaps some kind of special parameter on a seed that describes the environment it expects to be set? And then there can be some tooling to complain if those aren't set. (or it could just be convention, a utility seed of expect which takes an object, and then verifies that getting the var for each is not undefined.)

  • Needs keys
  • Needs let
  • Needs throw (to throw an error)
  • call
  • function
  • Test of call+ function
  • function has defaults
  • Make call.function be typed to only be allowed to be a seed function
  • Make call.function throw if the seed reference is not to a function
  • It should be that the arg list is explicitly expected to have arg: namespace (because var will have to have it so it's confusing)
  • Test function fails if args is not set
  • (Should call fail if the sub-object is not a function?)
  • example-utility#memorize-items should take this
  • example-utility#remove-numbers, remove-item-number should also take this
  • CLI should render functions differently
  • CLI should have a mode to print the parameters of a function
  • memorize-items should have memory be default

the convention is to pass parameters with an arg: prefix.

Ideally there'd be more than just convention, so there could be toolnig around it.

E.g. a call seed, which is basically a let-multi with a nested seed reference for block. And a function seed type that is basically an expect node but with a defined set of parameters and defaults. These don't do anything semantically except make it very clear to tooling what the intention is, allowing listing them as entrypoints, detecing missing parameters, etc.

function should have an array of arguments, prefixed with arg:, calle dargs. And defaults, which are a subset of args. And any that don't have defaults are required and will throw.

Should call require the arg: namespace or not?

jkomoros added a commit that referenced this issue Jul 9, 2023
It allows executing a seed reference that isn't bound until run-time.

This will be very useful for #20.

Part of #21.
jkomoros added a commit that referenced this issue Jul 9, 2023
jkomoros added a commit that referenced this issue Jul 15, 2023
It's useful when making meta-nodes, to check that variables that expected were set.

Part of #20. Part of #52.
jkomoros added a commit that referenced this issue Jul 23, 2023
jkomoros added a commit that referenced this issue Jul 23, 2023
jkomoros added a commit that referenced this issue Jul 23, 2023
jkomoros added a commit that referenced this issue Jul 29, 2023
Basically a `let-multi` but where you don't include a namespace in the names, and it's clearer the intent of the user.

Part of #20.
jkomoros added a commit that referenced this issue Jul 29, 2023
Just sketched in, not clear if it works yet.

Part of #20.
jkomoros added a commit that referenced this issue Jul 29, 2023
Now it's basically like `seeds/example-utility#expect` in that it's an array of expected parameters.

Part of #20.
jkomoros added a commit that referenced this issue Jul 29, 2023
The `var` references to arguments will need to include `arg` so it's better to be consistent.

Part of #20.
jkomoros added a commit that referenced this issue Jul 29, 2023
jkomoros added a commit that referenced this issue Jul 29, 2023
jkomoros added a commit that referenced this issue Jul 29, 2023
If set, it may be a subset of the enumerated arguments and if those values aren't set when called then it will set them to the default.

Part of #20.
jkomoros added a commit that referenced this issue Jul 29, 2023
jkomoros added a commit that referenced this issue Jul 29, 2023
… not of type function.

They'll also throw if it's not a seedReference.

Part of #20.
jkomoros added a commit that referenced this issue Jul 29, 2023
jkomoros added a commit that referenced this issue Jul 29, 2023
jkomoros added a commit that referenced this issue Jul 29, 2023
@jkomoros jkomoros reopened this Jul 30, 2023
jkomoros added a commit that referenced this issue Jul 30, 2023
It's no longer necessary now that we have `function`.

Part of #20. Part of #36.
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

1 participant